|
1 // Copyright (c) 2006-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 |
|
23 #if !defined(__TAUTOANSTEP_H__) |
|
24 #define __TAUTOANSTEP_H__ |
|
25 |
|
26 #include <w32adll.h> |
|
27 #include <w32std.h> |
|
28 #include <bmpancli.h> |
|
29 |
|
30 #include <test/testexecutestepbase.h> |
|
31 #include "TBmpAnimTestServer.h" |
|
32 #include "appfwk_tmsteststep.h" |
|
33 |
|
34 |
|
35 |
|
36 // structs and classes |
|
37 |
|
38 class CTestingData : public CBase |
|
39 { |
|
40 public: |
|
41 inline CTestingData(RAnimDll aAnimDll, RBitmapAnim aAnimation, RWindow aWindow); |
|
42 public: |
|
43 RAnimDll iAnimDll; |
|
44 RBitmapAnim iAnimation; |
|
45 RWindow iWindow; |
|
46 }; |
|
47 |
|
48 inline CTestingData::CTestingData(RAnimDll aAnimDll, RBitmapAnim aAnimation, RWindow aWindow) |
|
49 : iAnimDll(aAnimDll), iAnimation(aAnimation), iWindow(aWindow) |
|
50 {} |
|
51 |
|
52 class CTAutoAnStep : public CTmsTestStep |
|
53 { |
|
54 public: |
|
55 CTAutoAnStep(); |
|
56 ~CTAutoAnStep(); |
|
57 virtual TVerdict doTestStepL(); |
|
58 void Test1L(CTestingData* aTestingData); |
|
59 void Test2L(CTestingData* aTestingData); |
|
60 static CBitmapAnimClientData* CreateClientDataL(); |
|
61 void CreatedAndCloseAnimationsL(CTestingData* aTestingData); |
|
62 void TestNegativeFrameIntervalL(); |
|
63 // Series60 Specific Test |
|
64 static void TestStartAnimationAndKeepLastFrameL(CTestingData* aTestingData); |
|
65 private: |
|
66 void ExcuteTestCodeL(); |
|
67 void TestWindowConstructL(RBitmapAnim& aAnimation,RWindow& aWindow,CBitmapAnimClientData* aClientData); |
|
68 }; |
|
69 |
|
70 |
|
71 class CWsClient |
|
72 { |
|
73 public: |
|
74 // construct/destruct |
|
75 CWsClient(); |
|
76 void ConstructL(); |
|
77 ~CWsClient(); |
|
78 // terminate cleanly |
|
79 void Exit(); |
|
80 inline RWsSession WindowSession(); |
|
81 inline RWindowGroup WindowGroup(); |
|
82 private: |
|
83 RWsSession iWs; |
|
84 RWindowGroup iGroup; |
|
85 }; |
|
86 |
|
87 |
|
88 inline RWsSession CWsClient::WindowSession() |
|
89 { return iWs; } |
|
90 inline RWindowGroup CWsClient::WindowGroup() |
|
91 { return iGroup; } |
|
92 |
|
93 // |
|
94 // RTestBitmapAnim used to test Series60 specific changes |
|
95 // |
|
96 |
|
97 class RTestBitmapAnim : public RBitmapAnim |
|
98 { |
|
99 public: |
|
100 RTestBitmapAnim(RAnimDll& aAnimDll); |
|
101 |
|
102 void StartAndKeepLastFrameL(); |
|
103 }; |
|
104 |
|
105 _LIT(KTAutoAnStep,"TAutoAn"); |
|
106 #endif |
|
107 |
|
108 |