appfw/apparchitecture/tef/T_RuleBasedLaunchingStep.cpp
branchRCL_3
changeset 20 c2c61fdca848
parent 19 924385140d98
equal deleted inserted replaced
19:924385140d98 20:c2c61fdca848
     1 // Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2005-2009 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".
    27 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
    27 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
    28 #include <apgicnflpartner.h>
    28 #include <apgicnflpartner.h>
    29 #endif //SYMBIAN_ENABLE_SPLIT_HEADERS
    29 #endif //SYMBIAN_ENABLE_SPLIT_HEADERS
    30 #include "testableapalssession.h"
    30 #include "testableapalssession.h"
    31 
    31 
    32 #include "T_SisFileInstaller.h"
       
    33 
       
    34 _LIT(KRuleBasedApp1SisFile, "z:\\apparctest\\apparctestsisfiles\\tRuleBasedApp1.sis");
       
    35 _LIT(KRuleBasedApp1Component, "tRuleBasedApp1");
       
    36 
       
    37 _LIT(KRuleBasedApp2SisFile, "z:\\apparctest\\apparctestsisfiles\\tRuleBasedApp2.sis");
       
    38 _LIT(KRuleBasedApp2Component, "tRuleBasedApp2");
       
    39 
       
    40 _LIT(KRuleBasedApp3SisFile, "z:\\apparctest\\apparctestsisfiles\\tRuleBasedApp3.sis");
       
    41 _LIT(KRuleBasedApp3Component, "tRuleBasedApp3");
       
    42 
       
    43 _LIT(KRuleBasedApp4SisFile, "z:\\apparctest\\apparctestsisfiles\\tRuleBasedApp4.sis");
       
    44 _LIT(KRuleBasedApp4Component, "tRuleBasedApp4");
       
    45 
       
    46 const TUint KNonNativeApplicationType = 0x10207f90;
    32 const TUint KNonNativeApplicationType = 0x10207f90;
    47 const TUint KNonNativeApplication = 0xA0000B6E;
    33 const TUint KNonNativeApplication = 0xA0000B6E;
    48 
    34 
    49 _LIT(KLitNativeExecutable, "z:\\sys\\bin\\TNNAPP2.EXE");
    35 _LIT(KLitNativeExecutable, "z:\\sys\\bin\\TNNAPP2.EXE");
    50 _LIT(KLitLogicalExecutableA, "c:\\A.NNAPP2"); // this file never actually needs to exist
    36 _LIT(KLitLogicalExecutableA, "c:\\A.NNAPP2"); // this file never actually needs to exist
    67 	RTestableApaLsSession theLs;
    53 	RTestableApaLsSession theLs;
    68 	User::LeaveIfError(theLs.Connect());
    54 	User::LeaveIfError(theLs.Connect());
    69 	CleanupClosePushL(theLs);
    55 	CleanupClosePushL(theLs);
    70 	
    56 	
    71 	//DONT_CHECK since app list is updated
    57 	//DONT_CHECK since app list is updated
    72 #ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK	
       
    73 	HEAP_TEST_LS_SESSION(theLs, 0, DONT_CHECK, TestLaunchNonNativeApplicationForRuleBasedL(theLs), NO_CLEANUP);	
    58 	HEAP_TEST_LS_SESSION(theLs, 0, DONT_CHECK, TestLaunchNonNativeApplicationForRuleBasedL(theLs), NO_CLEANUP);	
    74 #endif	
       
    75 	//DONT_CHECK since result is unstable
    59 	//DONT_CHECK since result is unstable
    76 	HEAP_TEST_LS_SESSION(theLs, 0, DONT_CHECK, LaunchAppTests1L(theLs), theLs.FlushRecognitionCache() );
    60 	HEAP_TEST_LS_SESSION(theLs, 0, DONT_CHECK, LaunchAppTests1L(theLs), theLs.FlushRecognitionCache() );
    77 	HEAP_TEST_LS_SESSION(theLs, 0, 0, LaunchAppTests2L(theLs), theLs.FlushRecognitionCache() );
    61 	HEAP_TEST_LS_SESSION(theLs, 0, 0, LaunchAppTests2L(theLs), theLs.FlushRecognitionCache() );
    78 	HEAP_TEST_LS_SESSION(theLs, 0, 0, LaunchAppTests3L(theLs), theLs.FlushRecognitionCache() );
    62 	HEAP_TEST_LS_SESSION(theLs, 0, 0, LaunchAppTests3L(theLs), theLs.FlushRecognitionCache() );
    79 	HEAP_TEST_LS_SESSION(theLs, 0, 0, LaunchAppTests4L(theLs), theLs.FlushRecognitionCache() );
    63 	HEAP_TEST_LS_SESSION(theLs, 0, 0, LaunchAppTests4L(theLs), theLs.FlushRecognitionCache() );
   459 	AppClosed(KUidApp2);
   443 	AppClosed(KUidApp2);
   460 	AppClosed(KUidApp3);
   444 	AppClosed(KUidApp3);
   461 	AppClosed(KUidApp4);
   445 	AppClosed(KUidApp4);
   462 	}
   446 	}
   463 
   447 
   464 TVerdict CTRuleBasedLaunchingStep::doTestStepPreambleL()
       
   465     {
       
   466     CSisFileInstaller sisFIleInstaller;
       
   467     INFO_PRINTF2(_L("Installing sis file from -> %S"), &KRuleBasedApp1SisFile);
       
   468     sisFIleInstaller.InstallSisL(KRuleBasedApp1SisFile);
       
   469     INFO_PRINTF2(_L("Installing sis file from -> %S"), &KRuleBasedApp2SisFile);
       
   470     sisFIleInstaller.InstallSisL(KRuleBasedApp2SisFile);
       
   471     INFO_PRINTF2(_L("Installing sis file from -> %S"), &KRuleBasedApp3SisFile);
       
   472     sisFIleInstaller.InstallSisL(KRuleBasedApp3SisFile);
       
   473     INFO_PRINTF2(_L("Installing sis file from -> %S"), &KRuleBasedApp4SisFile);
       
   474     sisFIleInstaller.InstallSisAndWaitForAppListUpdateL(KRuleBasedApp4SisFile);
       
   475     
       
   476     SetTestStepResult(EPass);
       
   477     return TestStepResult();
       
   478     }
       
   479 
       
   480 
       
   481 /**
       
   482    @return - TVerdict code
       
   483    Override of base class virtual
       
   484  */
       
   485 TVerdict CTRuleBasedLaunchingStep::doTestStepPostambleL()
       
   486     {
       
   487     CSisFileInstaller sisFIleInstaller;
       
   488     sisFIleInstaller.UninstallSisL(KRuleBasedApp1Component);
       
   489     sisFIleInstaller.UninstallSisL(KRuleBasedApp2Component); 
       
   490     sisFIleInstaller.UninstallSisL(KRuleBasedApp3Component);
       
   491     sisFIleInstaller.UninstallSisL(KRuleBasedApp4Component);
       
   492     return TestStepResult();
       
   493     }
       
   494 
       
   495 
       
   496 TVerdict CTRuleBasedLaunchingStep::doTestStepL()
   448 TVerdict CTRuleBasedLaunchingStep::doTestStepL()
   497 	{
   449 	{
   498 	INFO_PRINTF1(_L("TRuleBasedLaunchingStep test started...."));
   450 	INFO_PRINTF1(_L("TRuleBasedLaunchingStep test started...."));
   499 	
   451 	
   500 	User::LeaveIfError(FbsStartup());
   452 	User::LeaveIfError(FbsStartup());