First public contribution.
2 // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
3 // All rights reserved.
4 // This component and the accompanying materials are made available
5 // under the terms of "Eclipse Public License v1.0"
6 // which accompanies this distribution, and is available
7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 // Initial Contributors:
10 // Nokia Corporation - initial contribution.
20 @internalComponent - Internal Symbian test code
23 #ifndef __TWSGRAPHS_H__
24 #define __TWSGRAPHS_H__
28 #include "../tlib/testbase.h"
30 #include "W32STDGRAPHIC.H"
33 #include "TGraphicsHarness.h"
34 #include "wsframerate.h"
35 #include "wscontaindrawer.h"
36 #include "wssimpledrawer.h"
41 class CCrWin: public CBase
44 static CCrWin* NewL(TInt aScreenId,TBool aDraw=ETrue);
47 void DrawSecondHalf();
48 void DrawGraphic(TInt aWsId=0);
49 void SetTextCursor(const TPoint &aPos, const TTextCursor &aCursor);
50 void CancelTextCursor();
52 void ConstructL(TInt aScreenId,TBool aDraw);
56 CWsScreenDevice* iScr;
62 class CCrAlphaWin: public CBase
65 static CCrAlphaWin* NewL(TInt aScreenId);
68 void ConstructL(TInt aScreenId);
71 CWsScreenDevice* iScr;
76 class CTWsGraphs : public CTWsGraphicsBase
81 ETestStandardTextCursor,
85 CTWsGraphs(CTestStep* aStep);
88 public: // list of test cases
89 void LaunchNewProcess(const TDesC& aExecutable);
92 virtual void RunTestCaseL(TInt aCurTestCase);
95 #ifdef TEST_GRAPHICS_WSERV_TAUTOSERVER_NONNGA
96 TestState TestInterfaceExtensionL();
97 TestState TestScreenRedirectionL();
98 TestState TestTextCursorUnderRedirectionL(TTestCursorType aCursorType);
99 TestState TestFlickerRedirectionL();
100 TestState TestRedirectionUsingWsBackBufferL();
101 void TestScreenModeChangeL();
103 TestState TestEventNotificationL();
104 void TestAddSwapGDArrayL();
105 TestState TestSuccessiveMessageL();
106 void ReportNegativeResultfail(TInt aLine,TInt aResult,TInt aExpectedResult);
107 void DoTestLeakInServiceL();
108 void TestNestedDrawerCRP();
110 void TestNotifyRemoval();
111 TestState TestWindowGroupChangeL();
112 TestState TestFrameRateL();
113 static TInt PluginCallBack(TAny* aArg);
114 void CreateWindowL(TBool aDraw=ETrue);
115 void DestroyWindowL();
116 void CreateAlphaWindowL();
117 void DestroyAlphaWindowL();
118 TBool CompareBitmapArea16Bpp(CFbsBitmap* aBmp1, const TPoint& aPos1, CFbsBitmap* aBmp2, const TPoint& aPos2, const TSize& aSize);
120 TBool PosTestAddSwapGDArrayL(TInt testcase);
122 TBool NegTestAddSwapGDArrayL(TInt failcase,WrapTestCall*aWrappedParams=NULL);
123 static TInt DoNegTestCall(TInt /*aInt*/, TAny *aPtr);
124 TBool LaunchNegTestCall(TUint aTestCount,TUint aPanicCode,const TDesC &aPanicCategory);
125 TestState TestGraphicDrawerCoverage();
126 // For WsBuffer CRP tests
127 #ifdef TEST_GRAPHICS_WSERV_TAUTOSERVER_NGA
128 void TestMWsUiBufferL();
129 TBool IsWhiteLine(TInt aWhiteLinePos);
133 #ifdef TEST_GRAPHICS_WSERV_TAUTOSERVER_NONNGA
135 CFbsBitmap* iFrontCopy;
136 CFbsBitmap* iBackCopy;
137 TRedirectorInfo iRedirInfo;
140 TTextCursor iTextCursor;
141 RArray<TSpriteMember> iSpriteMemberArray;
146 TListenerInfo iListenInfo;
150 TInt iOriginalWindowGroupId;
152 CGraphicTestFrameRate* iTestframerate;
153 TAnimRate iAnimCount;
154 CWsGdCoverage* iGdCoverage;
157 class CTWsGraphsStep : public CTGraphicsStep
163 //from CTGraphicsStep
164 virtual CTGraphicsBase* CreateTestL();
169 _LIT(KTWsGraphsStep,"TWsGraphs");