Update contrib.
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 "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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
19 @internalComponent - Internal Symbian test code
22 #include "tsgimagembx.h"
24 CTSgImageMbx::CTSgImageMbx()
26 INFO_PRINTF1(_L("Graphics resource component test - RSgImage MBX Tests.\r\n"));
29 CTSgImageMbx::~CTSgImageMbx()
34 Overrides of base class pure virtual
35 Our implementation only gets called if the base class doTestStepPreambleL() did
36 not leave. That being the case, the current test result value will be EPass.
37 @leave Gets system wide error code
40 TVerdict CTSgImageMbx::doTestStepL()
42 SetTestStepID(_L("GRAPHICS-RESOURCE-0040"));
43 INFO_PRINTF1(_L("Getting supported pixel formats on the MBX hardware.\r\n"));
44 TestGetPixelFormatsMBXL();
49 @SYMTestCaseID GRAPHICS-RESOURCE-0096
51 SetTestStepID(_L("GRAPHICS-RESOURCE-0096"));
52 INFO_PRINTF1(_L("Getting the interfaces implemented on the MBX hardware.\r\n"));
53 TestGetImageInterfacesMBXL();
56 return TestStepResult();
61 @SYMTestCaseID GRAPHICS-RESOURCE-0040
62 @SYMTestCaseDesc Gets supported pixel formats on the MBX hardware.
66 @SYMFssID RSgImage::GetPixelFormats(const TSgImageInfo&, TUidPixelFormat*, TInt&)
67 @SYMTestPriority Critical
68 @SYMTestType Unit Test
69 @SYMTestPurpose To ensure all the available pixel formats are returned
70 in the array and the actual number of pixel formats in
71 the input/output aCount parameter on the MBX hardware.
72 @SYMTestActions Initialise the graphics resource component. Construct a
73 TSgImageInfo object and Initialise the member variables.
74 Construct a TInt array of size\n
76 \t 2. greater than the number of supported pixel formats\n
77 \t 3. equal to the number of supported pixel formats\n
78 \t 4. less than the number of supported pixel formats
79 @SYMTestExpectedResults The function must return\n
84 The supported pixel formats are populated into the array
85 and aCount stores the actual number of supported pixel formats.
86 The returned pixel formats should cover the pixel formats
87 in the image compatibility table that works on all platforms.
88 All the returned pixel formats should appear on the image
89 compatibility list for the MBX driver.
90 @SYMTestStatus Defined
92 void CTSgImageMbx::TestGetPixelFormatsMBXL()
95 //check all the pixel formats returned are in the common compatibility guarantees table
96 TestGetPixelFormatCompatibilityGuaranteesL();
98 //check the pixel formates supported by the MBX hardware only
99 CallGetPixelFormatsL(ESgCpuAccessNone, ESgUsageDirectGdiSource|ESgUsageCompositionSource|ESgUsageOpenGlesTexture2D|ESgUsageOpenVgImage|ESgUsageDirectGdiTarget, ETrue, KSgScreenIdMain);
100 CheckPixelFormatPresent(EUidPixelFormatRGB_565);
101 CheckPixelFormatPresent(EUidPixelFormatXRGB_8888);
102 CheckPixelFormatPresent(EUidPixelFormatARGB_8888_PRE);
107 void CTSgImageMbx::TestGetImageInterfacesMBXL()