First public contribution.
1 // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
19 @internalComponent - Internal Symbian test code
29 #ifdef TEST_GRAPHICS_WSERV_TAUTOSERVER_NONNGA
30 #include "../nonnga/CLIENT/w32comm.h"
33 #ifdef TEST_GRAPHICS_WSERV_TAUTOSERVER_NGA
34 #include "../nga/CLIENT/w32comm.h"
37 #include "../tlib/testbase.h"
38 #include "TGraphicsHarness.h"
40 struct TWindowThreadParam
46 class CWinTestWindow : public CBlankWindow
49 CWinTestWindow(TRgb aCol);
51 void ConstructL(TPoint pos,TSize size,CTWinBase *parent, CWindowGc &aGc, TInt aDepth);
53 CWinTestWindow *iChild;
56 class CEvWindowGroup : public CTWindowGroup
59 static CEvWindowGroup* NewLC(CTClient* aClient,CTWsGraphicsBase* aTest);
60 CEvWindowGroup(CTClient* aClient,CTWsGraphicsBase* aTest);
61 void SetExpectedEvent(TInt aType);
62 void SendEvent(TInt aType);
63 //Virtual functions from CTWindowGroup
65 void UserEvent(TInt aEventType);
67 CTWsGraphicsBase* iTest;
69 TBool iExpectingEvent;
72 class CTWindowTest : public CTWsGraphicsBase
75 enum {EWinTypeFactor=1000};
83 enum TCorner {ECornerTL,ECornerTR,ECornerBL,ECornerBR};
85 CTWindowTest(CTestStep* aStep);
89 void CreateTestWindowL();
90 void CheckAndDestroyWindows();
91 void DestroyWindowWithActiveGc();
92 void DestroyWindowWithActiveGc2L();
93 void DrawWindows(CWinTestWindow *aWin);
94 void ClearRedraw(RWindow &aWindow, TRgb aRgb);
95 void TestInvalidFunctionsL();
96 void ShadowAutoClearTest();
97 void CreateMegaTree();
98 void TiledWindowTestL();
99 void TiledWindowTest2L();
102 void TestInvalidFunctions2L();
106 void TestDeletedParentPanics1L();
107 void TestDeletedParentPanics2L();
108 void BackColorBugL();
109 void FocusChangedL();
111 void FadeRegionsWithRedrawStoringL();
115 void doCornerTestsL();
116 void doCornerTest(TCornerType aCornerType, TInt aFlags);
117 void CheckCorner(TCorner aCorner, const TInt *aInsetList);
119 void TestWindowDelete();
120 void SaturateSendEvent();
121 void TestNotSupportedFunctionality();
123 //from CTGraphicsStep
124 virtual void RunTestCaseL(TInt aCurTestCase);
126 static TInt MoveGroup(TAny* aParam);
127 void DoFadeRegionsL(TBool aRedrawStoring);
129 CWinTestWindow *iWin;
130 CTBlankWindow *iBlankWin1;
131 CTBlankWindow *iBlankWin2;
132 CWsScreenDevice *iScreenDev;
133 TThreadStartUp iFirstFunction;
134 TWindowThreadParam iThreadParam;
137 class CTWindowTestStep : public CTGraphicsStep
142 //from CTGraphicsStep
143 virtual CTGraphicsBase* CreateTestL();
146 _LIT(KTWindowTestStep,"TWindowTest");