|
1 // Copyright (c) 2004-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 // This file contains testing steps for the integration test of ImageDecoder. |
|
15 // The tests are for opening the image file with TMMFileSource/TMMFileHandleSource |
|
16 // and decoding it. |
|
17 // |
|
18 // |
|
19 |
|
20 #ifndef __TESTIMAGEDECODERFILESOURCE_H__ |
|
21 #define __TESTIMAGEDECODERFILESOURCE_H__ |
|
22 |
|
23 #include "TestStepConversion.h" |
|
24 |
|
25 const TInt KMaxMimeLength = 256; |
|
26 |
|
27 // Positive Tests |
|
28 |
|
29 /** |
|
30 * |
|
31 * Read and decode an image, a JPEG, from a file passing FileSource. |
|
32 * |
|
33 * @lib "TSI_ICL_FRM_00.lib" |
|
34 * |
|
35 * @class CTestImageDecFileSource |
|
36 * |
|
37 */ |
|
38 class CTestImageDecFileSource : public CTestStepConversion |
|
39 { |
|
40 public: |
|
41 static CTestImageDecFileSource* NewL(const TDesC& aTestName); |
|
42 |
|
43 // from RTestStep |
|
44 virtual TVerdict DoTestStepL(); |
|
45 |
|
46 private: |
|
47 CTestImageDecFileSource(const TDesC& aTestName); |
|
48 void OpenImageAndDecodeFromFileSourceL(const TDesC& aFileName); |
|
49 |
|
50 TVerdict TestStep_I_0800_0801L(); |
|
51 }; |
|
52 |
|
53 /** |
|
54 * |
|
55 * Read and decode an image, a JPEG, from a file passing FileHandleSource. |
|
56 * |
|
57 * @lib "TSI_ICL_FRM_00.lib" |
|
58 * |
|
59 * @class CTestImageDecFileHandleSource |
|
60 * |
|
61 */ |
|
62 class CTestImageDecFileHandleSource : public CTestStepConversion |
|
63 { |
|
64 public: |
|
65 static CTestImageDecFileHandleSource* NewL(const TDesC& aTestName); |
|
66 |
|
67 // from RTestStep |
|
68 virtual TVerdict DoTestStepL(); |
|
69 |
|
70 private: |
|
71 CTestImageDecFileHandleSource(const TDesC& aTestName); |
|
72 void OpenImageAndDecodeFromFileHandleSourceL(const TDesC& aFileName); |
|
73 |
|
74 TVerdict TestStep_I_0802_0803L(); |
|
75 }; |
|
76 |
|
77 /** |
|
78 * |
|
79 * Read and decode an image, a JPEG, from a file passing FileSource passing a bitmap created using CreateExtendedBitmap. |
|
80 * |
|
81 * @lib "TSI_ICL_FRM_00.lib" |
|
82 * |
|
83 * @class CTestImageDecFileSource |
|
84 * |
|
85 */ |
|
86 class CTestImageDecFileSourceExtendedBitmap : public CTestStepConversion, public MFbsExtendedBitmapInitializer |
|
87 { |
|
88 public: |
|
89 static CTestImageDecFileSourceExtendedBitmap* NewL(const TDesC& aTestName); |
|
90 |
|
91 // from RTestStep |
|
92 virtual TVerdict DoTestStepL(); |
|
93 |
|
94 private: |
|
95 CTestImageDecFileSourceExtendedBitmap(const TDesC& aTestName); |
|
96 void OpenImageAndDecodeFromFileSourceL(const TDesC& aFileName); |
|
97 TInt InitExtendedBitmap(TAny* aData, TInt aDataSize); |
|
98 |
|
99 TVerdict TestStep_I_0804L(); |
|
100 }; |
|
101 |
|
102 #endif //__TESTIMAGEDECODERFILESOURCE_H__ |