|
1 // Copyright (c) 2008-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 |
|
20 */ |
|
21 |
|
22 #include "twservscreenconstructstepload.h" |
|
23 #include <test/tefunit.h> |
|
24 #include <e32const.h> //KNullUidValue |
|
25 #include <gdi.h> |
|
26 |
|
27 /** |
|
28 Constructor of CTWServScreenConstructStepLoad |
|
29 */ |
|
30 CTWServScreenConstructStepLoad::CTWServScreenConstructStepLoad() |
|
31 { |
|
32 SetTestStepName(KTWServScreenConstructStepLoad); |
|
33 } |
|
34 |
|
35 /** |
|
36 Destructor of CTWServScreenConstructStepLoad |
|
37 */ |
|
38 CTWServScreenConstructStepLoad::~CTWServScreenConstructStepLoad() |
|
39 { |
|
40 delete iGc; |
|
41 delete iScreen; |
|
42 iWinGroup.Close(); |
|
43 iWsSession.Flush(); |
|
44 iWsSession.Close(); |
|
45 } |
|
46 |
|
47 /** |
|
48 Overrides test step preamble. |
|
49 */ |
|
50 enum TVerdict CTWServScreenConstructStepLoad::doTestStepPreambleL() |
|
51 { |
|
52 TVerdict ret = CTestStep::doTestStepPreambleL(); |
|
53 |
|
54 User::LeaveIfError(iWsSession.Connect()); |
|
55 |
|
56 iScreen = new (ELeave) CWsScreenDevice(iWsSession); |
|
57 User::LeaveIfError(iScreen->Construct()); |
|
58 iWinGroup = RWindowGroup(iWsSession); |
|
59 User::LeaveIfError(iWinGroup.Construct(KNullWsHandle, iScreen)); |
|
60 iWinGroup.AutoForeground(ETrue); |
|
61 iGc = new (ELeave) CWindowGc(iScreen); |
|
62 User::LeaveIfError(iGc->Construct()); |
|
63 |
|
64 return ret; |
|
65 } |
|
66 |
|
67 /** |
|
68 Overrides test step prostamble. |
|
69 */ |
|
70 enum TVerdict CTWServScreenConstructStepLoad::doTestStepPostambleL() |
|
71 { |
|
72 return TestStepResult(); |
|
73 } |
|
74 |
|
75 /** |
|
76 Starts test step |
|
77 @return TVerdict pass / fail |
|
78 */ |
|
79 enum TVerdict CTWServScreenConstructStepLoad::doTestStepL() |
|
80 { |
|
81 return TestStepResult(); |
|
82 } |