90
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 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: Test class for homescreen::hsutils
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#include <QtTest/QtTest>
|
|
19 |
#include <QWidget>
|
|
20 |
#include <QGraphicsView>
|
|
21 |
#include <QObject>
|
|
22 |
#include <QList>
|
|
23 |
#include <QGraphicsWidget>
|
|
24 |
#include "hswidgetpositioningonwidgetmove.h"
|
|
25 |
|
|
26 |
/**
|
|
27 |
* @test Test class for homescreen::hsutils modules.
|
|
28 |
*/
|
|
29 |
class t_hsUtils : public QObject
|
|
30 |
{
|
|
31 |
Q_OBJECT
|
|
32 |
|
|
33 |
private slots:
|
|
34 |
|
|
35 |
/**
|
|
36 |
*
|
|
37 |
*/
|
|
38 |
void initTestCase();
|
|
39 |
|
|
40 |
#ifndef ONLY_MENU_TESTCASES
|
|
41 |
/**
|
|
42 |
* t_hswidgetpositioningonorientationchange.cpp
|
|
43 |
*/
|
|
44 |
void testWidgetPositioningOnOrientationChangeInstance();
|
|
45 |
void testAdvancedWidgetPositioningOnOrientationChange_data();
|
|
46 |
void testAdvancedWidgetPositioningOnOrientationChange();
|
|
47 |
|
|
48 |
/**
|
|
49 |
* t_hswidgetpositioningonwidgetmove.cpp
|
|
50 |
*/
|
|
51 |
void testWidgetPositioningOnWidgetMoveInstance();
|
|
52 |
void testHsSnapToLinesConstruct();
|
|
53 |
void testHsSnapToLines_data();
|
|
54 |
void testHsSnapToLines();
|
|
55 |
void testHsSnapToLinesSnapDisabled_data();
|
|
56 |
void testHsSnapToLinesSnapDisabled();
|
|
57 |
|
|
58 |
|
|
59 |
/**
|
|
60 |
* t_hspageindicator.cpp
|
|
61 |
*/
|
|
62 |
void testPageIndicatorConstruction();
|
|
63 |
void testPageIndicatorActiveItem();
|
|
64 |
void testPageIndicatorAddRemoveItem();
|
|
65 |
void testPageIndicatorAnimations();
|
|
66 |
|
|
67 |
/**
|
|
68 |
* t_trashbinwidget.cpp
|
|
69 |
*/
|
|
70 |
void testTrashbinWidgetConstruct();
|
|
71 |
void testTrashbinWidgetActivation();
|
|
72 |
|
|
73 |
/**
|
|
74 |
* t_hssnapline.cpp
|
|
75 |
*/
|
|
76 |
void testSnapLineConstruction();
|
|
77 |
void testSnapLineSetConfiguration();
|
|
78 |
void testShowAndHideHorizontalLine();
|
|
79 |
void testShowAndHideVerticalLine();
|
|
80 |
void testHideHorizontalLineWhileFadeInAnimationRunning();
|
|
81 |
void testHideVerticalLineWhileFadeInAnimationRunning();
|
|
82 |
void testShowHorizontalLineWhileFadeOutAnimationRunning();
|
|
83 |
void testShowVerticalLineWhileFadeOutAnimationRunning();
|
|
84 |
void testShowHorizontalLineAtNewPositionWhileFadeOutAnimationRunning();
|
|
85 |
void testShowVerticalLineAtNewPositionWhileFadeOutAnimationRunning();
|
|
86 |
|
|
87 |
/**
|
|
88 |
* t_titleresolver.cpp
|
|
89 |
*/
|
|
90 |
void testTitleResolver();
|
|
91 |
void testTitleResolverOnStatusChanged();
|
|
92 |
void testTitleResolverOnNetworkNameChanged();
|
|
93 |
|
|
94 |
/**
|
|
95 |
* t_hsdeviceinfolistener.cpp
|
|
96 |
*/
|
|
97 |
void testDeviceInfoListener();
|
|
98 |
void testDeviceInfoListenerNetworkMode_data();
|
|
99 |
void testDeviceInfoListenerNetworkMode();
|
|
100 |
void testDeviceInfoListenerOfflineProfile();
|
|
101 |
void testDeviceInfoListenerNetworkStatusChanged();
|
|
102 |
void testDeviceInfoListenerNetworkNameChanged();
|
|
103 |
void testDeviceInfoListenerNetworkCurrentProfileChanged();
|
|
104 |
|
|
105 |
/**
|
|
106 |
* t_hsspinnderdialog.cpp
|
|
107 |
*/
|
|
108 |
void testSpinnerDialog();
|
|
109 |
/**
|
|
110 |
* t_hsmessageboxwrapper.cpp
|
|
111 |
*/
|
|
112 |
void testMessageBoxWrapper();
|
|
113 |
/**
|
|
114 |
* t_hspropertyanimationwrapper.cpp
|
|
115 |
*/
|
|
116 |
void testPropertyAnimationWrapper();
|
|
117 |
|
|
118 |
#else // ONLY_MENU_TESTCASES
|
|
119 |
/**
|
|
120 |
* t_hsutils_menuevent.cpp
|
|
121 |
*/
|
|
122 |
void testMenuEventConstruction();
|
|
123 |
void testMenuEventFactoryCreateAddToHomeScreenEvent();
|
|
124 |
void testMenuEventFactoryCreatePreviewHSWidgetEvent();
|
|
125 |
void testMenuEventFactoryCreateAppSettingsViewEvent();
|
|
126 |
void testMenuEventFactoryCreateAppDetailsViewEvent();
|
|
127 |
void testMenuEventFactoryCreateOpenCollectionEvent();
|
|
128 |
void testMenuEventFactoryCreateOpenCollectionFromAppLibraryEvent();
|
|
129 |
void testMenuEventFactoryCreateRenameCollectionEvent();
|
|
130 |
void testMenuEventFactoryCreateNewCollectionEvent();
|
|
131 |
void testMenuEventFactoryCreateDeleteCollectionEvent();
|
|
132 |
void testMenuEventFactoryCreateCollectionDeletedEvent();
|
|
133 |
void testMenuEventFactoryCreateBackFromInstalledViewEvent();
|
|
134 |
void testMenuEventFactoryCreateOpenInstalledViewEvent();
|
|
135 |
void testMenuEventFactorycCreateOpenAppLibraryEvent();
|
|
136 |
void testMenuEventFactoryCreateAddAppsFromApplicationsViewEvent();
|
|
137 |
void testMenuEventFactoryCreateAddAppsFromCallectionViewEvent();
|
|
138 |
void testMenuEventFactoryCreateRemoveAppFromCollectionEvent();
|
|
139 |
void testMenuEventFactoryCreateUninstallApplicationEvent();
|
|
140 |
void testMenuEventFactoryCreateInstLogEvent();
|
|
141 |
void testMenuEventFactoryCreateUnknownEvent();
|
|
142 |
void testMenuEventFactoryOpenHSEvent();
|
|
143 |
void testMenuEventTransitionConstruction();
|
|
144 |
void testMenuEventTransitionTestCondition();
|
|
145 |
void testMenuEventFactoryCreateArrangeCollectionEvent();
|
|
146 |
void testMenuEventFactorycreateArrangeAllCollectionsEvent();
|
|
147 |
void testMenuEventFactoryCreateUninstallFailedEvent();
|
|
148 |
void testMenuDialogFactoryCreate();
|
|
149 |
#endif // ONLY_MENU_TESTCASES
|
|
150 |
|
|
151 |
void cleanupTestCase();
|
|
152 |
|
|
153 |
private:
|
|
154 |
bool hsLineCompare(QLineF l1, QLineF l2);
|
|
155 |
bool hsResultCompare(const HsWidgetPositioningOnWidgetMove::Result& sr1, const HsWidgetPositioningOnWidgetMove::Result& sr2);
|
|
156 |
|
|
157 |
};
|