|
1 // Copyright (c) 2007-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 #if !defined(__TMULTIPLESCREENS_STEP_H__) |
|
23 #define __TMULTIPLESCREENS_STEP_H__ |
|
24 |
|
25 #include <coemain.h> |
|
26 #include <coecntrl.h> |
|
27 #include <coeaui.h> |
|
28 #include <test/testexecutestepbase.h> |
|
29 #include "TConeTestServer.h" |
|
30 #include "appfwk_test_AppUi.h" |
|
31 #include <w32std.h> |
|
32 |
|
33 _LIT(KTMultipleScreensStep,"TMultipleScreens"); |
|
34 _LIT(KExeName, "z:\\sys\\bin\\TMulScreensApp.EXE"); |
|
35 _LIT(KImagePath,"z:\\conetest\\display.mbm"); |
|
36 |
|
37 class CTMultipleScreensStep : public CTmsTestStep |
|
38 { |
|
39 public: |
|
40 CTMultipleScreensStep(); |
|
41 ~CTMultipleScreensStep(); |
|
42 virtual TVerdict doTestStepL(); |
|
43 void ConstructAppL(CCoeEnv* aCoe); |
|
44 }; |
|
45 |
|
46 class CTImageControl : public CCoeControl |
|
47 { |
|
48 public: |
|
49 CTImageControl(CFbsBitmap& aBitmap); |
|
50 ~CTImageControl(); |
|
51 static CTImageControl* NewL(RWindowGroup& aWindow,CFbsBitmap& aBitmap); |
|
52 private: // framework |
|
53 void ConstructL(RWindowGroup& aWindow); |
|
54 void Draw(const TRect& aRect) const; |
|
55 private: |
|
56 CFbsBitmap& iBitmap; |
|
57 }; |
|
58 |
|
59 class CTMultipleScreensAppUi : public CTestCoeAppUi |
|
60 { |
|
61 public: |
|
62 CTMultipleScreensAppUi(CTmsTestStep* aStep); |
|
63 ~CTMultipleScreensAppUi(); |
|
64 void TestDrawOnFirstScreenL(); |
|
65 void TestDrawOnSecondScreenL(); |
|
66 void TestNumberOfScreens(); |
|
67 void StartProcessL(const TDesC8& aTailEnd); |
|
68 void TestInvalidScreenNumberL(); |
|
69 void CompareL(TInt aScreenNumber); |
|
70 public: // from CCoeAppUi |
|
71 void ConstructL(); |
|
72 private: |
|
73 void RunTestStepL(TInt aStepNum); |
|
74 private: |
|
75 TInt iNumScreens; |
|
76 CTImageControl* iFstControl; |
|
77 CTImageControl* iSndControl; |
|
78 CFbsBitmap* iBitmap; |
|
79 }; |
|
80 |
|
81 #endif |