First public contribution.
2 // Copyright (c) 1996-2010 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
28 #include "../tlib/testbase.h"
31 #include "TGraphicsHarness.h"
35 EPanicRedrawModeBackedUpWindow, // Draw to a RBackedUpWindow; no BeginRedraw()/EndRedraw() needed
36 EPanicRedrawModeNormalRedraw, // Draw in a redraw
37 EPanicRedrawModeTransRedraw, // Draw to a window under a transparent window in a redraw
38 EPanicRedrawModeInvisRedraw, // Draw to an invisible window in a redraw
41 class CTPanic : public CTWsGraphicsBase
48 TPanicRedrawMode iRedrawMode;
52 enum TCancelCaptureType
55 ECancelCaptureKeyUpAndDowns,
59 CTPanic(CTestStep* aStep);
63 void TestDeletedParentPanicsL();
64 void TestScreenDevicePanicsL();
65 void TestGraphicsPanicsL(TClientPanic aExitReason, TInt aIndex, CTPanic::TPanicParams* aPanicParams);
66 void TestGraphicsPanicsL();
67 void TestGraphicsPanicsL(TPanicRedrawMode aRedrawMode);
68 void TestMiscPanicsL();
69 void TestComputeModePanicsL();
70 void TestCaptureKeyPanicsL();
71 void TestEventPanicsL();
72 void TestTPtrPanicsL();
73 void TestOpcodePanicsL();
74 void TestMultiInitPanicL();
75 void TestSpritePanicsL();
76 void TestMoveToGroupPanicsL();
77 void TestHandleReUseL();
78 void TestDeleteScreenPanicL();
79 void TestWinHandleErrors();
80 void TestGetEventErrors();
81 void TestUnInitPanicL();
82 void TestAlphaBlendingPanicL();
83 void TestDoubleConstructionL();
84 void TestDoubleConstructionNoPanic();
85 void TestSpriteActivatePanicL();
86 #ifdef TEST_GRAPHICS_WSERV_TAUTOSERVER_NGA
87 void TestNonRedrawRedrawerL();
89 void TestMismatchedCaptureCancelPanicL();
91 void TestEnableAdvancePointerActivatePanicL();
94 virtual void RunTestCaseL(TInt aCurTestCase);
99 class CTPanicStep : public CTGraphicsStep
104 //from CTGraphicsStep
105 virtual CTGraphicsBase* CreateTestL();
108 _LIT(KTPanicStep,"TPanic");
110 class RUnInitalisedConnect : public RSessionBase
113 TInt Connect(const TDesC &aName, const TVersion &aVersion);
114 TInt Send(const TInt aMsg);
117 #ifdef TEST_GRAPHICS_WSERV_TAUTOSERVER_NGA
118 class CNonRedrawWin : public CBase{
121 static CNonRedrawWin* NewL(RWsSession &aSession, CWindowGc *aGc);
122 virtual void Redraw();
123 RWsSession &GetSession();
127 CNonRedrawWin(RWsSession &aSession, CWindowGc *aGc);
130 class CRedrawer : public CActive{
132 CRedrawer(CNonRedrawWin* aWd);
135 void HandleReDrawEvent();
138 void HandleRedrawEvent();
145 RWsSession &iSession;
150 CRedrawer *iRedrawer;