|
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 __TSCRDEV_H__ |
|
23 #define __TSCRDEV_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 class CTScreenDevice : public CTWsGraphicsBase |
|
32 { |
|
33 public: |
|
34 CTScreenDevice(CTestStep* aStep); |
|
35 ~CTScreenDevice(); |
|
36 void ConstructL(); |
|
37 void TestTwipPixelConversions(); |
|
38 void TestTwipPixelOverflow(); |
|
39 void TwipsCacheFlushL(); |
|
40 void CheckBitmapL(CFbsBitmap *aBitmap, const TRect &aRect); |
|
41 void TestScreenToBitmap(); |
|
42 protected: |
|
43 virtual void RunTestCaseL(TInt aCurTestCase); |
|
44 private: |
|
45 void doTestScreenToBitmapL(); |
|
46 }; |
|
47 |
|
48 class CTScreenDeviceStep : public CTGraphicsStep |
|
49 { |
|
50 public: |
|
51 CTScreenDeviceStep(); |
|
52 protected: |
|
53 //from CTGraphicsStep |
|
54 virtual CTGraphicsBase* CreateTestL(); |
|
55 }; |
|
56 |
|
57 class CCachePanic : public CBase |
|
58 { |
|
59 protected: |
|
60 CCachePanic() |
|
61 { |
|
62 }; |
|
63 ~CCachePanic(); |
|
64 virtual void TestL(); |
|
65 void ConstructL(TInt aScreenNumber, TInt aInt); |
|
66 static TInt DoTest(CCachePanic* aTestClass); |
|
67 |
|
68 protected: |
|
69 RWsSession iWs; |
|
70 CWsScreenDevice* iWsScrDev; |
|
71 TInt iScreenNumber; |
|
72 TInt iInt; |
|
73 }; |
|
74 |
|
75 class CTwipsPanic : public CCachePanic |
|
76 { |
|
77 public: |
|
78 static TInt RunTest(TInt aInt, TAny* aPtr); |
|
79 |
|
80 private: |
|
81 virtual void TestL(); |
|
82 }; |
|
83 |
|
84 class CScanLinePanic : public CCachePanic |
|
85 { |
|
86 public: |
|
87 enum ScanLineTestCases |
|
88 { |
|
89 TESTCASE_GRAPHICS_WSERV_0473 = 0, |
|
90 TESTCASE_GRAPHICS_WSERV_0474 |
|
91 }; |
|
92 public: |
|
93 static TInt RunTest(TInt aInt, TAny* aPtr); |
|
94 |
|
95 private: |
|
96 virtual void TestL(); |
|
97 |
|
98 // Methods for test cases go here |
|
99 private: |
|
100 void TestLengthInvariant(); |
|
101 void TestBufferInvariant(); |
|
102 |
|
103 }; |
|
104 |
|
105 _LIT(KTScreenDeviceStep,"TScreenDevice"); |
|
106 |
|
107 #endif |