|
1 // Copyright (c) 2005-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 // The following test case is used to test if apparctestserver |
|
15 // can return app data for a specific app by caching that data when requested. |
|
16 // |
|
17 // |
|
18 |
|
19 |
|
20 |
|
21 /** |
|
22 @file |
|
23 @internalComponent - Internal Symbian test code |
|
24 */ |
|
25 |
|
26 #include <apgcli.h> |
|
27 #include "T_AppList.h" |
|
28 |
|
29 CTestAppListStep::CTestAppListStep() |
|
30 { |
|
31 } |
|
32 |
|
33 CTestAppListStep::~CTestAppListStep() |
|
34 { |
|
35 iApaLsSession.Close(); |
|
36 } |
|
37 |
|
38 |
|
39 /** |
|
40 @SYMTestCaseID CTestAppListStep_TestAppListL |
|
41 |
|
42 @SYMDEF DEF056494: Apparc App Info access APIs require the applist to be complete, delaying startup |
|
43 |
|
44 @SYMTestCaseDesc Testing whether apparctestserver return app info when the list is not completely populated. |
|
45 |
|
46 @SYMTestPriority High |
|
47 |
|
48 @SYMTestStatus Implemented |
|
49 |
|
50 @SYMTestActions To query for a particular app Info and check if the info is available. |
|
51 API Calls:\n |
|
52 RApaLsSession::GetAppInfo(); |
|
53 |
|
54 @SYMTestExpectedResults Test should complete without any panic. |
|
55 */ |
|
56 void CTestAppListStep::TestAppList() |
|
57 { |
|
58 TApaAppInfo appInfo; |
|
59 TUid uid = {0x100048F3}; |
|
60 TInt ret = iApaLsSession.GetAppInfo(appInfo,uid); |
|
61 INFO_PRINTF2(_L(" Call to GetAppInfo returned : %d "), ret); |
|
62 TEST(ret==KErrNone); |
|
63 } |
|
64 |
|
65 |
|
66 TVerdict CTestAppListStep::doTestStepL() |
|
67 { |
|
68 INFO_PRINTF1(_L("Test T_AppList Started")); |
|
69 |
|
70 // Connect to RApaLsSession without waiting for app list population |
|
71 TEST(iApaLsSession.ConnectWithoutWaitingForListPopulation()==KErrNone); |
|
72 |
|
73 // Run the test |
|
74 //DONT_CHECK since apps are added to app list by CApaAppList::FindAndAddSpecificAppL() |
|
75 HEAP_TEST_LS_SESSION(iApaLsSession, 0, DONT_CHECK, TestAppList(), NO_CLEANUP); |
|
76 |
|
77 INFO_PRINTF1(_L("Test Finished")); |
|
78 return TestStepResult(); |
|
79 } |