sl@0: // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #include "../sfbs/UTILS.H" sl@0: #include "TGetAllBitmapsCapability.h" sl@0: sl@0: CTGetAllBitmapsCapability::CTGetAllBitmapsCapability(CTestStep* aStep) : CTGraphicsBase(aStep) sl@0: { sl@0: } sl@0: sl@0: CTGetAllBitmapsCapability::~CTGetAllBitmapsCapability() sl@0: { sl@0: } sl@0: sl@0: void CTGetAllBitmapsCapability::RunTestCaseL(TInt aCurTestCase) sl@0: { sl@0: ((CTGetAllBitmapsCapabilityStep*)iStep)->SetTestStepID(KUnknownSYMTestCaseIDName); sl@0: switch(aCurTestCase) sl@0: { sl@0: case 1: sl@0: /** sl@0: @SYMTestCaseID GRAPHICS-FBSERV-0622 sl@0: */ sl@0: ((CTGetAllBitmapsCapabilityStep*)iStep)->SetTestStepID(_L("GRAPHICS-FBSERV-0622")); sl@0: TRAPD(err,GetAllBitmapsTestL()); sl@0: if(err != KErrNone) sl@0: TEST(err == KErrPermissionDenied); sl@0: break; sl@0: case 2: sl@0: ((CTGetAllBitmapsCapabilityStep*)iStep)->SetTestStepID(KNotATestSYMTestCaseIDName); sl@0: ((CTGetAllBitmapsCapabilityStep*)iStep)->CloseTMSGraphicsStep(); sl@0: TestComplete(); sl@0: break; sl@0: } sl@0: ((CTGetAllBitmapsCapabilityStep*)iStep)->RecordTestResultL(); sl@0: } sl@0: sl@0: void CTGetAllBitmapsCapability::GetAllBitmapsTestL() sl@0: { sl@0: CFbsBitmap* bitmap = new (ELeave) CFbsBitmap; sl@0: CleanupStack::PushL(bitmap); sl@0: RArray bitmapHandleArray; sl@0: CleanupClosePushL(bitmapHandleArray); sl@0: User::LeaveIfError(bitmap->GetAllBitmapHandles(bitmapHandleArray)); sl@0: CleanupStack::PopAndDestroy(2, bitmap); sl@0: } sl@0: sl@0: //-------------- sl@0: __CONSTRUCT_STEP__(GetAllBitmapsCapability)