1 // |
|
2 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 // All rights reserved. |
|
4 // This component and the accompanying materials are made available |
|
5 // under the terms of "Eclipse Public License v1.0" |
|
6 // which accompanies this distribution, and is available |
|
7 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 // |
|
9 // Initial Contributors: |
|
10 // Nokia Corporation - initial contribution. |
|
11 // |
|
12 // Contributors: |
|
13 // |
|
14 // Description: |
|
15 // |
|
16 //! @file |
|
17 //! @SYMTestSuiteName GRAPHICS-WSERV-WsBitmap-PublicApi |
|
18 //! @SYMScriptTestEnvironment This test script requires a basic ROM. |
|
19 |
|
20 /////////////////////////////////////////////////////////////////////////////// |
|
21 // GRAPHICS-WSERV-WsBitmap-PublicApi.script |
|
22 // |
|
23 // Tests all public elements of the CWsBitmap class |
|
24 // as a means of confidence that the API works as expected. |
|
25 // |
|
26 // The purpose is to provide a regression test suite of PublishedAll APIs for |
|
27 // CWsBitmap related classes. |
|
28 // Negative testing is performed to confirm that correct errors are returned |
|
29 // when incorrect parameters are given. |
|
30 // |
|
31 // The tests are fully automated. |
|
32 /////////////////////////////////////////////////////////////////////////////// |
|
33 |
|
34 |
|
35 LOAD_SUITE T_GraphicsWservAPI |
|
36 |
|
37 |
|
38 // **************************************************************************** |
|
39 // CWsBitmap |
|
40 // **************************************************************************** |
|
41 |
|
42 START_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-0001 |
|
43 //! @SYMTestCaseID GRAPHICS-WSERV-WsBitmap-PublicApi-0001 |
|
44 //! @SYMAPI CWsBitmap |
|
45 //! @SYMAuthor Victor Liu |
|
46 //! @SYMCreationDate 08/01/2007 |
|
47 //! @SYMTestCaseDesc CWsBitmap(): create a CWsBitmap object by C++ defaut constructor |
|
48 //! Uses API elements: CWsBitmap() |
|
49 //! @SYMTestActions Simply execute new() a CWsBitmap to create the object |
|
50 //! @SYMTestStatus Implemented |
|
51 //! @SYMTestPriority Low |
|
52 //! @SYMTestExpectedResults CWsBitmap object was created without causing panic |
|
53 //! @SYMTestType CIT |
|
54 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsBitmap-PublicApi.ini |
|
55 CREATE_OBJECT CWsBitmap wsbmp |
|
56 COMMAND wsbmp new |
|
57 END_TEST_BLOCK |
|
58 END_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-0001 |
|
59 |
|
60 |
|
61 START_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-0002 |
|
62 //! @SYMTestCaseID GRAPHICS-WSERV-WsBitmap-PublicApi-0002 |
|
63 //! @SYMAPI CWsBitmap |
|
64 //! @SYMAuthor Victor Liu |
|
65 //! @SYMCreationDate 08/01/2007 |
|
66 //! @SYMTestCaseDesc CWsBitmap(RWsSession &aWs): create a CWsBitmap object within the specified RWsSession |
|
67 //! Uses API elements: RWsSession::Connect, CWsBitmap() |
|
68 //! @SYMTestActions 1. Create and connect a RWsSession |
|
69 //! 2. Create a CWsBitmap within the RWsSession |
|
70 //! @SYMTestStatus Implemented |
|
71 //! @SYMTestPriority Critical |
|
72 //! @SYMTestExpectedResults CWsBitmap object was created without causing panic |
|
73 //! @SYMTestType CIT |
|
74 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsBitmap-PublicApi.ini |
|
75 CREATE_OBJECT RWsSession ws |
|
76 CREATE_OBJECT CWsBitmap wsbmp |
|
77 COMMAND ws new |
|
78 COMMAND ws Connect |
|
79 COMMAND wsbmp new GRAPHICS-WSERV-WsBitmap-PublicApi-0002-0001-new_command04 |
|
80 END_TEST_BLOCK |
|
81 END_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-0002 |
|
82 |
|
83 |
|
84 START_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-0003 |
|
85 //! @SYMTestCaseID GRAPHICS-WSERV-WsBitmap-PublicApi-0003 |
|
86 //! @SYMAPI CWsBitmap |
|
87 //! @SYMAuthor Victor Liu |
|
88 //! @SYMCreationDate 08/01/2007 |
|
89 //! @SYMTestCaseDesc ~CWsBitmap(): CWsBitmap destructor |
|
90 //! Uses API elements: RWsSession::Connect, CWsBitmap |
|
91 //! @SYMTestActions 1. Create and connect a RWsSession |
|
92 //! 2. New/Construct a CWsBitmap within the RWsSession |
|
93 //! 3. Destruct the CWsBitmap object |
|
94 //! @SYMTestStatus Implemented |
|
95 //! @SYMTestPriority Critical |
|
96 //! @SYMTestExpectedResults CWsBitmap was destructed without causing panic |
|
97 //! @SYMTestType CIT |
|
98 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsBitmap-PublicApi.ini |
|
99 CREATE_OBJECT RWsSession ws |
|
100 CREATE_OBJECT CWsBitmap wsbmp |
|
101 COMMAND ws new |
|
102 COMMAND ws Connect |
|
103 COMMAND wsbmp new GRAPHICS-WSERV-WsBitmap-PublicApi-0003-0001-new_command04 |
|
104 COMMAND wsbmp ~ |
|
105 END_TEST_BLOCK |
|
106 END_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-0003 |
|
107 |
|
108 |
|
109 START_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-0004 |
|
110 //! @SYMTestCaseID GRAPHICS-WSERV-WsBitmap-PublicApi-0004 |
|
111 //! @SYMAPI CWsBitmap |
|
112 //! @SYMAuthor Victor Liu |
|
113 //! @SYMCreationDate 26/02/2007 |
|
114 //! @SYMTestCaseDesc Create(const TSize &aSizeInPixels, TDisplayMode aDispMode): create a CWsBitmap bitmap with the specified size and display mode |
|
115 //! Uses API elements: RWsSession::Connect, CFbsBitmap::SizeInPixels & DisplayMode, WsClientClass::WsHandle |
|
116 //! @SYMTestActions 1. Create and connect a RWsSession |
|
117 //! 2. New/Construct a CWsBitmap within the RWsSession, check its initial size and display mode |
|
118 //! 3. Create the CWsBitmap bitmap with the specified size and display mode |
|
119 //! 4. Check CWsBitmap bitmap creation: its size and display mode as specified |
|
120 //! @SYMTestStatus Implemented |
|
121 //! @SYMTestPriority Critical |
|
122 //! @SYMTestExpectedResults 1. Create() method returns KErrNone without causing panic |
|
123 //! 2. Before the bitmap creation: handle=0, wshandle=0, size width & height = 0, displaymode = ENone |
|
124 //! After the bitmap created: wshandle!=0, size width & height & displaymode as specified in the Create command |
|
125 //! @SYMTestType CIT |
|
126 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsBitmap-PublicApi.ini |
|
127 CREATE_OBJECT RWsSession ws |
|
128 CREATE_OBJECT CWsBitmap wsbmp |
|
129 COMMAND ws new |
|
130 COMMAND ws Connect |
|
131 COMMAND wsbmp new GRAPHICS-WSERV-WsBitmap-PublicApi-0004-0001-new_command04 |
|
132 COMMAND wsbmp Handle GRAPHICS-WSERV-WsBitmap-PublicApi-0004-0001-Handle_command05 |
|
133 COMMAND wsbmp WsHandle GRAPHICS-WSERV-WsBitmap-PublicApi-0004-0001-WsHandle_command06 |
|
134 COMMAND wsbmp SizeInPixels GRAPHICS-WSERV-WsBitmap-PublicApi-0004-0001-SizeInPixels_command07 |
|
135 COMMAND wsbmp DisplayMode GRAPHICS-WSERV-WsBitmap-PublicApi-0004-0001-DisplayMode_command08 |
|
136 COMMAND wsbmp Create GRAPHICS-WSERV-WsBitmap-PublicApi-0004-0001-Create_command09 |
|
137 COMMAND wsbmp SizeInPixels GRAPHICS-WSERV-WsBitmap-PublicApi-0004-0001-SizeInPixels_command10 |
|
138 COMMAND wsbmp DisplayMode GRAPHICS-WSERV-WsBitmap-PublicApi-0004-0001-DisplayMode_command11 |
|
139 COMMAND wsbmp Handle |
|
140 COMMAND wsbmp WsHandle GRAPHICS-WSERV-WsBitmap-PublicApi-0004-0001-WsHandle_command13 |
|
141 END_TEST_BLOCK |
|
142 END_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-0004 |
|
143 |
|
144 |
|
145 START_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-0005 |
|
146 //! @SYMTestCaseID GRAPHICS-WSERV-WsBitmap-PublicApi-0005 |
|
147 //! @SYMAPI CWsBitmap |
|
148 //! @SYMAuthor Victor Liu |
|
149 //! @SYMCreationDate 26/02/2007 |
|
150 //! @SYMTestCaseDesc Duplicate(TInt aHandle): make a duplicate of the specified bitmap handle |
|
151 //! Uses API elements: RWsSession::Connect, CFbsBitmap::Handle & SizeInPixels & DisplayMode, CWsBitmap: Create |
|
152 //! @SYMTestActions 1. Create and connect a RWsSession |
|
153 //! 2. New/Construct a source CWsBitmap within the RWsSession, and Create it with the specified size and display mode |
|
154 //! 3. New/Construct a dest CWsBitmap within the RWsSession, check its initial size and display mode |
|
155 //! 4. Execute Duplicate to make dest CWsBitmap a duplicate of the source CWsBitmap |
|
156 //! 5. Check the size and display mode of the dest CWsBitmap (expected to be the same as those of the source CWsBitmap) |
|
157 //! 6. Destruct the CWsBitmap objects |
|
158 //! @SYMTestStatus Implemented |
|
159 //! @SYMTestPriority Critical |
|
160 //! @SYMTestExpectedResults 1. Duplicate() method returns KErrNone without causing panic |
|
161 //! 2. Before the bitmap duplication: handle=0, wshandle=0, size width & height = 0, displaymode = ENone |
|
162 //! After the bitmap duplicated: wshandle!=0, size width & height & displaymode the same as the source bitmap |
|
163 //! @SYMTestType CIT |
|
164 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsBitmap-PublicApi.ini |
|
165 CREATE_OBJECT RWsSession ws |
|
166 CREATE_OBJECT CWsBitmap wsbmp |
|
167 CREATE_OBJECT CWsBitmap wsbmp_src |
|
168 COMMAND ws new |
|
169 COMMAND ws Connect |
|
170 COMMAND wsbmp_src new GRAPHICS-WSERV-WsBitmap-PublicApi-0005-0001-new_command04 |
|
171 COMMAND wsbmp_src Create GRAPHICS-WSERV-WsBitmap-PublicApi-0005-0001-Create_command05 |
|
172 COMMAND wsbmp_src Handle |
|
173 COMMAND wsbmp_src WsHandle GRAPHICS-WSERV-WsBitmap-PublicApi-0005-0001-WsHandle_command07 |
|
174 COMMAND wsbmp new GRAPHICS-WSERV-WsBitmap-PublicApi-0005-0001-new_command09 |
|
175 COMMAND wsbmp Handle GRAPHICS-WSERV-WsBitmap-PublicApi-0005-0001-Handle_command10 |
|
176 COMMAND wsbmp WsHandle GRAPHICS-WSERV-WsBitmap-PublicApi-0005-0001-WsHandle_command11 |
|
177 COMMAND wsbmp SizeInPixels GRAPHICS-WSERV-WsBitmap-PublicApi-0005-0001-SizeInPixels_command12 |
|
178 COMMAND wsbmp DisplayMode GRAPHICS-WSERV-WsBitmap-PublicApi-0005-0001-DisplayMode_command13 |
|
179 COMMAND wsbmp Duplicate GRAPHICS-WSERV-WsBitmap-PublicApi-0005-0001-Duplicate_command14 |
|
180 COMMAND wsbmp SizeInPixels GRAPHICS-WSERV-WsBitmap-PublicApi-0005-0001-SizeInPixels_command15 |
|
181 COMMAND wsbmp DisplayMode GRAPHICS-WSERV-WsBitmap-PublicApi-0005-0001-DisplayMode_command16 |
|
182 COMMAND wsbmp Handle |
|
183 COMMAND wsbmp WsHandle GRAPHICS-WSERV-WsBitmap-PublicApi-0005-0001-WsHandle_command18 |
|
184 COMMAND wsbmp ~ |
|
185 COMMAND wsbmp_src ~ |
|
186 END_TEST_BLOCK |
|
187 END_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-0005 |
|
188 |
|
189 |
|
190 START_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-0006 |
|
191 //! @SYMTestCaseID GRAPHICS-WSERV-WsBitmap-PublicApi-0006 |
|
192 //! @SYMAPI CWsBitmap |
|
193 //! @SYMAuthor Victor Liu |
|
194 //! @SYMCreationDate 09/01/2007 |
|
195 //! @SYMTestCaseDesc Load(const TDesC &aFileName, TInt32 aId, TBool aShareIfLoaded=ETrue): load a CWsBitmap from a file |
|
196 //! Uses API elements: RWsSession::Connect, CFbsBitmap::Save & Handle & SizeInPixels & DisplayMode, CWsBitmap: Create |
|
197 //! @SYMTestActions 1. Create and connect a RWsSession |
|
198 //! 2. New/Construct a source CWsBitmap within the RWsSession, and Create it with the specified size and display mode |
|
199 //! 3. Call CFbsBitmap::Save to save the source CWsBitmap into a temp file |
|
200 //! 4. New/Construct a dest CWsBitmap within the RWsSession, check its initial size and display mode |
|
201 //! 5. Execute Load the dest CWsBitmap from the temp file |
|
202 //! 6. Check the size and display mode of the dest CWsBitmap (expected to be the same as those of the source CWsBitmap) |
|
203 //! 7. Destruct the CWsBitmap objects |
|
204 //! @SYMTestStatus Implemented |
|
205 //! @SYMTestPriority Critical |
|
206 //! @SYMTestExpectedResults 1. Load() method returns KErrNone without causing panic, and the loaded bitmap size and display mode is the same as specified in the file |
|
207 //! 2. Before the bitmap loaded: handle=0, wshandle=0, size width & height = 0, displaymode = ENone |
|
208 //! After the bitmap loaded: wshandle!=0, size width & height & displaymode the same as the source bitmap |
|
209 //! @SYMTestType CIT |
|
210 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsBitmap-PublicApi.ini |
|
211 CREATE_OBJECT RWsSession ws |
|
212 CREATE_OBJECT CWsBitmap wsbmp |
|
213 CREATE_OBJECT CWsBitmap wsbmp_src |
|
214 COMMAND ws new |
|
215 COMMAND ws Connect |
|
216 COMMAND wsbmp_src new GRAPHICS-WSERV-WsBitmap-PublicApi-0006-0001-new_command04 |
|
217 COMMAND wsbmp_src Create GRAPHICS-WSERV-WsBitmap-PublicApi-0006-0001-Create_command05 |
|
218 COMMAND wsbmp_src Save GRAPHICS-WSERV-WsBitmap-PublicApi-0006-0001-Save_command06 |
|
219 COMMAND wsbmp_src Handle |
|
220 COMMAND wsbmp_src WsHandle GRAPHICS-WSERV-WsBitmap-PublicApi-0006-0001-WsHandle_command08 |
|
221 COMMAND wsbmp new GRAPHICS-WSERV-WsBitmap-PublicApi-0006-0001-new_command10 |
|
222 COMMAND wsbmp Handle GRAPHICS-WSERV-WsBitmap-PublicApi-0006-0001-Handle_command11 |
|
223 COMMAND wsbmp WsHandle GRAPHICS-WSERV-WsBitmap-PublicApi-0006-0001-WsHandle_command12 |
|
224 COMMAND wsbmp SizeInPixels GRAPHICS-WSERV-WsBitmap-PublicApi-0006-0001-SizeInPixels_command13 |
|
225 COMMAND wsbmp Load GRAPHICS-WSERV-WsBitmap-PublicApi-0006-0001-Load_command14 |
|
226 COMMAND wsbmp ~ |
|
227 COMMAND wsbmp_src ~ |
|
228 END_TEST_BLOCK |
|
229 RUN_UTILS DeleteFile ${SYSDRIVE}\graphics\test_wsbitmap.tmp |
|
230 END_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-0006 |
|
231 |
|
232 |
|
233 START_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-0007 |
|
234 //! @SYMTestCaseID GRAPHICS-WSERV-WsBitmap-PublicApi-0007 |
|
235 //! @SYMAPI CWsBitmap |
|
236 //! @SYMAuthor Victor Liu |
|
237 //! @SYMCreationDate 27/01/2007 |
|
238 //! @SYMTestCaseDesc InternalizeL(RReadStream &aStream): internalises a CWsBitmap from the read stream |
|
239 //! Uses API elements: RWsSession::Connect, CFbsBitmap::ExternalizeL & SizeInPixels & DisplayMode, CWsBitmap |
|
240 //! @SYMTestActions 1. Create and connect a RWsSession |
|
241 //! 2. New/Construct a source CWsBitmap within the RWsSession, and Create it with the specified size and display mode |
|
242 //! 3. Call CFbsBitmap::ExternalizeL to externalize the source CWsBitmap into a temp file stream |
|
243 //! 4. New/Construct a dest CWsBitmap within the RWsSession, check its initial size and display mode |
|
244 //! 5. Execute InternalizeL the dest CWsBitmap from the temp file stream |
|
245 //! 6. Check the size and display mode of the dest CWsBitmap (expected to be the same as those of the source CWsBitmap) |
|
246 //! 7. Destruct the CWsBitmap objects, and delete the temp file stream |
|
247 //! @SYMTestStatus Implemented |
|
248 //! @SYMTestPriority Critical |
|
249 //! @SYMTestExpectedResults 1. InternalizeL() without causing panic |
|
250 //! 2. Before the bitmap internalized: handle=0, wshandle=0, size width & height = 0, displaymode = ENone |
|
251 //! After the bitmap internalized: wshandle!=0, size width & height & displaymode the same as the source bitmap |
|
252 //! @SYMTestType CIT |
|
253 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsBitmap-PublicApi.ini |
|
254 CREATE_OBJECT RWsSession ws |
|
255 CREATE_OBJECT CWsBitmap wsbmp |
|
256 CREATE_OBJECT CWsBitmap wsbmp_src |
|
257 COMMAND ws new |
|
258 COMMAND ws Connect |
|
259 COMMAND wsbmp_src new GRAPHICS-WSERV-WsBitmap-PublicApi-0007-0001-new_command04 |
|
260 COMMAND wsbmp_src Create GRAPHICS-WSERV-WsBitmap-PublicApi-0007-0001-Create_command05 |
|
261 COMMAND wsbmp_src ExternalizeL GRAPHICS-WSERV-WsBitmap-PublicApi-0007-0001-ExternalizeL_command06 |
|
262 COMMAND wsbmp new GRAPHICS-WSERV-WsBitmap-PublicApi-0007-0001-new_command08 |
|
263 COMMAND wsbmp Handle GRAPHICS-WSERV-WsBitmap-PublicApi-0007-0001-Handle_command09 |
|
264 COMMAND wsbmp WsHandle GRAPHICS-WSERV-WsBitmap-PublicApi-0007-0001-WsHandle_command10 |
|
265 COMMAND wsbmp SizeInPixels GRAPHICS-WSERV-WsBitmap-PublicApi-0007-0001-SizeInPixels_command11 |
|
266 COMMAND wsbmp InternalizeL GRAPHICS-WSERV-WsBitmap-PublicApi-0007-0001-InternalizeL_command12 |
|
267 COMMAND wsbmp Handle |
|
268 COMMAND wsbmp WsHandle GRAPHICS-WSERV-WsBitmap-PublicApi-0007-0001-WsHandle_command14 |
|
269 COMMAND wsbmp SizeInPixels GRAPHICS-WSERV-WsBitmap-PublicApi-0007-0001-SizeInPixels_command15 |
|
270 COMMAND wsbmp ~ |
|
271 COMMAND wsbmp_src ~ |
|
272 END_TEST_BLOCK |
|
273 RUN_UTILS DeleteFile ${SYSDRIVE}\graphics\test_wsbitmap.tmp |
|
274 END_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-0007 |
|
275 |
|
276 |
|
277 START_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-0008 |
|
278 //! @SYMTestCaseID GRAPHICS-WSERV-WsBitmap-PublicApi-0008 |
|
279 //! @SYMAPI CWsBitmap |
|
280 //! @SYMAuthor Victor Liu |
|
281 //! @SYMCreationDate 09/01/2007 |
|
282 //! @SYMTestCaseDesc Reset(): release the bitmap's handle from the FBSERV |
|
283 //! Uses API elements: RWsSession::Connect, CFbsBitmap::Handle, MWsClientClass::WsHandle, CWsBitmap |
|
284 //! @SYMTestActions 1. Create and connect a RWsSession |
|
285 //! 2. New and create a CWsBitmap within the RWsSession, check its WsHandle to make sure the creation |
|
286 //! 3. Execute Reset() to release the bitmap's handle |
|
287 //! 4. Call CFbsBitmap::Handle & MWsClientClass::WsHandle to check if the handle id released (i.e. equal to value 0) |
|
288 //! @SYMTestStatus Implemented |
|
289 //! @SYMTestPriority Critical |
|
290 //! @SYMTestExpectedResults 1. CWsBitmap was reset without causing panic |
|
291 //! 2. Before the created bitmap reset: wshandle!=0 |
|
292 //! After the bitmap reset: wshandle=0, handle=0, size width & height = 0, displaymode = ENone |
|
293 //! @SYMTestType CIT |
|
294 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsBitmap-PublicApi.ini |
|
295 CREATE_OBJECT RWsSession ws |
|
296 CREATE_OBJECT CWsBitmap wsbmp |
|
297 COMMAND ws new |
|
298 COMMAND ws Connect |
|
299 COMMAND wsbmp new GRAPHICS-WSERV-WsBitmap-PublicApi-0008-0001-new_command04 |
|
300 COMMAND wsbmp Create GRAPHICS-WSERV-WsBitmap-PublicApi-0008-0001-Create_command05 |
|
301 COMMAND wsbmp Handle |
|
302 COMMAND wsbmp WsHandle GRAPHICS-WSERV-WsBitmap-PublicApi-0008-0001-WsHandle_command07 |
|
303 COMMAND wsbmp Reset |
|
304 COMMAND wsbmp Handle GRAPHICS-WSERV-WsBitmap-PublicApi-0008-0001-Handle_command09 |
|
305 COMMAND wsbmp WsHandle GRAPHICS-WSERV-WsBitmap-PublicApi-0008-0001-WsHandle_command10 |
|
306 COMMAND wsbmp SizeInPixels GRAPHICS-WSERV-WsBitmap-PublicApi-0008-0001-SizeInPixels_command11 |
|
307 COMMAND wsbmp DisplayMode GRAPHICS-WSERV-WsBitmap-PublicApi-0008-0001-DisplayMode_command12 |
|
308 END_TEST_BLOCK |
|
309 END_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-0008 |
|
310 |
|
311 |
|
312 // **************************************************************************** |
|
313 // Negative testcases of CWsBitmap |
|
314 // **************************************************************************** |
|
315 |
|
316 START_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-1001 |
|
317 //! @SYMTestCaseID GRAPHICS-WSERV-WsBitmap-PublicApi-1001 |
|
318 //! @SYMAPI CWsBitmap |
|
319 //! @SYMAuthor Victor Liu |
|
320 //! @SYMCreationDate 03/10/2007 |
|
321 //! @SYMTestCaseDesc CWsBitmap(): fail to execute Create() and follow-up commands for a CWsBitmap created by C++ default constructor |
|
322 //! Uses API elements: CWsBitmap::Create |
|
323 //! @SYMTestActions 1. new() a CWsBitmap with its default C++ constructor |
|
324 //! 2. Execute Create() on the CWsBitmap and check if it generated expected error code |
|
325 //! 3. Destruct CWsBitmap |
|
326 //! @SYMTestStatus Implemented |
|
327 //! @SYMTestPriority Low |
|
328 //! @SYMTestExpectedResults Create() on the CWsBitmap with its default C++ constructor generated KErrCouldNotConnect (-34) |
|
329 //! @SYMTestType CIT |
|
330 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsBitmap-PublicApi.ini |
|
331 CREATE_OBJECT CWsBitmap wsbmp |
|
332 COMMAND wsbmp new |
|
333 COMMAND !Error=-34 wsbmp Create GRAPHICS-WSERV-WsBitmap-PublicApi-1001-0001-Create_command01 |
|
334 COMMAND wsbmp ~ |
|
335 END_TEST_BLOCK |
|
336 END_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-1001 |
|
337 |
|
338 |
|
339 START_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-1002 |
|
340 //! @SYMTestCaseID GRAPHICS-WSERV-WsBitmap-PublicApi-1002 |
|
341 //! @SYMAPI CWsBitmap |
|
342 //! @SYMAuthor Victor Liu |
|
343 //! @SYMCreationDate 03/10/2007 |
|
344 //! @SYMTestCaseDesc CWsBitmap(RWsSession &aWs): new a CWsBitmap object within a unconnected RWsSession |
|
345 //! Uses API elements: RWsSession::Connect, CWsBitmap() |
|
346 //! @SYMTestActions 1. Create a RWsSession |
|
347 //! 2. new() a CWsBitmap within the unconnected RWsSession |
|
348 //! 3. Execute Create() on the CWsBitmap and check if it generated expected error code |
|
349 //! 4. Destruct and Close all objects used |
|
350 //! @SYMTestStatus Implemented |
|
351 //! @SYMTestPriority Medium |
|
352 //! @SYMTestExpectedResults Create() on the CWsBitmap within unconnected RWsSession generated KErrCouldNotConnect (-34) |
|
353 //! @SYMTestType CIT |
|
354 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsBitmap-PublicApi.ini |
|
355 CREATE_OBJECT RWsSession ws |
|
356 CREATE_OBJECT CWsBitmap wsbmp |
|
357 COMMAND ws new |
|
358 COMMAND wsbmp new GRAPHICS-WSERV-WsBitmap-PublicApi-1002-0001-new_command01 |
|
359 COMMAND !Error=-34 wsbmp Create GRAPHICS-WSERV-WsBitmap-PublicApi-1002-0001-Create_command02 |
|
360 COMMAND wsbmp ~ |
|
361 COMMAND ws Close |
|
362 END_TEST_BLOCK |
|
363 END_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-1002 |
|
364 |
|
365 |
|
366 START_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-1003 |
|
367 //! @SYMTestCaseID GRAPHICS-WSERV-WsBitmap-PublicApi-1003 |
|
368 //! @SYMAPI CWsBitmap |
|
369 //! @SYMAuthor Victor Liu |
|
370 //! @SYMCreationDate 03/10/2007 |
|
371 //! @SYMTestCaseDesc Create(const TSize &aSizeInPixels, TDisplayMode aDispMode): create a CWsBitmap object with invalid size (negative width & height) |
|
372 //! Uses API elements: RWsSession::Connect, CWsBitmap() |
|
373 //! @SYMTestActions 1. Create and Connect a RWsSession |
|
374 //! 2. new() a CWsBitmap within the RWsSession |
|
375 //! 3. Execute Create() on the CWsBitmap with invalid size (negative width & height) and check it returned expected error code |
|
376 //! 4. Destruct and Close all objects used |
|
377 //! @SYMTestStatus Implemented |
|
378 //! @SYMTestPriority Medium |
|
379 //! @SYMTestExpectedResults Create() on the CWsBitmap with invalid size generated KErrArgument (-6) |
|
380 //! @SYMTestType CIT |
|
381 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsBitmap-PublicApi.ini |
|
382 CREATE_OBJECT RWsSession ws |
|
383 CREATE_OBJECT CWsBitmap wsbmp |
|
384 COMMAND ws new |
|
385 COMMAND ws Connect |
|
386 COMMAND wsbmp new GRAPHICS-WSERV-WsBitmap-PublicApi-1003-0001-new_command01 |
|
387 COMMAND !Error=-6 wsbmp Create GRAPHICS-WSERV-WsBitmap-PublicApi-1003-0001-Create_command02 |
|
388 COMMAND wsbmp ~ |
|
389 COMMAND ws Close |
|
390 END_TEST_BLOCK |
|
391 END_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-1003 |
|
392 |
|
393 |
|
394 START_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-1004 |
|
395 //! @SYMTestCaseID GRAPHICS-WSERV-WsBitmap-PublicApi-1004 |
|
396 //! @SYMAPI CWsBitmap |
|
397 //! @SYMAuthor Victor Liu |
|
398 //! @SYMCreationDate 03/10/2007 |
|
399 //! @SYMTestCaseDesc Create(const TSize &aSizeInPixels, TDisplayMode aDispMode): create a CWsBitmap object with display mode ENone |
|
400 //! Uses API elements: RWsSession::Connect, CWsBitmap() |
|
401 //! @SYMTestActions 1. Create and Connect a RWsSession |
|
402 //! 2. new() a CWsBitmap within the RWsSession |
|
403 //! 3. Execute Create() on the CWsBitmap with display mode ENone and check it returned expected error code |
|
404 //! 4. Destruct and Close all objects used |
|
405 //! @SYMTestStatus Implemented |
|
406 //! @SYMTestPriority Medium |
|
407 //! @SYMTestExpectedResults Create() on the CWsBitmap with invalid size generated KErrArgument (-6) |
|
408 //! @SYMTestType CIT |
|
409 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsBitmap-PublicApi.ini |
|
410 CREATE_OBJECT RWsSession ws |
|
411 CREATE_OBJECT CWsBitmap wsbmp |
|
412 COMMAND ws new |
|
413 COMMAND ws Connect |
|
414 COMMAND wsbmp new GRAPHICS-WSERV-WsBitmap-PublicApi-1004-0001-new_command01 |
|
415 COMMAND !Error=-6 wsbmp Create GRAPHICS-WSERV-WsBitmap-PublicApi-1004-0001-Create_command02 |
|
416 COMMAND wsbmp ~ |
|
417 COMMAND ws Close |
|
418 END_TEST_BLOCK |
|
419 END_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-1004 |
|
420 |
|
421 |
|
422 START_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-1005 |
|
423 //! @SYMTestCaseID GRAPHICS-WSERV-WsBitmap-PublicApi-1005 |
|
424 //! @SYMAPI CWsBitmap |
|
425 //! @SYMAuthor Victor Liu |
|
426 //! @SYMCreationDate 03/10/2007 |
|
427 //! @SYMTestCaseDesc Duplicate(TInt aHandle): duplicate a non-existed handle |
|
428 //! Uses API elements: RWsSession::Connect, CWsBitmap() |
|
429 //! @SYMTestActions 1. Create and Connect a RWsSession |
|
430 //! 2. new() a CWsBitmap within the RWsSession |
|
431 //! 3. Execute Duplicate() the CWsBitmap with a non-existed handle (-1) and check it returned expected error code |
|
432 //! 4. Destruct and Close all objects used |
|
433 //! @SYMTestStatus Implemented |
|
434 //! @SYMTestPriority Medium |
|
435 //! @SYMTestExpectedResults Create() on the CWsBitmap with invalid size generated KErrUnknown (-19) |
|
436 //! @SYMTestType CIT |
|
437 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsBitmap-PublicApi.ini |
|
438 CREATE_OBJECT RWsSession ws |
|
439 CREATE_OBJECT CWsBitmap wsbmp |
|
440 COMMAND ws new |
|
441 COMMAND ws Connect |
|
442 COMMAND wsbmp new GRAPHICS-WSERV-WsBitmap-PublicApi-1005-0001-new_command01 |
|
443 COMMAND !Error=-19 wsbmp Duplicate GRAPHICS-WSERV-WsBitmap-PublicApi-1005-0001-Duplicate_command02 |
|
444 COMMAND wsbmp ~ |
|
445 COMMAND ws Close |
|
446 END_TEST_BLOCK |
|
447 END_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-1005 |
|
448 |
|
449 |
|
450 START_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-1006 |
|
451 //! @SYMTestCaseID GRAPHICS-WSERV-WsBitmap-PublicApi-1006 |
|
452 //! @SYMAPI CWsBitmap |
|
453 //! @SYMAuthor Victor Liu |
|
454 //! @SYMCreationDate 03/10/2007 |
|
455 //! @SYMTestCaseDesc Duplicate(TInt aHandle): duplicate a CWsBitmap object within a unconnected RWsSession |
|
456 //! Uses API elements: RWsSession::Connect, CWsBitmap::Create & Handle & Duplicate |
|
457 //! @SYMTestActions 1. Create a RWsSession |
|
458 //! 2. new() a CWsBitmap within the unconnected RWsSession |
|
459 //! 3. Connect the RWsSession to WSERV |
|
460 //! 4. new() another source CWsBitmap within the connected RWsSession |
|
461 //! 5. Create() the source CWsBitmap as the specified display mode and size |
|
462 //! 6. Use Handle() to get handle of the source CWsBitmap for the follow-up Duplicate |
|
463 //! 7. Execute Duplicate() the source CWsBitmap to the unconnected CWsBitmap and check if it generated expected error code |
|
464 //! 8. Destruct and Close all objects used |
|
465 //! @SYMTestStatus Implemented |
|
466 //! @SYMTestPriority Medium |
|
467 //! @SYMTestExpectedResults Create() on the CWsBitmap within unconnected RWsSession generated KErrCouldNotConnect (-34) |
|
468 //! @SYMTestType CIT |
|
469 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsBitmap-PublicApi.ini |
|
470 CREATE_OBJECT RWsSession ws |
|
471 CREATE_OBJECT CWsBitmap wsbmp |
|
472 CREATE_OBJECT CWsBitmap wsbmp_src |
|
473 COMMAND ws new |
|
474 COMMAND wsbmp new GRAPHICS-WSERV-WsBitmap-PublicApi-1006-0001-new_command01 |
|
475 COMMAND ws Connect |
|
476 COMMAND wsbmp_src new GRAPHICS-WSERV-WsBitmap-PublicApi-1006-0001-new_command01 |
|
477 COMMAND wsbmp_src Create GRAPHICS-WSERV-WsBitmap-PublicApi-1006-0001-Create_command02 |
|
478 COMMAND wsbmp_src Handle |
|
479 COMMAND !Error=-34 wsbmp Duplicate GRAPHICS-WSERV-WsBitmap-PublicApi-1006-0001-Duplicate_command03 |
|
480 COMMAND wsbmp_src ~ |
|
481 COMMAND wsbmp ~ |
|
482 COMMAND ws Close |
|
483 END_TEST_BLOCK |
|
484 END_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-1006 |
|
485 |
|
486 |
|
487 START_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-1007 |
|
488 //! @SYMTestCaseID GRAPHICS-WSERV-WsBitmap-PublicApi-1007 |
|
489 //! @SYMAPI CWsBitmap |
|
490 //! @SYMAuthor Victor Liu |
|
491 //! @SYMCreationDate 03/10/2007 |
|
492 //! @SYMTestCaseDesc Load(const TDesC &aFileName, TInt32 aId, TBool aShareIfLoaded=ETrue): load a file to a unconnected CWsBitmap |
|
493 //! Uses API elements: RWsSession |
|
494 //! @SYMTestActions 1. Create a RWsSession but not connected |
|
495 //! 2. new() a CWsBitmap within the unconnected RWsSession |
|
496 //! 3. Execute Load() to load a file to the CWsBitmap and check if it generated expected error code |
|
497 //! 4. Destruct the CWsBitmap objects |
|
498 //! @SYMTestStatus Implemented |
|
499 //! @SYMTestPriority Medium |
|
500 //! @SYMTestExpectedResults Load() on the CWsBitmap within unconnected RWsSession generated KErrCouldNotConnect (-34) |
|
501 //! @SYMTestType CIT |
|
502 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsBitmap-PublicApi.ini |
|
503 CREATE_OBJECT RWsSession ws |
|
504 CREATE_OBJECT CWsBitmap wsbmp |
|
505 COMMAND ws new |
|
506 COMMAND wsbmp new GRAPHICS-WSERV-WsBitmap-PublicApi-1007-0001-new_command01 |
|
507 COMMAND !Error=-34 wsbmp Load GRAPHICS-WSERV-WsBitmap-PublicApi-1007-0001-Load_command02 |
|
508 COMMAND wsbmp ~ |
|
509 COMMAND ws Close |
|
510 END_TEST_BLOCK |
|
511 END_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-1007 |
|
512 |
|
513 |
|
514 START_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-1008 |
|
515 //! @SYMTestCaseID GRAPHICS-WSERV-WsBitmap-PublicApi-1008 |
|
516 //! @SYMAPI CWsBitmap |
|
517 //! @SYMAuthor Victor Liu |
|
518 //! @SYMCreationDate 03/10/2007 |
|
519 //! @SYMTestCaseDesc Load(const TDesC &aFileName, TInt32 aId, TBool aShareIfLoaded=ETrue): load CWsBitmap from a file with identifier of large number |
|
520 //! Uses API elements: RWsSession |
|
521 //! @SYMTestActions 1. Create and Connect a RWsSession |
|
522 //! 2. new() a CWsBitmap within the RWsSession |
|
523 //! 3. Execute Load() to load an empty file to the CWsBitmap and check if it generated expected error code |
|
524 //! 4. Destruct the CWsBitmap objects |
|
525 //! @SYMTestStatus Implemented |
|
526 //! @SYMTestPriority Medium |
|
527 //! @SYMTestExpectedResults Load() CWsBitmap from a file with identifier of large number generated KErrEof (-25) |
|
528 //! @SYMTestType CIT |
|
529 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsBitmap-PublicApi.ini |
|
530 CREATE_OBJECT RWsSession ws |
|
531 CREATE_OBJECT CWsBitmap wsbmp |
|
532 COMMAND ws new |
|
533 COMMAND ws Connect |
|
534 COMMAND wsbmp new GRAPHICS-WSERV-WsBitmap-PublicApi-1008-0001-new_command01 |
|
535 COMMAND !Error=-25 wsbmp Load GRAPHICS-WSERV-WsBitmap-PublicApi-1008-0001-Load_command02 |
|
536 COMMAND wsbmp ~ |
|
537 COMMAND ws Close |
|
538 END_TEST_BLOCK |
|
539 END_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-1008 |
|
540 |
|
541 |
|
542 START_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-1009 |
|
543 //! @SYMTestCaseID GRAPHICS-WSERV-WsBitmap-PublicApi-1009 |
|
544 //! @SYMAPI CWsBitmap |
|
545 //! @SYMAuthor Victor Liu |
|
546 //! @SYMCreationDate 03/10/2007 |
|
547 //! @SYMTestCaseDesc Load(const TDesC &aFileName, TInt32 aId, TBool aShareIfLoaded=ETrue): load CWsBitmap from a file |
|
548 //! Uses API elements: RWsSession |
|
549 //! @SYMTestActions 1. Create and Connect a RWsSession |
|
550 //! 2. new() a CWsBitmap within the RWsSession |
|
551 //! 3. Execute Load() to load a file to the CWsBitmap and check if it generated expected error code |
|
552 //! 4. Destruct the CWsBitmap objects |
|
553 //! @SYMTestStatus Implemented |
|
554 //! @SYMTestPriority Medium |
|
555 //! @SYMTestExpectedResults Load() CWsBitmap from a non-existed filename generated KErrNotFound (-1) |
|
556 //! @SYMTestType CIT |
|
557 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsBitmap-PublicApi.ini |
|
558 CREATE_OBJECT RWsSession ws |
|
559 CREATE_OBJECT CWsBitmap wsbmp |
|
560 COMMAND ws new |
|
561 COMMAND ws Connect |
|
562 COMMAND wsbmp new GRAPHICS-WSERV-WsBitmap-PublicApi-1009-0001-new_command01 |
|
563 COMMAND !Error=-1 wsbmp Load GRAPHICS-WSERV-WsBitmap-PublicApi-1009-0001-Load_command02 |
|
564 COMMAND wsbmp ~ |
|
565 COMMAND ws Close |
|
566 END_TEST_BLOCK |
|
567 END_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-1009 |
|
568 |
|
569 |
|
570 START_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-1010 |
|
571 //! @SYMTestCaseID GRAPHICS-WSERV-WsBitmap-PublicApi-1010 |
|
572 //! @SYMAPI CWsBitmap |
|
573 //! @SYMAuthor Victor Liu |
|
574 //! @SYMCreationDate 03/10/2007 |
|
575 //! @SYMTestCaseDesc InternalizeL(RReadStream &aStream): internalises a CWsBitmap from the read stream |
|
576 //! Uses API elements: RWsSession |
|
577 //! @SYMTestActions 1. Create and Connect a RWsSession |
|
578 //! 2. new() a CWsBitmap within the RWsSession |
|
579 //! 3. Execute InternalizeL() to load a .mbm file to the CWsBitmap and check if it generated expected error code |
|
580 //! 4. Destruct the CWsBitmap objects |
|
581 //! @SYMTestStatus Implemented |
|
582 //! @SYMTestPriority Medium |
|
583 //! @SYMTestExpectedResults InternalizeL() CWsBitmap from a .mbm file generated KErrCorrupt (-20) |
|
584 //! @SYMTestType CIT |
|
585 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsBitmap-PublicApi.ini |
|
586 CREATE_OBJECT RWsSession ws |
|
587 CREATE_OBJECT CWsBitmap wsbmp |
|
588 COMMAND ws new |
|
589 COMMAND ws Connect |
|
590 COMMAND wsbmp new GRAPHICS-WSERV-WsBitmap-PublicApi-1010-0001-new_command01 |
|
591 COMMAND !Error=-20 wsbmp InternalizeL GRAPHICS-WSERV-WsBitmap-PublicApi-1010-0001-InternalizeL_command02 |
|
592 COMMAND wsbmp ~ |
|
593 COMMAND ws Close |
|
594 END_TEST_BLOCK |
|
595 END_TESTCASE GRAPHICS-WSERV-WsBitmap-PublicApi-1010 |
|