sl@0
|
1 |
|
sl@0
|
2 |
// Copyright (c) 1996-2010 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
// All rights reserved.
|
sl@0
|
4 |
// This component and the accompanying materials are made available
|
sl@0
|
5 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
6 |
// which accompanies this distribution, and is available
|
sl@0
|
7 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
//
|
sl@0
|
9 |
// Initial Contributors:
|
sl@0
|
10 |
// Nokia Corporation - initial contribution.
|
sl@0
|
11 |
//
|
sl@0
|
12 |
// Contributors:
|
sl@0
|
13 |
//
|
sl@0
|
14 |
// Description:
|
sl@0
|
15 |
//
|
sl@0
|
16 |
|
sl@0
|
17 |
/**
|
sl@0
|
18 |
@file
|
sl@0
|
19 |
@test
|
sl@0
|
20 |
@internalComponent - Internal Symbian test code
|
sl@0
|
21 |
*/
|
sl@0
|
22 |
|
sl@0
|
23 |
#ifndef __TPANIC_H__
|
sl@0
|
24 |
#define __TPANIC_H__
|
sl@0
|
25 |
|
sl@0
|
26 |
#include <e32std.h>
|
sl@0
|
27 |
#include <w32std.h>
|
sl@0
|
28 |
#include "../tlib/testbase.h"
|
sl@0
|
29 |
#include "AUTO.H"
|
sl@0
|
30 |
#include "AUTODLL.H"
|
sl@0
|
31 |
#include "TGraphicsHarness.h"
|
sl@0
|
32 |
|
sl@0
|
33 |
enum TPanicRedrawMode
|
sl@0
|
34 |
{
|
sl@0
|
35 |
EPanicRedrawModeBackedUpWindow, // Draw to a RBackedUpWindow; no BeginRedraw()/EndRedraw() needed
|
sl@0
|
36 |
EPanicRedrawModeNormalRedraw, // Draw in a redraw
|
sl@0
|
37 |
EPanicRedrawModeTransRedraw, // Draw to a window under a transparent window in a redraw
|
sl@0
|
38 |
EPanicRedrawModeInvisRedraw, // Draw to an invisible window in a redraw
|
sl@0
|
39 |
};
|
sl@0
|
40 |
|
sl@0
|
41 |
class CTPanic : public CTWsGraphicsBase
|
sl@0
|
42 |
{
|
sl@0
|
43 |
public:
|
sl@0
|
44 |
struct TPanicParams
|
sl@0
|
45 |
{
|
sl@0
|
46 |
public:
|
sl@0
|
47 |
TInt iScreen;
|
sl@0
|
48 |
TPanicRedrawMode iRedrawMode;
|
sl@0
|
49 |
TInt iSubTest;
|
sl@0
|
50 |
};
|
sl@0
|
51 |
|
sl@0
|
52 |
enum TCancelCaptureType
|
sl@0
|
53 |
{
|
sl@0
|
54 |
ECancelCaptureKey,
|
sl@0
|
55 |
ECancelCaptureKeyUpAndDowns,
|
sl@0
|
56 |
ECancelCaptureLongKey
|
sl@0
|
57 |
};
|
sl@0
|
58 |
public:
|
sl@0
|
59 |
CTPanic(CTestStep* aStep);
|
sl@0
|
60 |
~CTPanic();
|
sl@0
|
61 |
void ConstructL();
|
sl@0
|
62 |
private:
|
sl@0
|
63 |
void TestDeletedParentPanicsL();
|
sl@0
|
64 |
void TestScreenDevicePanicsL();
|
sl@0
|
65 |
void TestGraphicsPanicsL(TClientPanic aExitReason, TInt aIndex, CTPanic::TPanicParams* aPanicParams);
|
sl@0
|
66 |
void TestGraphicsPanicsL();
|
sl@0
|
67 |
void TestGraphicsPanicsL(TPanicRedrawMode aRedrawMode);
|
sl@0
|
68 |
void TestMiscPanicsL();
|
sl@0
|
69 |
void TestComputeModePanicsL();
|
sl@0
|
70 |
void TestCaptureKeyPanicsL();
|
sl@0
|
71 |
void TestEventPanicsL();
|
sl@0
|
72 |
void TestTPtrPanicsL();
|
sl@0
|
73 |
void TestOpcodePanicsL();
|
sl@0
|
74 |
void TestMultiInitPanicL();
|
sl@0
|
75 |
void TestSpritePanicsL();
|
sl@0
|
76 |
void TestMoveToGroupPanicsL();
|
sl@0
|
77 |
void TestHandleReUseL();
|
sl@0
|
78 |
void TestDeleteScreenPanicL();
|
sl@0
|
79 |
void TestWinHandleErrors();
|
sl@0
|
80 |
void TestGetEventErrors();
|
sl@0
|
81 |
void TestUnInitPanicL();
|
sl@0
|
82 |
void TestAlphaBlendingPanicL();
|
sl@0
|
83 |
void TestDoubleConstructionL();
|
sl@0
|
84 |
void TestDoubleConstructionNoPanic();
|
sl@0
|
85 |
void TestSpriteActivatePanicL();
|
sl@0
|
86 |
#ifdef TEST_GRAPHICS_WSERV_TAUTOSERVER_NGA
|
sl@0
|
87 |
void TestNonRedrawRedrawerL();
|
sl@0
|
88 |
#endif
|
sl@0
|
89 |
void TestMismatchedCaptureCancelPanicL();
|
sl@0
|
90 |
void LogHeapInfo();
|
sl@0
|
91 |
void TestEnableAdvancePointerActivatePanicL();
|
sl@0
|
92 |
protected:
|
sl@0
|
93 |
//from CTGraphicsStep
|
sl@0
|
94 |
virtual void RunTestCaseL(TInt aCurTestCase);
|
sl@0
|
95 |
private:
|
sl@0
|
96 |
TSize iWinSize;
|
sl@0
|
97 |
};
|
sl@0
|
98 |
|
sl@0
|
99 |
class CTPanicStep : public CTGraphicsStep
|
sl@0
|
100 |
{
|
sl@0
|
101 |
public:
|
sl@0
|
102 |
CTPanicStep();
|
sl@0
|
103 |
protected:
|
sl@0
|
104 |
//from CTGraphicsStep
|
sl@0
|
105 |
virtual CTGraphicsBase* CreateTestL();
|
sl@0
|
106 |
};
|
sl@0
|
107 |
|
sl@0
|
108 |
_LIT(KTPanicStep,"TPanic");
|
sl@0
|
109 |
|
sl@0
|
110 |
class RUnInitalisedConnect : public RSessionBase
|
sl@0
|
111 |
{
|
sl@0
|
112 |
public:
|
sl@0
|
113 |
TInt Connect(const TDesC &aName, const TVersion &aVersion);
|
sl@0
|
114 |
TInt Send(const TInt aMsg);
|
sl@0
|
115 |
};
|
sl@0
|
116 |
|
sl@0
|
117 |
#ifdef TEST_GRAPHICS_WSERV_TAUTOSERVER_NGA
|
sl@0
|
118 |
class CNonRedrawWin : public CBase{
|
sl@0
|
119 |
public:
|
sl@0
|
120 |
~CNonRedrawWin();
|
sl@0
|
121 |
static CNonRedrawWin* NewL(RWsSession &aSession, CWindowGc *aGc);
|
sl@0
|
122 |
virtual void Redraw();
|
sl@0
|
123 |
RWsSession &GetSession();
|
sl@0
|
124 |
void Invalidate();
|
sl@0
|
125 |
|
sl@0
|
126 |
protected:
|
sl@0
|
127 |
CNonRedrawWin(RWsSession &aSession, CWindowGc *aGc);
|
sl@0
|
128 |
void ConstrucL();
|
sl@0
|
129 |
|
sl@0
|
130 |
class CRedrawer : public CActive{
|
sl@0
|
131 |
public:
|
sl@0
|
132 |
CRedrawer(CNonRedrawWin* aWd);
|
sl@0
|
133 |
~CRedrawer();
|
sl@0
|
134 |
private:
|
sl@0
|
135 |
void HandleReDrawEvent();
|
sl@0
|
136 |
void RunL();
|
sl@0
|
137 |
void DoCancel();
|
sl@0
|
138 |
void HandleRedrawEvent();
|
sl@0
|
139 |
|
sl@0
|
140 |
private:
|
sl@0
|
141 |
CNonRedrawWin* iWd;
|
sl@0
|
142 |
};
|
sl@0
|
143 |
|
sl@0
|
144 |
private:
|
sl@0
|
145 |
RWsSession &iSession;
|
sl@0
|
146 |
RWindowGroup iWdGrp;
|
sl@0
|
147 |
RWindow iWd;
|
sl@0
|
148 |
CWindowGc *iGc;
|
sl@0
|
149 |
|
sl@0
|
150 |
CRedrawer *iRedrawer;
|
sl@0
|
151 |
|
sl@0
|
152 |
};
|
sl@0
|
153 |
#endif
|
sl@0
|
154 |
|
sl@0
|
155 |
#endif
|