103
|
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".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
/**
|
|
17 |
@file
|
|
18 |
@test
|
|
19 |
@internalComponent - Internal Symbian test code
|
|
20 |
*/
|
|
21 |
|
|
22 |
#ifndef __TOOMDRAW_H__
|
|
23 |
#define __TOOMDRAW_H__
|
|
24 |
|
|
25 |
#include <e32std.h>
|
|
26 |
#include <w32std.h>
|
|
27 |
#include "../tlib/testbase.h"
|
|
28 |
#include "AUTO.H"
|
|
29 |
#include "TGraphicsHarness.h"
|
|
30 |
|
|
31 |
#define LOGGING yes //Log only failures
|
|
32 |
#if defined(LOGGING)
|
|
33 |
#define FULLLOGGING yes
|
|
34 |
#endif
|
|
35 |
|
|
36 |
class CTestWin : public CTWin
|
|
37 |
{
|
|
38 |
public:
|
|
39 |
CTestWin();
|
|
40 |
void Draw();
|
|
41 |
};
|
|
42 |
|
|
43 |
class CBaseTestWin : public CTBackedUpWin
|
|
44 |
{
|
|
45 |
public:
|
|
46 |
CBaseTestWin();
|
|
47 |
void Resized(const TSize &aNewSize);
|
|
48 |
};
|
|
49 |
|
|
50 |
class CToomDraw : public CTWsGraphicsBase
|
|
51 |
{
|
|
52 |
private:
|
|
53 |
enum {EMaxOOMState=150};
|
|
54 |
public:
|
|
55 |
CToomDraw(CTestStep* aStep);
|
|
56 |
~CToomDraw();
|
|
57 |
void ConstructL();
|
|
58 |
void CreateTestWinL();
|
|
59 |
void TriggerOomDrawsL(TInt aCount);
|
|
60 |
TBool CheckWindowsL();
|
|
61 |
void DeleteWindows();
|
|
62 |
protected:
|
|
63 |
//from CTGraphicsStep
|
|
64 |
virtual void RunTestCaseL(TInt aCurTestCase);
|
|
65 |
private:
|
|
66 |
TBool iDoCheck;
|
|
67 |
TSize iScrSize;
|
|
68 |
CTBlankWindow* iBlankWin;
|
|
69 |
CTestWin *iTestWin;
|
|
70 |
CBaseTestWin *iBaseWin;
|
|
71 |
CTestWin *iBackWin;
|
|
72 |
TInt iFails;
|
|
73 |
TInt iFailAt;
|
|
74 |
TInt iRetryCount;
|
|
75 |
TInt iState;
|
|
76 |
};
|
|
77 |
|
|
78 |
class CToomDrawStep : public CTGraphicsStep
|
|
79 |
{
|
|
80 |
public:
|
|
81 |
CToomDrawStep();
|
|
82 |
protected:
|
|
83 |
//from CTGraphicsStep
|
|
84 |
virtual CTGraphicsBase* CreateTestL();
|
|
85 |
};
|
|
86 |
|
|
87 |
_LIT(KToomDrawStep,"TOOMDRAW");
|
|
88 |
|
|
89 |
|
|
90 |
#endif
|