homescreensrv_plat/menu_sat_interface_api/tsrc/src/menusatinterfacetestutils.cpp
changeset 0 79c6a41cd166
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     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:
       
    15 *
       
    16 */
       
    17 #include <ecom/ecom.h>
       
    18 #include <Stiftestinterface.h>
       
    19 #include "menusatinterfacetest.h"
       
    20 #include "waitactive.h"
       
    21 
       
    22 // ============================ MEMBER FUNCTIONS ===============================
       
    23 
       
    24 // -----------------------------------------------------------------------------
       
    25 // CClientServiceTester::CClientServiceTester
       
    26 // C++ default constructor can NOT contain any code, that
       
    27 // might leave.
       
    28 // -----------------------------------------------------------------------------
       
    29 //
       
    30 
       
    31 
       
    32 // -----------------------------------------------------------------------------
       
    33 // CClientServiceTester::NewL
       
    34 // Two-phased constructor.
       
    35 // -----------------------------------------------------------------------------
       
    36 //
       
    37 CMenuSatInterfaceTest::CMenuSatInterfaceTest( 
       
    38     CTestModuleIf& aTestModuleIf ):
       
    39         CScriptBase( aTestModuleIf )
       
    40     {
       
    41     TestModuleIf().SetBehavior( CTestModuleIf::ETestLeaksMem );
       
    42     }
       
    43 
       
    44 // -----------------------------------------------------------------------------
       
    45 // CClientServiceTester::ConstructL
       
    46 // Symbian 2nd phase constructor can leave.
       
    47 // -----------------------------------------------------------------------------
       
    48 //
       
    49 void CMenuSatInterfaceTest::ConstructL()
       
    50     {   
       
    51     ///save preconditions
       
    52     RProperty::Get( KCRUidMenu, KMenuSatUIIconId, iIconId );
       
    53     //save preconditions
       
    54     }
       
    55 
       
    56 // -----------------------------------------------------------------------------
       
    57 // CClientServiceTester::NewL
       
    58 // Two-phased constructor.
       
    59 // -----------------------------------------------------------------------------
       
    60 //
       
    61 CMenuSatInterfaceTest* CMenuSatInterfaceTest::NewL( 
       
    62     CTestModuleIf& aTestModuleIf )
       
    63     {
       
    64     CMenuSatInterfaceTest* self = new (ELeave) CMenuSatInterfaceTest( aTestModuleIf );
       
    65     
       
    66     CleanupStack::PushL( self );
       
    67     self->ConstructL();
       
    68     CleanupStack::Pop();
       
    69 
       
    70     return self;
       
    71     }
       
    72     
       
    73 // Destructor
       
    74 CMenuSatInterfaceTest::~CMenuSatInterfaceTest()
       
    75     { 
       
    76     ///load preconditions
       
    77     RProperty::Set( KCRUidMenu, KMenuSatUIIconId, iIconId );
       
    78     //load preconditions
       
    79 	WaitL(20000);
       
    80     }
       
    81 
       
    82 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
    83 
       
    84 // -----------------------------------------------------------------------------
       
    85 // LibEntryL is a polymorphic Dll entry point.
       
    86 // Returns: CScriptBase: New CScriptBase derived object
       
    87 // -----------------------------------------------------------------------------
       
    88 //
       
    89 EXPORT_C CScriptBase* LibEntryL( 
       
    90     CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
       
    91     {
       
    92     
       
    93     return ( CScriptBase* ) CMenuSatInterfaceTest::NewL( aTestModuleIf );
       
    94         
       
    95     }
       
    96 
       
    97 // -----------------------------------------------------------------------------
       
    98 // E32Dll is a DLL entry point function.
       
    99 // Returns: KErrNone
       
   100 // -----------------------------------------------------------------------------
       
   101 //
       
   102 #ifndef EKA2 // Hide Dll entry point to EKA2
       
   103 GLDEF_C TInt E32Dll(
       
   104     TDllReason /*aReason*/) // Reason code
       
   105     {
       
   106     return(KErrNone);
       
   107     
       
   108     }
       
   109 #endif // EKA2
       
   110 
       
   111 
       
   112 // ---------------------------------------------------------------------------
       
   113 // 
       
   114 // ---------------------------------------------------------------------------
       
   115 //
       
   116 
       
   117 
       
   118 void CMenuSatInterfaceTest::WaitL(TInt aMicroSec)
       
   119 	{
       
   120 	CWaitActive* wait = CWaitActive::NewL();
       
   121     wait->Wait(aMicroSec);
       
   122     delete wait;
       
   123 	}
       
   124