homescreenapp/stateplugins/hsmenuworkerstateplugin/tsrc/t_hsmenuworkerstateplugin/src/t_hsinstallationlogstate.cpp
changeset 96 458d8c8d9580
child 97 66b5fe3c07fd
equal deleted inserted replaced
92:6727c5d0afc7 96:458d8c8d9580
       
     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 // ---------------------------------------------------------------------------
       
    31 // ---------------------------------------------------------------------------
       
    32 //
       
    33 void MenuStatesTest::HsInstallationLogState_construction()
       
    34 {
       
    35 #ifdef Q_OS_SYMBIAN
       
    36 #ifdef UT_MEMORY_CHECK
       
    37     __UHEAP_MARK;
       
    38 #endif//UT_MEMORY_CHECK
       
    39 #endif//Q_OS_SYMBIAN
       
    40     {
       
    41         QState parentState1;
       
    42         parentState1.setObjectName(tr("testName1"));
       
    43 
       
    44         HsInstallationLogState logState(&parentState1);
       
    45         QString s1 = logState.objectName();
       
    46         QVERIFY(s1 == tr("testName1/InstallationLogState"));
       
    47     }
       
    48 #ifdef Q_OS_SYMBIAN
       
    49 #ifdef UT_MEMORY_CHECK
       
    50     __UHEAP_MARKEND;
       
    51 #endif//UT_MEMORY_CHECK
       
    52 #endif//Q_OS_SYMBIAN
       
    53 }
       
    54 
       
    55 
       
    56 void MenuStatesTest::HsInstallationLogState_onEntry()
       
    57 {
       
    58 #ifdef Q_OS_SYMBIAN
       
    59 #ifdef UT_MEMORY_CHECK
       
    60     __UHEAP_MARK;
       
    61 #endif//UT_MEMORY_CHECK
       
    62 #endif//Q_OS_SYMBIAN
       
    63     {
       
    64     QState parentState;
       
    65     HsInstallationLogState logState(&parentState);
       
    66 
       
    67     //test event
       
    68     QScopedPointer<HsMenuEvent> event(new HsMenuEvent(HsMenuEvent::ShowInstallationLog));
       
    69 
       
    70     logState.onEntry(event.data());
       
    71 
       
    72     checkDialogController();
       
    73     }
       
    74 #ifdef Q_OS_SYMBIAN
       
    75 #ifdef UT_MEMORY_CHECK
       
    76     __UHEAP_MARKEND;
       
    77 #endif//UT_MEMORY_CHECK
       
    78 #endif//Q_OS_SYMBIAN
       
    79 }