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/huienv.h> |
|
25 #include <uiacceltk/huicontrol.h> |
|
26 #include <uiacceltk/huicontrolgroup.h> |
|
27 #include <uiacceltk/huivisual.h> |
|
28 #include <uiacceltk/huianchorlayout.h> |
|
29 #include <uiacceltk/huievent.h> |
|
30 #include <eikenv.h> |
|
31 #include <e32err.h> |
|
32 #include <uiacceltk/HuiDisplayCoeControl.h> |
|
33 #include <uiacceltk/HuiDeckLayout.h> |
|
34 |
|
35 |
|
36 #include "testuiaifcoretoolkit.h" |
|
37 #include "testuiaifblockshuicontrolchild.h" |
|
38 // ----------------------------------------------------------------------------- |
|
39 // CTestUiAifCoreToolkit::TestCHuiControlL |
|
40 // ----------------------------------------------------------------------------- |
|
41 // |
|
42 TInt CTestUiAifCoreToolkit::TestCHuiControlL( CStifItemParser& /*aItem*/ ) |
|
43 { |
|
44 |
|
45 // Print to UI |
|
46 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
47 _LIT( KTestCHuiControlL, "In TestCHuiControlL" ); |
|
48 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlL ); |
|
49 // Print to log file |
|
50 iLog->Log( KTestCHuiControlL ); |
|
51 |
|
52 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
53 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
54 |
|
55 return KErrNone; |
|
56 } |
|
57 // ----------------------------------------------------------------------------- |
|
58 // CTestUiAifCoreToolkit::TestCHuiControlDestructL |
|
59 // ----------------------------------------------------------------------------- |
|
60 // |
|
61 TInt CTestUiAifCoreToolkit::TestCHuiControlDestructL( CStifItemParser& /*aItem*/ ) |
|
62 { |
|
63 |
|
64 // Print to UI |
|
65 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
66 _LIT( KTestCHuiControlDestructL, "In TestCHuiControlDestructL" ); |
|
67 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlDestructL ); |
|
68 // Print to log file |
|
69 iLog->Log( KTestCHuiControlDestructL ); |
|
70 |
|
71 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
72 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
73 |
|
74 return KErrNone; |
|
75 } |
|
76 // ----------------------------------------------------------------------------- |
|
77 // CTestUiAifCoreToolkit::TestCHuiControlSetIdL |
|
78 // ----------------------------------------------------------------------------- |
|
79 // |
|
80 TInt CTestUiAifCoreToolkit::TestCHuiControlSetIdL( CStifItemParser& /*aItem*/ ) |
|
81 { |
|
82 |
|
83 // Print to UI |
|
84 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
85 _LIT( KTestCHuiControlSetIdL, "In TestCHuiControlSetIdL" ); |
|
86 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlSetIdL ); |
|
87 // Print to log file |
|
88 iLog->Log( KTestCHuiControlSetIdL ); |
|
89 |
|
90 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
91 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
92 iHuiControl->SetId( 67 ); |
|
93 |
|
94 return KErrNone; |
|
95 } |
|
96 // ----------------------------------------------------------------------------- |
|
97 // CTestUiAifCoreToolkit::TestCHuiControlIdL |
|
98 // ----------------------------------------------------------------------------- |
|
99 // |
|
100 TInt CTestUiAifCoreToolkit::TestCHuiControlIdL( CStifItemParser& /*aItem*/ ) |
|
101 { |
|
102 |
|
103 // Print to UI |
|
104 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
105 _LIT( KTestCHuiControlIdL, "In TestCHuiControlIdL" ); |
|
106 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlIdL ); |
|
107 // Print to log file |
|
108 iLog->Log( KTestCHuiControlIdL ); |
|
109 |
|
110 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
111 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
112 iHuiControl->SetId( 67 ); |
|
113 STIF_ASSERT_EQUALS( iHuiControl->Id(), 67 ); |
|
114 |
|
115 return KErrNone; |
|
116 } |
|
117 // ----------------------------------------------------------------------------- |
|
118 // CTestUiAifCoreToolkit::TestCHuiControlEnvL |
|
119 // ----------------------------------------------------------------------------- |
|
120 // |
|
121 TInt CTestUiAifCoreToolkit::TestCHuiControlEnvL( CStifItemParser& /*aItem*/ ) |
|
122 { |
|
123 |
|
124 // Print to UI |
|
125 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
126 _LIT( KTestCHuiControlEnvL, "In TestCHuiControlEnvL" ); |
|
127 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlEnvL ); |
|
128 // Print to log file |
|
129 iLog->Log( KTestCHuiControlEnvL ); |
|
130 |
|
131 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
132 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
133 iHuiControl->SetId( 67 ); |
|
134 iHuiControl->Env(); |
|
135 |
|
136 return KErrNone; |
|
137 } |
|
138 // ----------------------------------------------------------------------------- |
|
139 // CTestUiAifCoreToolkit::TestCHuiControlControlGroupL |
|
140 // ----------------------------------------------------------------------------- |
|
141 // |
|
142 TInt CTestUiAifCoreToolkit::TestCHuiControlControlGroupL( CStifItemParser& /*aItem*/ ) |
|
143 { |
|
144 |
|
145 // Print to UI |
|
146 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
147 _LIT( KTestCHuiControlControlGroupL, "In TestCHuiControlControlGroupL" ); |
|
148 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlControlGroupL ); |
|
149 // Print to log file |
|
150 iLog->Log( KTestCHuiControlControlGroupL ); |
|
151 |
|
152 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
153 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
154 iHuiControl->SetId( 67 ); |
|
155 iHuiControl->ControlGroup(); |
|
156 |
|
157 return KErrNone; |
|
158 } |
|
159 // ----------------------------------------------------------------------------- |
|
160 // CTestUiAifCoreToolkit::TestCHuiControlTextureManagerL |
|
161 // ----------------------------------------------------------------------------- |
|
162 // |
|
163 TInt CTestUiAifCoreToolkit::TestCHuiControlTextureManagerL( CStifItemParser& /*aItem*/ ) |
|
164 { |
|
165 |
|
166 // Print to UI |
|
167 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
168 _LIT( KTestCHuiControlTextureManagerL, "In TestCHuiControlTextureManagerL" ); |
|
169 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlTextureManagerL ); |
|
170 // Print to log file |
|
171 iLog->Log( KTestCHuiControlTextureManagerL ); |
|
172 |
|
173 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
174 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
175 iHuiControl->SetId( 67 ); |
|
176 iHuiControl->TextureManager(); |
|
177 |
|
178 return KErrNone; |
|
179 } |
|
180 // ----------------------------------------------------------------------------- |
|
181 // CTestUiAifCoreToolkit::TestCHuiControlDisplayL |
|
182 // ----------------------------------------------------------------------------- |
|
183 // |
|
184 TInt CTestUiAifCoreToolkit::TestCHuiControlDisplayL( CStifItemParser& /*aItem*/ ) |
|
185 { |
|
186 |
|
187 // Print to UI |
|
188 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
189 _LIT( KTestCHuiControlDisplayL, "In TestCHuiControlDisplayL" ); |
|
190 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlDisplayL ); |
|
191 // Print to log file |
|
192 iLog->Log( KTestCHuiControlDisplayL ); |
|
193 |
|
194 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
195 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
196 iHuiControl->SetId( 67 ); |
|
197 iHuiControl->Display(); |
|
198 |
|
199 return KErrNone; |
|
200 } |
|
201 // ----------------------------------------------------------------------------- |
|
202 // CTestUiAifCoreToolkit::TestCHuiControlBindDisplayL |
|
203 // ----------------------------------------------------------------------------- |
|
204 // |
|
205 TInt CTestUiAifCoreToolkit::TestCHuiControlBindDisplayL( CStifItemParser& /*aItem*/ ) |
|
206 { |
|
207 |
|
208 // Print to UI |
|
209 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
210 _LIT( KTestCHuiControlBindDisplayL, "In TestCHuiControlBindDisplayL" ); |
|
211 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlBindDisplayL ); |
|
212 // Print to log file |
|
213 iLog->Log( KTestCHuiControlBindDisplayL ); |
|
214 |
|
215 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
216 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
217 iHuiControl->SetId( 67 ); |
|
218 |
|
219 return KErrNone; |
|
220 } |
|
221 // ----------------------------------------------------------------------------- |
|
222 // CTestUiAifCoreToolkit::TestCHuiControlAppendL |
|
223 // ----------------------------------------------------------------------------- |
|
224 // |
|
225 TInt CTestUiAifCoreToolkit::TestCHuiControlAppendL( CStifItemParser& /*aItem*/ ) |
|
226 { |
|
227 |
|
228 // Print to UI |
|
229 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
230 _LIT( KTestCHuiControlAppendL, "In TestCHuiControlAppendL" ); |
|
231 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlAppendL ); |
|
232 // Print to log file |
|
233 iLog->Log( KTestCHuiControlAppendL ); |
|
234 |
|
235 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
236 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
237 iHuiControl->SetId( 67 ); |
|
238 CHuiVisual* visual = new (ELeave) CHuiVisual( *iHuiControl ); |
|
239 iHuiControl->AppendL( visual ); |
|
240 |
|
241 return KErrNone; |
|
242 } |
|
243 // ----------------------------------------------------------------------------- |
|
244 // CTestUiAifCoreToolkit::TestCHuiControlAppendLayoutL |
|
245 // ----------------------------------------------------------------------------- |
|
246 // |
|
247 TInt CTestUiAifCoreToolkit::TestCHuiControlAppendLayoutL( CStifItemParser& /*aItem*/ ) |
|
248 { |
|
249 |
|
250 // Print to UI |
|
251 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
252 _LIT( KTestCHuiControlAppendLayoutL, "In TestCHuiControlAppendLayoutL" ); |
|
253 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlAppendLayoutL ); |
|
254 // Print to log file |
|
255 iLog->Log( KTestCHuiControlAppendLayoutL ); |
|
256 |
|
257 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
258 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
259 CHuiVisual* visual = new (ELeave) CHuiVisual( *iHuiControl ); |
|
260 STIF_ASSERT_NOT_NULL( visual ); |
|
261 CleanupStack::PushL( visual ); |
|
262 CHuiLayout* layout = NULL; |
|
263 iHuiControl->AppendL( visual, layout ); |
|
264 CleanupStack::Pop( 1 ); |
|
265 |
|
266 return KErrNone; |
|
267 } |
|
268 // ----------------------------------------------------------------------------- |
|
269 // CTestUiAifCoreToolkit::TestCHuiControlRemoveL |
|
270 // ----------------------------------------------------------------------------- |
|
271 // |
|
272 TInt CTestUiAifCoreToolkit::TestCHuiControlRemoveL( CStifItemParser& /*aItem*/ ) |
|
273 { |
|
274 |
|
275 // Print to UI |
|
276 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
277 _LIT( KTestCHuiControlRemoveL, "In TestCHuiControlRemoveL" ); |
|
278 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlRemoveL ); |
|
279 // Print to log file |
|
280 iLog->Log( KTestCHuiControlRemoveL ); |
|
281 |
|
282 |
|
283 CHuiVisual* visual = new (ELeave) CHuiVisual( *iHuiControl ); |
|
284 STIF_ASSERT_NOT_NULL( visual ); |
|
285 CleanupStack::PushL( visual ); |
|
286 iHuiControl->Remove( visual ); |
|
287 CleanupStack::Pop( 1 ); |
|
288 |
|
289 return KErrNone; |
|
290 } |
|
291 // ----------------------------------------------------------------------------- |
|
292 // CTestUiAifCoreToolkit::TestCHuiControlAppendVisualL |
|
293 // ----------------------------------------------------------------------------- |
|
294 // |
|
295 TInt CTestUiAifCoreToolkit::TestCHuiControlAppendVisualL( CStifItemParser& /*aItem*/ ) |
|
296 { |
|
297 |
|
298 // Print to UI |
|
299 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
300 _LIT( KTestCHuiControlAppendVisualL, "In TestCHuiControlAppendVisualL" ); |
|
301 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlAppendVisualL ); |
|
302 // Print to log file |
|
303 iLog->Log( KTestCHuiControlAppendVisualL ); |
|
304 |
|
305 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
306 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
307 THuiVisualType type = EHuiVisualTypeVisual; |
|
308 iHuiControl->AppendVisualL( type ); |
|
309 |
|
310 return KErrNone; |
|
311 } |
|
312 // ----------------------------------------------------------------------------- |
|
313 // CTestUiAifCoreToolkit::TestCHuiControlAppendTypeLayoutL |
|
314 // ----------------------------------------------------------------------------- |
|
315 // |
|
316 TInt CTestUiAifCoreToolkit::TestCHuiControlAppendTypeLayoutL( CStifItemParser& /*aItem*/ ) |
|
317 { |
|
318 |
|
319 // Print to UI |
|
320 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
321 _LIT( KTestCHuiControlAppendTypeLayoutL, "In TestCHuiControlAppendTypeLayoutL" ); |
|
322 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlAppendTypeLayoutL ); |
|
323 // Print to log file |
|
324 iLog->Log( KTestCHuiControlAppendTypeLayoutL ); |
|
325 |
|
326 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
327 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
328 iHuiControl->AppendLayoutL( EHuiLayoutTypeLayout ); |
|
329 |
|
330 return KErrNone; |
|
331 } |
|
332 // ----------------------------------------------------------------------------- |
|
333 // CTestUiAifCoreToolkit::TestCHuiControlVisualL |
|
334 // ----------------------------------------------------------------------------- |
|
335 // |
|
336 TInt CTestUiAifCoreToolkit::TestCHuiControlVisualL( CStifItemParser& /*aItem*/ ) |
|
337 { |
|
338 |
|
339 // Print to UI |
|
340 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
341 _LIT( KTestCHuiControlVisualL, "In TestCHuiControlVisualL" ); |
|
342 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlVisualL ); |
|
343 // Print to log file |
|
344 iLog->Log( KTestCHuiControlVisualL ); |
|
345 |
|
346 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
347 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
348 CHuiVisual* visual = new (ELeave) CHuiVisual( *iHuiControl ); |
|
349 iHuiControl->AppendL( visual ); |
|
350 iHuiControl->Visual( 0 ); |
|
351 |
|
352 return KErrNone; |
|
353 } |
|
354 // ----------------------------------------------------------------------------- |
|
355 // CTestUiAifCoreToolkit::TestCHuiControlVisualCountL |
|
356 // ----------------------------------------------------------------------------- |
|
357 // |
|
358 TInt CTestUiAifCoreToolkit::TestCHuiControlVisualCountL( CStifItemParser& /*aItem*/ ) |
|
359 { |
|
360 |
|
361 // Print to UI |
|
362 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
363 _LIT( KTestCHuiControlVisualCountL, "In TestCHuiControlVisualCountL" ); |
|
364 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlVisualCountL ); |
|
365 // Print to log file |
|
366 iLog->Log( KTestCHuiControlVisualCountL ); |
|
367 |
|
368 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
369 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
370 CHuiVisual* visual = new (ELeave) CHuiVisual( *iHuiControl ); |
|
371 iHuiControl->AppendL( visual ); |
|
372 TInt visualCount = iHuiControl->VisualCount(); |
|
373 |
|
374 return KErrNone; |
|
375 } |
|
376 // ----------------------------------------------------------------------------- |
|
377 // CTestUiAifCoreToolkit::TestCHuiControlFindTagL |
|
378 // ----------------------------------------------------------------------------- |
|
379 // |
|
380 TInt CTestUiAifCoreToolkit::TestCHuiControlFindTagL( CStifItemParser& /*aItem*/ ) |
|
381 { |
|
382 |
|
383 // Print to UI |
|
384 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
385 _LIT( KTestCHuiControlFindTagL, "In TestCHuiControlFindTagL" ); |
|
386 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlFindTagL ); |
|
387 // Print to log file |
|
388 iLog->Log( KTestCHuiControlFindTagL ); |
|
389 |
|
390 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
391 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
392 CHuiVisual* visual = new (ELeave) CHuiVisual( *iHuiControl ); |
|
393 iHuiControl->AppendL( visual ); |
|
394 TInt visualCount = iHuiControl->VisualCount(); |
|
395 _LIT( KHello, " Hello " ); |
|
396 const TDesC8* ptr = ( TDesC8* )&KHello; |
|
397 iHuiControl->FindTag( *ptr ); |
|
398 |
|
399 return KErrNone; |
|
400 } |
|
401 // ----------------------------------------------------------------------------- |
|
402 // CTestUiAifCoreToolkit::TestCHuiControlHostL |
|
403 // ----------------------------------------------------------------------------- |
|
404 // |
|
405 TInt CTestUiAifCoreToolkit::TestCHuiControlHostL( CStifItemParser& /*aItem */) |
|
406 { |
|
407 |
|
408 // Print to UI |
|
409 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
410 _LIT( KTestCHuiControlHostL, "In TestCHuiControlHostL" ); |
|
411 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlHostL ); |
|
412 // Print to log file |
|
413 iLog->Log( KTestCHuiControlHostL ); |
|
414 |
|
415 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
416 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
417 CHuiVisual* visual = new (ELeave) CHuiVisual( *iHuiControl ); |
|
418 iHuiControl->AppendL( visual ); |
|
419 iHuiControl->Host(); |
|
420 |
|
421 return KErrNone; |
|
422 } |
|
423 // ----------------------------------------------------------------------------- |
|
424 // CTestUiAifCoreToolkit::TestCHuiControlAddConnectionL |
|
425 // ----------------------------------------------------------------------------- |
|
426 // |
|
427 TInt CTestUiAifCoreToolkit::TestCHuiControlAddConnectionL( CStifItemParser& /*aItem */) |
|
428 { |
|
429 // Print to UI |
|
430 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
431 _LIT( KTestCHuiControlAddConnectionL, "In TestCHuiControlAddConnectionL" ); |
|
432 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlAddConnectionL ); |
|
433 // Print to log file |
|
434 iLog->Log( KTestCHuiControlAddConnectionL ); |
|
435 |
|
436 // Prepare |
|
437 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
438 CleanupStack::PushL( connectControl ); |
|
439 STIF_ASSERT_NOT_NULL( connectControl ); |
|
440 iHuiControl->ControlGroup()->AppendL( connectControl ); // add into same group |
|
441 STIF_ASSERT_EQUALS( iHuiControl->ConnectionCount() , 0 ); |
|
442 iHuiControl->AddConnectionL( connectControl ); |
|
443 STIF_ASSERT_EQUALS( iHuiControl->ConnectionCount() , 1 ); |
|
444 CleanupStack::Pop( connectControl ); |
|
445 |
|
446 return KErrNone; |
|
447 } |
|
448 // ----------------------------------------------------------------------------- |
|
449 // CTestUiAifCoreToolkit::TestCHuiControlRemoveConnectionL |
|
450 // ----------------------------------------------------------------------------- |
|
451 // |
|
452 TInt CTestUiAifCoreToolkit::TestCHuiControlRemoveConnectionL( CStifItemParser& /*aItem */) |
|
453 { |
|
454 |
|
455 // Print to UI |
|
456 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
457 _LIT( KTestCHuiControlRemoveConnectionL, "In TestCHuiControlRemoveConnectionL" ); |
|
458 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlRemoveConnectionL ); |
|
459 // Print to log file |
|
460 iLog->Log( KTestCHuiControlRemoveConnectionL ); |
|
461 |
|
462 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
463 CleanupStack::PushL( connectControl ); |
|
464 STIF_ASSERT_NOT_NULL( connectControl ); |
|
465 iHuiControl->ControlGroup()->AppendL( connectControl ); // add into same group |
|
466 STIF_ASSERT_EQUALS( iHuiControl->ConnectionCount() , 0 ); |
|
467 iHuiControl->AddConnectionL( connectControl ); |
|
468 STIF_ASSERT_EQUALS( iHuiControl->ConnectionCount() , 1 ); |
|
469 iHuiControl->RemoveConnection( connectControl ); |
|
470 STIF_ASSERT_EQUALS( iHuiControl->ConnectionCount() , 0 ); |
|
471 CleanupStack::Pop( connectControl ); |
|
472 |
|
473 return KErrNone; |
|
474 } |
|
475 // ----------------------------------------------------------------------------- |
|
476 // CTestUiAifCoreToolkit::TestCHuiControlFindConnectionL |
|
477 // ----------------------------------------------------------------------------- |
|
478 // |
|
479 TInt CTestUiAifCoreToolkit::TestCHuiControlFindConnectionL( CStifItemParser& /*aItem */) |
|
480 { |
|
481 |
|
482 // Print to UI |
|
483 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
484 _LIT( KTestCHuiControlFindConnectionL, "In TestCHuiControlFindConnectionL" ); |
|
485 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlFindConnectionL ); |
|
486 // Print to log file |
|
487 iLog->Log( KTestCHuiControlFindConnectionL ); |
|
488 |
|
489 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
490 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
491 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
492 STIF_ASSERT_NOT_NULL( connectControl ); |
|
493 CleanupStack::PushL( connectControl ); |
|
494 iHuiControl->AddConnectionL( connectControl ); |
|
495 TInt index = iHuiControl->FindConnection( connectControl ); |
|
496 CleanupStack::Pop( 1 ); |
|
497 |
|
498 return KErrNone; |
|
499 } |
|
500 // ----------------------------------------------------------------------------- |
|
501 // CTestUiAifCoreToolkit::TestCHuiControlConnectionCountL |
|
502 // ----------------------------------------------------------------------------- |
|
503 // |
|
504 TInt CTestUiAifCoreToolkit::TestCHuiControlConnectionCountL( CStifItemParser& /*aItem */) |
|
505 { |
|
506 |
|
507 // Print to UI |
|
508 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
509 _LIT( KTestCHuiControlConnectionCountL, "In TestCHuiControlConnectionCountL" ); |
|
510 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlConnectionCountL ); |
|
511 // Print to log file |
|
512 iLog->Log( KTestCHuiControlConnectionCountL ); |
|
513 |
|
514 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
515 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
516 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
517 STIF_ASSERT_NOT_NULL( connectControl ); |
|
518 CleanupStack::PushL( connectControl ); |
|
519 iHuiControl->AddConnectionL( connectControl ); |
|
520 iHuiControl->ConnectionCount(); |
|
521 CleanupStack::Pop( 1 ); |
|
522 |
|
523 return KErrNone; |
|
524 } |
|
525 // ----------------------------------------------------------------------------- |
|
526 // CTestUiAifCoreToolkit::TestCHuiControlConnectionL |
|
527 // ----------------------------------------------------------------------------- |
|
528 // |
|
529 TInt CTestUiAifCoreToolkit::TestCHuiControlConnectionL( CStifItemParser& /*aItem */) |
|
530 { |
|
531 |
|
532 // Print to UI |
|
533 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
534 _LIT( KTestCHuiControlConnectionL, "In TestCHuiControlConnectionL" ); |
|
535 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlConnectionL ); |
|
536 // Print to log file |
|
537 iLog->Log( KTestCHuiControlConnectionL ); |
|
538 |
|
539 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
540 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
541 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
542 STIF_ASSERT_NOT_NULL( connectControl ); |
|
543 CleanupStack::PushL( connectControl ); |
|
544 iHuiControl->AddConnectionL( connectControl ); |
|
545 TInt index = iHuiControl->FindConnection( connectControl ); |
|
546 iHuiControl->Connection( index ); |
|
547 CleanupStack::Pop( 1 ); |
|
548 |
|
549 return KErrNone; |
|
550 } |
|
551 // ----------------------------------------------------------------------------- |
|
552 // CTestUiAifCoreToolkit::TestCHuiControlConnectionByOrdinalL |
|
553 // ----------------------------------------------------------------------------- |
|
554 // |
|
555 TInt CTestUiAifCoreToolkit::TestCHuiControlConnectionByOrdinalL( CStifItemParser& /*aItem */) |
|
556 { |
|
557 |
|
558 // Print to UI |
|
559 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
560 _LIT( KTestCHuiControlConnectionByOrdinalL, "In TestCHuiControlConnectionByOrdinalL" ); |
|
561 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlConnectionByOrdinalL ); |
|
562 // Print to log file |
|
563 iLog->Log( KTestCHuiControlConnectionByOrdinalL ); |
|
564 |
|
565 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
566 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
567 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
568 STIF_ASSERT_NOT_NULL( connectControl ); |
|
569 CleanupStack::PushL( connectControl ); |
|
570 iHuiControl->AddConnectionL( connectControl ); |
|
571 TInt index = iHuiControl->FindConnection( connectControl ); |
|
572 iHuiControl->ConnectionByOrdinal( index ); |
|
573 CleanupStack::Pop( 1 ); |
|
574 |
|
575 return KErrNone; |
|
576 } |
|
577 // ----------------------------------------------------------------------------- |
|
578 // CTestUiAifCoreToolkit::TestCHuiControlConnectionRoleL |
|
579 // ----------------------------------------------------------------------------- |
|
580 // |
|
581 TInt CTestUiAifCoreToolkit::TestCHuiControlConnectionRoleL( CStifItemParser& /*aItem */) |
|
582 { |
|
583 |
|
584 // Print to UI |
|
585 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
586 _LIT( KTestCHuiControlConnectionRoleL, "In TestCHuiControlConnectionRoleL" ); |
|
587 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlConnectionRoleL ); |
|
588 // Print to log file |
|
589 iLog->Log( KTestCHuiControlConnectionRoleL ); |
|
590 |
|
591 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
592 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
593 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
594 STIF_ASSERT_NOT_NULL( connectControl ); |
|
595 CleanupStack::PushL( connectControl ); |
|
596 iHuiControl->AddConnectionL( connectControl ); |
|
597 TInt index = iHuiControl->FindConnection( connectControl ); |
|
598 iHuiControl->ConnectionRole( index ); |
|
599 CleanupStack::Pop( 1 ); |
|
600 |
|
601 return KErrNone; |
|
602 } |
|
603 // ----------------------------------------------------------------------------- |
|
604 // CTestUiAifCoreToolkit::TestCHuiControlConnectionOrdinalL |
|
605 // ----------------------------------------------------------------------------- |
|
606 // |
|
607 TInt CTestUiAifCoreToolkit::TestCHuiControlConnectionOrdinalL( CStifItemParser& /*aItem */) |
|
608 { |
|
609 |
|
610 // Print to UI |
|
611 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
612 _LIT( KTestCHuiControlConnectionOrdinalL, "In TestCHuiControlConnectionOrdinalL" ); |
|
613 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlConnectionOrdinalL ); |
|
614 // Print to log file |
|
615 iLog->Log( KTestCHuiControlConnectionOrdinalL ); |
|
616 |
|
617 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
618 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
619 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
620 STIF_ASSERT_NOT_NULL( connectControl ); |
|
621 CleanupStack::PushL( connectControl ); |
|
622 iHuiControl->AddConnectionL( connectControl ); |
|
623 TInt index = iHuiControl->FindConnection( connectControl ); |
|
624 iHuiControl->ConnectionOrdinal( index ); |
|
625 CleanupStack::Pop( 1 ); |
|
626 |
|
627 return KErrNone; |
|
628 } |
|
629 // ----------------------------------------------------------------------------- |
|
630 // CTestUiAifCoreToolkit::TestCHuiControlRoleL |
|
631 // ----------------------------------------------------------------------------- |
|
632 // |
|
633 TInt CTestUiAifCoreToolkit::TestCHuiControlRoleL( CStifItemParser& /*aItem */) |
|
634 { |
|
635 |
|
636 // Print to UI |
|
637 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
638 _LIT( KTestCHuiControlRoleL, "In TestCHuiControlRoleL" ); |
|
639 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlRoleL ); |
|
640 // Print to log file |
|
641 iLog->Log( KTestCHuiControlRoleL ); |
|
642 |
|
643 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
644 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
645 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
646 STIF_ASSERT_NOT_NULL( connectControl ); |
|
647 CleanupStack::PushL( connectControl ); |
|
648 iHuiControl->AddConnectionL( connectControl ); |
|
649 TInt index = iHuiControl->FindConnection( connectControl ); |
|
650 iHuiControl->Role(); |
|
651 CleanupStack::Pop( 1 ); |
|
652 |
|
653 return KErrNone; |
|
654 } |
|
655 // ----------------------------------------------------------------------------- |
|
656 // CTestUiAifCoreToolkit::TestCHuiControlSetRoleL |
|
657 // ----------------------------------------------------------------------------- |
|
658 // |
|
659 TInt CTestUiAifCoreToolkit::TestCHuiControlSetRoleL( CStifItemParser& /*aItem */) |
|
660 { |
|
661 |
|
662 // Print to UI |
|
663 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
664 _LIT( KTestCHuiControlSetRoleL, "In TestCHuiControlSetRoleL" ); |
|
665 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlSetRoleL ); |
|
666 // Print to log file |
|
667 iLog->Log( KTestCHuiControlSetRoleL ); |
|
668 |
|
669 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
670 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
671 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
672 STIF_ASSERT_NOT_NULL( connectControl ); |
|
673 CleanupStack::PushL( connectControl ); |
|
674 iHuiControl->AddConnectionL( connectControl ); |
|
675 TInt index = iHuiControl->FindConnection( connectControl ); |
|
676 iHuiControl->SetRole( index ); |
|
677 CleanupStack::Pop( 1 ); |
|
678 |
|
679 return KErrNone; |
|
680 } |
|
681 // ----------------------------------------------------------------------------- |
|
682 // CTestUiAifCoreToolkit::TestCHuiControlHostIdL |
|
683 // ----------------------------------------------------------------------------- |
|
684 // |
|
685 TInt CTestUiAifCoreToolkit::TestCHuiControlHostIdL( CStifItemParser& /*aItem */) |
|
686 { |
|
687 |
|
688 // Print to UI |
|
689 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
690 _LIT( KTestCHuiControlHostIdL, "In TestCHuiControlHostIdL" ); |
|
691 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlHostIdL ); |
|
692 // Print to log file |
|
693 iLog->Log( KTestCHuiControlHostIdL ); |
|
694 |
|
695 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
696 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
697 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
698 STIF_ASSERT_NOT_NULL( connectControl ); |
|
699 CleanupStack::PushL( connectControl ); |
|
700 iHuiControl->AddConnectionL( connectControl ); |
|
701 TInt index = iHuiControl->FindConnection( connectControl ); |
|
702 iHuiControl->HostId(); |
|
703 CleanupStack::Pop( 1 ); |
|
704 |
|
705 return KErrNone; |
|
706 } |
|
707 // ----------------------------------------------------------------------------- |
|
708 // CTestUiAifCoreToolkit::TestCHuiControlSetHostIdL |
|
709 // ----------------------------------------------------------------------------- |
|
710 // |
|
711 TInt CTestUiAifCoreToolkit::TestCHuiControlSetHostIdL( CStifItemParser& /*aItem */) |
|
712 { |
|
713 |
|
714 // Print to UI |
|
715 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
716 _LIT( KTestCHuiControlSetHostIdL, "In TestCHuiControlSetHostIdL" ); |
|
717 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlSetHostIdL ); |
|
718 // Print to log file |
|
719 iLog->Log( KTestCHuiControlSetHostIdL ); |
|
720 |
|
721 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
722 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
723 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
724 STIF_ASSERT_NOT_NULL( connectControl ); |
|
725 CleanupStack::PushL( connectControl ); |
|
726 iHuiControl->AddConnectionL( connectControl ); |
|
727 TInt index = iHuiControl->HostId(); |
|
728 iHuiControl->SetHostId( index ); |
|
729 CleanupStack::Pop( 1 ); |
|
730 |
|
731 return KErrNone; |
|
732 } |
|
733 // ----------------------------------------------------------------------------- |
|
734 // CTestUiAifCoreToolkit::TestCHuiControlSetHostL |
|
735 // ----------------------------------------------------------------------------- |
|
736 // |
|
737 TInt CTestUiAifCoreToolkit::TestCHuiControlSetHostL( CStifItemParser& /*aItem */) |
|
738 { |
|
739 |
|
740 // Print to UI |
|
741 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
742 _LIT( KTestCHuiControlSetHostL, "In TestCHuiControlSetHostL" ); |
|
743 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlSetHostL ); |
|
744 // Print to log file |
|
745 iLog->Log( KTestCHuiControlSetHostL ); |
|
746 |
|
747 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
748 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
749 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
750 STIF_ASSERT_NOT_NULL( connectControl ); |
|
751 CleanupStack::PushL( connectControl ); |
|
752 iHuiControl->AddConnectionL( connectControl); |
|
753 CleanupStack::Pop( 1 ); |
|
754 |
|
755 return KErrNone; |
|
756 } |
|
757 // ----------------------------------------------------------------------------- |
|
758 // CTestUiAifCoreToolkit::TestCHuiControlContainerLayoutL |
|
759 // ----------------------------------------------------------------------------- |
|
760 // |
|
761 TInt CTestUiAifCoreToolkit::TestCHuiControlContainerLayoutL( CStifItemParser& /*aItem */) |
|
762 { |
|
763 |
|
764 // Print to UI |
|
765 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
766 _LIT( KTestCHuiControlContainerLayoutL, "In TestCHuiControlContainerLayoutL" ); |
|
767 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlContainerLayoutL ); |
|
768 // Print to log file |
|
769 iLog->Log( KTestCHuiControlContainerLayoutL ); |
|
770 |
|
771 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
772 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
773 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
774 STIF_ASSERT_NOT_NULL( connectControl ); |
|
775 CleanupStack::PushL( connectControl ); |
|
776 iHuiControl->AddConnectionL( connectControl); |
|
777 iHuiControl->ContainerLayout( connectControl ); |
|
778 CleanupStack::Pop( 1 ); |
|
779 |
|
780 return KErrNone; |
|
781 } |
|
782 // ----------------------------------------------------------------------------- |
|
783 // CTestUiAifCoreToolkit::TestCHuiControlHostToDisplayL |
|
784 // ----------------------------------------------------------------------------- |
|
785 // |
|
786 TInt CTestUiAifCoreToolkit::TestCHuiControlHostToDisplayL( CStifItemParser& /*aItem */) |
|
787 { |
|
788 |
|
789 // Print to UI |
|
790 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
791 _LIT( KTestCHuiControlHostToDisplayL, "In TestCHuiControlHostToDisplayL" ); |
|
792 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlHostToDisplayL ); |
|
793 // Print to log file |
|
794 iLog->Log( KTestCHuiControlHostToDisplayL ); |
|
795 |
|
796 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
797 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
798 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
799 STIF_ASSERT_NOT_NULL( connectControl ); |
|
800 CleanupStack::PushL( connectControl ); |
|
801 iHuiControl->AddConnectionL( connectControl); |
|
802 iHuiControl->ContainerLayout( connectControl ); |
|
803 const TPoint iPoint; |
|
804 iHuiControl->HostToDisplay( iPoint ); |
|
805 CleanupStack::Pop( 1 ); |
|
806 |
|
807 return KErrNone; |
|
808 } |
|
809 // ----------------------------------------------------------------------------- |
|
810 // CTestUiAifCoreToolkit::TestCHuiControlDisplayToHostL |
|
811 // ----------------------------------------------------------------------------- |
|
812 // |
|
813 TInt CTestUiAifCoreToolkit::TestCHuiControlDisplayToHostL( CStifItemParser& /*aItem */) |
|
814 { |
|
815 |
|
816 // Print to UI |
|
817 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
818 _LIT( KTestCHuiControlDisplayToHostL, "In TestCHuiControlDisplayToHostL" ); |
|
819 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlDisplayToHostL ); |
|
820 // Print to log file |
|
821 iLog->Log( KTestCHuiControlDisplayToHostL ); |
|
822 |
|
823 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
824 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
825 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
826 STIF_ASSERT_NOT_NULL( connectControl ); |
|
827 CleanupStack::PushL( connectControl ); |
|
828 iHuiControl->AddConnectionL( connectControl); |
|
829 iHuiControl->ContainerLayout( connectControl ); |
|
830 const TPoint iPoint; |
|
831 iHuiControl->DisplayToHost( iPoint ); |
|
832 CleanupStack::Pop( 1 ); |
|
833 |
|
834 return KErrNone; |
|
835 } |
|
836 // ----------------------------------------------------------------------------- |
|
837 // CTestUiAifCoreToolkit::TestCHuiControlBoundsL |
|
838 // ----------------------------------------------------------------------------- |
|
839 // |
|
840 TInt CTestUiAifCoreToolkit::TestCHuiControlBoundsL( CStifItemParser& /*aItem */) |
|
841 { |
|
842 |
|
843 // Print to UI |
|
844 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
845 _LIT( KTestCHuiControlBoundsL, "In TestCHuiControlBoundsL" ); |
|
846 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlBoundsL ); |
|
847 // Print to log file |
|
848 iLog->Log( KTestCHuiControlBoundsL ); |
|
849 |
|
850 |
|
851 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
852 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
853 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
854 STIF_ASSERT_NOT_NULL( connectControl ); |
|
855 CleanupStack::PushL( connectControl ); |
|
856 iHuiControl->AddConnectionL( connectControl); |
|
857 iHuiControl->ContainerLayout( connectControl ); |
|
858 const TPoint iPoint; |
|
859 iHuiControl->DisplayToHost( iPoint ); |
|
860 iHuiControl->Bounds(); |
|
861 CleanupStack::Pop( 1 ); |
|
862 |
|
863 |
|
864 return KErrNone; |
|
865 } |
|
866 // ----------------------------------------------------------------------------- |
|
867 // CTestUiAifCoreToolkit::TestCHuiControlHitTestL |
|
868 // ----------------------------------------------------------------------------- |
|
869 // |
|
870 TInt CTestUiAifCoreToolkit::TestCHuiControlHitTestL( CStifItemParser& /*aItem */) |
|
871 { |
|
872 |
|
873 // Print to UI |
|
874 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
875 _LIT( KTestCHuiControlHitTestL, "In TestCHuiControlHitTestL" ); |
|
876 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlHitTestL ); |
|
877 // Print to log file |
|
878 iLog->Log( KTestCHuiControlHitTestL ); |
|
879 |
|
880 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
881 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
882 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
883 STIF_ASSERT_NOT_NULL( connectControl ); |
|
884 CleanupStack::PushL( connectControl ); |
|
885 iHuiControl->AddConnectionL( connectControl); |
|
886 iHuiControl->ContainerLayout( connectControl ); |
|
887 const TPoint iPoint; |
|
888 iHuiControl->DisplayToHost( iPoint ); |
|
889 iHuiControl->HitTest( iPoint ); |
|
890 CleanupStack::Pop( 1 ); |
|
891 |
|
892 return KErrNone; |
|
893 } |
|
894 // ----------------------------------------------------------------------------- |
|
895 // CTestUiAifCoreToolkit::TestCHuiControlAcquireFocusL |
|
896 // ----------------------------------------------------------------------------- |
|
897 // |
|
898 TInt CTestUiAifCoreToolkit::TestCHuiControlAcquireFocusL( CStifItemParser& /*aItem */) |
|
899 { |
|
900 |
|
901 // Print to UI |
|
902 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
903 _LIT( KTestCHuiControlAcquireFocusL, "In TestCHuiControlAcquireFocusL" ); |
|
904 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlAcquireFocusL ); |
|
905 // Print to log file |
|
906 iLog->Log( KTestCHuiControlAcquireFocusL ); |
|
907 |
|
908 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
909 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
910 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
911 STIF_ASSERT_NOT_NULL( connectControl ); |
|
912 CleanupStack::PushL( connectControl ); |
|
913 iHuiControl->AddConnectionL( connectControl); |
|
914 iHuiControl->ContainerLayout( connectControl ); |
|
915 const TPoint iPoint; |
|
916 iHuiControl->DisplayToHost( iPoint ); |
|
917 iHuiControl->AcquireFocus(); |
|
918 CleanupStack::Pop( 1 ); |
|
919 |
|
920 return KErrNone; |
|
921 } |
|
922 // ----------------------------------------------------------------------------- |
|
923 // CTestUiAifCoreToolkit::TestCHuiControlFocusL |
|
924 // ----------------------------------------------------------------------------- |
|
925 // |
|
926 TInt CTestUiAifCoreToolkit::TestCHuiControlFocusL( CStifItemParser& /*aItem */) |
|
927 { |
|
928 |
|
929 // Print to UI |
|
930 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
931 _LIT( KTestCHuiControlFocusL, "In TestCHuiControlFocusL" ); |
|
932 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlFocusL ); |
|
933 // Print to log file |
|
934 iLog->Log( KTestCHuiControlFocusL ); |
|
935 |
|
936 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
937 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
938 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
939 STIF_ASSERT_NOT_NULL( connectControl ); |
|
940 CleanupStack::PushL( connectControl ); |
|
941 iHuiControl->AddConnectionL( connectControl); |
|
942 iHuiControl->ContainerLayout( connectControl ); |
|
943 const TPoint iPoint; |
|
944 iHuiControl->DisplayToHost( iPoint ); |
|
945 iHuiControl->AcquireFocus(); |
|
946 iHuiControl->Focus(); |
|
947 CleanupStack::Pop( 1 ); |
|
948 |
|
949 return KErrNone; |
|
950 } |
|
951 // ----------------------------------------------------------------------------- |
|
952 // CTestUiAifCoreToolkit::TestCHuiControlIsFocusingL |
|
953 // ----------------------------------------------------------------------------- |
|
954 // |
|
955 TInt CTestUiAifCoreToolkit::TestCHuiControlIsFocusingL( CStifItemParser& /*aItem */) |
|
956 { |
|
957 |
|
958 // Print to UI |
|
959 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
960 _LIT( KTestCHuiControlIsFocusingL, "In TestCHuiControlIsFocusingL" ); |
|
961 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlIsFocusingL ); |
|
962 // Print to log file |
|
963 iLog->Log( KTestCHuiControlIsFocusingL ); |
|
964 |
|
965 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
966 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
967 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
968 STIF_ASSERT_NOT_NULL( connectControl ); |
|
969 CleanupStack::PushL( connectControl ); |
|
970 iHuiControl->AddConnectionL( connectControl); |
|
971 iHuiControl->ContainerLayout( connectControl ); |
|
972 const TPoint iPoint; |
|
973 iHuiControl->DisplayToHost( iPoint ); |
|
974 iHuiControl->AcquireFocus(); |
|
975 iHuiControl->Focus(); |
|
976 iHuiControl->IsFocusing(); |
|
977 CleanupStack::Pop( 1 ); |
|
978 |
|
979 return KErrNone; |
|
980 } |
|
981 // ----------------------------------------------------------------------------- |
|
982 // CTestUiAifCoreToolkit::TestCHuiControlFocusChangedL |
|
983 // ----------------------------------------------------------------------------- |
|
984 // |
|
985 TInt CTestUiAifCoreToolkit::TestCHuiControlFocusChangedL( CStifItemParser& /*aItem */) |
|
986 { |
|
987 |
|
988 // Print to UI |
|
989 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
990 _LIT( KTestCHuiControlFocusChangedL, "In TestCHuiControlFocusChangedL" ); |
|
991 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlFocusChangedL ); |
|
992 // Print to log file |
|
993 iLog->Log( KTestCHuiControlFocusChangedL ); |
|
994 |
|
995 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
996 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
997 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
998 STIF_ASSERT_NOT_NULL( connectControl ); |
|
999 CleanupStack::PushL( connectControl ); |
|
1000 iHuiControl->AddConnectionL( connectControl); |
|
1001 iHuiControl->ContainerLayout( connectControl ); |
|
1002 const TPoint iPoint; |
|
1003 iHuiControl->DisplayToHost( iPoint ); |
|
1004 iHuiControl->AcquireFocus(); |
|
1005 iHuiControl->Focus(); |
|
1006 iHuiControl->IsFocusing(); |
|
1007 iHuiControl->FocusChanged( *iHuiDisplay, EFalse ); |
|
1008 CleanupStack::Pop( 1 ); |
|
1009 |
|
1010 return KErrNone; |
|
1011 } |
|
1012 // ----------------------------------------------------------------------------- |
|
1013 // CTestUiAifCoreToolkit::TestCHuiControlAcceptInputL |
|
1014 // ----------------------------------------------------------------------------- |
|
1015 // |
|
1016 TInt CTestUiAifCoreToolkit::TestCHuiControlAcceptInputL( CStifItemParser& /*aItem */) |
|
1017 { |
|
1018 |
|
1019 // Print to UI |
|
1020 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
1021 _LIT( KTestCHuiControlAcceptInputL, "In TestCHuiControlAcceptInputL" ); |
|
1022 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlAcceptInputL ); |
|
1023 // Print to log file |
|
1024 iLog->Log( KTestCHuiControlAcceptInputL ); |
|
1025 |
|
1026 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
1027 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
1028 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
1029 STIF_ASSERT_NOT_NULL( connectControl ); |
|
1030 CleanupStack::PushL( connectControl ); |
|
1031 iHuiControl->AddConnectionL( connectControl); |
|
1032 iHuiControl->ContainerLayout( connectControl ); |
|
1033 const TPoint iPoint; |
|
1034 iHuiControl->DisplayToHost( iPoint ); |
|
1035 iHuiControl->AcquireFocus(); |
|
1036 iHuiControl->Focus(); |
|
1037 iHuiControl->IsFocusing(); |
|
1038 iHuiControl->AcceptInput(); |
|
1039 CleanupStack::Pop( 1 ); |
|
1040 |
|
1041 return KErrNone; |
|
1042 } |
|
1043 // ----------------------------------------------------------------------------- |
|
1044 // CTestUiAifCoreToolkit::TestCHuiControlOfferEventL |
|
1045 // ----------------------------------------------------------------------------- |
|
1046 // |
|
1047 TInt CTestUiAifCoreToolkit::TestCHuiControlOfferEventL( CStifItemParser& /*aItem */) |
|
1048 { |
|
1049 |
|
1050 // Print to UI |
|
1051 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
1052 _LIT( KTestCHuiControlAcceptInputL, "In TestCHuiControlAcceptInputL" ); |
|
1053 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlAcceptInputL ); |
|
1054 // Print to log file |
|
1055 iLog->Log( KTestCHuiControlAcceptInputL ); |
|
1056 |
|
1057 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
1058 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
1059 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
1060 STIF_ASSERT_NOT_NULL( connectControl ); |
|
1061 CleanupStack::PushL( connectControl ); |
|
1062 iHuiControl->AddConnectionL( connectControl); |
|
1063 iHuiControl->ContainerLayout( connectControl ); |
|
1064 const TPoint iPoint; |
|
1065 iHuiControl->DisplayToHost( iPoint ); |
|
1066 iHuiControl->AcquireFocus(); |
|
1067 iHuiControl->Focus(); |
|
1068 iHuiControl->IsFocusing(); |
|
1069 iHuiControl->AcceptInput(); |
|
1070 const THuiEvent aEvent = 0 ; |
|
1071 iHuiControl->OfferEventL( aEvent ); |
|
1072 CleanupStack::Pop( 1 ); |
|
1073 |
|
1074 return KErrNone; |
|
1075 } |
|
1076 // ----------------------------------------------------------------------------- |
|
1077 // CTestUiAifCoreToolkit::TestCHuiControlDisplayAreaL |
|
1078 // ----------------------------------------------------------------------------- |
|
1079 // |
|
1080 TInt CTestUiAifCoreToolkit::TestCHuiControlDisplayAreaL( CStifItemParser& /*aItem */) |
|
1081 { |
|
1082 |
|
1083 // Print to UI |
|
1084 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
1085 _LIT( KTestCHuiControlDisplayAreaL, "In TestCHuiControlDisplayAreaL" ); |
|
1086 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlDisplayAreaL ); |
|
1087 // Print to log file |
|
1088 iLog->Log( KTestCHuiControlDisplayAreaL ); |
|
1089 |
|
1090 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
1091 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
1092 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
1093 STIF_ASSERT_NOT_NULL( connectControl ); |
|
1094 CleanupStack::PushL( connectControl ); |
|
1095 iHuiControl->AddConnectionL( connectControl); |
|
1096 iHuiControl->ContainerLayout( connectControl ); |
|
1097 const TPoint iPoint; |
|
1098 iHuiControl->DisplayToHost( iPoint ); |
|
1099 iHuiControl->AcquireFocus(); |
|
1100 iHuiControl->Focus(); |
|
1101 iHuiControl->IsFocusing(); |
|
1102 iHuiControl->AcceptInput(); |
|
1103 iHuiControl->DisplayArea(); |
|
1104 CleanupStack::Pop( 1 ); |
|
1105 |
|
1106 return KErrNone; |
|
1107 } |
|
1108 // ----------------------------------------------------------------------------- |
|
1109 // CTestUiAifCoreToolkit::TestCHuiControlDisplayCenterL |
|
1110 // ----------------------------------------------------------------------------- |
|
1111 // |
|
1112 TInt CTestUiAifCoreToolkit::TestCHuiControlDisplayCenterL( CStifItemParser& /*aItem */) |
|
1113 { |
|
1114 |
|
1115 // Print to UI |
|
1116 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
1117 _LIT( KTestCHuiControlDisplayCenterL, "In TestCHuiControlDisplayCenterL" ); |
|
1118 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlDisplayCenterL ); |
|
1119 // Print to log file |
|
1120 iLog->Log( KTestCHuiControlDisplayCenterL ); |
|
1121 |
|
1122 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
1123 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
1124 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
1125 STIF_ASSERT_NOT_NULL( connectControl ); |
|
1126 CleanupStack::PushL( connectControl ); |
|
1127 iHuiControl->AddConnectionL( connectControl); |
|
1128 iHuiControl->ContainerLayout( connectControl ); |
|
1129 const TPoint iPoint; |
|
1130 iHuiControl->DisplayToHost( iPoint ); |
|
1131 iHuiControl->AcquireFocus(); |
|
1132 iHuiControl->Focus(); |
|
1133 iHuiControl->IsFocusing(); |
|
1134 iHuiControl->AcceptInput(); |
|
1135 iHuiControl->DisplayCenter(); |
|
1136 CleanupStack::Pop( 1 ); |
|
1137 |
|
1138 return KErrNone; |
|
1139 } |
|
1140 // ----------------------------------------------------------------------------- |
|
1141 // CTestUiAifCoreToolkit::TestCHuiControlCancelAllCommandsL |
|
1142 // ----------------------------------------------------------------------------- |
|
1143 // |
|
1144 TInt CTestUiAifCoreToolkit::TestCHuiControlCancelAllCommandsL( CStifItemParser& /*aItem */) |
|
1145 { |
|
1146 |
|
1147 // Print to UI |
|
1148 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
1149 _LIT( KTestCHuiControlCancelAllCommandsL, "In TestCHuiControlCancelAllCommandsL" ); |
|
1150 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlCancelAllCommandsL ); |
|
1151 // Print to log file |
|
1152 iLog->Log( KTestCHuiControlCancelAllCommandsL ); |
|
1153 |
|
1154 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
1155 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
1156 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
1157 STIF_ASSERT_NOT_NULL( connectControl ); |
|
1158 CleanupStack::PushL( connectControl ); |
|
1159 iHuiControl->AddConnectionL( connectControl); |
|
1160 iHuiControl->ContainerLayout( connectControl ); |
|
1161 const TPoint iPoint; |
|
1162 iHuiControl->DisplayToHost( iPoint ); |
|
1163 iHuiControl->AcquireFocus(); |
|
1164 iHuiControl->Focus(); |
|
1165 iHuiControl->IsFocusing(); |
|
1166 iHuiControl->AcceptInput(); |
|
1167 iHuiControl->CancelAllCommands(); |
|
1168 CleanupStack::Pop( 1 ); |
|
1169 |
|
1170 return KErrNone; |
|
1171 } |
|
1172 // ----------------------------------------------------------------------------- |
|
1173 // CTestUiAifCoreToolkit::TestCHuiControlVisualLayoutUpdatedL |
|
1174 // ----------------------------------------------------------------------------- |
|
1175 // |
|
1176 TInt CTestUiAifCoreToolkit::TestCHuiControlVisualLayoutUpdatedL( CStifItemParser& /*aItem */) |
|
1177 { |
|
1178 |
|
1179 // Print to UI |
|
1180 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
1181 _LIT( KTestCHuiControlVisualLayoutUpdatedL, "In TestCHuiControlVisualLayoutUpdatedL" ); |
|
1182 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlVisualLayoutUpdatedL ); |
|
1183 // Print to log file |
|
1184 iLog->Log( KTestCHuiControlVisualLayoutUpdatedL ); |
|
1185 |
|
1186 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
1187 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
1188 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
1189 STIF_ASSERT_NOT_NULL( connectControl ); |
|
1190 CleanupStack::PushL( connectControl ); |
|
1191 iHuiControl->AddConnectionL( connectControl); |
|
1192 iHuiControl->ContainerLayout( connectControl ); |
|
1193 CHuiVisual* visual = new (ELeave) CHuiVisual( *iHuiControl ); |
|
1194 iHuiControl->AppendL( visual ); |
|
1195 iHuiControl->VisualLayoutUpdated( *visual ); |
|
1196 CleanupStack::Pop( 1 ); |
|
1197 |
|
1198 return KErrNone; |
|
1199 } |
|
1200 // ----------------------------------------------------------------------------- |
|
1201 // CTestUiAifCoreToolkit::TestCHuiControlVisualDestroyedL |
|
1202 // ----------------------------------------------------------------------------- |
|
1203 // |
|
1204 TInt CTestUiAifCoreToolkit::TestCHuiControlVisualDestroyedL( CStifItemParser& /*aItem */) |
|
1205 { |
|
1206 |
|
1207 // Print to UI |
|
1208 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
1209 _LIT( KTestCHuiControlVisualDestroyedL, "In TestCHuiControlVisualDestroyedL" ); |
|
1210 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlVisualDestroyedL ); |
|
1211 // Print to log file |
|
1212 iLog->Log( KTestCHuiControlVisualDestroyedL ); |
|
1213 |
|
1214 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
1215 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
1216 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
1217 STIF_ASSERT_NOT_NULL( connectControl ); |
|
1218 CleanupStack::PushL( connectControl ); |
|
1219 iHuiControl->AddConnectionL( connectControl); |
|
1220 iHuiControl->ContainerLayout( connectControl ); |
|
1221 CHuiVisual* visual = new (ELeave) CHuiVisual( *iHuiControl ); |
|
1222 iHuiControl->AppendL( visual ); |
|
1223 iHuiControl->VisualLayoutUpdated( *visual ); |
|
1224 iHuiControl->VisualDestroyed( *visual ); |
|
1225 CleanupStack::Pop( 1 ); |
|
1226 |
|
1227 return KErrNone; |
|
1228 } |
|
1229 // ----------------------------------------------------------------------------- |
|
1230 // CTestUiAifCoreToolkit::TestCHuiControlEventHandlerL |
|
1231 // ----------------------------------------------------------------------------- |
|
1232 // |
|
1233 TInt CTestUiAifCoreToolkit::TestCHuiControlEventHandlerL( CStifItemParser& /*aItem */) |
|
1234 { |
|
1235 |
|
1236 // Print to UI |
|
1237 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
1238 _LIT( KTestCHuiControlEventHandlerL, "In TestCHuiControlEventHandlerL" ); |
|
1239 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlEventHandlerL ); |
|
1240 // Print to log file |
|
1241 iLog->Log( KTestCHuiControlEventHandlerL ); |
|
1242 |
|
1243 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
1244 STIF_ASSERT_NOT_NULL( iHuiControl ); |
|
1245 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
1246 STIF_ASSERT_NOT_NULL( connectControl ); |
|
1247 CleanupStack::PushL( connectControl ); |
|
1248 iHuiControl->AddConnectionL( connectControl); |
|
1249 iHuiControl->ContainerLayout( connectControl ); |
|
1250 iHuiControl->SetId( 67 ); |
|
1251 CHuiVisual* visual = new (ELeave) CHuiVisual( *iHuiControl ); |
|
1252 iHuiControl->AppendL( visual ); |
|
1253 _LIT( KHello, " Hello " ); |
|
1254 const TDesC8* ptr = ( TDesC8* )&KHello; |
|
1255 visual->SetTagL( *ptr ); |
|
1256 iHuiControl->FindTag( *ptr ); |
|
1257 iHuiControl->VisualLayoutUpdated( *visual ); |
|
1258 iHuiControl->EventHandler(); |
|
1259 CleanupStack::Pop( 1 ); |
|
1260 |
|
1261 return KErrNone; |
|
1262 } |
|
1263 // ----------------------------------------------------------------------------- |
|
1264 // CTestUiAifCoreToolkit::TestCHuiControlNotifyVisibilityL |
|
1265 // ----------------------------------------------------------------------------- |
|
1266 // |
|
1267 TInt CTestUiAifCoreToolkit::TestCHuiControlNotifyVisibilityL( CStifItemParser& /*aItem */) |
|
1268 { |
|
1269 |
|
1270 // Print to UI |
|
1271 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
1272 _LIT( KTestCHuiControlNotifyVisibilityL, "In TestCHuiControlNotifyVisibilityL" ); |
|
1273 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlNotifyVisibilityL ); |
|
1274 // Print to log file |
|
1275 iLog->Log( KTestCHuiControlNotifyVisibilityL ); |
|
1276 |
|
1277 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
1278 CTestUiAifBlocksHuiControlChild * controlChild = |
|
1279 new( ELeave ) CTestUiAifBlocksHuiControlChild( *iHuiEnv ); |
|
1280 STIF_ASSERT_NOT_NULL( controlChild ); |
|
1281 CleanupStack::PushL( controlChild ); |
|
1282 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
1283 STIF_ASSERT_NOT_NULL( connectControl ); |
|
1284 CleanupStack::PushL( connectControl ); |
|
1285 controlChild->AddConnectionL( connectControl); |
|
1286 controlChild->ContainerLayout( connectControl ); |
|
1287 controlChild->SetId( 67 ); |
|
1288 CHuiDisplay* display = controlChild->Display(); |
|
1289 controlChild->BindDisplay( *display ); |
|
1290 CHuiVisual* visual = new (ELeave) CHuiVisual( *controlChild ); |
|
1291 controlChild->AppendL( visual ); |
|
1292 _LIT( KHello, " Hello " ); |
|
1293 const TDesC8* ptr = ( TDesC8* )&KHello; |
|
1294 visual->SetTagL( *ptr ); |
|
1295 controlChild->FindTag( *ptr ); |
|
1296 controlChild->VisualLayoutUpdated( *visual ); |
|
1297 controlChild->ChildNotifyControlVisibility( EFalse, *display ); |
|
1298 CleanupStack::Pop( 2 ); |
|
1299 |
|
1300 return KErrNone; |
|
1301 } |
|
1302 // ----------------------------------------------------------------------------- |
|
1303 // CTestUiAifCoreToolkit::TestCHuiControlVisualAddedL |
|
1304 // ----------------------------------------------------------------------------- |
|
1305 // |
|
1306 TInt CTestUiAifCoreToolkit::TestCHuiControlVisualAddedL( CStifItemParser& /*aItem */) |
|
1307 { |
|
1308 |
|
1309 // Print to UI |
|
1310 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
1311 _LIT( KTestCHuiControlVisualAddedL, "In TestCHuiControlVisualAddedL" ); |
|
1312 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlVisualAddedL ); |
|
1313 // Print to log file |
|
1314 iLog->Log( KTestCHuiControlVisualAddedL ); |
|
1315 |
|
1316 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
1317 CTestUiAifBlocksHuiControlChild * controlChild = |
|
1318 new( ELeave ) CTestUiAifBlocksHuiControlChild( *iHuiEnv ); |
|
1319 STIF_ASSERT_NOT_NULL( controlChild ); |
|
1320 CleanupStack::PushL( controlChild ); |
|
1321 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
1322 STIF_ASSERT_NOT_NULL( connectControl ); |
|
1323 CleanupStack::PushL( connectControl ); |
|
1324 controlChild->AddConnectionL( connectControl); |
|
1325 controlChild->ContainerLayout( connectControl ); |
|
1326 controlChild->SetId( 67 ); |
|
1327 CHuiDisplay* display = controlChild->Display(); |
|
1328 controlChild->BindDisplay( *display ); |
|
1329 CHuiVisual* visual = new (ELeave) CHuiVisual( *controlChild ); |
|
1330 _LIT( KHello, " Hello " ); |
|
1331 const TDesC8* ptr = ( TDesC8* )&KHello; |
|
1332 visual->SetTagL( *ptr ); |
|
1333 controlChild->FindTag( *ptr ); |
|
1334 controlChild->VisualLayoutUpdated( *visual ); |
|
1335 controlChild->ChildVisualAddedL( visual ); |
|
1336 CleanupStack::Pop( 2 ); |
|
1337 |
|
1338 return KErrNone; |
|
1339 } |
|
1340 // ----------------------------------------------------------------------------- |
|
1341 // CTestUiAifCoreToolkit::TestCHuiControlVisualRemovedL |
|
1342 // ----------------------------------------------------------------------------- |
|
1343 // |
|
1344 TInt CTestUiAifCoreToolkit::TestCHuiControlVisualRemovedL( CStifItemParser& /*aItem */) |
|
1345 { |
|
1346 |
|
1347 // Print to UI |
|
1348 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
1349 _LIT( KTestCHuiControlVisualRemovedL, "In TestCHuiControlVisualRemovedL" ); |
|
1350 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlVisualRemovedL ); |
|
1351 // Print to log file |
|
1352 iLog->Log( KTestCHuiControlVisualRemovedL ); |
|
1353 |
|
1354 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
1355 CTestUiAifBlocksHuiControlChild * controlChild = |
|
1356 new( ELeave ) CTestUiAifBlocksHuiControlChild( *iHuiEnv ); |
|
1357 STIF_ASSERT_NOT_NULL( controlChild ); |
|
1358 CleanupStack::PushL( controlChild ); |
|
1359 CHuiControl* connectControl = new( ELeave ) CHuiControl( *iHuiEnv ); |
|
1360 STIF_ASSERT_NOT_NULL( connectControl ); |
|
1361 CleanupStack::PushL( connectControl ); |
|
1362 controlChild->AddConnectionL( connectControl); |
|
1363 controlChild->ContainerLayout( connectControl ); |
|
1364 controlChild->SetId( 67 ); |
|
1365 CHuiDisplay* display = controlChild->Display(); |
|
1366 controlChild->BindDisplay( *display ); |
|
1367 CHuiVisual* visual = new (ELeave) CHuiVisual( *controlChild ); |
|
1368 _LIT( KHello, " Hello " ); |
|
1369 const TDesC8* ptr = ( TDesC8* )&KHello; |
|
1370 visual->SetTagL( *ptr ); |
|
1371 controlChild->FindTag( *ptr ); |
|
1372 controlChild->VisualLayoutUpdated( *visual ); |
|
1373 controlChild->ChildVisualAddedL( visual ); |
|
1374 controlChild->ChildVisualRemovedL( visual ); |
|
1375 CleanupStack::Pop( 2 ); |
|
1376 |
|
1377 return KErrNone; |
|
1378 } |
|
1379 // ----------------------------------------------------------------------------- |
|
1380 // CTestUiAifCoreToolkit::TestCHuiControlConnectionAddedL |
|
1381 // ----------------------------------------------------------------------------- |
|
1382 // |
|
1383 TInt CTestUiAifCoreToolkit::TestCHuiControlConnectionAddedL( CStifItemParser& /*aItem */) |
|
1384 { |
|
1385 |
|
1386 // Print to UI |
|
1387 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
1388 _LIT( KTestCHuiControlConnectionAddedL, "In TestCHuiControlConnectionAddedL" ); |
|
1389 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlConnectionAddedL ); |
|
1390 // Print to log file |
|
1391 iLog->Log( KTestCHuiControlConnectionAddedL ); |
|
1392 |
|
1393 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
1394 CTestUiAifBlocksHuiControlChild * controlChild = |
|
1395 new( ELeave ) CTestUiAifBlocksHuiControlChild( *iHuiEnv ); |
|
1396 STIF_ASSERT_NOT_NULL( controlChild ); |
|
1397 CleanupStack::PushL( controlChild ); |
|
1398 CTestUiAifBlocksHuiControlChild* connectControlChild = |
|
1399 new( ELeave ) CTestUiAifBlocksHuiControlChild( *iHuiEnv ); |
|
1400 STIF_ASSERT_NOT_NULL( connectControlChild ); |
|
1401 CleanupStack::PushL( connectControlChild ); |
|
1402 controlChild->SetId( 67 ); |
|
1403 CHuiDisplay* display = controlChild->Display(); |
|
1404 controlChild->BindDisplay( *display ); |
|
1405 CHuiVisual* visual = new (ELeave) CHuiVisual( *controlChild ); |
|
1406 _LIT( KHello, " Hello " ); |
|
1407 const TDesC8* ptr = ( TDesC8* )&KHello; |
|
1408 visual->SetTagL( *ptr ); |
|
1409 controlChild->FindTag( *ptr ); |
|
1410 controlChild->VisualLayoutUpdated( *visual ); |
|
1411 controlChild->ChildVisualAddedL( visual ); |
|
1412 controlChild->ChildVisualRemovedL( visual ); |
|
1413 controlChild->ChildConnectionAddedL( connectControlChild, 0 ); |
|
1414 CleanupStack::Pop( 2 ); |
|
1415 |
|
1416 return KErrNone; |
|
1417 } |
|
1418 // ----------------------------------------------------------------------------- |
|
1419 // CTestUiAifCoreToolkit::TestCHuiControlConnectionRemovedL |
|
1420 // ----------------------------------------------------------------------------- |
|
1421 // |
|
1422 TInt CTestUiAifCoreToolkit::TestCHuiControlConnectionRemovedL( CStifItemParser& /*aItem */) |
|
1423 { |
|
1424 |
|
1425 // Print to UI |
|
1426 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
1427 _LIT( KTestCHuiControlConnectionRemovedL, "In TestCHuiControlConnectionRemovedL" ); |
|
1428 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlConnectionRemovedL ); |
|
1429 // Print to log file |
|
1430 iLog->Log( KTestCHuiControlConnectionRemovedL ); |
|
1431 |
|
1432 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
1433 CTestUiAifBlocksHuiControlChild * controlChild = |
|
1434 new( ELeave ) CTestUiAifBlocksHuiControlChild( *iHuiEnv ); |
|
1435 STIF_ASSERT_NOT_NULL( controlChild ); |
|
1436 CleanupStack::PushL( controlChild ); |
|
1437 CTestUiAifBlocksHuiControlChild* connectControlChild = |
|
1438 new( ELeave ) CTestUiAifBlocksHuiControlChild( *iHuiEnv ); |
|
1439 STIF_ASSERT_NOT_NULL( connectControlChild ); |
|
1440 CleanupStack::PushL( connectControlChild ); |
|
1441 controlChild->SetId( 67 ); |
|
1442 CHuiDisplay* display = controlChild->Display(); |
|
1443 controlChild->BindDisplay( *display ); |
|
1444 CHuiVisual* visual = new (ELeave) CHuiVisual( *controlChild ); |
|
1445 _LIT( KHello, " Hello " ); |
|
1446 const TDesC8* ptr = ( TDesC8* )&KHello; |
|
1447 visual->SetTagL( *ptr ); |
|
1448 controlChild->FindTag( *ptr ); |
|
1449 controlChild->VisualLayoutUpdated( *visual ); |
|
1450 controlChild->ChildVisualAddedL( visual ); |
|
1451 controlChild->ChildVisualRemovedL( visual ); |
|
1452 controlChild->ChildConnectionAddedL( connectControlChild, 0 ); |
|
1453 controlChild->ChildConnectionRemovedL( connectControlChild, 0 ); |
|
1454 CleanupStack::Pop( 2 ); |
|
1455 |
|
1456 return KErrNone; |
|
1457 } |
|
1458 // ----------------------------------------------------------------------------- |
|
1459 // CTestUiAifCoreToolkit::TestCHuiControlHostChangingL |
|
1460 // ----------------------------------------------------------------------------- |
|
1461 // |
|
1462 TInt CTestUiAifCoreToolkit::TestCHuiControlHostChangingL( CStifItemParser& /*aItem */) |
|
1463 { |
|
1464 |
|
1465 // Print to UI |
|
1466 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
1467 _LIT( KTestCHuiControlHostChangingL, "In TestCHuiControlHostChangingL" ); |
|
1468 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlHostChangingL ); |
|
1469 // Print to log file |
|
1470 iLog->Log( KTestCHuiControlHostChangingL ); |
|
1471 |
|
1472 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
1473 CTestUiAifBlocksHuiControlChild * controlChild = |
|
1474 new( ELeave ) CTestUiAifBlocksHuiControlChild( *iHuiEnv ); |
|
1475 STIF_ASSERT_NOT_NULL( controlChild ); |
|
1476 CleanupStack::PushL( controlChild ); |
|
1477 CTestUiAifBlocksHuiControlChild* connectControlChild = |
|
1478 new( ELeave ) CTestUiAifBlocksHuiControlChild( *iHuiEnv ); |
|
1479 STIF_ASSERT_NOT_NULL( connectControlChild ); |
|
1480 CleanupStack::PushL( connectControlChild ); |
|
1481 controlChild->SetId( 67 ); |
|
1482 CHuiDisplay* display = controlChild->Display(); |
|
1483 controlChild->BindDisplay( *display ); |
|
1484 CHuiVisual* visual = new (ELeave) CHuiVisual( *controlChild ); |
|
1485 _LIT( KHello, " Hello " ); |
|
1486 const TDesC8* ptr = ( TDesC8* )&KHello; |
|
1487 visual->SetTagL( *ptr ); |
|
1488 controlChild->FindTag( *ptr ); |
|
1489 controlChild->VisualLayoutUpdated( *visual ); |
|
1490 controlChild->ChildVisualAddedL( visual ); |
|
1491 controlChild->ChildVisualRemovedL( visual ); |
|
1492 controlChild->ChildConnectionAddedL( connectControlChild, 0 ); |
|
1493 controlChild->ChildConnectionRemovedL( connectControlChild, 0 ); |
|
1494 controlChild->ChildHostChangingL( connectControlChild ); |
|
1495 CleanupStack::Pop( 2 ); |
|
1496 |
|
1497 return KErrNone; |
|
1498 } |
|
1499 // ----------------------------------------------------------------------------- |
|
1500 // CTestUiAifCoreToolkit::TestCHuiControlBaseConstructL |
|
1501 // ----------------------------------------------------------------------------- |
|
1502 // |
|
1503 TInt CTestUiAifCoreToolkit::TestCHuiControlBaseConstructL( CStifItemParser& /*aItem */) |
|
1504 { |
|
1505 |
|
1506 // Print to UI |
|
1507 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
1508 _LIT( KTestCHuiControlBaseConstructL, "In TestCHuiControlBaseConstructL" ); |
|
1509 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlBaseConstructL ); |
|
1510 // Print to log file |
|
1511 iLog->Log( KTestCHuiControlBaseConstructL ); |
|
1512 |
|
1513 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
1514 CTestUiAifBlocksHuiControlChild * controlChild = |
|
1515 new( ELeave ) CTestUiAifBlocksHuiControlChild( *iHuiEnv ); |
|
1516 STIF_ASSERT_NOT_NULL( controlChild ); |
|
1517 CleanupStack::PushL( controlChild ); |
|
1518 CTestUiAifBlocksHuiControlChild* connectControlChild = |
|
1519 new( ELeave ) CTestUiAifBlocksHuiControlChild( *iHuiEnv ); |
|
1520 STIF_ASSERT_NOT_NULL( connectControlChild ); |
|
1521 CleanupStack::PushL( connectControlChild ); |
|
1522 controlChild->SetId( 67 ); |
|
1523 CHuiDisplay* display = controlChild->Display(); |
|
1524 controlChild->BindDisplay( *display ); |
|
1525 CHuiVisual* visual = new (ELeave) CHuiVisual( *controlChild ); |
|
1526 _LIT( KHello, " Hello " ); |
|
1527 const TDesC8* ptr = ( TDesC8* )&KHello; |
|
1528 visual->SetTagL( *ptr ); |
|
1529 controlChild->FindTag( *ptr ); |
|
1530 controlChild->VisualLayoutUpdated( *visual ); |
|
1531 controlChild->ChildVisualAddedL( visual ); |
|
1532 controlChild->ChildVisualRemovedL( visual ); |
|
1533 controlChild->ChildConnectionAddedL( connectControlChild, 0 ); |
|
1534 controlChild->ChildConnectionRemovedL( connectControlChild, 0 ); |
|
1535 controlChild->ChildHostChangingL( connectControlChild ); |
|
1536 controlChild->ChildBaseConstructL(); |
|
1537 CleanupStack::Pop( 2 ); |
|
1538 |
|
1539 return KErrNone; |
|
1540 } |
|
1541 // ----------------------------------------------------------------------------- |
|
1542 // CTestUiAifCoreToolkit::TestCHuiControlControlExtensionL |
|
1543 // ----------------------------------------------------------------------------- |
|
1544 // |
|
1545 TInt CTestUiAifCoreToolkit::TestCHuiControlControlExtensionL( CStifItemParser& /*aItem */) |
|
1546 { |
|
1547 |
|
1548 // Print to UI |
|
1549 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
1550 _LIT( KTestCHuiControlControlExtensionL, "In TestCHuiControlControlExtensionL" ); |
|
1551 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlControlExtensionL ); |
|
1552 // Print to log file |
|
1553 iLog->Log( KTestCHuiControlControlExtensionL ); |
|
1554 |
|
1555 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
1556 CTestUiAifBlocksHuiControlChild * controlChild = |
|
1557 new( ELeave ) CTestUiAifBlocksHuiControlChild( *iHuiEnv ); |
|
1558 STIF_ASSERT_NOT_NULL( controlChild ); |
|
1559 CleanupStack::PushL( controlChild ); |
|
1560 CTestUiAifBlocksHuiControlChild* connectControlChild = |
|
1561 new( ELeave ) CTestUiAifBlocksHuiControlChild( *iHuiEnv ); |
|
1562 STIF_ASSERT_NOT_NULL( connectControlChild ); |
|
1563 CleanupStack::PushL( connectControlChild ); |
|
1564 controlChild->SetId( 67 ); |
|
1565 CHuiDisplay* display = controlChild->Display(); |
|
1566 controlChild->BindDisplay( *display ); |
|
1567 CHuiVisual* visual = new (ELeave) CHuiVisual( *controlChild ); |
|
1568 _LIT( KHello, " Hello " ); |
|
1569 const TDesC8* ptr = ( TDesC8* )&KHello; |
|
1570 visual->SetTagL( *ptr ); |
|
1571 controlChild->FindTag( *ptr ); |
|
1572 controlChild->VisualLayoutUpdated( *visual ); |
|
1573 controlChild->ChildVisualAddedL( visual ); |
|
1574 controlChild->ChildVisualRemovedL( visual ); |
|
1575 controlChild->ChildConnectionAddedL( connectControlChild, 0 ); |
|
1576 controlChild->ChildConnectionRemovedL( connectControlChild, 0 ); |
|
1577 controlChild->ChildHostChangingL( connectControlChild ); |
|
1578 controlChild->ChildBaseConstructL(); |
|
1579 const TUid aExtensionUid = TUid::Null(); |
|
1580 TAny** aExtensionParameters = NULL; |
|
1581 controlChild->ChildControlExtensionL( aExtensionUid, aExtensionParameters ); |
|
1582 CleanupStack::Pop( 2 ); |
|
1583 |
|
1584 return KErrNone; |
|
1585 } |
|
1586 // ----------------------------------------------------------------------------- |
|
1587 // CTestUiAifCoreToolkit::TestCHuiControlTypeL |
|
1588 // ----------------------------------------------------------------------------- |
|
1589 // |
|
1590 TInt CTestUiAifCoreToolkit::TestCHuiControlTypeL( CStifItemParser& /*aItem */) |
|
1591 { |
|
1592 |
|
1593 // Print to UI |
|
1594 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
1595 _LIT( KTestCHuiControlTypeL, "In TestCHuiControlTypeL" ); |
|
1596 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlTypeL ); |
|
1597 // Print to log file |
|
1598 iLog->Log( KTestCHuiControlTypeL ); |
|
1599 |
|
1600 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
1601 CTestUiAifBlocksHuiControlChild * controlChild = |
|
1602 new( ELeave ) CTestUiAifBlocksHuiControlChild( *iHuiEnv ); |
|
1603 STIF_ASSERT_NOT_NULL( controlChild ); |
|
1604 CleanupStack::PushL( controlChild ); |
|
1605 CTestUiAifBlocksHuiControlChild* connectControlChild = |
|
1606 new( ELeave ) CTestUiAifBlocksHuiControlChild( *iHuiEnv ); |
|
1607 STIF_ASSERT_NOT_NULL( connectControlChild ); |
|
1608 CleanupStack::PushL( connectControlChild ); |
|
1609 controlChild->SetId( 67 ); |
|
1610 CHuiDisplay* display = controlChild->Display(); |
|
1611 controlChild->BindDisplay( *display ); |
|
1612 CHuiVisual* visual = new (ELeave) CHuiVisual( *controlChild ); |
|
1613 _LIT( KHello, " Hello " ); |
|
1614 const TDesC8* ptr = ( TDesC8* )&KHello; |
|
1615 visual->SetTagL( *ptr ); |
|
1616 controlChild->FindTag( *ptr ); |
|
1617 controlChild->VisualLayoutUpdated( *visual ); |
|
1618 controlChild->ChildVisualAddedL( visual ); |
|
1619 controlChild->ChildVisualRemovedL( visual ); |
|
1620 controlChild->ChildConnectionAddedL( connectControlChild, 0 ); |
|
1621 controlChild->ChildConnectionRemovedL( connectControlChild, 0 ); |
|
1622 controlChild->ChildHostChangingL( connectControlChild ); |
|
1623 controlChild->ChildBaseConstructL(); |
|
1624 controlChild->ChildTypeL(); |
|
1625 const TUid aExtensionUid = TUid::Null(); |
|
1626 TAny** aExtensionParameters = NULL; |
|
1627 controlChild->ChildControlExtensionL( aExtensionUid, aExtensionParameters ); |
|
1628 CleanupStack::Pop( 2 ); |
|
1629 |
|
1630 return KErrNone; |
|
1631 } |
|
1632 // ----------------------------------------------------------------------------- |
|
1633 // CTestUiAifCoreToolkit::TestCHuiControlSessionIdL |
|
1634 // ----------------------------------------------------------------------------- |
|
1635 // |
|
1636 TInt CTestUiAifCoreToolkit::TestCHuiControlSessionIdL( CStifItemParser& /*aItem */) |
|
1637 { |
|
1638 |
|
1639 // Print to UI |
|
1640 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
1641 _LIT( KTestCHuiControlSessionIdL, "In TestCHuiControlSessionIdL" ); |
|
1642 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlSessionIdL ); |
|
1643 // Print to log file |
|
1644 iLog->Log( KTestCHuiControlSessionIdL ); |
|
1645 |
|
1646 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
1647 CTestUiAifBlocksHuiControlChild * controlChild = |
|
1648 new( ELeave ) CTestUiAifBlocksHuiControlChild( *iHuiEnv ); |
|
1649 STIF_ASSERT_NOT_NULL( controlChild ); |
|
1650 CleanupStack::PushL( controlChild ); |
|
1651 CTestUiAifBlocksHuiControlChild* connectControlChild = |
|
1652 new( ELeave ) CTestUiAifBlocksHuiControlChild( *iHuiEnv ); |
|
1653 STIF_ASSERT_NOT_NULL( connectControlChild ); |
|
1654 CleanupStack::PushL( connectControlChild ); |
|
1655 controlChild->SetId( 67 ); |
|
1656 CHuiDisplay* display = controlChild->Display(); |
|
1657 controlChild->BindDisplay( *display ); |
|
1658 CHuiVisual* visual = new (ELeave) CHuiVisual( *controlChild ); |
|
1659 _LIT( KHello, " Hello " ); |
|
1660 const TDesC8* ptr = ( TDesC8* )&KHello; |
|
1661 visual->SetTagL( *ptr ); |
|
1662 controlChild->FindTag( *ptr ); |
|
1663 controlChild->VisualLayoutUpdated( *visual ); |
|
1664 controlChild->ChildVisualAddedL( visual ); |
|
1665 controlChild->ChildVisualRemovedL( visual ); |
|
1666 controlChild->ChildConnectionAddedL( connectControlChild, 0 ); |
|
1667 controlChild->ChildConnectionRemovedL( connectControlChild, 0 ); |
|
1668 controlChild->ChildHostChangingL( connectControlChild ); |
|
1669 controlChild->ChildBaseConstructL(); |
|
1670 controlChild->ChildTypeL(); |
|
1671 const TUid aExtensionUid = TUid::Null(); |
|
1672 TAny** aExtensionParameters = NULL; |
|
1673 controlChild->ChildControlExtensionL( aExtensionUid, aExtensionParameters ); |
|
1674 controlChild->ChildSessionIdL(); |
|
1675 CleanupStack::Pop( 2 ); |
|
1676 |
|
1677 return KErrNone; |
|
1678 } |
|
1679 // ----------------------------------------------------------------------------- |
|
1680 // CTestUiAifCoreToolkit::TestCHuiControlSetSessionIdL |
|
1681 // ----------------------------------------------------------------------------- |
|
1682 // |
|
1683 TInt CTestUiAifCoreToolkit::TestCHuiControlSetSessionIdL( CStifItemParser& /*aItem */) |
|
1684 { |
|
1685 |
|
1686 // Print to UI |
|
1687 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
1688 _LIT( KTestCHuiControlSetSessionIdL, "In TestCHuiControlSetSessionIdL" ); |
|
1689 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiControlSetSessionIdL ); |
|
1690 // Print to log file |
|
1691 iLog->Log( KTestCHuiControlSetSessionIdL ); |
|
1692 |
|
1693 STIF_ASSERT_NOT_NULL( iHuiEnv ); |
|
1694 CTestUiAifBlocksHuiControlChild * controlChild = |
|
1695 new( ELeave ) CTestUiAifBlocksHuiControlChild( *iHuiEnv ); |
|
1696 STIF_ASSERT_NOT_NULL( controlChild ); |
|
1697 CleanupStack::PushL( controlChild ); |
|
1698 CTestUiAifBlocksHuiControlChild* connectControlChild = |
|
1699 new( ELeave ) CTestUiAifBlocksHuiControlChild( *iHuiEnv ); |
|
1700 STIF_ASSERT_NOT_NULL( connectControlChild ); |
|
1701 CleanupStack::PushL( connectControlChild ); |
|
1702 controlChild->SetId( 67 ); |
|
1703 CHuiDisplay* display = controlChild->Display(); |
|
1704 controlChild->BindDisplay( *display ); |
|
1705 CHuiVisual* visual = new (ELeave) CHuiVisual( *controlChild ); |
|
1706 _LIT( KHello, " Hello " ); |
|
1707 const TDesC8* ptr = ( TDesC8* )&KHello; |
|
1708 visual->SetTagL( *ptr ); |
|
1709 controlChild->FindTag( *ptr ); |
|
1710 controlChild->VisualLayoutUpdated( *visual ); |
|
1711 controlChild->ChildVisualAddedL( visual ); |
|
1712 controlChild->ChildVisualRemovedL( visual ); |
|
1713 controlChild->ChildConnectionAddedL( connectControlChild, 0 ); |
|
1714 controlChild->ChildConnectionRemovedL( connectControlChild, 0 ); |
|
1715 controlChild->ChildHostChangingL( connectControlChild ); |
|
1716 controlChild->ChildBaseConstructL(); |
|
1717 controlChild->ChildTypeL(); |
|
1718 const TUid aExtensionUid = TUid::Null(); |
|
1719 TAny** aExtensionParameters = NULL; |
|
1720 controlChild->ChildControlExtensionL( aExtensionUid, aExtensionParameters ); |
|
1721 TInt sessionId = controlChild->ChildSessionIdL(); |
|
1722 controlChild->ChildSetSessionIdL( sessionId ); |
|
1723 CleanupStack::Pop( 2 ); |
|
1724 |
|
1725 return KErrNone; |
|
1726 |
|
1727 } |
|
1728 |
|
1729 // [End of File] |
|