36 |
36 |
37 void HomeScreenStatePluginTest::testLoadSceneStateOnEntryExit() |
37 void HomeScreenStatePluginTest::testLoadSceneStateOnEntryExit() |
38 { |
38 { |
39 HbInstance::instance(); |
39 HbInstance::instance(); |
40 HbMainWindow mainWindow; |
40 HbMainWindow mainWindow; |
41 mainWindow.show(); |
41 |
42 |
|
43 HsLoadSceneState *lss = new HsLoadSceneState; |
42 HsLoadSceneState *lss = new HsLoadSceneState; |
44 |
43 |
45 QStateMachine *sm = new QStateMachine; |
44 QStateMachine *sm = new QStateMachine; |
46 sm->addState(lss); |
45 sm->addState(lss); |
47 sm->setInitialState(lss); |
46 sm->setInitialState(lss); |
48 sm->start(); |
47 sm->start(); |
49 QCoreApplication::sendPostedEvents(); |
48 |
|
49 QCoreApplication::sendPostedEvents(sm,0); |
50 // main window deleted -> HsGui must be deleted also |
50 // main window deleted -> HsGui must be deleted also |
51 delete HsGui::takeInstance(); |
51 delete HsGui::takeInstance(); |
52 delete sm; |
52 delete sm; |
|
53 |
53 } |
54 } |
54 |
55 |
55 #ifdef Q_OS_SYMBIAN |
56 #ifdef Q_OS_SYMBIAN |
56 void HomeScreenStatePluginTest::testLoadSceneStateHandleKeyChange() |
57 void HomeScreenStatePluginTest::testLoadSceneStateHandleKeyChange() |
57 { |
58 { |
58 HbInstance::instance(); |
59 HbInstance::instance(); |
59 HbMainWindow mainWindow; |
60 HbMainWindow mainWindow; |
60 mainWindow.show(); |
61 // mainWindow.show(); |
61 QCoreApplication::sendPostedEvents(); |
62 // QCoreApplication::sendPostedEvents(); |
62 |
63 |
63 HsLoadSceneState *lss = new HsLoadSceneState; |
64 HsLoadSceneState *lss = new HsLoadSceneState; |
64 XQSettingsKey testKey(XQSettingsKey::TargetPublishAndSubscribe, KPSUidStartup.iUid, KPSStartupUiPhase); |
65 XQSettingsKey testKey(XQSettingsKey::TargetPublishAndSubscribe, KPSUidStartup.iUid, KPSStartupUiPhase); |
65 QVariant variant(QVariant::Int); |
66 QVariant variant(QVariant::Int); |
66 lss->handleKeyChange(testKey, variant); |
67 lss->handleKeyChange(testKey, variant); |