16 // Send them to the dialog box for the FEP to intercept and to display on the editboxes of the target dialog box. |
16 // Send them to the dialog box for the FEP to intercept and to display on the editboxes of the target dialog box. |
17 // NOTE: This test is mostly automated as the result of the dialog boxes is checked. However, due to time constraints |
17 // NOTE: This test is mostly automated as the result of the dialog boxes is checked. However, due to time constraints |
18 // it has not been investigated a way to automate parts of it, particularly key combinations of 'shift+A', 'shift+B' or 'shift+S', |
18 // it has not been investigated a way to automate parts of it, particularly key combinations of 'shift+A', 'shift+B' or 'shift+S', |
19 // which still rely on a live creature checking that the output on the screen is correct (that creature may want to put a delay |
19 // which still rely on a live creature checking that the output on the screen is correct (that creature may want to put a delay |
20 // when sending messages to be able to see that message, otherwise it may be too fast for it/him/her). |
20 // when sending messages to be able to see that message, otherwise it may be too fast for it/him/her). |
21 // |
21 // |
22 // |
22 // |
23 |
23 |
24 /** |
24 /** |
25 @file |
25 @file |
26 @test |
26 @test |
59 _LIT(KExpectedTextPhoneticalEdwin, "JulietteKiloLimaMNO"); |
59 _LIT(KExpectedTextPhoneticalEdwin, "JulietteKiloLimaMNO"); |
60 _LIT(KExpectedTextCJKEdwin, "!\x0411\x0E02\x2E81\x303A\x4E19\xAD00\xD840\xDC00\xD87E\xDC00 !\"#"); |
60 _LIT(KExpectedTextCJKEdwin, "!\x0411\x0E02\x2E81\x303A\x4E19\xAD00\xD840\xDC00\xD87E\xDC00 !\"#"); |
61 |
61 |
62 |
62 |
63 /************************************************************* |
63 /************************************************************* |
64 ** |
64 ** |
65 ** TTstResourceFileId - TCleanupItem derived class |
65 ** TTstResourceFileId - TCleanupItem derived class |
66 ** |
66 ** |
67 *************************************************************/ |
67 *************************************************************/ |
68 /* |
68 /* |
69 Encapsulates the clean up operations. The class unloads the resource file from the list maintained by CCoeEnv |
69 Encapsulates the clean up operations. The class unloads the resource file from the list maintained by CCoeEnv |
70 */ |
70 */ |
71 TTstResourceFileId::TTstResourceFileId(CCoeEnv& aConeEnvironment, TInt aResourceFileId) |
71 TTstResourceFileId::TTstResourceFileId(CCoeEnv& aConeEnvironment, TInt aResourceFileId) |
72 :TCleanupItem(UnloadResourceFile, this), |
72 :TCleanupItem(UnloadResourceFile, this), |
73 iConeEnvironment(aConeEnvironment), |
73 iConeEnvironment(aConeEnvironment), |
74 iResourceFileId(aResourceFileId) |
74 iResourceFileId(aResourceFileId) |
82 } |
82 } |
83 |
83 |
84 |
84 |
85 |
85 |
86 /************************************************************* |
86 /************************************************************* |
87 ** |
87 ** |
88 ** CTstTestTargetDialog - CEikDialog derived class |
88 ** CTstTestTargetDialog - CEikDialog derived class |
89 ** |
89 ** |
90 *************************************************************/ |
90 *************************************************************/ |
91 |
91 |
92 /** |
92 /** |
93 This fucntion is derived to perform the pre-layout dialog initialisation.\n |
93 This fucntion is derived to perform the pre-layout dialog initialisation.\n |
94 This is called by the dialog framework before the dialog is sized and laid out. \n |
94 This is called by the dialog framework before the dialog is sized and laid out. \n |
110 } |
110 } |
111 |
111 |
112 |
112 |
113 TBool CTstTestTargetDialog::OkToExitL(TInt /*aKeyCode*/) |
113 TBool CTstTestTargetDialog::OkToExitL(TInt /*aKeyCode*/) |
114 { |
114 { |
|
115 RDebug::Print(_L("**************************************************************")); |
|
116 RDebug::Print(_L("**** OK or CANCEL key pressed ")); |
|
117 RDebug::Print(_L("**************************************************************\n")); |
|
118 |
115 // Get fields text values... |
119 // Get fields text values... |
116 CEikEdwin* edwinNormal = static_cast<CEikEdwin*>(Control(EControlIdNormalEdwin)); |
120 CEikEdwin* edwinNormal = static_cast<CEikEdwin*>(Control(EControlIdNormalEdwin)); |
117 edwinNormal->GetText(gTextNormalEdwin); |
121 edwinNormal->GetText(gTextNormalEdwin); |
118 |
122 |
119 CEikEdwin* edwinNormalNum = static_cast<CEikEdwin*>(Control(EControlIdNormalNumEdwin)); |
123 CEikEdwin* edwinNormalNum = static_cast<CEikEdwin*>(Control(EControlIdNormalNumEdwin)); |
132 return ETrue; |
136 return ETrue; |
133 } |
137 } |
134 |
138 |
135 |
139 |
136 /** |
140 /** |
137 Flag TRUE for support of Phonetic alphabets |
141 Flag TRUE for support of Phonetic alphabets |
138 */ |
142 */ |
139 TBool CTstTestTargetDialog::SupportsPhoneticAlphabet() const |
143 TBool CTstTestTargetDialog::SupportsPhoneticAlphabet() const |
140 { |
144 { |
141 return ETrue; |
145 return ETrue; |
142 } |
146 } |
143 |
147 |
144 |
148 |
145 |
149 |
146 |
150 |
147 /************************************************************* |
151 /************************************************************* |
148 ** |
152 ** |
149 ** CFep1TestTargetUi |
153 ** CFep1TestTargetUi |
150 ** |
154 ** |
151 *************************************************************/ |
155 *************************************************************/ |
152 |
156 |
153 CFep1TestTargetUi::CFep1TestTargetUi(CTmsTestStep* aStep) : |
157 CFep1TestTargetUi::CFep1TestTargetUi(CTmsTestStep* aStep) : |
154 CTestAppUi(aStep, KNullDesC) |
158 CTestAppUi(aStep, KNullDesC) |
155 { |
159 { |
158 CFep1TestTargetUi::~CFep1TestTargetUi() |
162 CFep1TestTargetUi::~CFep1TestTargetUi() |
159 { |
163 { |
160 } |
164 } |
161 |
165 |
162 /** |
166 /** |
163 Install the FEP.\n |
167 Install the FEP.\n |
164 Set the windows server event as User defined.\n |
168 Set the windows server event as User defined.\n |
165 Connect the client session to widows server.\n |
169 Connect the client session to widows server.\n |
166 Create the Client side handle \n |
170 Create the Client side handle \n |
167 Send the user events and close the session on completion\n |
171 Send the user events and close the session on completion\n |
168 */ |
172 */ |
169 void CFep1TestTargetUi::ConstructL() |
173 void CFep1TestTargetUi::ConstructL() |
170 { |
174 { |
|
175 RDebug::Print(_L("**************************************************************")); |
|
176 RDebug::Print(_L("**** CFep1TestTargetUi::ConstructL ")); |
|
177 RDebug::Print(_L("**************************************************************\n")); |
|
178 |
171 CTestAppUi::ConstructL(); |
179 CTestAppUi::ConstructL(); |
172 |
180 |
173 iCoeEnv->InstallFepL(KNullUid); |
181 iCoeEnv->InstallFepL(KNullUid); |
174 iCoeEnv->InstallFepL(KUidTFep1); |
182 iCoeEnv->InstallFepL(KUidTFep1); |
175 |
183 |
196 |
204 |
197 void CFep1TestTargetUi::RunTestStepL(TInt aStep) |
205 void CFep1TestTargetUi::RunTestStepL(TInt aStep) |
198 { |
206 { |
199 switch(aStep) |
207 switch(aStep) |
200 { |
208 { |
201 |
209 |
202 //---------------------------------------------------------------------------------------------- |
210 //---------------------------------------------------------------------------------------------- |
203 |
211 |
204 /** |
212 /** |
205 @SYMTestCaseID UIF-FEPTEST-0004 |
213 @SYMTestCaseID UIF-FEPTEST-0004 |
206 @SYMPREQ 0000 |
214 @SYMPREQ 0000 |
207 @SYMTestCaseDesc Offer key events to the dialog having the TFEP1 activated. |
215 @SYMTestCaseDesc Offer key events to the dialog having the TFEP1 activated. |
208 @SYMTestPriority High |
216 @SYMTestPriority High |
209 @SYMTestStatus Implemented |
217 @SYMTestStatus Implemented |
210 @SYMTestActions Simulate key events sent to the dialog box, and do some actions with the fep, |
218 @SYMTestActions Simulate key events sent to the dialog box, and do some actions with the fep, |
211 like commit, cancel and go back to add a 'missing' letter. |
219 like commit, cancel and go back to add a 'missing' letter. |
212 @SYMTestExpectedResults When the dialog is dismissed, the text box reads as is expected. |
220 @SYMTestExpectedResults When the dialog is dismissed, the text box reads as is expected. |
213 */ |
221 */ |
220 TUint code = 'A' + aStep - 1; |
228 TUint code = 'A' + aStep - 1; |
221 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
229 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
222 SendKey(code); |
230 SendKey(code); |
223 } |
231 } |
224 break; |
232 break; |
225 |
233 |
226 case 4: |
234 case 4: |
227 { |
235 { |
228 INFO_PRINTF1(_L("...simulate Key Event Enter ---> Submits 'ABC'")); |
236 INFO_PRINTF1(_L("...simulate Key Event Enter ---> Submits 'ABC'")); |
229 SendKey(EKeyEnter); |
237 SendKey(EKeyEnter); |
230 } |
238 } |
231 break; |
239 break; |
232 |
240 |
233 case 5: case 6: case 7: |
241 case 5: case 6: case 7: |
234 { |
242 { |
235 TUint code = 'D' + aStep - 5; |
243 TUint code = 'D' + aStep - 5; |
236 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
244 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
237 SendKey(code); |
245 SendKey(code); |
238 } |
246 } |
239 break; |
247 break; |
240 |
248 |
241 case 8: |
249 case 8: |
242 { |
250 { |
243 INFO_PRINTF1(_L("...simulate Key Event Escape ---> Cancels 'DEF'")); |
251 INFO_PRINTF1(_L("...simulate Key Event Escape ---> Cancels 'DEF'")); |
244 SendKey(EKeyEscape); |
252 SendKey(EKeyEscape); |
245 } |
253 } |
246 break; |
254 break; |
247 |
255 |
248 case 9: case 10: case 11: |
256 case 9: case 10: case 11: |
249 { |
257 { |
250 TUint code = 'H' + aStep - 9; |
258 TUint code = 'H' + aStep - 9; |
251 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
259 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
252 SendKey(code); |
260 SendKey(code); |
253 } |
261 } |
254 break; |
262 break; |
255 |
263 |
256 case 12: case 13: case 14: case 15: case 16: |
264 case 12: case 13: case 14: case 15: case 16: |
257 { |
265 { |
258 INFO_PRINTF1(_L("...simulate Key Cursor Left ---> Go left 5 positions (should not go further than the previous 'H' however")); |
266 INFO_PRINTF1(_L("...simulate Key Cursor Left ---> Go left 5 positions (should not go further than the previous 'H' however")); |
259 SendKey(EKeyLeftArrow); |
267 SendKey(EKeyLeftArrow); |
260 } |
268 } |
261 break; |
269 break; |
262 |
270 |
263 case 17: |
271 case 17: |
264 { |
272 { |
291 |
299 |
292 /** |
300 /** |
293 @SYMTestCaseID UIF-FEPTEST-0005 |
301 @SYMTestCaseID UIF-FEPTEST-0005 |
294 @SYMPREQ 0000 |
302 @SYMPREQ 0000 |
295 @SYMTestCaseDesc Repeat the same as the other but changing mode (inline <--> non inline) |
303 @SYMTestCaseDesc Repeat the same as the other but changing mode (inline <--> non inline) |
296 @SYMTestPriority High |
304 @SYMTestPriority High |
297 @SYMTestStatus Implemented |
305 @SYMTestStatus Implemented |
298 @SYMTestActions Simulate key events sent to the dialog box, and do some actions with the fep, |
306 @SYMTestActions Simulate key events sent to the dialog box, and do some actions with the fep, |
299 like commit, cancel and go back to add a 'missing' letter. |
307 like commit, cancel and go back to add a 'missing' letter. |
300 @SYMTestExpectedResults When the dialog is dismissed, the text box reads as is expected. |
308 @SYMTestExpectedResults When the dialog is dismissed, the text box reads as is expected. |
301 */ |
309 */ |
304 |
312 |
305 case 51: |
313 case 51: |
306 { |
314 { |
307 SetTestStepID(_L("UIF-FEPTEST-0005")); |
315 SetTestStepID(_L("UIF-FEPTEST-0005")); |
308 INFO_PRINTF1(_L("...simulate Key Event 'Shift + I' ---> Changes fep mode!")); |
316 INFO_PRINTF1(_L("...simulate Key Event 'Shift + I' ---> Changes fep mode!")); |
309 SendKey('I', EModifierRightShift); |
317 SendKey('I', EModifierRightShift); |
310 } |
318 } |
311 break; |
319 break; |
312 |
320 |
313 case 52: case 53: case 54: |
321 case 52: case 53: case 54: |
314 { |
322 { |
315 TUint code = 'K' + aStep - 52; |
323 TUint code = 'K' + aStep - 52; |
316 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
324 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
317 SendKey(code); |
325 SendKey(code); |
318 } |
326 } |
319 break; |
327 break; |
320 |
328 |
321 case 55: |
329 case 55: |
322 { |
330 { |
323 INFO_PRINTF1(_L("...simulate Key Event Enter ---> Submits 'KLM'")); // Submit "KLM" ----> We should have "ABCGHIJKLM" |
331 INFO_PRINTF1(_L("...simulate Key Event Enter ---> Submits 'KLM'")); // Submit "KLM" ----> We should have "ABCGHIJKLM" |
324 SendKey(EKeyEnter); |
332 SendKey(EKeyEnter); |
325 } |
333 } |
326 break; |
334 break; |
327 |
335 |
328 case 56: case 57: case 58: |
336 case 56: case 57: case 58: |
329 { |
337 { |
330 TUint code = 'N' + aStep - 56; |
338 TUint code = 'N' + aStep - 56; |
331 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
339 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
332 SendKey(code); |
340 SendKey(code); |
333 } |
341 } |
334 break; |
342 break; |
335 |
343 |
336 case 59: |
344 case 59: |
337 { |
345 { |
338 INFO_PRINTF1(_L("...simulate Key Event Escape ---> Cancels 'NOP'")); |
346 INFO_PRINTF1(_L("...simulate Key Event Escape ---> Cancels 'NOP'")); |
339 SendKey(EKeyEscape); |
347 SendKey(EKeyEscape); |
340 } |
348 } |
341 break; |
349 break; |
342 |
350 |
343 case 60: case 61: case 62: |
351 case 60: case 61: case 62: |
344 { |
352 { |
345 TUint code = 'R' + aStep - 60; |
353 TUint code = 'R' + aStep - 60; |
346 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
354 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
347 SendKey(code); |
355 SendKey(code); |
348 } |
356 } |
349 break; |
357 break; |
350 |
358 |
351 case 63: case 64: case 65: case 66: case 67: |
359 case 63: case 64: case 65: case 66: case 67: |
352 { |
360 { |
353 INFO_PRINTF1(_L("...simulate Key Cursor Left ---> Go left 5 positions (should not go further than the previous 'R' however")); |
361 INFO_PRINTF1(_L("...simulate Key Cursor Left ---> Go left 5 positions (should not go further than the previous 'R' however")); |
354 SendKey(EKeyLeftArrow); |
362 SendKey(EKeyLeftArrow); |
355 } |
363 } |
356 break; |
364 break; |
357 |
365 |
358 case 68: |
366 case 68: |
359 { |
367 { |
386 |
394 |
387 /** |
395 /** |
388 @SYMTestCaseID UIF-FEPTEST-0006 |
396 @SYMTestCaseID UIF-FEPTEST-0006 |
389 @SYMPREQ 0000 |
397 @SYMPREQ 0000 |
390 @SYMTestCaseDesc Test changing focus |
398 @SYMTestCaseDesc Test changing focus |
391 @SYMTestPriority High |
399 @SYMTestPriority High |
392 @SYMTestStatus Implemented |
400 @SYMTestStatus Implemented |
393 @SYMTestActions Simulate key events to change focus of the Fep window and move the windows around. |
401 @SYMTestActions Simulate key events to change focus of the Fep window and move the windows around. |
394 In addition, simulate the key event that sends the Fep window to the current dialog cursor. |
402 In addition, simulate the key event that sends the Fep window to the current dialog cursor. |
395 @SYMTestExpectedResults When the dialog is dismissed, the text box reads as is expected. |
403 @SYMTestExpectedResults When the dialog is dismissed, the text box reads as is expected. |
396 */ |
404 */ |
399 |
407 |
400 case 101: |
408 case 101: |
401 { |
409 { |
402 SetTestStepID(_L("UIF-FEPTEST-0006")); |
410 SetTestStepID(_L("UIF-FEPTEST-0006")); |
403 INFO_PRINTF1(_L("...simulate Key Event 'Shift + N' ---> Moves the Fep window to dialog cursor!")); |
411 INFO_PRINTF1(_L("...simulate Key Event 'Shift + N' ---> Moves the Fep window to dialog cursor!")); |
404 SendKey('N', EModifierRightShift); |
412 SendKey('N', EModifierRightShift); |
405 } |
413 } |
406 break; |
414 break; |
407 |
415 |
408 case 102: |
416 case 102: |
409 { |
417 { |
410 INFO_PRINTF1(_L("...simulate Key Event 'Shift + F' ---> Changes focus!")); |
418 INFO_PRINTF1(_L("...simulate Key Event 'Shift + F' ---> Changes focus!")); |
411 SendKey('F', EModifierRightShift); |
419 SendKey('F', EModifierRightShift); |
412 } |
420 } |
413 break; |
421 break; |
414 |
422 |
415 case 103: case 104: case 105: case 106: case 107: case 108: case 109: case 110: case 111: case 112: case 113: case 114: case 115: |
423 case 103: case 104: case 105: case 106: case 107: case 108: case 109: case 110: case 111: case 112: case 113: case 114: case 115: |
416 { |
424 { |
417 INFO_PRINTF1(_L("...send several cursor right events to move the window")); |
425 INFO_PRINTF1(_L("...send several cursor right events to move the window")); |
418 for (TInt ii=10; ii>0; --ii) |
426 for (TInt ii=10; ii>0; --ii) |
419 SendKey(EKeyRightArrow); |
427 SendKey(EKeyRightArrow); |
420 } |
428 } |
421 break; |
429 break; |
422 |
430 |
423 case 116: |
431 case 116: |
424 { |
432 { |
425 INFO_PRINTF1(_L("...simulate Key Event Enter ---> Finishes moving the Fep window!")); |
433 INFO_PRINTF1(_L("...simulate Key Event Enter ---> Finishes moving the Fep window!")); |
426 SendKey(EKeyEnter); |
434 SendKey(EKeyEnter); |
427 RecordTestResultL(); |
435 RecordTestResultL(); |
428 } |
436 } |
429 break; |
437 break; |
430 |
438 |
431 |
439 |
433 |
441 |
434 /** |
442 /** |
435 @SYMTestCaseID UIF-FEPTEST-0007 |
443 @SYMTestCaseID UIF-FEPTEST-0007 |
436 @SYMPREQ 0000 |
444 @SYMPREQ 0000 |
437 @SYMTestCaseDesc Test TFEP1 in HEXadecimal mode |
445 @SYMTestCaseDesc Test TFEP1 in HEXadecimal mode |
438 @SYMTestPriority High |
446 @SYMTestPriority High |
439 @SYMTestStatus Implemented |
447 @SYMTestStatus Implemented |
440 @SYMTestActions Change Fep to HEX mode by means of the corresponding key event. |
448 @SYMTestActions Change Fep to HEX mode by means of the corresponding key event. |
441 Simulate that the combination of 0x0040 produces the symbol '@' |
449 Simulate that the combination of 0x0040 produces the symbol '@' |
442 @SYMTestExpectedResults When the dialog is dismissed, the text box reads as is expected. |
450 @SYMTestExpectedResults When the dialog is dismissed, the text box reads as is expected. |
443 */ |
451 */ |
504 |
517 |
505 /** |
518 /** |
506 @SYMTestCaseID UIF-FEPTEST-0008 |
519 @SYMTestCaseID UIF-FEPTEST-0008 |
507 @SYMPREQ 0000 |
520 @SYMPREQ 0000 |
508 @SYMTestCaseDesc Text selection within a dialog box editor. |
521 @SYMTestCaseDesc Text selection within a dialog box editor. |
509 @SYMTestPriority High |
522 @SYMTestPriority High |
510 @SYMTestStatus Implemented |
523 @SYMTestStatus Implemented |
511 @SYMTestActions To test this functionality we simulate a key event to go to the next dialog |
524 @SYMTestActions To test this functionality we simulate a key event to go to the next dialog |
512 field (cursor down). Once in there, some numerical key events are sent to the |
525 field (cursor down). Once in there, some numerical key events are sent to the |
513 application. |
526 application. |
514 The selection of uncommited text and replacing it for new characters is also tested. |
527 The selection of uncommited text and replacing it for new characters is also tested. |
538 break; |
551 break; |
539 |
552 |
540 case 205: |
553 case 205: |
541 { |
554 { |
542 INFO_PRINTF1(_L("...simulate Key Event 'Shift + W' ---> Change cursor type in case of inline editing!")); |
555 INFO_PRINTF1(_L("...simulate Key Event 'Shift + W' ---> Change cursor type in case of inline editing!")); |
543 SendKey('W', EModifierRightShift); |
556 SendKey('W', EModifierRightShift); |
544 } |
557 } |
545 break; |
558 break; |
546 |
559 |
547 case 206: case 207: case 208: |
560 case 206: case 207: case 208: |
548 { |
561 { |
549 INFO_PRINTF1(_L("...simulate Key Cursor 'shift + Left' ---> Selects non-submitted text")); |
562 INFO_PRINTF1(_L("...simulate Key Cursor 'shift + Left' ---> Selects non-submitted text")); |
550 SendKey(EKeyLeftArrow, EModifierLeftShift|EModifierShift); |
563 SendKey(EKeyLeftArrow, EModifierLeftShift|EModifierShift); |
551 } |
564 } |
552 break; |
565 break; |
582 break; |
595 break; |
583 |
596 |
584 case 217: |
597 case 217: |
585 { |
598 { |
586 INFO_PRINTF1(_L("...simulate Key Event 'Shift + W' ---> Change cursor type in case of inline editing!")); |
599 INFO_PRINTF1(_L("...simulate Key Event 'Shift + W' ---> Change cursor type in case of inline editing!")); |
587 SendKey('W', EModifierRightShift); |
600 SendKey('W', EModifierRightShift); |
588 } |
601 } |
589 break; |
602 break; |
590 |
603 |
591 case 218: case 219: case 220: |
604 case 218: case 219: case 220: |
592 { |
605 { |
593 INFO_PRINTF1(_L("...simulate Key Cursor 'shift + Right' ---> Selects non-submitted text")); |
606 INFO_PRINTF1(_L("...simulate Key Cursor 'shift + Right' ---> Selects non-submitted text")); |
594 SendKey(EKeyLeftArrow, EModifierLeftShift|EModifierShift); |
607 SendKey(EKeyLeftArrow, EModifierLeftShift|EModifierShift); |
595 } |
608 } |
596 break; |
609 break; |
625 break; |
638 break; |
626 |
639 |
627 case 229: |
640 case 229: |
628 { |
641 { |
629 INFO_PRINTF1(_L("...simulate Key Event 'Shift + A' ---> Tells about what's AFTER the selected 4!")); // Should be 56 |
642 INFO_PRINTF1(_L("...simulate Key Event 'Shift + A' ---> Tells about what's AFTER the selected 4!")); // Should be 56 |
630 SendKey('A', EModifierRightShift); |
643 SendKey('A', EModifierRightShift); |
631 } |
644 } |
632 break; |
645 break; |
633 |
646 |
634 case 230: |
647 case 230: |
635 { |
648 { |
636 INFO_PRINTF1(_L("...simulate Key Event 'Shift + S' ---> Tells about what's SELECTED!")); // Should be 4 |
649 INFO_PRINTF1(_L("...simulate Key Event 'Shift + S' ---> Tells about what's SELECTED!")); // Should be 4 |
637 SendKey('S', EModifierRightShift); |
650 SendKey('S', EModifierRightShift); |
638 } |
651 } |
639 break; |
652 break; |
640 |
653 |
641 case 231: |
654 case 231: |
642 { |
655 { |
643 INFO_PRINTF1(_L("...simulate Key Event 'Shift + B' ---> Tells about what's BEFORE the selected 4!")); // Should be 123 |
656 INFO_PRINTF1(_L("...simulate Key Event 'Shift + B' ---> Tells about what's BEFORE the selected 4!")); // Should be 123 |
644 SendKey('B', EModifierRightShift); |
657 SendKey('B', EModifierRightShift); |
645 } |
658 } |
646 break; |
659 break; |
647 |
660 |
648 case 232: case 233: |
661 case 232: case 233: |
649 { |
662 { |
667 |
680 |
668 /** |
681 /** |
669 @SYMTestCaseID UIF-FEPTEST-0009 |
682 @SYMTestCaseID UIF-FEPTEST-0009 |
670 @SYMPREQ 0000 |
683 @SYMPREQ 0000 |
671 @SYMTestCaseDesc Fep state within a dialog box editor. |
684 @SYMTestCaseDesc Fep state within a dialog box editor. |
672 @SYMTestPriority High |
685 @SYMTestPriority High |
673 @SYMTestStatus Implemented |
686 @SYMTestStatus Implemented |
674 @SYMTestActions To test this functionality we simulate a key event to go to change the state |
687 @SYMTestActions To test this functionality we simulate a key event to go to change the state |
675 variable (in TFEP1 case it's just a counter), repeating the same event few times. |
688 variable (in TFEP1 case it's just a counter), repeating the same event few times. |
676 he next dialog. |
689 he next dialog. |
677 Move to the next text editor box and go back to the previous one. State is maintained |
690 Move to the next text editor box and go back to the previous one. State is maintained |
678 @SYMTestExpectedResults The state is maintained even though we move across to other text editor boxes (partly manual) |
691 @SYMTestExpectedResults The state is maintained even though we move across to other text editor boxes (partly manual) |
679 */ |
692 */ |
680 |
693 |
681 //---------------------------------------------------------------------------------------------- |
694 //---------------------------------------------------------------------------------------------- |
682 case 251: |
695 case 251: |
683 SetTestStepID(_L("UIF-FEPTEST-0009")); |
696 SetTestStepID(_L("UIF-FEPTEST-0009")); |
684 |
697 |
685 case 252: case 253: case 254: case 255: |
698 case 252: case 253: case 254: case 255: |
686 { |
699 { |
687 INFO_PRINTF1(_L("...simulate Key Event 'Shift + T' ---> Changes State variable!")); |
700 INFO_PRINTF1(_L("...simulate Key Event 'Shift + T' ---> Changes State variable!")); |
688 SendKey('T', EModifierRightShift); |
701 SendKey('T', EModifierRightShift); |
689 } |
702 } |
690 break; |
703 break; |
691 |
704 |
692 case 256: |
705 case 256: |
693 { |
706 { |
694 INFO_PRINTF1(_L("Send cursor up events to move the next dialog")); |
707 INFO_PRINTF1(_L("Send cursor up events to move the next dialog")); |
695 SendKey(EKeyUpArrow); |
708 SendKey(EKeyUpArrow); |
696 } |
709 } |
697 break; |
710 break; |
698 |
711 |
699 case 257: |
712 case 257: |
700 { |
713 { |
701 INFO_PRINTF1(_L("Send cursor down events to move the next dialog")); |
714 INFO_PRINTF1(_L("Send cursor down events to move the next dialog")); |
702 SendKey(EKeyDownArrow); |
715 SendKey(EKeyDownArrow); |
703 } |
716 } |
704 break; |
717 break; |
705 |
718 |
706 case 258: case 259: case 260: case 261: case 262: |
719 case 258: case 259: case 260: case 261: case 262: |
707 { |
720 { |
708 INFO_PRINTF1(_L("...simulate Key Event 'Shift + T' ---> Changes State variable!")); |
721 INFO_PRINTF1(_L("...simulate Key Event 'Shift + T' ---> Changes State variable!")); |
709 SendKey('T', EModifierRightShift); |
722 SendKey('T', EModifierRightShift); |
710 if(aStep == 262) |
723 if(aStep == 262) |
711 { |
724 { |
|
725 RDebug::Print(_L("**************************************************************")); |
|
726 RDebug::Print(_L("**** UIF-FEPTEST-0009 Finished ")); |
|
727 RDebug::Print(_L("**************************************************************\n")); |
|
728 |
712 RecordTestResultL(); |
729 RecordTestResultL(); |
713 } |
730 } |
714 } |
731 } |
715 break; |
732 break; |
716 |
733 |
719 |
736 |
720 /** |
737 /** |
721 @SYMTestCaseID UIF-FEPTEST-0010 |
738 @SYMTestCaseID UIF-FEPTEST-0010 |
722 @SYMPREQ 0000 |
739 @SYMPREQ 0000 |
723 @SYMTestCaseDesc Kata-kata dialog box editor. |
740 @SYMTestCaseDesc Kata-kata dialog box editor. |
724 @SYMTestPriority High |
741 @SYMTestPriority High |
725 @SYMTestStatus Implemented |
742 @SYMTestStatus Implemented |
726 @SYMTestActions To test this functionality we simulate a key event to go to next dialog box |
743 @SYMTestActions To test this functionality we simulate a key event to go to next dialog box |
727 editor (Katakana dialog box). Simulate some characters and check that |
744 editor (Katakana dialog box). Simulate some characters and check that |
728 they appear on the box accordingly. |
745 they appear on the box accordingly. |
729 @SYMTestExpectedResults When the dialog is dismissed, the text box reads as is expected. |
746 @SYMTestExpectedResults When the dialog is dismissed, the text box reads as is expected. |
730 */ |
747 */ |
731 |
748 |
732 //---------------------------------------------------------------------------------------------- |
749 //---------------------------------------------------------------------------------------------- |
733 |
750 |
734 case 351: |
751 case 351: |
735 { |
752 { |
736 SetTestStepID(_L("UIF-FEPTEST-0010")); |
753 SetTestStepID(_L("UIF-FEPTEST-0010")); |
737 INFO_PRINTF1(_L("Send cursor down events to move the next dialog")); |
754 INFO_PRINTF1(_L("Send cursor down events to move the next dialog")); |
738 SendKey(EKeyDownArrow); |
755 SendKey(EKeyDownArrow); |
739 } |
756 } |
740 break; |
757 break; |
741 |
758 |
742 case 352: case 353: case 354: |
759 case 352: case 353: case 354: |
743 { |
760 { |
744 SetTestStepID(_L("UIF-FEPTEST-0010")); |
761 SetTestStepID(_L("UIF-FEPTEST-0010")); |
745 TUint code = 'E' + aStep - 352; |
762 TUint code = 'E' + aStep - 352; |
746 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
763 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
747 SendKey(code); |
764 SendKey(code); |
757 |
774 |
758 /** |
775 /** |
759 @SYMTestCaseID UIF-FEPTEST-0011 |
776 @SYMTestCaseID UIF-FEPTEST-0011 |
760 @SYMPREQ 0000 |
777 @SYMPREQ 0000 |
761 @SYMTestCaseDesc Phoneticall dialog box editor. |
778 @SYMTestCaseDesc Phoneticall dialog box editor. |
762 @SYMTestPriority High |
779 @SYMTestPriority High |
763 @SYMTestStatus Implemented |
780 @SYMTestStatus Implemented |
764 @SYMTestActions To test this functionality we simulate a key event to go to next dialog box |
781 @SYMTestActions To test this functionality we simulate a key event to go to next dialog box |
765 editor (Phoneticall dialog box). Simulate some characters and check that |
782 editor (Phoneticall dialog box). Simulate some characters and check that |
766 they appear on the box accordingly, i.e, converting single characters to those |
783 they appear on the box accordingly, i.e, converting single characters to those |
767 in the phoneticall alphabet (A-->Alpha, B-->Bravo...) |
784 in the phoneticall alphabet (A-->Alpha, B-->Bravo...) |
768 In addition, uninstall the Fep and write more characters, so they are not |
785 In addition, uninstall the Fep and write more characters, so they are not |
769 phonetically 'translated' by the Fep. |
786 phonetically 'translated' by the Fep. |
770 @SYMTestExpectedResults When the dialog is dismissed, the text box reads as is expected. |
787 @SYMTestExpectedResults When the dialog is dismissed, the text box reads as is expected. |
771 */ |
788 */ |
772 |
789 |
773 //---------------------------------------------------------------------------------------------- |
790 //---------------------------------------------------------------------------------------------- |
774 |
791 |
775 case 451: |
792 case 451: |
776 { |
793 { |
777 SetTestStepID(_L("UIF-FEPTEST-0011")); |
794 SetTestStepID(_L("UIF-FEPTEST-0011")); |
778 INFO_PRINTF1(_L("Send cursor down events to move the next dialog")); |
795 INFO_PRINTF1(_L("Send cursor down events to move the next dialog")); |
779 SendKey(EKeyDownArrow); |
796 SendKey(EKeyDownArrow); |
780 } |
797 } |
781 break; |
798 break; |
782 |
799 |
783 case 452: case 453: case 454: |
800 case 452: case 453: case 454: |
784 { |
801 { |
785 TUint code = 'J' + aStep - 452; |
802 TUint code = 'J' + aStep - 452; |
786 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
803 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
787 SendKey(code); |
804 SendKey(code); |
788 } |
805 } |
789 break; |
806 break; |
790 |
807 |
791 case 455: |
808 case 455: |
792 { |
809 { |
793 INFO_PRINTF1(_L("...simulate Key Event Enter ---> Submits 'JulietteKiloLima'")); |
810 INFO_PRINTF1(_L("...simulate Key Event Enter ---> Submits 'JulietteKiloLima'")); |
794 SendKey(EKeyEnter); |
811 SendKey(EKeyEnter); |
795 } |
812 } |
796 break; |
813 break; |
797 |
814 |
798 case 456: |
815 case 456: |
799 { |
816 { |
808 TUint code = 'M' + aStep - 457; |
825 TUint code = 'M' + aStep - 457; |
809 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
826 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
810 SendKey(code); |
827 SendKey(code); |
811 } |
828 } |
812 break; |
829 break; |
813 |
830 |
814 case 460: |
831 case 460: |
815 { |
832 { |
816 //INFO_PRINTF1(_L("...simulate Key Event Enter ---> Submits 'MNO' (not Fep installed --> No Alphabetical!")); |
833 //INFO_PRINTF1(_L("...simulate Key Event Enter ---> Submits 'MNO' (not Fep installed --> No Alphabetical!")); |
817 //SendKey(EKeyEnter); |
834 //SendKey(EKeyEnter); |
|
835 |
|
836 RDebug::Print(_L("**************************************************************")); |
|
837 RDebug::Print(_L("**** UIF-FEPTEST-0011 Finished ")); |
|
838 RDebug::Print(_L("**************************************************************\n")); |
|
839 |
818 RecordTestResultL(); |
840 RecordTestResultL(); |
819 } |
841 } |
820 break; |
842 break; |
821 |
843 |
822 //---------------------------------------------------------------------------------------------- |
844 //---------------------------------------------------------------------------------------------- |
823 |
845 |
824 /** |
846 /** |
825 @SYMTestCaseID TI18N-FEPBASE-CIT-4001 |
847 @SYMTestCaseID TI18N-FEPBASE-CIT-4001 |
826 @SYMPREQ 2471 |
848 @SYMPREQ 2471 |
827 @SYMTestCaseDesc Check FEPBASE Unicode 5.0 support. |
849 @SYMTestCaseDesc Check FEPBASE Unicode 5.0 support. |
828 @SYMTestPriority High |
850 @SYMTestPriority High |
829 @SYMTestStatus Implemented |
851 @SYMTestStatus Implemented |
830 @SYMTestActions 1. Pass BMP code points to WORD.exe |
852 @SYMTestActions 1. Pass BMP code points to WORD.exe |
831 2. Pass non-BMP code points to WORD.exe |
853 2. Pass non-BMP code points to WORD.exe |
832 |
854 |
833 @SYMTestExpectedResults When the dialog is dismissed, the text box reads as is expected. |
855 @SYMTestExpectedResults When the dialog is dismissed, the text box reads as is expected. |
834 */ |
856 */ |
835 |
857 |
836 //---------------------------------------------------------------------------------------------- |
858 //---------------------------------------------------------------------------------------------- |
837 |
859 |
848 } |
870 } |
849 break; |
871 break; |
850 case 462: |
872 case 462: |
851 { |
873 { |
852 INFO_PRINTF1(_L("...simulate Key Event 'Shift + M' ---> Changes to hex fep!")); |
874 INFO_PRINTF1(_L("...simulate Key Event 'Shift + M' ---> Changes to hex fep!")); |
853 SendKey('M', EModifierRightShift); |
875 SendKey('M', EModifierRightShift); |
854 TUint codes[] = {'0', '0', '0', '2', '1'}; // FEP 4 supports UTF-16, and need 5 digits for one Unicode value |
876 TUint codes[] = {'0', '0', '0', '2', '1'}; // FEP 4 supports UTF-16, and need 5 digits for one Unicode value |
855 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
877 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
856 { |
878 { |
857 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
879 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
858 SendKey(codes[i]); |
880 SendKey(codes[i]); |
859 } |
881 } |
860 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
882 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
861 SendKey(EKeyEnter); |
883 SendKey(EKeyEnter); |
862 } |
884 } |
863 break; |
885 break; |
864 case 463: |
886 case 463: |
865 { |
887 { |
866 TUint codes[] = {'0', '0', '4', '1', '1'}; // FEP 4 supports UTF-16, and need 5 digit for one Unicode value |
888 TUint codes[] = {'0', '0', '4', '1', '1'}; // FEP 4 supports UTF-16, and need 5 digit for one Unicode value |
867 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
889 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
868 { |
890 { |
869 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
891 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
870 SendKey(codes[i]); |
892 SendKey(codes[i]); |
871 } |
893 } |
872 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
894 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
873 SendKey(EKeyEnter); |
895 SendKey(EKeyEnter); |
874 } |
896 } |
875 break; |
897 break; |
876 case 464: |
898 case 464: |
877 { |
899 { |
878 TUint codes[] = {'0', '0', 'E', '0', '2'}; // FEP 4 supports UTF-16, and need 5 digit for one Unicode value |
900 TUint codes[] = {'0', '0', 'E', '0', '2'}; // FEP 4 supports UTF-16, and need 5 digit for one Unicode value |
879 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
901 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
880 { |
902 { |
881 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
903 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
882 SendKey(codes[i]); |
904 SendKey(codes[i]); |
883 } |
905 } |
884 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
906 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
885 SendKey(EKeyEnter); |
907 SendKey(EKeyEnter); |
886 } |
908 } |
887 break; |
909 break; |
888 case 465: |
910 case 465: |
889 { |
911 { |
890 TUint codes[] = {'0', '2', 'E', '8', '1'}; // FEP 4 supports UTF-16, and need 5 digit for one Unicode value |
912 TUint codes[] = {'0', '2', 'E', '8', '1'}; // FEP 4 supports UTF-16, and need 5 digit for one Unicode value |
892 { |
914 { |
893 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
915 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
894 SendKey(codes[i]); |
916 SendKey(codes[i]); |
895 } |
917 } |
896 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
918 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
897 SendKey(EKeyEnter); |
919 SendKey(EKeyEnter); |
898 } |
920 } |
899 break; |
921 break; |
900 case 466: |
922 case 466: |
901 { |
923 { |
902 TUint codes[] = {'0', '3', '0', '3', 'A'}; // FEP 4 supports UTF-16, and need 5 digit for one Unicode value |
924 TUint codes[] = {'0', '3', '0', '3', 'A'}; // FEP 4 supports UTF-16, and need 5 digit for one Unicode value |
904 { |
926 { |
905 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
927 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
906 SendKey(codes[i]); |
928 SendKey(codes[i]); |
907 } |
929 } |
908 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
930 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
909 SendKey(EKeyEnter); |
931 SendKey(EKeyEnter); |
910 } |
932 } |
911 break; |
933 break; |
912 case 467: |
934 case 467: |
913 { |
935 { |
914 TUint codes[] = {'0', '4', 'E', '1', '9'}; // FEP 4 supports UTF-16, and need 5 digit for one Unicode value |
936 TUint codes[] = {'0', '4', 'E', '1', '9'}; // FEP 4 supports UTF-16, and need 5 digit for one Unicode value |
916 { |
938 { |
917 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
939 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
918 SendKey(codes[i]); |
940 SendKey(codes[i]); |
919 } |
941 } |
920 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
942 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
921 SendKey(EKeyEnter); |
943 SendKey(EKeyEnter); |
922 } |
944 } |
923 break; |
945 break; |
924 case 468: |
946 case 468: |
925 { |
947 { |
926 TUint codes[] = {'0', 'A', 'D', '0', '0'}; // FEP 4 supports UTF-16, and need 5 digit for one Unicode value |
948 TUint codes[] = {'0', 'A', 'D', '0', '0'}; // FEP 4 supports UTF-16, and need 5 digit for one Unicode value |
940 { |
962 { |
941 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
963 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
942 SendKey(codes[i]); |
964 SendKey(codes[i]); |
943 } |
965 } |
944 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
966 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
945 SendKey(EKeyEnter); |
967 SendKey(EKeyEnter); |
946 } |
968 } |
947 break; |
969 break; |
948 case 470: |
970 case 470: |
949 { |
971 { |
950 TUint codes[] = {'2', 'F', '8', '0', '0'}; |
972 TUint codes[] = {'2', 'F', '8', '0', '0'}; |
951 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
973 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
952 { |
974 { |
953 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
975 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
954 SendKey(codes[i]); |
976 SendKey(codes[i]); |
955 } |
977 } |
956 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
978 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
957 SendKey(EKeyEnter); |
979 SendKey(EKeyEnter); |
958 } |
980 } |
959 break; |
981 break; |
960 case 471: |
982 case 471: |
961 { |
983 { |
962 INFO_PRINTF1(_L("...simulate Key Event 'Shift + X' ---> test SimulateKeyEventsL!")); |
984 INFO_PRINTF1(_L("...simulate Key Event 'Shift + X' ---> test SimulateKeyEventsL!")); |
970 case 472: |
992 case 472: |
971 { |
993 { |
972 INFO_PRINTF1(_L("Uninstall the FEP 4")); |
994 INFO_PRINTF1(_L("Uninstall the FEP 4")); |
973 iCoeEnv->InstallFepL(KNullUid); |
995 iCoeEnv->InstallFepL(KNullUid); |
974 User::After(TTimeIntervalMicroSeconds32(2000000)); |
996 User::After(TTimeIntervalMicroSeconds32(2000000)); |
975 SendKey(EKeyEnter); |
997 SendKey(EKeyEnter); |
976 RecordTestResultL(); |
998 |
|
999 RDebug::Print(_L("**************************************************************")); |
|
1000 RDebug::Print(_L("**** TI18N-FEPBASE-CIT-4001 Finished ")); |
|
1001 RDebug::Print(_L("**************************************************************\n")); |
|
1002 |
|
1003 RecordTestResultL(); |
977 } |
1004 } |
978 break; |
1005 break; |
979 |
1006 |
980 //---------------------------------------------------------------------------------------------- |
1007 //---------------------------------------------------------------------------------------------- |
981 |
1008 |
982 /** |
1009 /** |
983 @SYMTestCaseID UIF-FEPTEST-0012 |
1010 @SYMTestCaseID UIF-FEPTEST-0012 |
984 @SYMPREQ 0000 |
1011 @SYMPREQ 0000 |
985 @SYMTestCaseDesc Dismiss dialog. |
1012 @SYMTestCaseDesc Dismiss dialog. |
986 @SYMTestPriority High |
1013 @SYMTestPriority High |
987 @SYMTestStatus Implemented |
1014 @SYMTestStatus Implemented |
988 @SYMTestActions To test this functionality we simulate a key event to dismiss the dialog. |
1015 @SYMTestActions To test this functionality we simulate a key event to dismiss the dialog. |
989 When the dialog is closed, CTstTestTargetDialog::OkToExitL() is called and |
1016 When the dialog is closed, CTstTestTargetDialog::OkToExitL() is called and |
990 general variables are set with the values from the dialog text editors. |
1017 general variables are set with the values from the dialog text editors. |
991 @SYMTestExpectedResults All global variables read as expected. |
1018 @SYMTestExpectedResults All global variables read as expected. |
992 */ |
1019 */ |
993 |
1020 |
994 //---------------------------------------------------------------------------------------------- |
1021 //---------------------------------------------------------------------------------------------- |
996 case 501: |
1023 case 501: |
997 { |
1024 { |
998 SetTestStepID(_L("UIF-FEPTEST-0012")); |
1025 SetTestStepID(_L("UIF-FEPTEST-0012")); |
999 INFO_PRINTF1(_L("Ssimulate Key Enter Event to dismiss the dialog")); |
1026 INFO_PRINTF1(_L("Ssimulate Key Enter Event to dismiss the dialog")); |
1000 AutoTestManager().Cancel(); |
1027 AutoTestManager().Cancel(); |
1001 SendKey(EKeyEnter); |
1028 SendKey(EKeyEnter); |
1002 } |
1029 } |
1003 break; |
1030 break; |
1004 |
1031 |
1005 case 502: |
1032 case 502: |
1006 { |
1033 { |
1007 INFO_PRINTF1(_L("Wait for 2 seconds...")); |
1034 INFO_PRINTF1(_L("Wait for 2 seconds...")); |
1008 User::After(TTimeIntervalMicroSeconds32(2000000)); |
1035 User::After(TTimeIntervalMicroSeconds32(2000000)); |
1009 } |
1036 } |
1010 break; |
1037 break; |
1011 |
1038 |
1012 case 503: |
1039 case 503: |
1013 { |
1040 { |
|
1041 RDebug::Print(_L("**************************************************************")); |
|
1042 RDebug::Print(_L("**** Checking dialog values... ")); |
|
1043 RDebug::Print(_L("**************************************************************\n")); |
|
1044 |
1014 INFO_PRINTF1(_L("Checking dialog values...")); |
1045 INFO_PRINTF1(_L("Checking dialog values...")); |
1015 INFO_PRINTF3(_L("gTextNormalEdwin was '%S' (expected '%S')"), &gTextNormalEdwin, &KExpectedTextNormalEdwin); |
1046 INFO_PRINTF3(_L("gTextNormalEdwin was '%S' (expected '%S')"), &gTextNormalEdwin, &KExpectedTextNormalEdwin); |
1016 INFO_PRINTF3(_L("gTextNormalNumEdwin was '%S' (expected '%S')"), &gTextNormalNumEdwin, &KExpectedTextNormalNumEdwin); |
1047 INFO_PRINTF3(_L("gTextNormalNumEdwin was '%S' (expected '%S')"), &gTextNormalNumEdwin, &KExpectedTextNormalNumEdwin); |
1017 INFO_PRINTF3(_L("gTextKatakanaEdwin was '%S' (expected '%S')"), &gTextKatakanaEdwin, &KExpectedTextKatakanaEdwin); |
1048 INFO_PRINTF3(_L("gTextKatakanaEdwin was '%S' (expected '%S')"), &gTextKatakanaEdwin, &KExpectedTextKatakanaEdwin); |
1018 INFO_PRINTF3(_L("gTextPhoneticalEdwin was '%S' (expected '%S')"), &gTextPhoneticalEdwin, &KExpectedTextPhoneticalEdwin); |
1049 INFO_PRINTF3(_L("gTextPhoneticalEdwin was '%S' (expected '%S')"), &gTextPhoneticalEdwin, &KExpectedTextPhoneticalEdwin); |
1049 theKey->iCode = aCode; |
1080 theKey->iCode = aCode; |
1050 SendEventToWindowGroups(theEvent); |
1081 SendEventToWindowGroups(theEvent); |
1051 } |
1082 } |
1052 |
1083 |
1053 |
1084 |
1054 /** |
1085 /** |
1055 Handle the window events.\n |
1086 Handle the window events.\n |
1056 Create a window server session and connect the client\n |
1087 Create a window server session and connect the client\n |
1057 Create a client side handle for the server.\n |
1088 Create a client side handle for the server.\n |
1058 Set the window event type and call the SendEventToWindowGroup().\n |
1089 Set the window event type and call the SendEventToWindowGroup().\n |
1059 Close the session on completion \n |
1090 Close the session on completion \n |
1066 TInt theRes = ws.Connect(); |
1097 TInt theRes = ws.Connect(); |
1067 TEST(theRes == KErrNone); |
1098 TEST(theRes == KErrNone); |
1068 |
1099 |
1069 RWindowGroup& winGroup = iCoeEnv->RootWin(); |
1100 RWindowGroup& winGroup = iCoeEnv->RootWin(); |
1070 TInt theId = winGroup.Identifier(); |
1101 TInt theId = winGroup.Identifier(); |
1071 |
1102 |
1072 aEvent.SetType(EEventKeyDown); |
1103 aEvent.SetType(EEventKeyDown); |
1073 aEvent.SetTimeNow(); |
1104 aEvent.SetTimeNow(); |
1074 ws.SendEventToWindowGroup(theId, aEvent); |
1105 ws.SendEventToWindowGroup(theId, aEvent); |
1075 |
1106 |
1076 aEvent.SetType(EEventKey); |
1107 aEvent.SetType(EEventKey); |
1077 aEvent.SetTimeNow(); |
1108 aEvent.SetTimeNow(); |
1078 ws.SendEventToWindowGroup(theId, aEvent); |
1109 ws.SendEventToWindowGroup(theId, aEvent); |
1079 |
1110 |
1080 aEvent.SetType(EEventKeyUp); |
1111 aEvent.SetType(EEventKeyUp); |
1081 aEvent.SetTimeNow(); |
1112 aEvent.SetTimeNow(); |
1082 ws.SendEventToWindowGroup(theId, aEvent); |
1113 ws.SendEventToWindowGroup(theId, aEvent); |
1083 |
1114 |
1084 ws.Close(); |
1115 ws.Close(); |
1085 } |
1116 } |
1086 |
1117 |
1087 /** |
1118 /** |
1088 Handle the user defined events.\n |
1119 Handle the user defined events.\n |
1089 Search for the resource file that support the language.\n |
1120 Search for the resource file that support the language.\n |
1090 Adds the specified resource file to the list maintained by CCoeEnv. \n |
1121 Adds the specified resource file to the list maintained by CCoeEnv. \n |
1091 */ |
1122 */ |
1093 { |
1124 { |
1094 if(aEvent.Type() == (EEventUser + 1)) |
1125 if(aEvent.Type() == (EEventUser + 1)) |
1095 { |
1126 { |
1096 CCoeEnv& coneEnvironment=*CCoeEnv::Static(); |
1127 CCoeEnv& coneEnvironment=*CCoeEnv::Static(); |
1097 TFileName* resourceFileName=new(ELeave) TFileName(KFep1TestTargetResourceFilePath); |
1128 TFileName* resourceFileName=new(ELeave) TFileName(KFep1TestTargetResourceFilePath); |
1098 |
1129 |
1099 TBuf8<128> buf; |
1130 TBuf8<128> buf; |
1100 buf.Copy(*resourceFileName); |
1131 buf.Copy(*resourceFileName); |
1101 |
1132 |
1102 CleanupStack::PushL(resourceFileName); |
1133 CleanupStack::PushL(resourceFileName); |
1103 BaflUtils::NearestLanguageFile(coneEnvironment.FsSession(), *resourceFileName); |
1134 BaflUtils::NearestLanguageFile(coneEnvironment.FsSession(), *resourceFileName); |
1104 TTstResourceFileId resourceFileId(coneEnvironment, coneEnvironment.AddResourceFileL(*resourceFileName)); |
1135 TTstResourceFileId resourceFileId(coneEnvironment, coneEnvironment.AddResourceFileL(*resourceFileName)); |
1105 CleanupStack::PopAndDestroy(resourceFileName); |
1136 CleanupStack::PopAndDestroy(resourceFileName); |
1106 CleanupStack::PushL(resourceFileId); |
1137 CleanupStack::PushL(resourceFileId); |
1108 |
1139 |
1109 AutoTestManager().StartAutoTest(); |
1140 AutoTestManager().StartAutoTest(); |
1110 dlg->ExecuteLD(R_TFT_DIALOG); |
1141 dlg->ExecuteLD(R_TFT_DIALOG); |
1111 CleanupStack::PopAndDestroy(&resourceFileId); |
1142 CleanupStack::PopAndDestroy(&resourceFileId); |
1112 } |
1143 } |
1113 else |
1144 else |
1114 { |
1145 { |
1115 CTestAppUi::HandleApplicationSpecificEventL(aType, aEvent); |
1146 CTestAppUi::HandleApplicationSpecificEventL(aType, aEvent); |
1116 } |
1147 } |
1117 } |
1148 } |
1118 |
1149 |
1119 |
1150 |
1120 /************************************************************* |
1151 /************************************************************* |
1121 ** |
1152 ** |
1122 ** CTestFep1TargetStep |
1153 ** CTestFep1TargetStep |
1123 ** |
1154 ** |
1124 *************************************************************/ |
1155 *************************************************************/ |
1125 |
1156 |
1126 CTestFep1TargetStep::CTestFep1TargetStep() |
1157 CTestFep1TargetStep::CTestFep1TargetStep() |
1127 { |
1158 { |
1128 SetTestStepName(KFep1TestTargetStep); |
1159 SetTestStepName(KFep1TestTargetStep); |
1131 CTestFep1TargetStep::~CTestFep1TargetStep() |
1162 CTestFep1TargetStep::~CTestFep1TargetStep() |
1132 { |
1163 { |
1133 } |
1164 } |
1134 |
1165 |
1135 |
1166 |
1136 /** |
1167 /** |
1137 Call ConstructL() of CEikonEnv and initialize a pointer to CFep1TestTargetUi \n |
1168 Call ConstructL() of CEikonEnv and initialize a pointer to CFep1TestTargetUi \n |
1138 Set the application's user interface object \n |
1169 Set the application's user interface object \n |
1139 Call ConstructL() of CFep1TestTargetUi |
1170 Call ConstructL() of CFep1TestTargetUi |
1140 */ |
1171 */ |
1141 void CTestFep1TargetStep::ConstructAppL(CEikonEnv* aCoe) |
1172 void CTestFep1TargetStep::ConstructAppL(CEikonEnv* aCoe) |
1142 { // runs inside a TRAP harness |
1173 { // runs inside a TRAP harness |
1143 aCoe->ConstructL(); |
1174 aCoe->ConstructL(); |
1144 CTestAppUi* appUi= new (ELeave) CFep1TestTargetUi(this); |
1175 CTestAppUi* appUi= new (ELeave) CFep1TestTargetUi(this); |