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-WsPointerCursor-PublicApi |
|
18 //! @SYMScriptTestEnvironment This test script requires a basic ROM. |
|
19 |
|
20 /////////////////////////////////////////////////////////////////////////////// |
|
21 // GRAPHICS-WSERV-WsPointerCursor-PublicApi.script |
|
22 // |
|
23 // Tests all public elements of the RWsPointerCursor 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 // RWsPointerCursor 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 LOAD_SUITE T_GraphicsWservAPI |
|
35 |
|
36 // **************************************************************************** |
|
37 // RWsPointerCursor |
|
38 // **************************************************************************** |
|
39 START_TESTCASE GRAPHICS-WSERV-WsPointerCursor-PublicApi-0001 |
|
40 //! @SYMTestCaseID GRAPHICS-WSERV-WsPointerCursor-PublicApi-0001 |
|
41 //! @SYMAPI RWsPointerCursor::RWsPointerCursor() |
|
42 //! @SYMAuthor Jeffery Zhao |
|
43 //! @SYMCreationDate 10/12/2007 |
|
44 //! @SYMTestCaseDesc Create a RWsPointerCursor object with default construct. |
|
45 //! @SYMTestActions 1. Create RWsPointerCursor with RWsPointerCursor::RWsPointerCursor() |
|
46 //! @SYMTestStatus Implemented |
|
47 //! @SYMTestPriority High |
|
48 //! @SYMTestExpectedResults RWsPointerCursor object was created without causing panic |
|
49 //! @SYMTestType CIT |
|
50 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsPointerCursor-PublicApi.ini |
|
51 CREATE_OBJECT RWsPointerCursor pointcursor |
|
52 COMMAND pointcursor new |
|
53 COMMAND pointcursor Close |
|
54 END_TEST_BLOCK |
|
55 END_TESTCASE GRAPHICS-WSERV-WsPointerCursor-PublicApi-0001 |
|
56 |
|
57 |
|
58 START_TESTCASE GRAPHICS-WSERV-WsPointerCursor-PublicApi-0002 |
|
59 //! @SYMTestCaseID GRAPHICS-WSERV-WsPointerCursor-PublicApi-0002 |
|
60 //! @SYMAPI RWsPointerCursor::RWsPointerCursor(RWsSession{ref}) |
|
61 //! @SYMAuthor Jeffery Zhao |
|
62 //! @SYMCreationDate 10/12/2007 |
|
63 //! @SYMTestCaseDesc Create a RWsPointerCursor object with RWsSession. |
|
64 //! @SYMTestActions 1. Create and connect a RWsSession |
|
65 //! 2. Create RWsPointerCursor with RWsSession by using RWsPointerCursor(RWsSession &aWs). |
|
66 //! 3. Close RWsSession. |
|
67 //! @SYMTestStatus Implemented |
|
68 //! @SYMTestPriority High |
|
69 //! @SYMTestExpectedResults RWsPointerCursor object was created without causing panic |
|
70 //! @SYMTestType CIT |
|
71 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsPointerCursor-PublicApi.ini |
|
72 CREATE_OBJECT RWsSession ws |
|
73 CREATE_OBJECT RWsPointerCursor pointcursor |
|
74 COMMAND ws new |
|
75 COMMAND ws Connect |
|
76 COMMAND pointcursor new GRAPHICS-WSERV-WsPointerCursor-PublicApi-0002-0001-new_command004 |
|
77 COMMAND pointcursor Close |
|
78 COMMAND ws Close |
|
79 END_TEST_BLOCK |
|
80 END_TESTCASE GRAPHICS-WSERV-WsPointerCursor-PublicApi-0002 |
|
81 |
|
82 |
|
83 START_TESTCASE GRAPHICS-WSERV-WsPointerCursor-PublicApi-0003 |
|
84 //! @SYMTestCaseID GRAPHICS-WSERV-WsPointerCursor-PublicApi-0003 |
|
85 //! @SYMAPI RWsPointerCursor::Construct(TInt) |
|
86 //! @SYMAuthor Jeffery Zhao |
|
87 //! @SYMCreationDate 10/12/2007 |
|
88 //! @SYMTestCaseDesc Create a RWsPointerCursor object with RWsSession and construct. |
|
89 //! @SYMTestActions 1. Create and connect a RWsSession |
|
90 //! 2. Create RWsPointerCursor with RWsPointerCursor by using RWsPointerCursor(RWsSession &). |
|
91 //! 3. Construct RWsPointerCursor. |
|
92 //! 4. Close RWsPointerCursor,RWsSession. |
|
93 //! @SYMTestStatus Implemented |
|
94 //! @SYMTestPriority High |
|
95 //! @SYMTestExpectedResults RWsPointerCursor object was constructed without causing panic |
|
96 //! @SYMTestType CIT |
|
97 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsPointerCursor-PublicApi.ini |
|
98 CREATE_OBJECT RWsSession ws |
|
99 CREATE_OBJECT RWsPointerCursor pointcursor |
|
100 COMMAND ws new |
|
101 COMMAND ws Connect |
|
102 COMMAND pointcursor new GRAPHICS-WSERV-WsPointerCursor-PublicApi-0003-0001-new_command004 |
|
103 COMMAND pointcursor Construct GRAPHICS-WSERV-WsPointerCursor-PublicApi-0003-0001-Construct_command005 |
|
104 COMMAND pointcursor Close |
|
105 COMMAND ws Close |
|
106 END_TEST_BLOCK |
|
107 END_TESTCASE GRAPHICS-WSERV-WsPointerCursor-PublicApi-0003 |
|
108 |
|
109 START_TESTCASE GRAPHICS-WSERV-WsPointerCursor-PublicApi-0004 |
|
110 //! @SYMTestCaseID GRAPHICS-WSERV-WsPointerCursor-PublicApi-0004 |
|
111 //! @SYMAPI RWsPointerCursor::RWsPointerCursor(RWsSession{ref}); |
|
112 //! RWsPointerCursor::Construct(TInt) |
|
113 //! @SYMAuthor Jeffery Zhao |
|
114 //! @SYMCreationDate 10/12/2007 |
|
115 //! @SYMTestCaseDesc Create pointer cursor and activate, call SetCustomPointerCursor using custom RWsPointerCursor object and verify if it's visible. |
|
116 //! mask1 is iMaskBitmap member of TSpriteMember and the other are iBitmap member of TSpriteMember. |
|
117 //! @SYMTestActions 1. Create and connect a RWsSession, create 4 CFbsBitmap objects. |
|
118 //! 2. Create and construct RWindow. |
|
119 //! 3. Create RWsPointerCursor with RWsPointerCursor by using RWsPointerCursor(RWsSession &). |
|
120 //! 4. Construct RWsPointerCursor. |
|
121 //! 5. Create CFbsBitmap objects and load bitmap to initialize TSpriteMember. |
|
122 //! 6. Append three different bitmaps to the sprite, each with the same mask. |
|
123 //! 7. Activate RWsPointerCursor. |
|
124 //! 8. Call RWindowTreeNode::SetCustomPointerCursor(const RWsPointerCursor&) to set PointerCursor. |
|
125 //! 9. Create CWsScreenDevice and compare the two rect before SetPointerCursorPosition, they should be same. |
|
126 //! 11. SetPointerCursorMode,SimulatePointerEvent and then SetPointerCursorPosition. |
|
127 //! 12. Compare the two rect again, they should be not same. |
|
128 //! 13. Destruct all created object and Close RWsPointerCursor,RWsSession and RWindowTreeNode. |
|
129 //! @SYMTestStatus Implemented |
|
130 //! @SYMTestPriority High |
|
131 //! @SYMTestExpectedResults 1.SetCustomPointerCursor with created RWsPointerCursor object without causing panic |
|
132 //! 2.The rect of before SetCustomPointerCursor and after SetCustomPointerCursor should not be same. |
|
133 //! @SYMTestType CIT |
|
134 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsPointerCursor-PublicApi.ini |
|
135 CREATE_OBJECT RWsSession ws |
|
136 CREATE_OBJECT CWsScreenDevice scrdev |
|
137 CREATE_OBJECT CFbsBitmap mask1 |
|
138 CREATE_OBJECT CFbsBitmap bitmap1 |
|
139 CREATE_OBJECT CFbsBitmap bitmap2 |
|
140 CREATE_OBJECT CFbsBitmap bitmap3 |
|
141 CREATE_OBJECT RWindowGroup wingrp |
|
142 CREATE_OBJECT RWindow win |
|
143 CREATE_OBJECT RWsPointerCursor pointcursor |
|
144 COMMAND ws new |
|
145 COMMAND ws Connect |
|
146 COMMAND wingrp new GRAPHICS-WSERV-WsPointerCursor-Setup-0004-0001-new_command001 |
|
147 COMMAND wingrp Construct GRAPHICS-WSERV-WsPointerCursor-Setup-0004-0001-Construct_command002 |
|
148 COMMAND win new GRAPHICS-WSERV-WsPointerCursor-PublicApi-0004-0001-new_command003 |
|
149 COMMAND win Construct GRAPHICS-WSERV-WsPointerCursor-Setup-0004-0001-Construct_command004 |
|
150 COMMAND win Activate |
|
151 COMMAND pointcursor new GRAPHICS-WSERV-WsPointerCursor-PublicApi-0004-0001-new_command006 |
|
152 COMMAND pointcursor Construct GRAPHICS-WSERV-WsPointerCursor-PublicApi-0004-0001-Construct_command007 |
|
153 COMMAND mask1 new |
|
154 COMMAND mask1 Load GRAPHICS-WSERV-WsPointerCursor-PublicApi-0004-0001-Load_command009 |
|
155 |
|
156 COMMAND bitmap1 new |
|
157 COMMAND bitmap1 Load GRAPHICS-WSERV-WsPointerCursor-PublicApi-0004-0001-Load_command011 |
|
158 COMMAND pointcursor AppendMember GRAPHICS-WSERV-WsPointerCursor-PublicApi-0004-0001-AppendMember_command012 |
|
159 |
|
160 COMMAND bitmap2 new |
|
161 COMMAND bitmap2 Load GRAPHICS-WSERV-WsPointerCursor-PublicApi-0004-0001-Load_command014 |
|
162 COMMAND pointcursor AppendMember GRAPHICS-WSERV-WsPointerCursor-PublicApi-0004-0001-AppendMember_command015 |
|
163 |
|
164 COMMAND bitmap3 new |
|
165 COMMAND bitmap3 Load GRAPHICS-WSERV-WsPointerCursor-PublicApi-0004-0001-Load_command017 |
|
166 COMMAND pointcursor AppendMember GRAPHICS-WSERV-WsPointerCursor-PublicApi-0004-0001-AppendMember_command018 |
|
167 |
|
168 COMMAND pointcursor Activate |
|
169 COMMAND win SetCustomPointerCursor GRAPHICS-WSERV-WsPointerCursor-PublicApi-0004-0001-SetCustomPointerCursor_command020 |
|
170 |
|
171 COMMAND scrdev new GRAPHICS-WSERV-WsPointerCursor-PublicApi-0004-0001-new_command21 |
|
172 COMMAND scrdev Construct |
|
173 COMMAND win BeginRedraw |
|
174 COMMAND win EndRedraw |
|
175 //!COMMAND scrdev RectCompare GRAPHICS-WSERV-WsPointerCursor-PublicApi-0004-0001-RectCompare_command23 |
|
176 |
|
177 COMMAND ws SetPointerCursorMode GRAPHICS-WSERV-WsPointerCursor-PublicApi-0004-0001-SetPointerCursorMode_command24 |
|
178 COMMAND wingrp SimulatePointerEvent GRAPHICS-WSERV-WsPointerCursor-PublicApi-0004-0001-SimulatePointerEvent_command25 |
|
179 COMMAND ws SetPointerCursorPosition GRAPHICS-WSERV-WsPointerCursor-PublicApi-0004-0001-SetPointerCursorPosition_command26 |
|
180 //!COMMAND scrdev RectCompare GRAPHICS-WSERV-WsPointerCursor-PublicApi-0004-0001-RectCompare_command27 |
|
181 |
|
182 COMMAND pointcursor Close |
|
183 COMMAND mask1 ~ |
|
184 COMMAND bitmap1 ~ |
|
185 COMMAND bitmap2 ~ |
|
186 COMMAND bitmap3 ~ |
|
187 COMMAND scrdev ~ |
|
188 COMMAND win Close |
|
189 COMMAND wingrp Close |
|
190 COMMAND ws Close |
|
191 END_TEST_BLOCK |
|
192 END_TESTCASE GRAPHICS-WSERV-WsPointerCursor-PublicApi-0004 |
|
193 |
|
194 START_TESTCASE GRAPHICS-WSERV-WsPointerCursor-PublicApi-0005 |
|
195 //! @SYMTestCaseID GRAPHICS-WSERV-WsPointerCursor-PublicApi-0005 |
|
196 //! @SYMAPI RWsPointerCursor::Construct(TInt) |
|
197 //! @SYMAuthor Jeffery Zhao |
|
198 //! @SYMCreationDate 03/01/2008 |
|
199 //! @SYMTestCaseDesc Construct with ESpriteFlash flag; |
|
200 //! Create a RWsPointerCursor object with RWsSession and construct with ESpriteFlash flag. |
|
201 //! @SYMTestActions 1. Create and connect a RWsSession |
|
202 //! 2. Create RWsPointerCursor with RWsPointerCursor by using RWsPointerCursor(RWsSession &). |
|
203 //! 3. Construct RWsPointerCursor with ESpriteFlash flag. |
|
204 //! 4. Close RWsPointerCursor,RWsSession. |
|
205 //! @SYMTestStatus Implemented |
|
206 //! @SYMTestPriority High |
|
207 //! @SYMTestExpectedResults RWsPointerCursor object was constructed without causing panic |
|
208 //! @SYMTestType CIT |
|
209 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsPointerCursor-PublicApi.ini |
|
210 CREATE_OBJECT RWsSession ws |
|
211 CREATE_OBJECT RWsPointerCursor pointcursor |
|
212 COMMAND ws new |
|
213 COMMAND ws Connect |
|
214 COMMAND pointcursor new GRAPHICS-WSERV-WsPointerCursor-PublicApi-0005-0001-new_command003 |
|
215 COMMAND pointcursor Construct GRAPHICS-WSERV-WsPointerCursor-PublicApi-0005-0001-Construct_command004 |
|
216 COMMAND pointcursor Close |
|
217 COMMAND ws Close |
|
218 END_TEST_BLOCK |
|
219 END_TESTCASE GRAPHICS-WSERV-WsPointerCursor-PublicApi-0005 |
|
220 |
|
221 START_TESTCASE GRAPHICS-WSERV-WsPointerCursor-PublicApi-0006 |
|
222 //! @SYMTestCaseID GRAPHICS-WSERV-WsPointerCursor-PublicApi-0006 |
|
223 //! @SYMAPI RWsPointerCursor::Construct(TInt) |
|
224 //! @SYMAuthor Jeffery Zhao |
|
225 //! @SYMCreationDate 08/01/2008 |
|
226 //! @SYMTestCaseDesc Construct with ESpriteNoChildClip flag; |
|
227 //! Create a RWsPointerCursor object with RWsSession and construct with ESpriteNoChildClip flag. |
|
228 //! @SYMTestActions 1. Create and connect a RWsSession |
|
229 //! 2. Create RWsPointerCursor with RWsPointerCursor by using RWsPointerCursor(RWsSession &). |
|
230 //! 3. Construct RWsPointerCursor with ESpriteNoChildClip flag. |
|
231 //! 4. Close RWsPointerCursor,RWsSession. |
|
232 //! @SYMTestStatus Implemented |
|
233 //! @SYMTestPriority High |
|
234 //! @SYMTestExpectedResults RWsPointerCursor object was constructed without causing panic |
|
235 //! @SYMTestType CIT |
|
236 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsPointerCursor-PublicApi.ini |
|
237 CREATE_OBJECT RWsSession ws |
|
238 CREATE_OBJECT RWsPointerCursor pointcursor |
|
239 COMMAND ws new |
|
240 COMMAND ws Connect |
|
241 COMMAND pointcursor new GRAPHICS-WSERV-WsPointerCursor-PublicApi-0006-0001-new_command003 |
|
242 COMMAND pointcursor Construct GRAPHICS-WSERV-WsPointerCursor-PublicApi-0006-0001-Construct_command004 |
|
243 COMMAND pointcursor Close |
|
244 COMMAND ws Close |
|
245 END_TEST_BLOCK |
|
246 END_TESTCASE GRAPHICS-WSERV-WsPointerCursor-PublicApi-0006 |
|
247 |
|
248 START_TESTCASE GRAPHICS-WSERV-WsPointerCursor-PublicApi-0007 |
|
249 //! @SYMTestCaseID GRAPHICS-WSERV-WsPointerCursor-PublicApi-0007 |
|
250 //! @SYMAPI RWsPointerCursor::Construct(TInt) |
|
251 //! @SYMAuthor Jeffery Zhao |
|
252 //! @SYMCreationDate 08/01/2008 |
|
253 //! @SYMTestCaseDesc Construct with ESpriteNoShadows flag; |
|
254 //! Create a RWsPointerCursor object with RWsSession and construct with ESpriteNoShadows flag. |
|
255 //! @SYMTestActions 1. Create and connect a RWsSession |
|
256 //! 2. Create RWsPointerCursor with RWsPointerCursor by using RWsPointerCursor(RWsSession &). |
|
257 //! 3. Construct RWsPointerCursor with ESpriteNoShadows flag. |
|
258 //! 4. Close RWsPointerCursor,RWsSession. |
|
259 //! @SYMTestStatus Implemented |
|
260 //! @SYMTestPriority High |
|
261 //! @SYMTestExpectedResults RWsPointerCursor object was constructed without causing panic |
|
262 //! @SYMTestType CIT |
|
263 START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WsPointerCursor-PublicApi.ini |
|
264 CREATE_OBJECT RWsSession ws |
|
265 CREATE_OBJECT RWsPointerCursor pointcursor |
|
266 COMMAND ws new |
|
267 COMMAND ws Connect |
|
268 COMMAND pointcursor new GRAPHICS-WSERV-WsPointerCursor-PublicApi-0007-0001-new_command003 |
|
269 COMMAND pointcursor Construct GRAPHICS-WSERV-WsPointerCursor-PublicApi-0007-0001-Construct_command004 |
|
270 COMMAND pointcursor Close |
|
271 COMMAND ws Close |
|
272 END_TEST_BLOCK |
|
273 END_TESTCASE GRAPHICS-WSERV-WsPointerCursor-PublicApi-0007 |
|
274 |
|