|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Symbian Foundation License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent - Internal Symbian test code |
|
21 */ |
|
22 |
|
23 |
|
24 #ifndef T_ABSTRACT_NONNATIVEAPPS_STEP_H |
|
25 #define T_ABSTRACT_NONNATIVEAPPS_STEP_H |
|
26 |
|
27 #include <testexecutestepbase.h> |
|
28 #include <appfwk_test_utils.h> |
|
29 #include "testableapalssession.h" |
|
30 |
|
31 const TInt KApplicationType = 0x102081A0; |
|
32 _LIT(KLitNativeExecutable, "z:\\sys\\bin\\dummy.exe"); |
|
33 _LIT(KLitUpdatedAppsList, "c:\\private\\10003a3f\\UpdatedAppsList.bin"); |
|
34 |
|
35 class CT_AbstractNonNativeAppsTestStep : public CTestStep |
|
36 { |
|
37 public: |
|
38 CT_AbstractNonNativeAppsTestStep(); |
|
39 ~CT_AbstractNonNativeAppsTestStep(); |
|
40 |
|
41 public: |
|
42 struct TTestAppDetails |
|
43 { |
|
44 inline TTestAppDetails(TInt aAppUid, const TDesC& aLogicalExecutable, const TDesC& aRegistrationFile) : |
|
45 iAppUid(aAppUid), |
|
46 iLogicalExecutable(aLogicalExecutable), |
|
47 iRegistrationFile(aRegistrationFile) |
|
48 { |
|
49 } |
|
50 TInt iAppUid; |
|
51 const TDesC& iLogicalExecutable; |
|
52 const TDesC& iRegistrationFile; |
|
53 }; |
|
54 |
|
55 protected: |
|
56 void doAbstractNonNativeAppsTestStepPreambleL(); |
|
57 static void CleanupAndReset(RTestableApaLsSession& aSession, const TTestAppDetails& aApp); |
|
58 static void CallRegisterL(RTestableApaLsSession& aSession, const TTestAppDetails& aApp); |
|
59 static void CompleteRegisterL(RTestableApaLsSession& aSession, const TTestAppDetails& aApp); |
|
60 static void CallDeregisterL(RTestableApaLsSession& aSession, const TTestAppDetails& aApp); |
|
61 static void CompleteDeregisterL(RTestableApaLsSession& aSession, const TTestAppDetails& aApp); |
|
62 TBool FilePresent(const TDesC& aFile); |
|
63 TBool FileAbsent(const TDesC& aFile); |
|
64 TBool AppPresent(RTestableApaLsSession& aSession, const TTestAppDetails& aApp); |
|
65 TBool AppAbsent(RTestableApaLsSession& aSession, const TTestAppDetails& aApp); |
|
66 |
|
67 protected: |
|
68 RTestableApaLsSession iSession; |
|
69 RSmlTestUtils iUtils; |
|
70 }; |
|
71 |
|
72 #endif // T_ABSTRACT_NONNATIVEAPPS_STEP_H |