appfw/apparchitecture/tef/T_StartAppStep.cpp
branchRCL_3
changeset 62 924385140d98
parent 0 2e3d3ce01487
child 63 c2c61fdca848
equal deleted inserted replaced
58:0818dd463d41 62:924385140d98
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    22 
    22 
    23 #include "T_StartAppStep.h"
    23 #include "T_StartAppStep.h"
    24 #include "tstapp.h"
    24 #include "tstapp.h"
    25 #include "TRApaLsSessionStartAppTest.h"
    25 #include "TRApaLsSessionStartAppTest.h"
    26 #include <apacmdln.h>
    26 #include <apacmdln.h>
       
    27 #include "T_SisFileInstaller.h"    
    27 
    28 
    28 _LIT(KCompleted, "Completed.");
    29 _LIT(KCompleted, "Completed.");
    29 _LIT8(KLitPlainText,"text/plain");
    30 _LIT8(KLitPlainText,"text/plain");
       
    31 
       
    32 _LIT(KUnprotectedAppSisFile, "z:\\apparctest\\apparctestsisfiles\\UnProctectedUidApp.sis");
       
    33 _LIT(KUnprotectedAppComponent, "UnProctectedUidApp");
       
    34 
       
    35 _LIT(KRApaLsSessionStartAppSisFile, "z:\\apparctest\\apparctestsisfiles\\TRApaLsSessionStartAppTestApp_v2.sis");
       
    36 _LIT(KRApaLsSessionStartAppComponent, "TRApaLsSessionStartAppTestApp_v2");
       
    37 
    30 
    38 
    31 const TInt KTUnProtectedAppTestPassed = 1234;
    39 const TInt KTUnProtectedAppTestPassed = 1234;
    32 
    40 
    33 class RIpcApparcFuzzTest : public RSessionBase
    41 class RIpcApparcFuzzTest : public RSessionBase
    34 	{
    42 	{
   106    @return - TVerdict code
   114    @return - TVerdict code
   107    Override of base class virtual
   115    Override of base class virtual
   108  */	
   116  */	
   109 TVerdict CT_StartAppTestStep::doTestStepPreambleL()
   117 TVerdict CT_StartAppTestStep::doTestStepPreambleL()
   110 	{
   118 	{
       
   119     CSisFileInstaller sisFileInstaller;
       
   120     
       
   121     INFO_PRINTF2(_L("Installing sis file from -> %S"), &KUnprotectedAppSisFile);
       
   122     sisFileInstaller.InstallSisL(KUnprotectedAppSisFile);
       
   123     INFO_PRINTF2(_L("Installing sis file from -> %S"), &KRApaLsSessionStartAppSisFile);
       
   124     sisFileInstaller.InstallSisAndWaitForAppListUpdateL(KRApaLsSessionStartAppSisFile); 
       
   125     
   111 	SetTestStepResult(EPass);
   126 	SetTestStepResult(EPass);
   112 	TInt error = iApaLsSession.Connect();
   127 	TInt error = iApaLsSession.Connect();
   113 	TEST(error==KErrNone);
   128 	TEST(error==KErrNone);
   114 	return TestStepResult();
   129 	return TestStepResult();
   115 	}
   130 	}
   118    @return - TVerdict code
   133    @return - TVerdict code
   119    Override of base class virtual
   134    Override of base class virtual
   120  */
   135  */
   121 TVerdict CT_StartAppTestStep::doTestStepPostambleL()
   136 TVerdict CT_StartAppTestStep::doTestStepPostambleL()
   122 	{
   137 	{
       
   138     CSisFileInstaller sisFileInstaller;
       
   139     
       
   140     sisFileInstaller.UninstallSisL(KUnprotectedAppComponent);
       
   141     sisFileInstaller.UninstallSisL(KRApaLsSessionStartAppComponent); 
       
   142      
   123 	return TestStepResult();
   143 	return TestStepResult();
   124 	}
   144 	}
   125 
   145 
   126 
   146 
   127 TVerdict CT_StartAppTestStep::doTestStepL()
   147 TVerdict CT_StartAppTestStep::doTestStepL()