1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/windowing/windowserver/test/tauto/TOOMDRAW.H Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,90 @@
1.4 +// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +/**
1.20 + @file
1.21 + @test
1.22 + @internalComponent - Internal Symbian test code
1.23 +*/
1.24 +
1.25 +#ifndef __TOOMDRAW_H__
1.26 +#define __TOOMDRAW_H__
1.27 +
1.28 +#include <e32std.h>
1.29 +#include <w32std.h>
1.30 +#include "../tlib/testbase.h"
1.31 +#include "AUTO.H"
1.32 +#include "TGraphicsHarness.h"
1.33 +
1.34 +#define LOGGING yes //Log only failures
1.35 +#if defined(LOGGING)
1.36 + #define FULLLOGGING yes
1.37 +#endif
1.38 +
1.39 +class CTestWin : public CTWin
1.40 + {
1.41 +public:
1.42 + CTestWin();
1.43 + void Draw();
1.44 + };
1.45 +
1.46 +class CBaseTestWin : public CTBackedUpWin
1.47 + {
1.48 +public:
1.49 + CBaseTestWin();
1.50 + void Resized(const TSize &aNewSize);
1.51 + };
1.52 +
1.53 +class CToomDraw : public CTWsGraphicsBase
1.54 + {
1.55 +private:
1.56 + enum {EMaxOOMState=150};
1.57 +public:
1.58 + CToomDraw(CTestStep* aStep);
1.59 + ~CToomDraw();
1.60 + void ConstructL();
1.61 + void CreateTestWinL();
1.62 + void TriggerOomDrawsL(TInt aCount);
1.63 + TBool CheckWindowsL();
1.64 + void DeleteWindows();
1.65 +protected:
1.66 +//from CTGraphicsStep
1.67 + virtual void RunTestCaseL(TInt aCurTestCase);
1.68 +private:
1.69 + TBool iDoCheck;
1.70 + TSize iScrSize;
1.71 + CTBlankWindow* iBlankWin;
1.72 + CTestWin *iTestWin;
1.73 + CBaseTestWin *iBaseWin;
1.74 + CTestWin *iBackWin;
1.75 + TInt iFails;
1.76 + TInt iFailAt;
1.77 + TInt iRetryCount;
1.78 + TInt iState;
1.79 + };
1.80 +
1.81 +class CToomDrawStep : public CTGraphicsStep
1.82 + {
1.83 +public:
1.84 + CToomDrawStep();
1.85 +protected:
1.86 + //from CTGraphicsStep
1.87 + virtual CTGraphicsBase* CreateTestL();
1.88 + };
1.89 +
1.90 +_LIT(KToomDrawStep,"TOOMDRAW");
1.91 +
1.92 +
1.93 +#endif