90
|
1 |
/*
|
|
2 |
* Copyright (c) 2008 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: Tests for HsHomeScreenStatePlugin class.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#include <QtTest/QtTest>
|
|
19 |
#include <QtGui>
|
|
20 |
#include "hshomescreenstateplugin.h"
|
|
21 |
#include "hsidlestate.h"
|
|
22 |
#include "hsloadscenestate.h"
|
|
23 |
#include "hscontentservice.h"
|
|
24 |
#include "hspage.h"
|
|
25 |
#include "hswidgethost.h"
|
|
26 |
|
|
27 |
/**
|
|
28 |
* @test Test class for homescreen::hsutils modules.
|
|
29 |
*/
|
|
30 |
class HomeScreenStatePluginTest : public QObject
|
|
31 |
{
|
|
32 |
Q_OBJECT
|
|
33 |
|
|
34 |
signals:
|
|
35 |
void finishStateMachine();
|
|
36 |
|
|
37 |
private slots:
|
|
38 |
|
|
39 |
/**
|
|
40 |
* initialize
|
|
41 |
*/
|
|
42 |
void initTestCase();
|
|
43 |
void cleanup();
|
|
44 |
void init();
|
|
45 |
void cleanupTestCase();
|
|
46 |
|
|
47 |
/**
|
|
48 |
* hswallpaperselectionstate.cpp
|
|
49 |
*/
|
|
50 |
void testWallpaperSelectionStateConstruction();
|
|
51 |
void testWallpaperSelectionStateImageSelection();
|
|
52 |
void testWallpaperSelectionStateImageAssignment();
|
|
53 |
void testWallpaperSelectionStateSimpleMethods();
|
|
54 |
|
|
55 |
/**
|
|
56 |
* hsloadscenestate.cpp
|
|
57 |
*/
|
|
58 |
void testLoadSceneStateConstructors();
|
|
59 |
void testLoadSceneStateOnEntryExit();
|
|
60 |
#ifdef Q_OS_SYMBIAN
|
|
61 |
void testLoadSceneStateHandleKeyChange();
|
|
62 |
#endif
|
|
63 |
/**
|
|
64 |
* hsrootstate.cpp
|
|
65 |
*/
|
|
66 |
void testLoadRootStateConstructors();
|
|
67 |
void testLoadRootStateOnEntryExit();
|
|
68 |
|
|
69 |
/**
|
|
70 |
* t_hsbackuprestorestate.cpp
|
|
71 |
*/
|
|
72 |
void testLoadBackupRestoreStateConstructors();
|
|
73 |
void testLoadBackupRestoreStateOnEntryExit();
|
|
74 |
|
|
75 |
/**
|
|
76 |
* hsidlestate.cpp
|
|
77 |
*/
|
|
78 |
void testIdleStateConstruction();
|
|
79 |
void testIdleStateEntryAndExit();
|
|
80 |
void testIdleStatePageLayerPos();
|
|
81 |
void testIdleStatePageChangeAnimation();
|
|
82 |
void testIdleStatePageChangeZones();
|
|
83 |
void testIdleStateAddPage();
|
|
84 |
void testIdleStateRemoveActivePage();
|
|
85 |
void testIdleStateRemovePage();
|
|
86 |
void testIdleStateToggleConnection();
|
|
87 |
void testIdleStateTapPage();
|
|
88 |
void testIdleStatePanPage();
|
|
89 |
void testIdleStateTapWidget();
|
|
90 |
void testIdleStateDragWidget();
|
|
91 |
void testIdleStateDeleteWidget();
|
|
92 |
void testIdleStateMisc();
|
|
93 |
void testIdleStateChromeBehaviour();
|
|
94 |
void testEventFilter();
|
|
95 |
void testIdleStateSnapToObject();
|
|
96 |
void testIdleStateSnapToObjectSnapEffectDisabled();
|
|
97 |
void testIdleStateSnapToObjectSnappingDisabled();
|
|
98 |
void testOnVerticalSnapLineTimerTimeout();
|
|
99 |
void testOnHorizontalSnapLineTimerTimeout();
|
|
100 |
void testShowHorizontalLine();
|
|
101 |
void testEditorAndVKB();
|
|
102 |
|
|
103 |
|
|
104 |
|
|
105 |
private:
|
|
106 |
void createSceneAndWindow(int pageCount, int defaultPageIndex = 0, int maximumPageCount = 8);
|
|
107 |
void deleteSceneAndWindow();
|
|
108 |
|
|
109 |
private:
|
|
110 |
HbMainWindow *mMainWindow;
|
|
111 |
int mImageProcessingDelay;
|
|
112 |
};
|