|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <QtTest/QtTest> |
|
20 #include <QObject> |
|
21 |
|
22 #include <HbMainWindow.h> |
|
23 |
|
24 class CaService; |
|
25 |
|
26 class TestHsDomainModel : public QObject |
|
27 { |
|
28 Q_OBJECT |
|
29 |
|
30 private slots: |
|
31 void init(); |
|
32 void cleanup(); |
|
33 void initTestCase(); |
|
34 void cleanupTestCase(); |
|
35 |
|
36 //t_hswidgethostvisual |
|
37 void testHsWidgetHostVisualConstruction(); |
|
38 void testHsWidgetHostVisualShape(); |
|
39 void testHsWidgetHostVisualSetWidget(); |
|
40 void testHsWidgetHostVisualSetVisualModel(); |
|
41 void testHsWidgetHostVisualEffects(); |
|
42 void testHsWidgetHostVisualEventFilter(); |
|
43 void testHsWidgetHostVisualGestureEvent(); |
|
44 void testHsWidgetHostVisualSetupTouchArea(); |
|
45 void testHsWidgetHostVisualSetupEffects(); |
|
46 void testHsWidgetHostVisualSetNewSize(); |
|
47 |
|
48 //t_hsidlewidget |
|
49 void testIdleWidgetConstruction(); |
|
50 void testIdleWidgetSetGeometry(); |
|
51 void testIdleWidgetSetSceneX(); |
|
52 void testIdleWidgetSetActivePage(); |
|
53 void testIdleWidgetInsertPage(); |
|
54 void testIdleWidgetRemovePage(); |
|
55 void testIdleWidgetLayers(); |
|
56 void testIdleWidgetTrashbin(); |
|
57 void testIdleWidgetPageIndicator(); |
|
58 void testIdleWidgetParallaxFactor(); |
|
59 void testIdleWidgetShowTrashBin(); |
|
60 void testIdleWidgetShowPageIndicator(); |
|
61 void testIdleWidgetShowSnapLines(); |
|
62 void testIdleWidgetPolishEvent(); |
|
63 |
|
64 // testshortcutservice.cpp |
|
65 void testShortcutService(); |
|
66 |
|
67 //t_hsdatabase.cpp |
|
68 void testHsDatabaseConstruction(); |
|
69 void testHsDatabaseProperties(); |
|
70 void testHsDatabaseStaticInterface(); |
|
71 void testHsDatabaseTransaction(); |
|
72 void testHsDatabaseSceneMethods(); |
|
73 void testHsDatabasePageMethods(); |
|
74 void testHsDatabaseWidgetMethods(); |
|
75 void testHsDatabaseWidgetPreferenceMethods(); |
|
76 void testHsDatabaseBadConnection(); |
|
77 void testHsDatabaseMatchWidgetsPreferences_data(); |
|
78 void testHsDatabaseMatchWidgetsPreferences(); |
|
79 void testHsDatabaseWidgetsCount(); |
|
80 void testHsDatabaseUpdateWidgetZValues(); |
|
81 |
|
82 //t_hswidgethost.cpp |
|
83 void testHsWidgetHostConstruction(); |
|
84 void testHsWidgetHostStateMachine(); |
|
85 void testHsWidgetHostCloseAndRemove(); |
|
86 void testHsWidgetHostPage(); |
|
87 void testHsWidgetHostEffects(); |
|
88 void testHsWidgetHostShowAndHideActions(); |
|
89 void testHsWidgetHostPresentation(); |
|
90 void testHsWidgetHostOnError(); |
|
91 void testHsWidgetHostOnSetPreferences(); |
|
92 void testHsWidgetHostShape(); |
|
93 void testHsWidgetHostShapeInvalidValues(); |
|
94 void testHsWidgetHostGestureEvent(); |
|
95 |
|
96 //testcontentservice.cpp |
|
97 void testCreateNDeleteWidget(); |
|
98 void testContentServiceStaticInterface(); |
|
99 void testContentServiceWidgetCount(); |
|
100 |
|
101 //t_hswallpaperloaderthread.cpp |
|
102 void testHsWallpaperLoaderThreadConstruction(); |
|
103 void testHsWallpaperLoaderThreadRun(); |
|
104 |
|
105 //t_hswallpaperloader.cpp |
|
106 void testHsWallpaperLoaderConstruction(); |
|
107 void testHsWallpaperLoaderStartWithFinished(); |
|
108 void testHsWallpaperLoaderStartWithFailed(); |
|
109 void testHsWallpaperLoaderCancel(); |
|
110 |
|
111 //t_hswallpaper.cpp |
|
112 void testHsWallpaperConstruction(); |
|
113 void testHsWallpaperSetNRemoveDefaultImage(); |
|
114 void testHsWallpaperSetNRemoveImage(); |
|
115 void testHsWallpaperLoaderFailed(); |
|
116 void testHsWallpaperScene(); |
|
117 void testHsWallpaperPage(); |
|
118 void testHsWallpaperSetImages(); |
|
119 |
|
120 //t_hspage.cpp |
|
121 void testHsPage(); |
|
122 void testHsPageLoad(); |
|
123 void testHsPageContentRects(); |
|
124 void testHsPageAddRemoveWidget(); |
|
125 void testHsPageAddExistingWidget(); |
|
126 void testHsPageWidgetFinished(); |
|
127 void testHsPageIsActivePage(); |
|
128 void testHsPageWidgetSignals(); |
|
129 void testHsPageOrientationChange(); |
|
130 void testHsPageDeleteFromDatabase(); |
|
131 void testHsPageOnPageMarginChanged(); |
|
132 void testHsPageIndex(); |
|
133 |
|
134 //t_hspagenewwidgetlayout.cpp |
|
135 void testHsPageNewWidgetLayout(); |
|
136 void testHsPageNewWidgetLayoutWithPosition(); |
|
137 |
|
138 //t_hsscene.cpp |
|
139 void testSceneDefaultValues(); |
|
140 void testSceneStaticInterface(); |
|
141 void testSceneLoad(); |
|
142 void testSceneAddPages(); |
|
143 void testSceneOnline(); |
|
144 void testSceneEventFilter(); |
|
145 |
|
146 //t_hswidgetcomponent.cpp |
|
147 void testWidgetComponent(); |
|
148 void testWidgetComponentEmits(); |
|
149 |
|
150 //t_hswidgetcomponentregistry.cpp |
|
151 void testWidgetComponentRegistry(); |
|
152 void testWidgetComponentRegistryOnEntryChanged(); |
|
153 |
|
154 // hswidgetcomponentdescriptor.cpp |
|
155 void testWidgetComponentDescriptor(); |
|
156 |
|
157 // t_hsbackuprestoreobserver.cpp |
|
158 void testBackupRestoreObserver(); |
|
159 void testBackupRestoreObserverStarted(); |
|
160 void testBackupRestoreObserverCompleted(); |
|
161 #ifdef Q_OS_SYMBIAN |
|
162 void testBackupRestoreObserverPsKeyObserver(); |
|
163 #endif //Q_OS_SYMBIAN |
|
164 // t_hsbackuprestoreactivecallback.cpp |
|
165 void testBackupRestoreActiveCallback(); |
|
166 |
|
167 // t_hsconfiguration.cpp |
|
168 void testConfigurationConstruction(); |
|
169 void testConfigurationStaticInterface(); |
|
170 void testConfigurationSizes(); |
|
171 void testConfigurationImportAndExport(); |
|
172 void testConfigurationLoad(); |
|
173 |
|
174 // t_hspagetoucharea.cpp |
|
175 void testPageTouchAreaConstruction(); |
|
176 void testPageTouchAreaGestureEvent(); |
|
177 |
|
178 // t_hswidgettoucharea.cpp |
|
179 void testWidgetTouchAreaConstruction(); |
|
180 void testWidgetTouchAreaSceneEvent(); |
|
181 void testWidgetTouchAreaGestureEvent(); |
|
182 |
|
183 // hsdocumentloader.cpp |
|
184 void testDocumentLoaderConstructors(); |
|
185 void testDocumentLoaderCreateObjects(); |
|
186 |
|
187 // t_hswidgetpositioningonwidgetadd |
|
188 void testWidgetPositioningOnWidgetAddChangeInstance(); |
|
189 void testHsAnchorPointInBottomRight_data(); |
|
190 void testHsAnchorPointInBottomRight(); |
|
191 void testHsWidgetOrganizerCase1_data(); |
|
192 void testHsWidgetOrganizerCase1(); |
|
193 void testHsWidgetOrganizerCase2_data(); |
|
194 void testHsWidgetOrganizerCase2(); |
|
195 void testHsWidgetOrganizerCase3_data(); |
|
196 void testHsWidgetOrganizerCase3(); |
|
197 |
|
198 /** |
|
199 * hsgui.cpp |
|
200 */ |
|
201 void testGuiStaticInterface(); |
|
202 void testSetupCleanupIdleUi(); |
|
203 void testOrientation(); |
|
204 void testShow(); |
|
205 void testPageChangeAnimation(); |
|
206 void testPageCrawlingAnimation(); |
|
207 |
|
208 /** |
|
209 * hshostedwidgetfactory.cpp |
|
210 */ |
|
211 void testHostedWidgetFactoryStaticInterface(); |
|
212 private: |
|
213 void createPagesToDatabase(int pageCount); |
|
214 void createSceneWithPages(int pageCount=1,int activePageIndex=0); |
|
215 void destroySceneAndPages(); |
|
216 QString sourceTestWallpaper(); |
|
217 QString targetPortraitTestWallpaper(); |
|
218 QString targetLandscapeTestWallpaper(); |
|
219 QString tempTestWallpaper(); |
|
220 QString notExistingTestWallpaper(); |
|
221 QString wallpaperDirectory(); |
|
222 void cleanupTargetWallpaperFiles(); |
|
223 |
|
224 signals: |
|
225 void quitStateMachine(); |
|
226 |
|
227 private: |
|
228 HbMainWindow mainWindow; |
|
229 |
|
230 QSharedPointer<CaService> mCaService; |
|
231 bool mWallpaperTypeScene; //set true at init() |
|
232 }; |