|
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: Test AknNoteWrappers.h |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <aknnotewrappers.h> |
|
20 #include <testsdknotes.rsg> |
|
21 |
|
22 #include "testsdknotesresourcenotedialog.h" |
|
23 #include "testsdknotes.h" |
|
24 #include "testsdknotescontrol.h" |
|
25 |
|
26 const TInt KLength = 10; |
|
27 const TInt KPoint1 = 10; |
|
28 const TInt KPoint2 = 30; |
|
29 |
|
30 // ============================ MEMBER FUNCTIONS =============================== |
|
31 |
|
32 // ----------------------------------------------------------------------------- |
|
33 // CTestSDKNotes::TestNWCAknNoteWrapperL |
|
34 // ----------------------------------------------------------------------------- |
|
35 TInt CTestSDKNotes::TestNWCAknNoteWrapperL( CStifItemParser& /*aItem*/ ) |
|
36 { |
|
37 CAknNoteWrapper* noteWrapper = new (ELeave) CAknNoteWrapper; |
|
38 CleanupStack::PushL( noteWrapper ); |
|
39 STIF_ASSERT_NOT_NULL( noteWrapper ); |
|
40 |
|
41 CleanupStack::PopAndDestroy( noteWrapper ); |
|
42 |
|
43 return KErrNone; |
|
44 |
|
45 } |
|
46 |
|
47 // ----------------------------------------------------------------------------- |
|
48 // CTestSDKNotes::TestNWCAknNoteWrapperPointerL |
|
49 // ----------------------------------------------------------------------------- |
|
50 TInt CTestSDKNotes::TestNWCAknNoteWrapperPointerL( CStifItemParser& /*aItem*/ ) |
|
51 { |
|
52 CAknNoteWrapper* wrapper = new (ELeave) CAknNoteWrapper; |
|
53 CleanupStack::PushL( wrapper ); |
|
54 STIF_ASSERT_NOT_NULL( wrapper ); |
|
55 |
|
56 CAknNoteWrapper* noteWrapper = new (ELeave) CAknNoteWrapper( &wrapper ); |
|
57 CleanupStack::PushL( noteWrapper ); |
|
58 STIF_ASSERT_NOT_NULL( noteWrapper ); |
|
59 |
|
60 CleanupStack::Pop( noteWrapper ); |
|
61 CleanupStack::PopAndDestroy( wrapper ); |
|
62 |
|
63 return KErrNone; |
|
64 |
|
65 } |
|
66 |
|
67 // ----------------------------------------------------------------------------- |
|
68 // CTestSDKNotes::TestNWExecuteLD |
|
69 // ----------------------------------------------------------------------------- |
|
70 TInt CTestSDKNotes::TestNWExecuteLD( CStifItemParser& /*aItem*/ ) |
|
71 { |
|
72 CAknNoteWrapper* noteWrapper = new (ELeave) CAknNoteWrapper; |
|
73 CleanupStack::PushL( noteWrapper ); |
|
74 STIF_ASSERT_NOT_NULL( noteWrapper ); |
|
75 CleanupStack::Pop( noteWrapper ); |
|
76 |
|
77 noteWrapper->ExecuteLD( R_TESTSDK_NOTEWRAPPER ); |
|
78 |
|
79 return KErrNone; |
|
80 |
|
81 } |
|
82 |
|
83 // ----------------------------------------------------------------------------- |
|
84 // CTestSDKNotes::TestNWExecutePromptLD |
|
85 // ----------------------------------------------------------------------------- |
|
86 TInt CTestSDKNotes::TestNWExecutePromptLD( CStifItemParser& /*aItem*/ ) |
|
87 { |
|
88 CAknNoteWrapper* noteWrapper = new (ELeave) CAknNoteWrapper; |
|
89 CleanupStack::PushL( noteWrapper ); |
|
90 STIF_ASSERT_NOT_NULL( noteWrapper ); |
|
91 CleanupStack::Pop( noteWrapper ); |
|
92 |
|
93 _LIT( KPrompt, "Wrapper" ); |
|
94 TBuf<KLength> prompt( KPrompt ); |
|
95 noteWrapper->ExecuteLD( R_TESTSDK_NOTEWRAPPERNOTEXT, prompt ); |
|
96 |
|
97 return KErrNone; |
|
98 |
|
99 } |
|
100 |
|
101 // ----------------------------------------------------------------------------- |
|
102 // CTestSDKNotes::TestNWHandlePointerEventL |
|
103 // ----------------------------------------------------------------------------- |
|
104 TInt CTestSDKNotes::TestNWHandlePointerEventL( CStifItemParser& /*aItem*/ ) |
|
105 { |
|
106 CAknNoteWrapper* noteWrapper = new (ELeave) CAknNoteWrapper; |
|
107 CleanupStack::PushL( noteWrapper ); |
|
108 STIF_ASSERT_NOT_NULL( noteWrapper ); |
|
109 |
|
110 TPointerEvent event; |
|
111 event.iType = TPointerEvent::EButton1Down; |
|
112 event.iModifiers = 0; |
|
113 TPoint eventPos( KPoint1, KPoint2 ); |
|
114 event.iPosition = eventPos; |
|
115 event.iParentPosition = eventPos; |
|
116 |
|
117 noteWrapper->HandlePointerEventL( event ); |
|
118 |
|
119 CleanupStack::PopAndDestroy( noteWrapper ); |
|
120 |
|
121 return KErrNone; |
|
122 |
|
123 } |
|
124 |
|
125 // ----------------------------------------------------------------------------- |
|
126 // CTestSDKNotes::TestNWHandleDialogPageEventL |
|
127 // ----------------------------------------------------------------------------- |
|
128 TInt CTestSDKNotes::TestNWHandleDialogPageEventL( CStifItemParser& /*aItem*/ ) |
|
129 { |
|
130 CAknNoteWrapper* noteWrapper = new (ELeave) CAknNoteWrapper; |
|
131 CleanupStack::PushL( noteWrapper ); |
|
132 STIF_ASSERT_NOT_NULL( noteWrapper ); |
|
133 |
|
134 CleanupStack::Pop( noteWrapper ); |
|
135 CTestNotesControl* control = CTestNotesControl::NewL(); |
|
136 CleanupStack::PushL( control ); |
|
137 |
|
138 noteWrapper->SetContainerWindowL( *control ); |
|
139 noteWrapper->HandleDialogPageEventL( MEikDialogPageObserver::EDialogPageTapped ); |
|
140 |
|
141 CleanupStack::PopAndDestroy( control ); |
|
142 return KErrNone; |
|
143 |
|
144 } |
|
145 |
|
146 // ----------------------------------------------------------------------------- |
|
147 // CTestSDKNotes::TestNRNDExecuteLD |
|
148 // ----------------------------------------------------------------------------- |
|
149 TInt CTestSDKNotes::TestNRNDExecuteLD( CStifItemParser& /*aItem*/ ) |
|
150 { |
|
151 CTestSDKNotesResourceNoteDialog* noteDialog = new (ELeave) CTestSDKNotesResourceNoteDialog( R_TESTSDK_NOTEWRAPPER ); |
|
152 CleanupStack::PushL( noteDialog ); |
|
153 STIF_ASSERT_NOT_NULL( noteDialog ); |
|
154 CleanupStack::Pop( noteDialog ); |
|
155 |
|
156 noteDialog->ExecuteLD(); |
|
157 |
|
158 return KErrNone; |
|
159 |
|
160 } |
|
161 |
|
162 // ----------------------------------------------------------------------------- |
|
163 // CTestSDKNotes::TestNRNDExecutePromptLD |
|
164 // ----------------------------------------------------------------------------- |
|
165 TInt CTestSDKNotes::TestNRNDExecutePromptLD( CStifItemParser& /*aItem*/ ) |
|
166 { |
|
167 CTestSDKNotesResourceNoteDialog* noteDialog = new (ELeave) CTestSDKNotesResourceNoteDialog( R_TESTSDK_NOTEWRAPPERNOTEXT ); |
|
168 CleanupStack::PushL( noteDialog ); |
|
169 STIF_ASSERT_NOT_NULL( noteDialog ); |
|
170 CleanupStack::Pop( noteDialog ); |
|
171 |
|
172 _LIT( KPrompt, "Wrapper" ); |
|
173 TBuf<KLength> prompt( KPrompt ); |
|
174 noteDialog->ExecuteLD( prompt ); |
|
175 |
|
176 return KErrNone; |
|
177 |
|
178 } |
|
179 |
|
180 // ----------------------------------------------------------------------------- |
|
181 // CTestSDKNotes::TestNRNDHandlePointerEventL |
|
182 // ----------------------------------------------------------------------------- |
|
183 TInt CTestSDKNotes::TestNRNDHandlePointerEventL( CStifItemParser& /*aItem*/ ) |
|
184 { |
|
185 CTestSDKNotesResourceNoteDialog* noteDialog = new (ELeave) CTestSDKNotesResourceNoteDialog( R_TESTSDK_NOTEWRAPPERNOTEXT ); |
|
186 CleanupStack::PushL( noteDialog ); |
|
187 STIF_ASSERT_NOT_NULL( noteDialog ); |
|
188 |
|
189 TPointerEvent event; |
|
190 event.iType = TPointerEvent::EButton1Down; |
|
191 event.iModifiers = 0; |
|
192 TPoint eventPos( KPoint1, KPoint2 ); |
|
193 event.iPosition = eventPos; |
|
194 event.iParentPosition = eventPos; |
|
195 |
|
196 noteDialog->HandlePointerEventL( event ); |
|
197 |
|
198 CleanupStack::PopAndDestroy( noteDialog ); |
|
199 |
|
200 return KErrNone; |
|
201 |
|
202 } |
|
203 |
|
204 // ----------------------------------------------------------------------------- |
|
205 // CTestSDKNotes::TestNRNDCAknResourceNoteDialogL |
|
206 // ----------------------------------------------------------------------------- |
|
207 TInt CTestSDKNotes::TestNRNDCAknResourceNoteDialogL( CStifItemParser& /*aItem*/ ) |
|
208 { |
|
209 CTestSDKNotesResourceNoteDialog* noteDialog = new (ELeave) CTestSDKNotesResourceNoteDialog( R_TESTSDK_NOTEWRAPPER ); |
|
210 CleanupStack::PushL( noteDialog ); |
|
211 STIF_ASSERT_NOT_NULL( noteDialog ); |
|
212 |
|
213 CleanupStack::PopAndDestroy( noteDialog ); |
|
214 |
|
215 return KErrNone; |
|
216 |
|
217 } |
|
218 |
|
219 // ----------------------------------------------------------------------------- |
|
220 // CTestSDKNotes::TestNRNDCAknResourceNoteDialogPointerL |
|
221 // ----------------------------------------------------------------------------- |
|
222 TInt CTestSDKNotes::TestNRNDCAknResourceNoteDialogPointerL( CStifItemParser& /*aItem*/ ) |
|
223 { |
|
224 CAknNoteWrapper* dialog = new (ELeave) CAknNoteWrapper; |
|
225 CleanupStack::PushL( dialog ); |
|
226 STIF_ASSERT_NOT_NULL( dialog ); |
|
227 |
|
228 CTestSDKNotesResourceNoteDialog* noteDialog = new (ELeave) CTestSDKNotesResourceNoteDialog( R_TESTSDK_NOTEWRAPPER, &dialog ); |
|
229 CleanupStack::PushL( noteDialog ); |
|
230 STIF_ASSERT_NOT_NULL( noteDialog ); |
|
231 |
|
232 CleanupStack::Pop( noteDialog ); |
|
233 CleanupStack::PopAndDestroy( dialog ); |
|
234 |
|
235 return KErrNone; |
|
236 |
|
237 } |
|
238 |
|
239 // ----------------------------------------------------------------------------- |
|
240 // CTestSDKNotes::TestNCNCAknConfirmationNoteL |
|
241 // ----------------------------------------------------------------------------- |
|
242 TInt CTestSDKNotes::TestNCNCAknConfirmationNoteL( CStifItemParser& /*aItem*/ ) |
|
243 { |
|
244 CAknConfirmationNote* confirmationNote = new (ELeave) CAknConfirmationNote; |
|
245 CleanupStack::PushL( confirmationNote ); |
|
246 STIF_ASSERT_NOT_NULL( confirmationNote ); |
|
247 CleanupStack::Pop( confirmationNote ); |
|
248 |
|
249 confirmationNote->ExecuteLD(); |
|
250 |
|
251 return KErrNone; |
|
252 |
|
253 } |
|
254 |
|
255 // ----------------------------------------------------------------------------- |
|
256 // CTestSDKNotes::TestNCNCAknConfirmationNoteParameterL |
|
257 // ----------------------------------------------------------------------------- |
|
258 TInt CTestSDKNotes::TestNCNCAknConfirmationNoteParameterL( CStifItemParser& /*aItem*/ ) |
|
259 { |
|
260 CAknConfirmationNote* confirmationNote = new (ELeave) CAknConfirmationNote( ETrue ); |
|
261 CleanupStack::PushL( confirmationNote ); |
|
262 STIF_ASSERT_NOT_NULL( confirmationNote ); |
|
263 CleanupStack::Pop( confirmationNote ); |
|
264 |
|
265 confirmationNote->ExecuteLD(); |
|
266 |
|
267 confirmationNote = new (ELeave) CAknConfirmationNote( EFalse ); |
|
268 CleanupStack::PushL( confirmationNote ); |
|
269 STIF_ASSERT_NOT_NULL( confirmationNote ); |
|
270 CleanupStack::Pop( confirmationNote ); |
|
271 |
|
272 confirmationNote->ExecuteLD(); |
|
273 |
|
274 return KErrNone; |
|
275 |
|
276 } |
|
277 |
|
278 // ----------------------------------------------------------------------------- |
|
279 // CTestSDKNotes::TestNCNCAknConfirmationNotePointerL |
|
280 // ----------------------------------------------------------------------------- |
|
281 TInt CTestSDKNotes::TestNCNCAknConfirmationNotePointerL( CStifItemParser& /*aItem*/ ) |
|
282 { |
|
283 CAknConfirmationNote* note = new (ELeave) CAknConfirmationNote; |
|
284 CleanupStack::PushL( note ); |
|
285 STIF_ASSERT_NOT_NULL( note ); |
|
286 |
|
287 CAknConfirmationNote* confirmationNote = new (ELeave) CAknConfirmationNote( ¬e ); |
|
288 CleanupStack::Pop( note ); |
|
289 CleanupStack::PushL( confirmationNote ); |
|
290 STIF_ASSERT_NOT_NULL( confirmationNote ); |
|
291 CleanupStack::Pop( confirmationNote ); |
|
292 |
|
293 confirmationNote->ExecuteLD(); |
|
294 |
|
295 return KErrNone; |
|
296 |
|
297 } |
|
298 |
|
299 // ----------------------------------------------------------------------------- |
|
300 // CTestSDKNotes::TestNCNHandlePointerEventL |
|
301 // ----------------------------------------------------------------------------- |
|
302 TInt CTestSDKNotes::TestNCNHandlePointerEventL( CStifItemParser& /*aItem*/ ) |
|
303 { |
|
304 CAknConfirmationNote* note = new (ELeave) CAknConfirmationNote; |
|
305 CleanupStack::PushL( note ); |
|
306 STIF_ASSERT_NOT_NULL( note ); |
|
307 |
|
308 TPointerEvent event; |
|
309 event.iType = TPointerEvent::EButton1Down; |
|
310 event.iModifiers = 0; |
|
311 TPoint eventPos( KPoint1, KPoint2 ); |
|
312 event.iPosition = eventPos; |
|
313 event.iParentPosition = eventPos; |
|
314 |
|
315 note->HandlePointerEventL( event ); |
|
316 |
|
317 CleanupStack::PopAndDestroy( note ); |
|
318 |
|
319 return KErrNone; |
|
320 |
|
321 } |
|
322 |
|
323 // ----------------------------------------------------------------------------- |
|
324 // CTestSDKNotes::TestNINCAknInformationNoteL |
|
325 // ----------------------------------------------------------------------------- |
|
326 TInt CTestSDKNotes::TestNINCAknInformationNoteL( CStifItemParser& /*aItem*/ ) |
|
327 { |
|
328 CAknInformationNote* informationNote = new (ELeave) CAknInformationNote; |
|
329 CleanupStack::PushL( informationNote ); |
|
330 STIF_ASSERT_NOT_NULL( informationNote ); |
|
331 CleanupStack::Pop( informationNote ); |
|
332 |
|
333 informationNote->ExecuteLD(); |
|
334 |
|
335 return KErrNone; |
|
336 |
|
337 } |
|
338 |
|
339 // ----------------------------------------------------------------------------- |
|
340 // CTestSDKNotes::TestNINCAknInformationNoteParameterL |
|
341 // ----------------------------------------------------------------------------- |
|
342 TInt CTestSDKNotes::TestNINCAknInformationNoteParameterL( CStifItemParser& /*aItem*/ ) |
|
343 { |
|
344 CAknInformationNote* informationNote = new (ELeave) CAknInformationNote( ETrue ); |
|
345 CleanupStack::PushL( informationNote ); |
|
346 STIF_ASSERT_NOT_NULL( informationNote ); |
|
347 CleanupStack::Pop( informationNote ); |
|
348 |
|
349 informationNote->ExecuteLD(); |
|
350 |
|
351 informationNote = new (ELeave) CAknInformationNote( EFalse ); |
|
352 CleanupStack::PushL( informationNote ); |
|
353 STIF_ASSERT_NOT_NULL( informationNote ); |
|
354 CleanupStack::Pop( informationNote ); |
|
355 |
|
356 informationNote->ExecuteLD(); |
|
357 |
|
358 return KErrNone; |
|
359 |
|
360 } |
|
361 |
|
362 // ----------------------------------------------------------------------------- |
|
363 // CTestSDKNotes::TestNINCAknInformationNotePointerL |
|
364 // ----------------------------------------------------------------------------- |
|
365 TInt CTestSDKNotes::TestNINCAknInformationNotePointerL( CStifItemParser& /*aItem*/ ) |
|
366 { |
|
367 CAknInformationNote* note = new (ELeave) CAknInformationNote; |
|
368 CleanupStack::PushL( note ); |
|
369 STIF_ASSERT_NOT_NULL( note ); |
|
370 |
|
371 CAknInformationNote* informationNote = new (ELeave) CAknInformationNote( ¬e ); |
|
372 CleanupStack::Pop( note ); |
|
373 CleanupStack::PushL( informationNote ); |
|
374 STIF_ASSERT_NOT_NULL( informationNote ); |
|
375 CleanupStack::Pop( informationNote ); |
|
376 |
|
377 informationNote->ExecuteLD(); |
|
378 |
|
379 return KErrNone; |
|
380 |
|
381 } |
|
382 |
|
383 // ----------------------------------------------------------------------------- |
|
384 // CTestSDKNotes::TestNINHandlePointerEventL |
|
385 // ----------------------------------------------------------------------------- |
|
386 TInt CTestSDKNotes::TestNINHandlePointerEventL( CStifItemParser& /*aItem*/ ) |
|
387 { |
|
388 CAknInformationNote* note = new (ELeave) CAknInformationNote; |
|
389 CleanupStack::PushL( note ); |
|
390 STIF_ASSERT_NOT_NULL( note ); |
|
391 |
|
392 TPointerEvent event; |
|
393 event.iType = TPointerEvent::EButton1Down; |
|
394 event.iModifiers = 0; |
|
395 TPoint eventPos( KPoint1, KPoint2 ); |
|
396 event.iPosition = eventPos; |
|
397 event.iParentPosition = eventPos; |
|
398 |
|
399 note->HandlePointerEventL( event ); |
|
400 |
|
401 CleanupStack::PopAndDestroy( note ); |
|
402 |
|
403 return KErrNone; |
|
404 |
|
405 } |
|
406 |
|
407 // ----------------------------------------------------------------------------- |
|
408 // CTestSDKNotes::TestNENCAknErrorNoteL |
|
409 // ----------------------------------------------------------------------------- |
|
410 TInt CTestSDKNotes::TestNENCAknErrorNoteL( CStifItemParser& /*aItem*/ ) |
|
411 { |
|
412 CAknErrorNote* errorNote = new (ELeave) CAknErrorNote; |
|
413 CleanupStack::PushL( errorNote ); |
|
414 STIF_ASSERT_NOT_NULL( errorNote ); |
|
415 CleanupStack::Pop( errorNote ); |
|
416 |
|
417 errorNote->ExecuteLD(); |
|
418 |
|
419 return KErrNone; |
|
420 |
|
421 } |
|
422 |
|
423 // ----------------------------------------------------------------------------- |
|
424 // CTestSDKNotes::TestNENCAknErrorNoteParameterL |
|
425 // ----------------------------------------------------------------------------- |
|
426 TInt CTestSDKNotes::TestNENCAknErrorNoteParameterL( CStifItemParser& /*aItem*/ ) |
|
427 { |
|
428 CAknErrorNote* errorNote = new (ELeave) CAknErrorNote( ETrue ); |
|
429 CleanupStack::PushL( errorNote ); |
|
430 STIF_ASSERT_NOT_NULL( errorNote ); |
|
431 CleanupStack::Pop( errorNote ); |
|
432 |
|
433 errorNote->ExecuteLD(); |
|
434 |
|
435 errorNote = new (ELeave) CAknErrorNote( EFalse ); |
|
436 CleanupStack::PushL( errorNote ); |
|
437 STIF_ASSERT_NOT_NULL( errorNote ); |
|
438 CleanupStack::Pop( errorNote ); |
|
439 |
|
440 errorNote->ExecuteLD(); |
|
441 |
|
442 return KErrNone; |
|
443 |
|
444 } |
|
445 |
|
446 // ----------------------------------------------------------------------------- |
|
447 // CTestSDKNotes::TestNENCAknErrorNotePointerL |
|
448 // ----------------------------------------------------------------------------- |
|
449 TInt CTestSDKNotes::TestNENCAknErrorNotePointerL( CStifItemParser& /*aItem*/ ) |
|
450 { |
|
451 CAknErrorNote* note = new (ELeave) CAknErrorNote; |
|
452 CleanupStack::PushL( note ); |
|
453 STIF_ASSERT_NOT_NULL( note ); |
|
454 |
|
455 CAknErrorNote* errorNote = new (ELeave) CAknErrorNote( ¬e ); |
|
456 CleanupStack::Pop( note ); |
|
457 CleanupStack::PushL( errorNote ); |
|
458 STIF_ASSERT_NOT_NULL( errorNote ); |
|
459 CleanupStack::Pop( errorNote ); |
|
460 |
|
461 errorNote->ExecuteLD(); |
|
462 |
|
463 return KErrNone; |
|
464 |
|
465 } |
|
466 |
|
467 // ----------------------------------------------------------------------------- |
|
468 // CTestSDKNotes::TestNENHandlePointerEventL |
|
469 // ----------------------------------------------------------------------------- |
|
470 TInt CTestSDKNotes::TestNENHandlePointerEventL( CStifItemParser& /*aItem*/ ) |
|
471 { |
|
472 CAknErrorNote* note = new (ELeave) CAknErrorNote; |
|
473 CleanupStack::PushL( note ); |
|
474 STIF_ASSERT_NOT_NULL( note ); |
|
475 |
|
476 TPointerEvent event; |
|
477 event.iType = TPointerEvent::EButton1Down; |
|
478 event.iModifiers = 0; |
|
479 TPoint eventPos( KPoint1, KPoint2 ); |
|
480 event.iPosition = eventPos; |
|
481 event.iParentPosition = eventPos; |
|
482 |
|
483 note->HandlePointerEventL( event ); |
|
484 |
|
485 CleanupStack::PopAndDestroy( note ); |
|
486 |
|
487 return KErrNone; |
|
488 |
|
489 } |
|
490 |
|
491 // ----------------------------------------------------------------------------- |
|
492 // CTestSDKNotes::TestNWNCAknWarningNoteL |
|
493 // ----------------------------------------------------------------------------- |
|
494 TInt CTestSDKNotes::TestNWNCAknWarningNoteL( CStifItemParser& /*aItem*/ ) |
|
495 { |
|
496 CAknWarningNote* warningNote = new (ELeave) CAknWarningNote; |
|
497 CleanupStack::PushL( warningNote ); |
|
498 STIF_ASSERT_NOT_NULL( warningNote ); |
|
499 CleanupStack::Pop( warningNote ); |
|
500 |
|
501 warningNote->ExecuteLD(); |
|
502 |
|
503 return KErrNone; |
|
504 |
|
505 } |
|
506 |
|
507 // ----------------------------------------------------------------------------- |
|
508 // CTestSDKNotes::TestNWNCAknWarningNoteParameterL |
|
509 // ----------------------------------------------------------------------------- |
|
510 TInt CTestSDKNotes::TestNWNCAknWarningNoteParameterL( CStifItemParser& /*aItem*/ ) |
|
511 { |
|
512 CAknWarningNote* warningNote = new (ELeave) CAknWarningNote( ETrue ); |
|
513 CleanupStack::PushL( warningNote ); |
|
514 STIF_ASSERT_NOT_NULL( warningNote ); |
|
515 CleanupStack::Pop( warningNote ); |
|
516 |
|
517 warningNote->ExecuteLD(); |
|
518 |
|
519 warningNote = new (ELeave) CAknWarningNote( EFalse ); |
|
520 CleanupStack::PushL( warningNote ); |
|
521 STIF_ASSERT_NOT_NULL( warningNote ); |
|
522 CleanupStack::Pop( warningNote ); |
|
523 |
|
524 warningNote->ExecuteLD(); |
|
525 |
|
526 return KErrNone; |
|
527 |
|
528 } |
|
529 |
|
530 // ----------------------------------------------------------------------------- |
|
531 // CTestSDKNotes::TestNWNCAknWarningNotePointerL |
|
532 // ----------------------------------------------------------------------------- |
|
533 TInt CTestSDKNotes::TestNWNCAknWarningNotePointerL( CStifItemParser& /*aItem*/ ) |
|
534 { |
|
535 CAknWarningNote* note = new (ELeave) CAknWarningNote; |
|
536 CleanupStack::PushL( note ); |
|
537 STIF_ASSERT_NOT_NULL( note ); |
|
538 |
|
539 CAknWarningNote* warningNote = new (ELeave) CAknWarningNote( ¬e ); |
|
540 CleanupStack::Pop( note ); |
|
541 CleanupStack::PushL( warningNote ); |
|
542 STIF_ASSERT_NOT_NULL( warningNote ); |
|
543 CleanupStack::Pop( warningNote ); |
|
544 |
|
545 warningNote->ExecuteLD(); |
|
546 |
|
547 return KErrNone; |
|
548 |
|
549 } |
|
550 |
|
551 // ----------------------------------------------------------------------------- |
|
552 // CTestSDKNotes::TestNWNHandlePointerEventL |
|
553 // ----------------------------------------------------------------------------- |
|
554 TInt CTestSDKNotes::TestNWNHandlePointerEventL( CStifItemParser& /*aItem*/ ) |
|
555 { |
|
556 CAknWarningNote* note = new (ELeave) CAknWarningNote; |
|
557 CleanupStack::PushL( note ); |
|
558 STIF_ASSERT_NOT_NULL( note ); |
|
559 |
|
560 TPointerEvent event; |
|
561 event.iType = TPointerEvent::EButton2Up; |
|
562 |
|
563 note->HandlePointerEventL( event ); |
|
564 |
|
565 CleanupStack::PopAndDestroy( note ); |
|
566 |
|
567 return KErrNone; |
|
568 |
|
569 } |
|
570 |