1 /* |
|
2 * Copyright (c) 2002 - 2007 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: For test alf core toolkit api modules |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // [INCLUDE FILES] |
|
21 #include <e32svr.h> |
|
22 #include <stifparser.h> |
|
23 #include <stiftestinterface.h> |
|
24 #include <uiacceltk/huianchorlayout.h> |
|
25 #include <uiacceltk/huienv.h> |
|
26 #include <uiacceltk/huicontrol.h> |
|
27 #include <uiacceltk/huianimatedtexture.h> |
|
28 #include <fbs.h> |
|
29 #include <BITDEV.H> // CFbsDevice |
|
30 #include <BITSTD.H> // CFbsBitGc |
|
31 |
|
32 #include "testuiaifcoretoolkit.h" |
|
33 #include "testuiaifblockstexturechild.h" |
|
34 #include "testuiaifblocksmanagerchild.h" |
|
35 |
|
36 // ----------------------------------------------------------------------------- |
|
37 // CTestUiAifCoreToolkit::TestCHuiATextDestructL |
|
38 // ----------------------------------------------------------------------------- |
|
39 // |
|
40 TInt CTestUiAifCoreToolkit::TestCHuiATextDestructL( CStifItemParser& /*aItem*/ ) |
|
41 { |
|
42 |
|
43 // Print to UI |
|
44 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
45 _LIT( KTestCHuiATextDestructL, "In TestCHuiATextDestructL" ); |
|
46 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiATextDestructL ); |
|
47 // Print to log file |
|
48 iLog->Log( KTestCHuiATextDestructL ); |
|
49 |
|
50 CTestUiAifBlocksManagerChild* managerChild =new ( ELeave ) CTestUiAifBlocksManagerChild; |
|
51 STIF_ASSERT_NOT_NULL( managerChild ); |
|
52 CleanupStack::PushL( managerChild ); |
|
53 CTestUiAifBlocksTextureChild* textureChild = CTestUiAifBlocksTextureChild::NewL( *managerChild ); |
|
54 STIF_ASSERT_NOT_NULL( textureChild ); |
|
55 CleanupStack::PushL( textureChild ); |
|
56 CleanupStack::PopAndDestroy( textureChild ); |
|
57 |
|
58 return KErrNone; |
|
59 |
|
60 } |
|
61 // ----------------------------------------------------------------------------- |
|
62 // CTestUiAifCoreToolkit::TestCHuiATextTextureL |
|
63 // ----------------------------------------------------------------------------- |
|
64 // |
|
65 TInt CTestUiAifCoreToolkit::TestCHuiATextTextureL( CStifItemParser& /*aItem*/ ) |
|
66 { |
|
67 |
|
68 // Print to UI |
|
69 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
70 _LIT( KTestCHuiATextTextureL, "In TestCHuiATextTextureL" ); |
|
71 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiATextTextureL ); |
|
72 // Print to log file |
|
73 iLog->Log( KTestCHuiATextTextureL ); |
|
74 |
|
75 CTestUiAifBlocksManagerChild* managerChild =new ( ELeave ) CTestUiAifBlocksManagerChild; |
|
76 STIF_ASSERT_NOT_NULL( managerChild ); |
|
77 CleanupStack::PushL( managerChild ); |
|
78 CTestUiAifBlocksTextureChild* textureChild = CTestUiAifBlocksTextureChild::NewL( *managerChild ); |
|
79 STIF_ASSERT_NOT_NULL( textureChild ); |
|
80 CleanupStack::PushL( textureChild ); |
|
81 CHuiTexture& texture = textureChild->Texture(); |
|
82 CleanupStack::PopAndDestroy( textureChild ); |
|
83 |
|
84 return KErrNone; |
|
85 |
|
86 } |
|
87 // ----------------------------------------------------------------------------- |
|
88 // CTestUiAifCoreToolkit::TestCHuiATextSegmentedTextureL |
|
89 // ----------------------------------------------------------------------------- |
|
90 // |
|
91 TInt CTestUiAifCoreToolkit::TestCHuiATextSegmentTextureL( CStifItemParser& /*aItem*/ ) |
|
92 { |
|
93 |
|
94 // Print to UI |
|
95 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
96 _LIT( KTestCHuiATextSegmentTextureL, "In TestCHuiATextSegmentTextureL" ); |
|
97 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiATextSegmentTextureL ); |
|
98 // Print to log file |
|
99 iLog->Log( KTestCHuiATextSegmentTextureL ); |
|
100 |
|
101 CTestUiAifBlocksManagerChild* managerChild =new ( ELeave ) CTestUiAifBlocksManagerChild; |
|
102 STIF_ASSERT_NOT_NULL( managerChild ); |
|
103 CleanupStack::PushL( managerChild ); |
|
104 CTestUiAifBlocksTextureChild* textureChild = CTestUiAifBlocksTextureChild::NewL( *managerChild ); |
|
105 STIF_ASSERT_NOT_NULL( textureChild ); |
|
106 CleanupStack::PushL( textureChild ); |
|
107 textureChild->SegmentedTexture(); |
|
108 CleanupStack::PopAndDestroy( textureChild ); |
|
109 |
|
110 return KErrNone; |
|
111 |
|
112 } |
|
113 // ----------------------------------------------------------------------------- |
|
114 // CTestUiAifCoreToolkit::TestCHuiATextSegmentTextureConstL |
|
115 // ----------------------------------------------------------------------------- |
|
116 // |
|
117 TInt CTestUiAifCoreToolkit::TestCHuiATextSegmentTextureConstL( CStifItemParser& /*aItem*/ ) |
|
118 { |
|
119 |
|
120 // Print to UI |
|
121 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
122 _LIT( KTestCHuiATextSegmentTextureConstL, "In TestCHuiATextSegmentTextureConstL" ); |
|
123 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiATextSegmentTextureConstL ); |
|
124 // Print to log file |
|
125 iLog->Log( KTestCHuiATextSegmentTextureConstL ); |
|
126 |
|
127 CTestUiAifBlocksManagerChild* managerChild =new ( ELeave ) CTestUiAifBlocksManagerChild; |
|
128 STIF_ASSERT_NOT_NULL( managerChild ); |
|
129 CleanupStack::PushL( managerChild ); |
|
130 const CTestUiAifBlocksTextureChild* textureChild = CTestUiAifBlocksTextureChild::NewL( *managerChild ); |
|
131 STIF_ASSERT_NOT_NULL( textureChild ); |
|
132 textureChild->SegmentedTexture(); |
|
133 delete textureChild; |
|
134 |
|
135 return KErrNone; |
|
136 |
|
137 } |
|
138 // ----------------------------------------------------------------------------- |
|
139 // CTestUiAifCoreToolkit::TestCHuiATextShadowedTextureL |
|
140 // ----------------------------------------------------------------------------- |
|
141 // |
|
142 TInt CTestUiAifCoreToolkit::TestCHuiATextShadowedTextureL( CStifItemParser& /*aItem*/ ) |
|
143 { |
|
144 |
|
145 // Print to UI |
|
146 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
147 _LIT( KTestCHuiATextShadowedTextureL, "In TestCHuiATextShadowedTextureL" ); |
|
148 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiATextShadowedTextureL ); |
|
149 // Print to log file |
|
150 iLog->Log( KTestCHuiATextShadowedTextureL ); |
|
151 |
|
152 CTestUiAifBlocksManagerChild* managerChild =new ( ELeave ) CTestUiAifBlocksManagerChild; |
|
153 STIF_ASSERT_NOT_NULL( managerChild ); |
|
154 CleanupStack::PushL( managerChild ); |
|
155 CTestUiAifBlocksTextureChild* textureChild = CTestUiAifBlocksTextureChild::NewL( *managerChild ); |
|
156 STIF_ASSERT_NOT_NULL( textureChild ); |
|
157 CleanupStack::PushL( textureChild ); |
|
158 textureChild->ShadowedTexture(); |
|
159 CleanupStack::PopAndDestroy( textureChild ); |
|
160 |
|
161 return KErrNone; |
|
162 |
|
163 } |
|
164 // ----------------------------------------------------------------------------- |
|
165 // CTestUiAifCoreToolkit::TestCHuiATextShadowedTextureConstL |
|
166 // ----------------------------------------------------------------------------- |
|
167 // |
|
168 TInt CTestUiAifCoreToolkit::TestCHuiATextShadowedTextureConstL( CStifItemParser& /*aItem*/ ) |
|
169 { |
|
170 |
|
171 // Print to UI |
|
172 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
173 _LIT( KTestCHuiATextSegmentTextureConstL, "In TestCHuiATextSegmentTextureConstL" ); |
|
174 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiATextSegmentTextureConstL ); |
|
175 // Print to log file |
|
176 iLog->Log( KTestCHuiATextSegmentTextureConstL ); |
|
177 |
|
178 CTestUiAifBlocksManagerChild* managerChild =new ( ELeave ) CTestUiAifBlocksManagerChild; |
|
179 STIF_ASSERT_NOT_NULL( managerChild ); |
|
180 CleanupStack::PushL( managerChild ); |
|
181 CTestUiAifBlocksTextureChild* textureChild = CTestUiAifBlocksTextureChild::NewL( *managerChild ); |
|
182 CleanupStack::PushL( textureChild ); |
|
183 STIF_ASSERT_NOT_NULL( textureChild ); |
|
184 textureChild->ShadowedTexture(); |
|
185 CleanupStack::PopAndDestroy( textureChild ); |
|
186 |
|
187 return KErrNone; |
|
188 |
|
189 } |
|
190 // ----------------------------------------------------------------------------- |
|
191 // CTestUiAifCoreToolkit::TestCHuiATextHasContentL |
|
192 // ----------------------------------------------------------------------------- |
|
193 // |
|
194 TInt CTestUiAifCoreToolkit::TestCHuiATextHasContentL( CStifItemParser& /*aItem*/ ) |
|
195 { |
|
196 |
|
197 // Print to UI |
|
198 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
199 _LIT( KTestCHuiATextHasContentL, "In TestCHuiATextHasContentL" ); |
|
200 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiATextHasContentL ); |
|
201 // Print to log file |
|
202 iLog->Log( KTestCHuiATextHasContentL ); |
|
203 |
|
204 CTestUiAifBlocksManagerChild* managerChild =new ( ELeave ) CTestUiAifBlocksManagerChild; |
|
205 STIF_ASSERT_NOT_NULL( managerChild ); |
|
206 CleanupStack::PushL( managerChild ); |
|
207 CTestUiAifBlocksTextureChild* textureChild = CTestUiAifBlocksTextureChild::NewL( *managerChild ); |
|
208 STIF_ASSERT_NOT_NULL( textureChild ); |
|
209 CleanupStack::PushL( textureChild ); |
|
210 // textureChild->HasContent(); |
|
211 STIF_ASSERT_EQUALS( textureChild->HasContent(), 0 ); |
|
212 CleanupStack::PopAndDestroy( textureChild ); |
|
213 |
|
214 return KErrNone; |
|
215 |
|
216 } |
|
217 // ----------------------------------------------------------------------------- |
|
218 // CTestUiAifCoreToolkit::TestCHuiATextSizeL |
|
219 // ----------------------------------------------------------------------------- |
|
220 // |
|
221 TInt CTestUiAifCoreToolkit::TestCHuiATextSizeL( CStifItemParser& /*aItem*/ ) |
|
222 { |
|
223 |
|
224 // Print to UI |
|
225 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
226 _LIT( KTestCHuiATextSizeL, "In TestCHuiATextSizeL" ); |
|
227 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiATextSizeL ); |
|
228 // Print to log file |
|
229 iLog->Log( KTestCHuiATextSizeL ); |
|
230 //my code |
|
231 CTestUiAifBlocksManagerChild* managerChild =new ( ELeave ) CTestUiAifBlocksManagerChild; |
|
232 STIF_ASSERT_NOT_NULL( managerChild ); |
|
233 CleanupStack::PushL( managerChild ); |
|
234 CTestUiAifBlocksTextureChild* textureChild = CTestUiAifBlocksTextureChild::NewL( *managerChild ); |
|
235 STIF_ASSERT_NOT_NULL( textureChild ); |
|
236 CleanupStack::PushL( textureChild ); |
|
237 TSize logicalSize = textureChild->Size(); |
|
238 STIF_ASSERT_EQUALS( logicalSize.iWidth, 0 ); |
|
239 STIF_ASSERT_EQUALS( logicalSize.iHeight, 0 ); |
|
240 CleanupStack::PopAndDestroy( textureChild ); |
|
241 |
|
242 return KErrNone; |
|
243 |
|
244 } |
|
245 // ----------------------------------------------------------------------------- |
|
246 // CTestUiAifCoreToolkit::TestCHuiATextSegmentCountL |
|
247 // ----------------------------------------------------------------------------- |
|
248 // |
|
249 TInt CTestUiAifCoreToolkit::TestCHuiATextSegmentCountL( CStifItemParser& /*aItem*/ ) |
|
250 { |
|
251 |
|
252 // Print to UI |
|
253 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
254 _LIT( KTestCHuiATextSegmentCountL, "In TestCHuiATextSegmentCountL" ); |
|
255 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiATextSegmentCountL ); |
|
256 // Print to log file |
|
257 iLog->Log( KTestCHuiATextSegmentCountL ); |
|
258 |
|
259 CTestUiAifBlocksManagerChild* managerChild =new ( ELeave ) CTestUiAifBlocksManagerChild; |
|
260 STIF_ASSERT_NOT_NULL( managerChild ); |
|
261 CleanupStack::PushL( managerChild ); |
|
262 CTestUiAifBlocksTextureChild* textureChild = CTestUiAifBlocksTextureChild::NewL( *managerChild ); |
|
263 STIF_ASSERT_NOT_NULL( textureChild ); |
|
264 CleanupStack::PushL( textureChild ); |
|
265 STIF_ASSERT_EQUALS( textureChild->SegmentCount(), 0 ); |
|
266 CleanupStack::PopAndDestroy( textureChild ); |
|
267 |
|
268 return KErrNone; |
|
269 |
|
270 } |
|
271 // ----------------------------------------------------------------------------- |
|
272 // CTestUiAifCoreToolkit::TestCHuiATextSegmentNameL |
|
273 // ----------------------------------------------------------------------------- |
|
274 // |
|
275 TInt CTestUiAifCoreToolkit::TestCHuiATextSegmentNameL( CStifItemParser& /*aItem*/ ) |
|
276 { |
|
277 // Print to UI |
|
278 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
279 _LIT( KTestCHuiATextSegmentNameL, "In TestCHuiATextSegmentNameL" ); |
|
280 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiATextSegmentNameL ); |
|
281 // Print to log file |
|
282 iLog->Log( KTestCHuiATextSegmentNameL ); |
|
283 |
|
284 CTestUiAifBlocksManagerChild* managerChild =new ( ELeave ) CTestUiAifBlocksManagerChild; |
|
285 STIF_ASSERT_NOT_NULL( managerChild ); |
|
286 CleanupStack::PushL( managerChild ); |
|
287 CTestUiAifBlocksTextureChild* textureChild = CTestUiAifBlocksTextureChild::NewL( *managerChild ); |
|
288 STIF_ASSERT_NOT_NULL( textureChild ); |
|
289 CleanupStack::PushL( textureChild ); |
|
290 textureChild->SegmentedTexture(); |
|
291 textureChild->SetSegmentCountL(); |
|
292 STIF_ASSERT_EQUALS( textureChild->SegmentName( 0 ), (unsigned int)1 ); |
|
293 textureChild->TextureClearChanged(); |
|
294 CleanupStack::PopAndDestroy( textureChild ); |
|
295 |
|
296 return KErrNone; |
|
297 |
|
298 } |
|
299 // ----------------------------------------------------------------------------- |
|
300 // CTestUiAifCoreToolkit::TestCHuiATextTextureChangedL |
|
301 // ----------------------------------------------------------------------------- |
|
302 // |
|
303 TInt CTestUiAifCoreToolkit::TestCHuiATextTextureChangedL( CStifItemParser& /*aItem*/ ) |
|
304 { |
|
305 |
|
306 // Print to UI |
|
307 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
308 _LIT( KTestCHuiATextTextureChangedL, "In TestCHuiATextTextureChangedL" ); |
|
309 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiATextTextureChangedL ); |
|
310 // Print to log file |
|
311 iLog->Log( KTestCHuiATextTextureChangedL ); |
|
312 |
|
313 CTestUiAifBlocksManagerChild* managerChild =new ( ELeave ) CTestUiAifBlocksManagerChild; |
|
314 STIF_ASSERT_NOT_NULL( managerChild ); |
|
315 CleanupStack::PushL( managerChild ); |
|
316 CTestUiAifBlocksTextureChild* textureChild = CTestUiAifBlocksTextureChild::NewL( *managerChild ); |
|
317 STIF_ASSERT_NOT_NULL( textureChild ); |
|
318 CleanupStack::PushL( textureChild ); |
|
319 STIF_ASSERT_EQUALS( textureChild->TextureChanged(), 0 ); |
|
320 CleanupStack::PopAndDestroy( textureChild ); |
|
321 |
|
322 return KErrNone; |
|
323 |
|
324 } |
|
325 // ----------------------------------------------------------------------------- |
|
326 // CTestUiAifCoreToolkit::TestCHuiATextTextureClearChangedL |
|
327 // ----------------------------------------------------------------------------- |
|
328 // |
|
329 TInt CTestUiAifCoreToolkit::TestCHuiATextTextureClearChangedL( CStifItemParser& /*aItem*/ ) |
|
330 { |
|
331 |
|
332 // Print to UI |
|
333 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
334 _LIT( KTestCHuiATextTextureClearChangedL, "In TestCHuiATextTextureClearChangedL" ); |
|
335 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiATextTextureClearChangedL ); |
|
336 // Print to log file |
|
337 iLog->Log( KTestCHuiATextTextureClearChangedL ); |
|
338 |
|
339 CTestUiAifBlocksManagerChild* managerChild =new ( ELeave ) CTestUiAifBlocksManagerChild; |
|
340 STIF_ASSERT_NOT_NULL( managerChild ); |
|
341 CleanupStack::PushL( managerChild ); |
|
342 CTestUiAifBlocksTextureChild* textureChild = CTestUiAifBlocksTextureChild::NewL( *managerChild ); |
|
343 STIF_ASSERT_NOT_NULL( textureChild ); |
|
344 CleanupStack::PushL( textureChild ); |
|
345 textureChild->TextureClearChanged(); |
|
346 CleanupStack::PopAndDestroy( textureChild ); |
|
347 |
|
348 return KErrNone; |
|
349 |
|
350 } |
|
351 // ----------------------------------------------------------------------------- |
|
352 // CTestUiAifCoreToolkit::TestCHuiATextTextureConstructorL |
|
353 // ----------------------------------------------------------------------------- |
|
354 // |
|
355 TInt CTestUiAifCoreToolkit::TestCHuiATextTextureConstructorL( CStifItemParser& /*aItem*/ ) |
|
356 { |
|
357 |
|
358 // Print to UI |
|
359 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
360 _LIT( KTestCHuiATextTextureConstructorL, "In TestCHuiATextTextureConstructorL" ); |
|
361 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiATextTextureConstructorL ); |
|
362 // Print to log file |
|
363 iLog->Log( KTestCHuiATextTextureConstructorL ); |
|
364 |
|
365 CTestUiAifBlocksManagerChild* managerChild =new ( ELeave ) CTestUiAifBlocksManagerChild; |
|
366 STIF_ASSERT_NOT_NULL( managerChild ); |
|
367 CleanupStack::PushL( managerChild ); |
|
368 CTestUiAifBlocksTextureChild* textureChild = CTestUiAifBlocksTextureChild::NewL( *managerChild ); |
|
369 STIF_ASSERT_NOT_NULL( textureChild ); |
|
370 CleanupStack::PushL( textureChild ); |
|
371 textureChild->TextureClearChanged(); |
|
372 CleanupStack::PopAndDestroy( textureChild ); |
|
373 |
|
374 return KErrNone; |
|
375 |
|
376 } |
|
377 // ----------------------------------------------------------------------------- |
|
378 // CTestUiAifCoreToolkit::TestCHuiATextBaseConstructL |
|
379 // ----------------------------------------------------------------------------- |
|
380 // |
|
381 TInt CTestUiAifCoreToolkit::TestCHuiATextBaseConstructL( CStifItemParser& /*aItem*/ ) |
|
382 { |
|
383 |
|
384 // Print to UI |
|
385 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
386 _LIT( KTestCHuiATextBaseConstructL, "In TestCHuiATextBaseConstructL" ); |
|
387 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiATextBaseConstructL ); |
|
388 // Print to log file |
|
389 iLog->Log( KTestCHuiATextBaseConstructL ); |
|
390 |
|
391 CTestUiAifBlocksManagerChild* managerChild =new ( ELeave ) CTestUiAifBlocksManagerChild; |
|
392 STIF_ASSERT_NOT_NULL( managerChild ); |
|
393 CleanupStack::PushL( managerChild ); |
|
394 CTestUiAifBlocksTextureChild* textureChild = CTestUiAifBlocksTextureChild::NewL( *managerChild ); |
|
395 STIF_ASSERT_NOT_NULL( textureChild ); |
|
396 CleanupStack::PushL( textureChild ); |
|
397 textureChild->TextureClearChanged(); |
|
398 const TUid aExtensionUid = TUid::Null(); |
|
399 TAny** aExtensionParameters = NULL; |
|
400 textureChild->TextureExtension( aExtensionUid, aExtensionParameters ); |
|
401 CleanupStack::PopAndDestroy( textureChild ); |
|
402 |
|
403 return KErrNone; |
|
404 |
|
405 } |
|
406 // ----------------------------------------------------------------------------- |
|
407 // CTestUiAifCoreToolkit::TestCHuiATextTextureExtensionL |
|
408 // ----------------------------------------------------------------------------- |
|
409 // |
|
410 TInt CTestUiAifCoreToolkit::TestCHuiATextTextureExtensionL( CStifItemParser& /*aItem*/ ) |
|
411 { |
|
412 |
|
413 // Print to UI |
|
414 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
415 _LIT( KTestCHuiATextTextureExtensionL, "In TestCHuiATextTextureExtensionL" ); |
|
416 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiATextTextureExtensionL ); |
|
417 // Print to log file |
|
418 iLog->Log( KTestCHuiATextTextureExtensionL ); |
|
419 |
|
420 CTestUiAifBlocksManagerChild* managerChild =new ( ELeave ) CTestUiAifBlocksManagerChild; |
|
421 STIF_ASSERT_NOT_NULL( managerChild ); |
|
422 CleanupStack::PushL( managerChild ); |
|
423 CTestUiAifBlocksTextureChild* textureChild = CTestUiAifBlocksTextureChild::NewL( *managerChild ); |
|
424 STIF_ASSERT_NOT_NULL( textureChild ); |
|
425 CleanupStack::PushL( textureChild ); |
|
426 textureChild->SegmentedTexture(); |
|
427 textureChild->SetSegmentCountL(); |
|
428 textureChild->SegmentName( 1 ); |
|
429 textureChild->TextureClearChanged(); |
|
430 const TUid aExtensionUid = TUid::Null(); |
|
431 TAny** aExtensionParameters = NULL; |
|
432 textureChild->TextureExtension( aExtensionUid, aExtensionParameters ); |
|
433 CleanupStack::PopAndDestroy( textureChild ); |
|
434 |
|
435 return KErrNone; |
|
436 |
|
437 } |
|
438 // ----------------------------------------------------------------------------- |
|
439 // CTestUiAifCoreToolkit::TestCHuiATextSegmentSizeL |
|
440 // ----------------------------------------------------------------------------- |
|
441 // |
|
442 TInt CTestUiAifCoreToolkit::TestCHuiATextSegmentSizeL( CStifItemParser& /*aItem*/ ) |
|
443 { |
|
444 |
|
445 // Print to UI |
|
446 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
447 _LIT( KTestCHuiATextSegmentSizeL, "In TestCHuiATextSegmentSizeL" ); |
|
448 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiATextSegmentSizeL ); |
|
449 // Print to log file |
|
450 iLog->Log( KTestCHuiATextSegmentSizeL ); |
|
451 |
|
452 CTestUiAifBlocksManagerChild* managerChild =new ( ELeave ) CTestUiAifBlocksManagerChild; |
|
453 STIF_ASSERT_NOT_NULL( managerChild ); |
|
454 CleanupStack::PushL( managerChild ); |
|
455 CTestUiAifBlocksTextureChild* textureChild = CTestUiAifBlocksTextureChild::NewL( *managerChild ); |
|
456 STIF_ASSERT_NOT_NULL( textureChild ); |
|
457 CleanupStack::PushL( textureChild ); |
|
458 textureChild->SegmentedTexture(); |
|
459 textureChild->SetSegmentCountL(); |
|
460 textureChild->SegmentName( 1 ); |
|
461 STIF_ASSERT_EQUALS( textureChild->SegmentSize(0), textureChild->Size() ); |
|
462 textureChild->TextureClearChanged(); |
|
463 CleanupStack::PopAndDestroy( textureChild ); |
|
464 |
|
465 return KErrNone; |
|
466 |
|
467 } |
|
468 // ----------------------------------------------------------------------------- |
|
469 // CTestUiAifCoreToolkit::TestCHuiATextSegmentTextureSizeL |
|
470 // ----------------------------------------------------------------------------- |
|
471 // |
|
472 TInt CTestUiAifCoreToolkit::TestCHuiATextSegmentTextureSizeL( CStifItemParser& /*aItem*/ ) |
|
473 { |
|
474 |
|
475 // Print to UI |
|
476 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
477 _LIT( KTestCHuiATextSegmentTextureSizeL, "In TestCHuiATextSegmentTextureSizeL" ); |
|
478 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiATextSegmentTextureSizeL ); |
|
479 // Print to log file |
|
480 iLog->Log( KTestCHuiATextSegmentTextureSizeL ); |
|
481 |
|
482 CTestUiAifBlocksManagerChild* managerChild =new ( ELeave ) CTestUiAifBlocksManagerChild; |
|
483 STIF_ASSERT_NOT_NULL( managerChild ); |
|
484 CleanupStack::PushL( managerChild ); |
|
485 CTestUiAifBlocksTextureChild* textureChild = CTestUiAifBlocksTextureChild::NewL( *managerChild ); |
|
486 STIF_ASSERT_NOT_NULL( textureChild ); |
|
487 CleanupStack::PushL( textureChild ); |
|
488 textureChild->SegmentedTexture(); |
|
489 textureChild->SetSegmentCountL(); |
|
490 textureChild->SegmentName( 1 ); |
|
491 textureChild->SegmentSize( 0 ); |
|
492 textureChild->SegmentTextureSize( 0 ); |
|
493 TInt width = textureChild->SegmentTextureSize(0).iWidth; |
|
494 TInt height = textureChild->SegmentTextureSize(0).iHeight; |
|
495 STIF_ASSERT_EQUALS( textureChild->SegmentTextureSize(0).iWidth, 0 ); |
|
496 STIF_ASSERT_EQUALS( textureChild->SegmentTextureSize(0).iHeight, 0 ); |
|
497 textureChild->TextureClearChanged(); |
|
498 CleanupStack::PopAndDestroy( textureChild ); |
|
499 |
|
500 return KErrNone; |
|
501 |
|
502 } |
|
503 // ----------------------------------------------------------------------------- |
|
504 // CTestUiAifCoreToolkit::TestCHuiATextSegmentOffsetL |
|
505 // ----------------------------------------------------------------------------- |
|
506 // |
|
507 TInt CTestUiAifCoreToolkit::TestCHuiATextSegmentOffsetL( CStifItemParser& /*aItem*/ ) |
|
508 { |
|
509 |
|
510 // Print to UI |
|
511 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
512 _LIT( KTestCHuiATextSegmentOffsetL, "In TestCHuiATextSegmentOffsetL" ); |
|
513 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiATextSegmentOffsetL ); |
|
514 // Print to log file |
|
515 iLog->Log( KTestCHuiATextSegmentOffsetL ); |
|
516 |
|
517 CTestUiAifBlocksManagerChild* managerChild =new ( ELeave ) CTestUiAifBlocksManagerChild; |
|
518 STIF_ASSERT_NOT_NULL( managerChild ); |
|
519 CleanupStack::PushL( managerChild ); |
|
520 CTestUiAifBlocksTextureChild* textureChild = CTestUiAifBlocksTextureChild::NewL( *managerChild ); |
|
521 STIF_ASSERT_NOT_NULL( textureChild ); |
|
522 CleanupStack::PushL( textureChild ); |
|
523 textureChild->SegmentedTexture(); |
|
524 textureChild->SetSegmentCountL(); |
|
525 textureChild->SegmentName( 1 ); |
|
526 textureChild->SegmentSize( 0 ); |
|
527 STIF_ASSERT_EQUALS( textureChild->SegmentTextureSize(0).iWidth, 0 ); |
|
528 STIF_ASSERT_EQUALS( textureChild->SegmentTextureSize(0).iHeight, 0 ); |
|
529 STIF_ASSERT_EQUALS( textureChild->SegmentOffset(0).iX, 0 ); |
|
530 STIF_ASSERT_EQUALS( textureChild->SegmentOffset(0).iY, 0 ); |
|
531 textureChild->TextureClearChanged(); |
|
532 CleanupStack::PopAndDestroy( textureChild ); |
|
533 |
|
534 return KErrNone; |
|
535 |
|
536 } |
|
537 |
|
538 // [End of File] |
|