|
1 /* |
|
2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: EUnit unit test class for CAiStateProvider |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef _UT_AISTATEPROVIDER_H |
|
20 #define _UT_AISTATEPROVIDER_H |
|
21 |
|
22 // System includes |
|
23 #include <e32base.h> |
|
24 #include <digia/eunit/ceunittestsuiteclass.h> |
|
25 |
|
26 // User includes |
|
27 #include <aifwdefs.h> |
|
28 #include "aistateobserver.h" |
|
29 |
|
30 // Forward declarations |
|
31 class CAiStateProvider; |
|
32 class THsPublisherInfo; |
|
33 |
|
34 // Clas declaration |
|
35 NONSHARABLE_CLASS( UT_AiStateProvider ) : public CEUnitTestSuiteClass, |
|
36 public MAiStateObserver |
|
37 { |
|
38 public: |
|
39 // Constructors and destructors |
|
40 |
|
41 /** |
|
42 * Two phase construction |
|
43 */ |
|
44 static UT_AiStateProvider* NewL(); |
|
45 |
|
46 /** |
|
47 * Two phase construction |
|
48 */ |
|
49 static UT_AiStateProvider* NewLC(); |
|
50 |
|
51 /** |
|
52 * Destructor |
|
53 */ |
|
54 ~UT_AiStateProvider(); |
|
55 |
|
56 private: |
|
57 // Constructors and destructors |
|
58 |
|
59 UT_AiStateProvider(); |
|
60 |
|
61 void ConstructL(); |
|
62 |
|
63 private: |
|
64 // from MAiStateObserver |
|
65 |
|
66 /** |
|
67 * @see MAiStateObserver |
|
68 */ |
|
69 void NotifyStateChange( TAiFwState aState ); |
|
70 |
|
71 /** |
|
72 * @see MAiStateObserver |
|
73 */ |
|
74 void NotifyLoadPlugin( const TAiFwPublisherInfo& aInfo ); |
|
75 |
|
76 /** |
|
77 * @see MAiStateObserver |
|
78 */ |
|
79 void NotifyDestroyPlugin( const TAiFwPublisherInfo& aInfo ); |
|
80 |
|
81 /** |
|
82 * @see MAiStateObserver |
|
83 */ |
|
84 //void NotifyUpdatePlugins(); |
|
85 |
|
86 /** |
|
87 * Notifies to reload previously released plugins |
|
88 * |
|
89 * @since S60 5.2 |
|
90 */ |
|
91 void NotifyReloadPlugins(); |
|
92 |
|
93 /** |
|
94 * Notifies that defined ECom plugins should be released to enable |
|
95 * plugin upgrade |
|
96 * |
|
97 * @since S60 5.2 |
|
98 */ |
|
99 void NotifyReleasePlugins( const RArray<TUid>& aUidList ); |
|
100 |
|
101 private: |
|
102 // New methods |
|
103 |
|
104 void SetupL(); |
|
105 void Teardown(); |
|
106 |
|
107 void TestStartStopL(); |
|
108 void TestFgBgStateL(); |
|
109 void TestLightStateL(); |
|
110 void TestSkinChangeL(); |
|
111 void TestEcomRegistryChangeL(); |
|
112 void TestLoadDestroyPluginL(); |
|
113 void TestChangePluginStateL(); |
|
114 void TestBackupRestoreStateChangeL(); |
|
115 void SwiUidListEventL(); |
|
116 |
|
117 private: |
|
118 // data |
|
119 |
|
120 EUNIT_DECLARE_TEST_TABLE; |
|
121 |
|
122 CAiStateProvider* iProvider; |
|
123 |
|
124 TAiFwState iExpectedState; |
|
125 TBool iIgnoreNotifyStateChange; |
|
126 TBool iPluginsUpdated; |
|
127 |
|
128 }; |
|
129 |
|
130 #endif // _UT_AISTATEPROVIDER_H |
|
131 |
|
132 // End of file |