|
1 // Copyright (c) 2006-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 // |
|
15 |
|
16 #include "../sfbs/UTILS.H" |
|
17 #include "TGetAllBitmapsCapability.h" |
|
18 |
|
19 CTGetAllBitmapsCapability::CTGetAllBitmapsCapability(CTestStep* aStep) : CTGraphicsBase(aStep) |
|
20 { |
|
21 } |
|
22 |
|
23 CTGetAllBitmapsCapability::~CTGetAllBitmapsCapability() |
|
24 { |
|
25 } |
|
26 |
|
27 void CTGetAllBitmapsCapability::RunTestCaseL(TInt aCurTestCase) |
|
28 { |
|
29 ((CTGetAllBitmapsCapabilityStep*)iStep)->SetTestStepID(KUnknownSYMTestCaseIDName); |
|
30 switch(aCurTestCase) |
|
31 { |
|
32 case 1: |
|
33 /** |
|
34 @SYMTestCaseID GRAPHICS-FBSERV-0622 |
|
35 */ |
|
36 ((CTGetAllBitmapsCapabilityStep*)iStep)->SetTestStepID(_L("GRAPHICS-FBSERV-0622")); |
|
37 TRAPD(err,GetAllBitmapsTestL()); |
|
38 if(err != KErrNone) |
|
39 TEST(err == KErrPermissionDenied); |
|
40 break; |
|
41 case 2: |
|
42 ((CTGetAllBitmapsCapabilityStep*)iStep)->SetTestStepID(KNotATestSYMTestCaseIDName); |
|
43 ((CTGetAllBitmapsCapabilityStep*)iStep)->CloseTMSGraphicsStep(); |
|
44 TestComplete(); |
|
45 break; |
|
46 } |
|
47 ((CTGetAllBitmapsCapabilityStep*)iStep)->RecordTestResultL(); |
|
48 } |
|
49 |
|
50 void CTGetAllBitmapsCapability::GetAllBitmapsTestL() |
|
51 { |
|
52 CFbsBitmap* bitmap = new (ELeave) CFbsBitmap; |
|
53 CleanupStack::PushL(bitmap); |
|
54 RArray <TInt> bitmapHandleArray; |
|
55 CleanupClosePushL(bitmapHandleArray); |
|
56 User::LeaveIfError(bitmap->GetAllBitmapHandles(bitmapHandleArray)); |
|
57 CleanupStack::PopAndDestroy(2, bitmap); |
|
58 } |
|
59 |
|
60 //-------------- |
|
61 __CONSTRUCT_STEP__(GetAllBitmapsCapability) |