|
1 // Copyright (c) 1997-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 #if !defined(__TAUTO_H__) |
|
17 #define __TAUTO_H__ |
|
18 |
|
19 |
|
20 #include <bitdev.h> |
|
21 #include <test/testexecutestepbase.h> |
|
22 #include "TGraphicsHarness.h" |
|
23 |
|
24 const TInt KNumRects = 8; |
|
25 |
|
26 |
|
27 class CTAuto : public CTGraphicsBase |
|
28 { |
|
29 public: |
|
30 CTAuto(CTestStep* aStep); |
|
31 ~CTAuto(); |
|
32 |
|
33 protected: |
|
34 //from CTGraphicsStep |
|
35 virtual void RunTestCaseL(TInt aCurTestCase); |
|
36 |
|
37 private: // Memory testing |
|
38 void TestMem(TDisplayMode aDispMode); |
|
39 void ScreenDevice(TDisplayMode aDispMode); |
|
40 void BitmapDevice(TDisplayMode aDispMode); |
|
41 void LowLevelDevice(TDisplayMode aDispMode,TBool aScreen); |
|
42 private: // Color mapping testing |
|
43 void TestMapL(TDisplayMode aDispMode,TInt aShadowFactor); |
|
44 void Clear(TRgb aColor); |
|
45 void TestMapColors(); |
|
46 void TestShadowArea(TInt aShadowFactor); |
|
47 void TestFadeArea(); |
|
48 void DoTestFadeArea(TUint8 aBlackMap,TUint8 aWhiteMap); |
|
49 void DoTestFadeArea(TRgb aColor,TRgb aFadedColor); |
|
50 TRgb FadeColor(TRgb aColor,TInt aBlackMap,TInt aWhiteMap); |
|
51 TRgb MapColorToDisplayMode(TRgb aColor); |
|
52 private: // Bitmap drawing testing |
|
53 void TestBmpL(TDisplayMode aDispMode); |
|
54 void TestGc(CFbsBitGc* aGc,const TSize& aSize); |
|
55 void Colors(CFbsBitGc* aGc,const TSize& aSize); |
|
56 void Shapes(CFbsBitGc* aGc,const TSize& aSize); |
|
57 private:// Bitmap Fading Testing |
|
58 void TestFadingL(); |
|
59 private: // Panic testing |
|
60 void TestPanics(); |
|
61 void StartThread(TInt aOption); |
|
62 private: |
|
63 CFbsScreenDevice* iScreenDevice; |
|
64 CFbsBitGc* iScreenGc; |
|
65 TSize iHalfScreen; |
|
66 TRect iTestRect[KNumRects]; |
|
67 }; |
|
68 |
|
69 class CTAutoStep : public CTGraphicsStep |
|
70 { |
|
71 public: |
|
72 CTAutoStep(); |
|
73 protected: |
|
74 //from CTGraphicsStep |
|
75 virtual CTGraphicsBase* CreateTestL(); |
|
76 virtual void TestSetupL(); |
|
77 virtual void TestClose(); |
|
78 }; |
|
79 |
|
80 _LIT(KTAutoStep,"TAuto"); |
|
81 |
|
82 #endif |