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