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 #include <QString> |
|
18 #include <QPainter> |
|
19 #include <QEvent> |
|
20 #include <HbLabel> |
|
21 #include <HbStyleOptionLabel> |
|
22 #include <HbMarqueeItem> |
|
23 #include <HbPushButton> |
|
24 #include <HbCheckBox> |
|
25 #include <HbEvent> |
|
26 #include <HbColorScheme> |
|
27 #include <hbframedrawer.h> |
|
28 #include "ut_infowidget.h" |
|
29 #include "qtestmains60.h" |
|
30 |
|
31 #define private friend class UT_InfoWidget;private |
|
32 #include "infowidget.h" |
|
33 |
|
34 // mocked dependencies |
|
35 #include "infowidgetpreferences.h" |
|
36 |
|
37 const QString KPreferenceOn("On"); |
|
38 const QString KPreferenceOff("Off"); |
|
39 const QString KMcnName("tnw1: 3233255435"); |
|
40 |
|
41 /*! |
|
42 UT_InfoWidget::UT_InfoWidget |
|
43 */ |
|
44 UT_InfoWidget::UT_InfoWidget() |
|
45 : m_infoWidget(0) |
|
46 { |
|
47 m_modelData.setActiveLine(1); |
|
48 m_modelData.setHomeZoneIndicatorType(1); |
|
49 m_modelData.setMcnName(KMcnName); |
|
50 |
|
51 SmcDefaultValue<const InfoWidgetEngine::ModelData &>::SetL(m_modelData); |
|
52 SmcDefaultValue<QColor>::SetL(m_qcolor); |
|
53 SmcDefaultValue<QGraphicsWidget*>::SetL(&m_qgraphicswidget); |
|
54 } |
|
55 |
|
56 /*! |
|
57 UT_InfoWidget::~UT_InfoWidget |
|
58 */ |
|
59 UT_InfoWidget::~UT_InfoWidget() |
|
60 { |
|
61 delete m_infoWidget; |
|
62 } |
|
63 |
|
64 /*! |
|
65 UT_InfoWidget::init |
|
66 */ |
|
67 void UT_InfoWidget::init() |
|
68 { |
|
69 initialize(); |
|
70 |
|
71 SmcDefaultValue<QString>::SetL("On"); |
|
72 SmcDefaultValue<InfoWidgetLayoutManager::DisplayRole>::SetL( |
|
73 InfoWidgetLayoutManager::InfoDisplay); |
|
74 m_infoWidget = new InfoWidget(); |
|
75 SmcDefaultValue<QString>::SetL(""); |
|
76 |
|
77 QVERIFY(verify()); |
|
78 } |
|
79 |
|
80 /*! |
|
81 UT_InfoWidget::cleanup |
|
82 */ |
|
83 void UT_InfoWidget::cleanup() |
|
84 { |
|
85 reset(); |
|
86 |
|
87 delete m_infoWidget; |
|
88 m_infoWidget = 0; |
|
89 } |
|
90 |
|
91 /*! |
|
92 UT_InfoWidget::t_boundingRect |
|
93 */ |
|
94 void UT_InfoWidget::t_boundingRect() |
|
95 { |
|
96 m_infoWidget->boundingRect(); |
|
97 } |
|
98 |
|
99 /*! |
|
100 UT_InfoWidget::t_shape |
|
101 */ |
|
102 void UT_InfoWidget::t_shape() |
|
103 { |
|
104 m_infoWidget->shape(); |
|
105 } |
|
106 |
|
107 |
|
108 /*! |
|
109 UT_InfoWidget::t_sizePolicy |
|
110 */ |
|
111 void UT_InfoWidget::t_sizePolicy() |
|
112 { |
|
113 QVERIFY(m_infoWidget->sizePolicy() == |
|
114 QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); |
|
115 } |
|
116 |
|
117 /*! |
|
118 UT_InfoWidget::t_setHomeZoneDisplay |
|
119 */ |
|
120 void UT_InfoWidget::t_setHomeZoneDisplay() |
|
121 { |
|
122 EXPECT(InfoWidgetPreferences::setPreference) |
|
123 .with(InfoWidgetPreferences::DisplayHomeZone, KPreferenceOn); |
|
124 |
|
125 m_infoWidget->setHomeZoneDisplay(KPreferenceOn); |
|
126 |
|
127 QVERIFY(verify()); |
|
128 } |
|
129 |
|
130 /*! |
|
131 UT_InfoWidget::t_setMcnDisplay |
|
132 */ |
|
133 void UT_InfoWidget::t_setMcnDisplay() |
|
134 { |
|
135 EXPECT(InfoWidgetPreferences::setPreference) |
|
136 .with(InfoWidgetPreferences::DisplayMcn, KPreferenceOn); |
|
137 |
|
138 m_infoWidget->setMcnDisplay(KPreferenceOn); |
|
139 |
|
140 QVERIFY(verify()); |
|
141 } |
|
142 |
|
143 /*! |
|
144 UT_InfoWidget::t_setActiveLineDisplay |
|
145 */ |
|
146 void UT_InfoWidget::t_setActiveLineDisplay() |
|
147 { |
|
148 EXPECT(InfoWidgetPreferences::setPreference) |
|
149 .with(InfoWidgetPreferences::DisplayActiveLine, KPreferenceOn); |
|
150 |
|
151 m_infoWidget->setActiveLineDisplay(KPreferenceOn); |
|
152 |
|
153 QVERIFY(verify()); |
|
154 } |
|
155 |
|
156 /*! |
|
157 UT_InfoWidget::t_setSatDisplay |
|
158 */ |
|
159 void UT_InfoWidget::t_setSatDisplay() |
|
160 { |
|
161 EXPECT(InfoWidgetPreferences::setPreference) |
|
162 .with(InfoWidgetPreferences::DisplaySatText, KPreferenceOn); |
|
163 |
|
164 m_infoWidget->setSatDisplay(KPreferenceOn); |
|
165 |
|
166 QVERIFY(verify()); |
|
167 } |
|
168 |
|
169 /*! |
|
170 UT_InfoWidget::t_paint |
|
171 */ |
|
172 void UT_InfoWidget::t_paint() |
|
173 { |
|
174 QScopedPointer<QPainter> painter(new QPainter()); |
|
175 QStyleOptionGraphicsItem *option = NULL; |
|
176 QWidget *widget = NULL; |
|
177 |
|
178 m_infoWidget->paint(painter.data(), option, widget); |
|
179 |
|
180 // layout change ongoing while paint requested |
|
181 m_infoWidget->startChanges(); |
|
182 m_infoWidget->paint(painter.data(), option, widget); |
|
183 } |
|
184 |
|
185 /*! |
|
186 UT_InfoWidget::t_mousePressEvent |
|
187 */ |
|
188 void UT_InfoWidget::t_mousePressEvent() |
|
189 { |
|
190 QGraphicsSceneMouseEvent event; |
|
191 m_infoWidget->mousePressEvent(&event); |
|
192 } |
|
193 |
|
194 /*! |
|
195 UT_InfoWidget::t_mouseReleaseEvent |
|
196 */ |
|
197 void UT_InfoWidget::t_mouseReleaseEvent() |
|
198 { |
|
199 QGraphicsSceneMouseEvent event; |
|
200 |
|
201 // widget clicked while showing info display => |
|
202 // switch to settings display expected |
|
203 EXPECT(InfoWidgetLayoutManager::currentDisplayRole) |
|
204 .returns(InfoWidgetLayoutManager::InfoDisplay); |
|
205 EXPECT(InfoWidgetLayoutManager::layoutSettingsDisplay); |
|
206 m_infoWidget->mousePressEvent(&event); |
|
207 m_infoWidget->mouseReleaseEvent(&event); |
|
208 |
|
209 // widget clicked while showing settings display => |
|
210 // no action expected |
|
211 EXPECT(InfoWidgetLayoutManager::currentDisplayRole) |
|
212 .returns(InfoWidgetLayoutManager::SettingsDisplay); |
|
213 EXPECT(InfoWidgetLayoutManager::layoutSettingsDisplay).times(0); |
|
214 m_infoWidget->mousePressEvent(&event); |
|
215 m_infoWidget->mouseReleaseEvent(&event); |
|
216 |
|
217 // release event received after dragging widget => |
|
218 // no action expected |
|
219 EXPECT(InfoWidgetLayoutManager::layoutSettingsDisplay).times(0); |
|
220 m_infoWidget->mouseMoveEvent(&event); |
|
221 m_infoWidget->mouseReleaseEvent(&event); |
|
222 |
|
223 QVERIFY(verify()); |
|
224 } |
|
225 |
|
226 /*! |
|
227 UT_InfoWidget::t_mouseMoveEvent |
|
228 */ |
|
229 void UT_InfoWidget::t_mouseMoveEvent() |
|
230 { |
|
231 |
|
232 } |
|
233 |
|
234 /*! |
|
235 UT_InfoWidget::t_updateInfoDisplay |
|
236 */ |
|
237 void UT_InfoWidget::t_updateInfoDisplay() |
|
238 { |
|
239 HbLabel hbLabel; |
|
240 QGraphicsWidget* pointerHbLabel(&hbLabel); |
|
241 |
|
242 EXPECT(InfoWidgetLayoutManager::currentDisplayRole) |
|
243 .returns(InfoWidgetLayoutManager::InfoDisplay); |
|
244 |
|
245 EXPECT(InfoWidgetLayoutManager::getWidget) |
|
246 .with(InfoWidgetLayoutManager::RoleSpnLabel) |
|
247 .returns(pointerHbLabel); |
|
248 |
|
249 HbMarqueeItem mcnMarqueeItem; |
|
250 QGraphicsWidget* pointerMcnMarqueeItem(&mcnMarqueeItem); |
|
251 EXPECT(InfoWidgetLayoutManager::getWidget) |
|
252 .with(InfoWidgetLayoutManager::RoleMcnMarqueeItem) |
|
253 .returns(pointerMcnMarqueeItem); |
|
254 EXPECT(HbMarqueeItem::isAnimating).returns(true); |
|
255 EXPECT(InfoWidgetLayoutManager::getWidget) |
|
256 .with(InfoWidgetLayoutManager::RoleSatMarqueeItem) |
|
257 .returns(pointerMcnMarqueeItem); |
|
258 |
|
259 m_infoWidget->updateInfoDisplay(); |
|
260 |
|
261 QVERIFY(verify()); |
|
262 } |
|
263 |
|
264 /*! |
|
265 UT_InfoWidget::t_readPersistentPreferences |
|
266 */ |
|
267 void UT_InfoWidget::t_readPersistentPreferences() |
|
268 { |
|
269 EXPECT(InfoWidgetPreferences::setPreference) |
|
270 .with(InfoWidgetPreferences::DisplayHomeZone, QString("")); |
|
271 |
|
272 EXPECT(InfoWidgetPreferences::setPreference) |
|
273 .with(InfoWidgetPreferences::DisplayMcn, QString("")); |
|
274 |
|
275 EXPECT(InfoWidgetPreferences::setPreference) |
|
276 .with(InfoWidgetPreferences::DisplayActiveLine, QString("")); |
|
277 |
|
278 EXPECT(InfoWidgetPreferences::setPreference) |
|
279 .with(InfoWidgetPreferences::DisplaySatText, QString("")); |
|
280 |
|
281 EXPECT(InfoWidgetPreferences::setPreference) |
|
282 .with(InfoWidgetPreferences::DisplaySpn, QString("")); |
|
283 |
|
284 EXPECT(InfoWidgetPreferences::validate); |
|
285 |
|
286 m_infoWidget->readPersistentPreferences(); |
|
287 |
|
288 QVERIFY(verify()); |
|
289 |
|
290 // one visible item initially |
|
291 EXPECT(InfoWidgetPreferences::validate).returns(true); |
|
292 EXPECT(InfoWidgetPreferences::storePreferences); |
|
293 |
|
294 m_infoWidget->readPersistentPreferences(); |
|
295 |
|
296 QVERIFY(verify()); |
|
297 } |
|
298 |
|
299 /*! |
|
300 UT_InfoWidget::t_onInitialize |
|
301 */ |
|
302 void UT_InfoWidget::t_onInitialize() |
|
303 { |
|
304 // Test onInitialize sequence where |
|
305 // meta-object properties have been |
|
306 // initialized |
|
307 EXPECT(InfoWidgetPreferences::validate) |
|
308 .returns(true); |
|
309 EXPECT(InfoWidgetPreferences::storePreferences) |
|
310 .returns(true); |
|
311 m_infoWidget->onInitialize(); |
|
312 |
|
313 // Test onInitialize sequence where |
|
314 // meta-object properties are |
|
315 // uninitialized |
|
316 EXPECT(InfoWidgetPreferences::validate) |
|
317 .returns(false); |
|
318 m_infoWidget->onInitialize(); |
|
319 } |
|
320 |
|
321 /*! |
|
322 UT_InfoWidget::t_onUninitialize |
|
323 */ |
|
324 void UT_InfoWidget::t_onUninitialize() |
|
325 { |
|
326 m_infoWidget->onUninitialize(); |
|
327 } |
|
328 |
|
329 /*! |
|
330 UT_InfoWidget::t_onShow |
|
331 */ |
|
332 void UT_InfoWidget::t_onShow() |
|
333 { |
|
334 m_infoWidget->onShow(); |
|
335 } |
|
336 |
|
337 /*! |
|
338 UT_InfoWidget::t_onHide |
|
339 */ |
|
340 void UT_InfoWidget::t_onHide() |
|
341 { |
|
342 m_infoWidget->onHide(); |
|
343 } |
|
344 |
|
345 /*! |
|
346 UT_InfoWidget::t_readModel |
|
347 */ |
|
348 void UT_InfoWidget::t_readModel() |
|
349 { |
|
350 EXPECT(InfoWidgetLayoutManager::currentDisplayRole) |
|
351 .returns(InfoWidgetLayoutManager::InfoDisplay); |
|
352 m_infoWidget->readModel(); |
|
353 |
|
354 EXPECT(InfoWidgetLayoutManager::currentDisplayRole) |
|
355 .returns(InfoWidgetLayoutManager::SettingsDisplay); |
|
356 m_infoWidget->readModel(); |
|
357 |
|
358 QVERIFY(verify()); |
|
359 } |
|
360 |
|
361 /*! |
|
362 UT_InfoWidget::t_handleModelError |
|
363 */ |
|
364 void UT_InfoWidget::t_handleModelError() |
|
365 { |
|
366 int operation(0); |
|
367 int errorCode(0); |
|
368 m_infoWidget->handleModelError(operation, errorCode); |
|
369 } |
|
370 |
|
371 /*! |
|
372 UT_InfoWidget::t_mcnDisplaySettingChanged |
|
373 */ |
|
374 void UT_InfoWidget::t_mcnDisplaySettingChanged() |
|
375 { |
|
376 // user enables MCN setting |
|
377 EXPECT(InfoWidgetPreferences::setPreference) |
|
378 .with(InfoWidgetPreferences::DisplayMcn, KPreferenceOn); |
|
379 int setting(Qt::Checked); |
|
380 m_infoWidget->mcnDisplaySettingChanged(setting); |
|
381 |
|
382 // user disables MCN setting |
|
383 EXPECT(InfoWidgetPreferences::setPreference) |
|
384 .with(InfoWidgetPreferences::DisplayMcn, KPreferenceOff); |
|
385 setting = Qt::Unchecked; |
|
386 m_infoWidget->mcnDisplaySettingChanged(setting); |
|
387 |
|
388 QVERIFY(verify()); |
|
389 } |
|
390 |
|
391 void UT_InfoWidget::t_satDisplaySettingChanged() |
|
392 { |
|
393 // user enables SAT setting |
|
394 EXPECT(InfoWidgetPreferences::setPreference) |
|
395 .with(InfoWidgetPreferences::DisplaySatText, KPreferenceOn); |
|
396 int setting(Qt::Checked); |
|
397 m_infoWidget->satDisplaySettingChanged(setting); |
|
398 |
|
399 // user disables SAT setting |
|
400 EXPECT(InfoWidgetPreferences::setPreference) |
|
401 .with(InfoWidgetPreferences::DisplaySatText, KPreferenceOff); |
|
402 setting = Qt::Unchecked; |
|
403 m_infoWidget->satDisplaySettingChanged(setting); |
|
404 |
|
405 QVERIFY(verify()); |
|
406 } |
|
407 |
|
408 void UT_InfoWidget::t_settingsEditingFinished() |
|
409 { |
|
410 m_infoWidget->settingsEditingFinished(); |
|
411 } |
|
412 |
|
413 void UT_InfoWidget::t_updateItemsVisibility() |
|
414 { |
|
415 // All items visible |
|
416 EXPECT(InfoWidgetPreferences::preference) |
|
417 .with(InfoWidgetPreferences::DisplaySpn) |
|
418 .returns(KPreferenceOn); |
|
419 EXPECT(InfoWidgetPreferences::preference) |
|
420 .with(InfoWidgetPreferences::DisplayMcn) |
|
421 .returns(KPreferenceOn); |
|
422 EXPECT(InfoWidgetPreferences::preference) |
|
423 .with(InfoWidgetPreferences::DisplaySatText) |
|
424 .returns(KPreferenceOn); |
|
425 EXPECT(InfoWidgetLayoutManager::setLayoutRows) |
|
426 .with(3); |
|
427 |
|
428 m_infoWidget->updateItemsVisibility(); |
|
429 QVERIFY(verify()); |
|
430 |
|
431 // none of items visible |
|
432 EXPECT(InfoWidgetLayoutManager::currentDisplayRole) |
|
433 .returns(InfoWidgetLayoutManager::InfoDisplay); |
|
434 |
|
435 EXPECT(InfoWidgetPreferences::preference) |
|
436 .with(InfoWidgetPreferences::DisplaySpn) |
|
437 .returns(KPreferenceOff); |
|
438 EXPECT(InfoWidgetLayoutManager::removeWidget) |
|
439 .with(InfoWidgetLayoutManager::RoleSpnLabel); |
|
440 EXPECT(InfoWidgetLayoutManager::removeWidget) |
|
441 .with(InfoWidgetLayoutManager::RoleSpnIcon); |
|
442 |
|
443 EXPECT(InfoWidgetPreferences::preference) |
|
444 .with(InfoWidgetPreferences::DisplayMcn) |
|
445 .returns(KPreferenceOff); |
|
446 EXPECT(InfoWidgetLayoutManager::removeWidget) |
|
447 .with(InfoWidgetLayoutManager::RoleMcnMarqueeItem); |
|
448 EXPECT(InfoWidgetLayoutManager::removeWidget) |
|
449 .with(InfoWidgetLayoutManager::RoleMcnIcon); |
|
450 |
|
451 EXPECT(InfoWidgetPreferences::preference) |
|
452 .with(InfoWidgetPreferences::DisplaySatText) |
|
453 .returns(KPreferenceOff); |
|
454 EXPECT(InfoWidgetLayoutManager::removeWidget) |
|
455 .with(InfoWidgetLayoutManager::RoleSatMarqueeItem); |
|
456 EXPECT(InfoWidgetLayoutManager::removeWidget) |
|
457 .with(InfoWidgetLayoutManager::RoleSatTextIcon); |
|
458 |
|
459 EXPECT(InfoWidgetLayoutManager::setLayoutRows) |
|
460 .with(0); |
|
461 |
|
462 m_infoWidget->updateItemsVisibility(); |
|
463 |
|
464 QVERIFY(verify()); |
|
465 } |
|
466 |
|
467 void UT_InfoWidget::t_layoutInfoDisplay() |
|
468 { |
|
469 EXPECT(InfoWidgetLayoutManager::showAll); |
|
470 EXPECT(InfoWidgetLayoutManager::currentDisplayRole) |
|
471 .returns(InfoWidgetLayoutManager::SettingsDisplay); |
|
472 |
|
473 m_infoWidget->layoutInfoDisplay(); |
|
474 |
|
475 QVERIFY(verify()); |
|
476 } |
|
477 |
|
478 void UT_InfoWidget::t_layoutSettingsDisplay() |
|
479 { |
|
480 EXPECT(InfoWidgetLayoutManager::showAll); |
|
481 |
|
482 m_infoWidget->layoutSettingsDisplay(); |
|
483 |
|
484 QVERIFY(verify()); |
|
485 } |
|
486 |
|
487 void UT_InfoWidget::t_initializeInfoDisplayItems() |
|
488 { |
|
489 m_infoWidget->initializeInfoDisplayItems(); |
|
490 } |
|
491 |
|
492 void UT_InfoWidget::t_initializeSettingsDisplayItems() |
|
493 { |
|
494 QGraphicsWidget okButton; |
|
495 EXPECT(InfoWidgetLayoutManager::getWidget) |
|
496 .with(InfoWidgetLayoutManager::RoleOkButton) |
|
497 .returns(&okButton); |
|
498 |
|
499 QGraphicsWidget mcnCheckBox; |
|
500 EXPECT(InfoWidgetLayoutManager::getWidget) |
|
501 .with(InfoWidgetLayoutManager::RoleMcnCheckBox) |
|
502 .returns(&mcnCheckBox); |
|
503 |
|
504 QGraphicsWidget satTextCheckBox; |
|
505 EXPECT(InfoWidgetLayoutManager::getWidget) |
|
506 .with(InfoWidgetLayoutManager::RoleSatTextCheckBox) |
|
507 .returns(&satTextCheckBox); |
|
508 |
|
509 m_infoWidget->initializeSettingsDisplayItems(); |
|
510 |
|
511 QVERIFY(verify()); |
|
512 } |
|
513 |
|
514 void UT_InfoWidget::t_startChanges() |
|
515 { |
|
516 m_infoWidget->startChanges(); |
|
517 } |
|
518 |
|
519 void UT_InfoWidget::t_endChanges() |
|
520 { |
|
521 m_infoWidget->endChanges(); |
|
522 } |
|
523 |
|
524 /*! |
|
525 UT_InfoWidget::t_changeEvent |
|
526 */ |
|
527 void UT_InfoWidget::t_changeEvent() |
|
528 { |
|
529 /* |
|
530 * Not work from commmand prompt. |
|
531 */ |
|
532 HbEvent event(HbEvent::ThemeChanged); |
|
533 EXPECT(HbColorScheme::color); |
|
534 m_infoWidget->changeEvent(&event); |
|
535 QVERIFY(verify()); |
|
536 |
|
537 HbEvent event2(HbEvent::ChildFocusIn); |
|
538 m_infoWidget->changeEvent(&event2); |
|
539 QVERIFY(verify()); |
|
540 } |
|
541 |
|
542 |
|
543 /*! |
|
544 UT_InfoWidget::t_sizeHint |
|
545 */ |
|
546 void UT_InfoWidget::t_sizeHint() |
|
547 { |
|
548 const QSizeF KMinimumSize(33.5, 160); |
|
549 const QSizeF KPreferredSize(134, 160); |
|
550 const QSizeF KDefaultSizeInfoDisplay(100, 100); |
|
551 const QSizeF KDefaultSizeSettingsDisplay(230, 220); |
|
552 |
|
553 // Test: initial size after construction |
|
554 Qt::SizeHint sizeHint = Qt::PreferredSize; |
|
555 QSizeF constraint = QSizeF(); |
|
556 QVERIFY(KDefaultSizeInfoDisplay == m_infoWidget->sizeHint( |
|
557 sizeHint, constraint)); |
|
558 |
|
559 // Test: size after onInitialize is called |
|
560 // and current display is InfoDisplay |
|
561 m_infoWidget->onInitialize(); |
|
562 |
|
563 EXPECT(InfoWidgetLayoutManager::currentDisplayRole). |
|
564 returns(InfoWidgetLayoutManager::InfoDisplay); |
|
565 QGraphicsWidget *contentWidget = new QGraphicsWidget; |
|
566 contentWidget->setMinimumSize(KMinimumSize); |
|
567 EXPECT(InfoWidgetLayoutManager::contentWidget). |
|
568 returns(contentWidget); |
|
569 EXPECT(InfoWidgetPreferences::visibleItemCount). |
|
570 returns(1); |
|
571 |
|
572 // No strict verification, approximate values. |
|
573 // Data in docml is in "un" format and strict comparison to pixels won't work |
|
574 //QVERIFY(abs(KMinimumSize.width()-m_infoWidget->sizeHint(sizeHint, constraint).width()) < 1); |
|
575 //QVERIFY(abs(KMinimumSize.height()-m_infoWidget->sizeHint(sizeHint, constraint).height()) < 1); |
|
576 QVERIFY(KDefaultSizeInfoDisplay != m_infoWidget->sizeHint(sizeHint, constraint)); |
|
577 |
|
578 // Test: size after onInitialize is called |
|
579 // and current display is SettingsDisplay |
|
580 |
|
581 delete contentWidget; |
|
582 contentWidget = NULL; |
|
583 |
|
584 QVERIFY(verify()); |
|
585 } |
|
586 |
|
587 QTEST_MAIN_S60(UT_InfoWidget) |
|