30
|
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: tester for methods in VideoSortFilterProxyModel
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef __TESTLISTWIDGET_H__
|
|
19 |
#define __TESTLISTWIDGET_H__
|
|
20 |
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include <QtTest/QtTest>
|
|
24 |
|
|
25 |
class VideoListWidget;
|
|
26 |
class DummyDataModel;
|
|
27 |
class HbAbstractViewItem;
|
|
28 |
class HbView;
|
|
29 |
class VideoSortFilterProxyModel;
|
|
30 |
class VideoCollectionWrapper;
|
|
31 |
class HbMainWindow;
|
|
32 |
class ListWidgetTester;
|
|
33 |
class VideoServices;
|
34
|
34 |
class VideoListDataModel;
|
35
|
35 |
class VideoCollectionUiLoader;
|
30
|
36 |
|
|
37 |
class TestListWidget : public QObject
|
|
38 |
{
|
|
39 |
Q_OBJECT
|
|
40 |
|
|
41 |
public:
|
|
42 |
|
34
|
43 |
void setRowCount(int count, int type = 0, VideoListDataModel *model = 0);
|
30
|
44 |
|
|
45 |
// test functions for the test framework
|
|
46 |
private slots:
|
|
47 |
|
|
48 |
/**
|
35
|
49 |
* will be called automatically when test starts
|
|
50 |
*
|
|
51 |
*/
|
|
52 |
void initTestCase();
|
|
53 |
|
|
54 |
/**
|
|
55 |
* will be called automatically before each testfunction is executed.
|
30
|
56 |
*
|
|
57 |
*/
|
|
58 |
void init();
|
|
59 |
|
|
60 |
/**
|
35
|
61 |
* will be called automatically after every testfunction.
|
30
|
62 |
*
|
|
63 |
*/
|
|
64 |
void cleanup();
|
|
65 |
|
|
66 |
|
|
67 |
/**
|
|
68 |
* verifies initialize
|
|
69 |
*/
|
|
70 |
void testInitialize();
|
|
71 |
|
|
72 |
/**
|
|
73 |
* verifies activate()
|
|
74 |
*/
|
|
75 |
void testActivate();
|
|
76 |
|
|
77 |
/**
|
|
78 |
* verifies deactivate()
|
|
79 |
*/
|
|
80 |
void testDeactivate();
|
|
81 |
|
|
82 |
/**
|
34
|
83 |
* verifies getLevel
|
30
|
84 |
*/
|
34
|
85 |
void testGetLevel();
|
30
|
86 |
|
|
87 |
/**
|
|
88 |
* verifies getModel
|
|
89 |
*/
|
|
90 |
void testGetModel();
|
|
91 |
|
|
92 |
/**
|
|
93 |
* verifies emitActivated
|
|
94 |
*/
|
|
95 |
void testEmitActivated();
|
|
96 |
|
|
97 |
/**
|
|
98 |
* verifies longPressGesture
|
|
99 |
*/
|
|
100 |
void testLongPressGesture();
|
|
101 |
|
|
102 |
/**
|
|
103 |
* verifies setContextMenu
|
|
104 |
*/
|
|
105 |
void testSetContextMenu();
|
|
106 |
|
|
107 |
/**
|
35
|
108 |
* verifies doDelayedsSlot
|
30
|
109 |
*/
|
35
|
110 |
void testDoDelayedsSlot();
|
30
|
111 |
|
|
112 |
/**
|
|
113 |
* verifies deleteItemSlot
|
|
114 |
*/
|
|
115 |
void testDeleteItemSlot();
|
|
116 |
|
|
117 |
/**
|
|
118 |
* verifies renameSlot
|
|
119 |
*/
|
|
120 |
void testRenameSlot();
|
|
121 |
|
|
122 |
/**
|
35
|
123 |
* verifies playItemSlot
|
|
124 |
*/
|
|
125 |
void testPlayItemSlot();
|
|
126 |
|
|
127 |
/**
|
30
|
128 |
* verifies playAllSlot
|
|
129 |
*/
|
|
130 |
void testPlayAllSlot();
|
|
131 |
|
|
132 |
/**
|
35
|
133 |
* verifies addToCollectionSlot
|
30
|
134 |
*/
|
|
135 |
void testAddToCollectionSlot();
|
35
|
136 |
|
|
137 |
/**
|
|
138 |
* verifies removeFromCollectionSlot
|
|
139 |
*/
|
|
140 |
void testRemoveFromCollectionSlot();
|
|
141 |
|
|
142 |
/**
|
|
143 |
* verifies removeCollectionSlot
|
|
144 |
*/
|
|
145 |
void testRemoveCollectionSlot();
|
30
|
146 |
|
|
147 |
/**
|
|
148 |
* verifies openDetailsSlot()
|
|
149 |
*/
|
|
150 |
void testOpenDetailsSlot();
|
|
151 |
|
|
152 |
/**
|
|
153 |
* verifies back()
|
|
154 |
*/
|
|
155 |
void testBack();
|
|
156 |
|
|
157 |
/**
|
35
|
158 |
* verifies scrollingStartedSlot
|
|
159 |
*/
|
|
160 |
void testScrollingStartedSlot();
|
|
161 |
|
|
162 |
/**
|
30
|
163 |
* verifies scrollingEndedSlot();
|
|
164 |
*/
|
|
165 |
void testScrollingEndedSlot();
|
|
166 |
|
|
167 |
/**
|
|
168 |
* verifies scrollPositionChangedSlot();
|
|
169 |
*/
|
|
170 |
void testScrollPositionChangedSlot();
|
35
|
171 |
|
|
172 |
/**
|
|
173 |
* verifies scrollPositionTimerSlot()
|
|
174 |
*/
|
|
175 |
void testScrollPositionTimerSlot();
|
30
|
176 |
|
|
177 |
signals:
|
|
178 |
|
|
179 |
/**
|
|
180 |
* test signal
|
|
181 |
*/
|
|
182 |
void testSignal();
|
|
183 |
|
|
184 |
/**
|
|
185 |
* another test signal
|
|
186 |
*/
|
|
187 |
void testSignal(const QPointF&);
|
|
188 |
|
|
189 |
private:
|
|
190 |
/**
|
|
191 |
* object under test, ListWidgetTester is inherited from VideoListWidget
|
|
192 |
*/
|
|
193 |
ListWidgetTester* mTestWidget;
|
|
194 |
|
|
195 |
/**
|
|
196 |
* dummy view
|
|
197 |
*/
|
|
198 |
HbView *mTempView;
|
|
199 |
|
|
200 |
/**
|
|
201 |
* dummy main wnd
|
|
202 |
*/
|
|
203 |
HbMainWindow *mDummyMainWnd;
|
35
|
204 |
|
|
205 |
/**
|
|
206 |
* stub -uiloader
|
|
207 |
*/
|
|
208 |
VideoCollectionUiLoader *mTestUiLoader;
|
30
|
209 |
};
|
|
210 |
|
|
211 |
|
|
212 |
#endif // __TESTLISTWIDGET_H__
|
|
213 |
|
|
214 |
// End of file
|