90
|
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: Main test class for hsHomeScreenStatePlugin library.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#include<qscopedpointer.h>
|
|
19 |
#include<hbmessagebox.h>
|
|
20 |
#include<hbaction.h>
|
|
21 |
#include <HbParameterLengthLimiter>
|
|
22 |
#include <HbLabel>
|
|
23 |
|
|
24 |
#include "hsinstallationlogstate.h"
|
|
25 |
#include "t_hsmenuworkerstateplugin.h"
|
|
26 |
#include "hscontentservice.h"
|
|
27 |
#include "hsshortcutservice.h"
|
|
28 |
#include "hsmenuevent.h"
|
|
29 |
|
|
30 |
// ---------------------------------------------------------------------------
|
97
|
31 |
//
|
90
|
32 |
// ---------------------------------------------------------------------------
|
|
33 |
//
|
|
34 |
void MenuStatesTest::HsInstallationLogState_construction()
|
|
35 |
{
|
|
36 |
#ifdef Q_OS_SYMBIAN
|
|
37 |
#ifdef UT_MEMORY_CHECK
|
|
38 |
__UHEAP_MARK;
|
|
39 |
#endif//UT_MEMORY_CHECK
|
|
40 |
#endif//Q_OS_SYMBIAN
|
|
41 |
{
|
|
42 |
QState parentState1;
|
|
43 |
parentState1.setObjectName(tr("testName1"));
|
|
44 |
|
|
45 |
HsInstallationLogState logState(&parentState1);
|
|
46 |
QString s1 = logState.objectName();
|
|
47 |
QVERIFY(s1 == tr("testName1/InstallationLogState"));
|
|
48 |
}
|
|
49 |
#ifdef Q_OS_SYMBIAN
|
|
50 |
#ifdef UT_MEMORY_CHECK
|
|
51 |
__UHEAP_MARKEND;
|
|
52 |
#endif//UT_MEMORY_CHECK
|
|
53 |
#endif//Q_OS_SYMBIAN
|
|
54 |
}
|
|
55 |
|
97
|
56 |
// ---------------------------------------------------------------------------
|
|
57 |
//
|
|
58 |
// ---------------------------------------------------------------------------
|
|
59 |
//
|
90
|
60 |
void MenuStatesTest::HsInstallationLogState_onEntry()
|
|
61 |
{
|
|
62 |
#ifdef Q_OS_SYMBIAN
|
|
63 |
#ifdef UT_MEMORY_CHECK
|
|
64 |
__UHEAP_MARK;
|
|
65 |
#endif//UT_MEMORY_CHECK
|
|
66 |
#endif//Q_OS_SYMBIAN
|
|
67 |
{
|
|
68 |
QState parentState;
|
|
69 |
HsInstallationLogState logState(&parentState);
|
|
70 |
|
|
71 |
//test event
|
|
72 |
QScopedPointer<HsMenuEvent> event(new HsMenuEvent(HsMenuEvent::ShowInstallationLog));
|
|
73 |
|
|
74 |
logState.onEntry(event.data());
|
|
75 |
|
|
76 |
checkDialogController();
|
|
77 |
}
|
|
78 |
#ifdef Q_OS_SYMBIAN
|
|
79 |
#ifdef UT_MEMORY_CHECK
|
|
80 |
__UHEAP_MARKEND;
|
|
81 |
#endif//UT_MEMORY_CHECK
|
|
82 |
#endif//Q_OS_SYMBIAN
|
|
83 |
}
|