appfw/apparchitecture/tef/T_AppList.cpp
changeset 0 2e3d3ce01487
child 19 924385140d98
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     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 "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-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  @file
       
    21  @internalComponent - Internal Symbian test code
       
    22 */
       
    23 
       
    24 #include <apgcli.h>
       
    25 #include "T_AppList.h"
       
    26 
       
    27 CTestAppListStep::CTestAppListStep()
       
    28 	{
       
    29 	}
       
    30 
       
    31 CTestAppListStep::~CTestAppListStep()
       
    32 	{
       
    33 	iApaLsSession.Close();
       
    34 	}
       
    35 
       
    36 
       
    37 /**
       
    38    @SYMTestCaseID CTestAppListStep_TestAppListL
       
    39   
       
    40    @SYMDEF DEF056494: Apparc App Info access APIs require the applist to be complete, delaying startup
       
    41   
       
    42    @SYMTestCaseDesc Testing whether apparctestserver return app info when the list is not completely populated.
       
    43   
       
    44    @SYMTestPriority High
       
    45   
       
    46    @SYMTestStatus Implemented
       
    47    
       
    48    @SYMTestActions To query for a particular app Info and check if the info is available.
       
    49    API Calls:\n
       
    50    RApaLsSession::GetAppInfo();
       
    51   
       
    52    @SYMTestExpectedResults Test should complete without any panic.
       
    53  */
       
    54 void CTestAppListStep::TestAppList()
       
    55 	{
       
    56 	TApaAppInfo appInfo;
       
    57 	TUid uid = {0x100048F3};
       
    58 	TInt ret = iApaLsSession.GetAppInfo(appInfo,uid);
       
    59 	INFO_PRINTF2(_L(" Call to GetAppInfo returned : %d  "), ret);
       
    60 	TEST(ret==KErrNone);
       
    61 	}
       
    62 
       
    63 
       
    64 TVerdict CTestAppListStep::doTestStepL()
       
    65 	{
       
    66 	INFO_PRINTF1(_L("Test T_AppList Started"));
       
    67 	
       
    68 	// Connect to RApaLsSession without waiting for app list population
       
    69 	TEST(iApaLsSession.ConnectWithoutWaitingForListPopulation()==KErrNone);
       
    70 	
       
    71 	// Run the test
       
    72 	//DONT_CHECK since apps are added to app list by CApaAppList::FindAndAddSpecificAppL()
       
    73 	HEAP_TEST_LS_SESSION(iApaLsSession, 0, DONT_CHECK, TestAppList(), NO_CLEANUP);
       
    74 
       
    75 	INFO_PRINTF1(_L("Test Finished"));	
       
    76 	return TestStepResult();
       
    77 	}