38 #include "TFEP1TESTTARGET.hrh" |
38 #include "TFEP1TESTTARGET.hrh" |
39 |
39 |
40 |
40 |
41 |
41 |
42 const TUid KUidTFep1 = { 0x102024D0 }; |
42 const TUid KUidTFep1 = { 0x102024D0 }; |
43 const TUid KUidTFep4 = { 0x1028716D }; |
|
44 |
43 |
45 // String literal to represent the language-specific resource file path. |
44 // String literal to represent the language-specific resource file path. |
46 _LIT(KFep1TestTargetResourceFilePath, "z:\\system\\test\\fepbasetest\\tfep1testtarget.r01"); |
45 _LIT(KFep1TestTargetResourceFilePath, "z:\\system\\test\\fepbasetest\\tfep1testtarget.r01"); |
47 |
46 |
48 // global variables |
47 // global variables |
49 TBuf<16> gTextNormalEdwin; |
48 TBuf<16> gTextNormalEdwin; |
50 TBuf<16> gTextNormalNumEdwin; |
49 TBuf<16> gTextNormalNumEdwin; |
51 TBuf<16> gTextKatakanaEdwin; |
50 TBuf<16> gTextKatakanaEdwin; |
52 TBuf<32> gTextPhoneticalEdwin; |
51 TBuf<32> gTextPhoneticalEdwin; |
53 TBuf<32> gTextCJKEdwin; |
|
54 |
52 |
55 // expected results (according to FEP1 settings and the actions performed in the CFep1TestTargetUi::RunTestStepL method below) |
53 // expected results (according to FEP1 settings and the actions performed in the CFep1TestTargetUi::RunTestStepL method below) |
56 _LIT(KExpectedTextNormalEdwin, "ABCGHIJKLMQRST@"); |
54 _LIT(KExpectedTextNormalEdwin, "ABCGHIJKLMQRST@"); |
57 _LIT(KExpectedTextNormalNumEdwin, "1230056"); |
55 _LIT(KExpectedTextNormalNumEdwin, "1230056"); |
58 _LIT(KExpectedTextKatakanaEdwin, "EFG"); |
56 _LIT(KExpectedTextKatakanaEdwin, "EFG"); |
59 _LIT(KExpectedTextPhoneticalEdwin, "JulietteKiloLimaMNO"); |
57 _LIT(KExpectedTextPhoneticalEdwin, "JulietteKiloLimaMNO"); |
60 _LIT(KExpectedTextCJKEdwin, "!\x0411\x0E02\x2E81\x303A\x4E19\xAD00\xD840\xDC00\xD87E\xDC00 !\"#"); |
|
61 |
58 |
62 |
59 |
63 /************************************************************* |
60 /************************************************************* |
64 ** |
61 ** |
65 ** TTstResourceFileId - TCleanupItem derived class |
62 ** TTstResourceFileId - TCleanupItem derived class |
66 ** |
63 ** |
67 *************************************************************/ |
64 *************************************************************/ |
68 /* |
65 /* |
69 Encapsulates the clean up operations. The class unloads the resource file from the list maintained by CCoeEnv |
66 Encapsulates the clean up operations. The class unloads the resource file from the list maintained by CCoeEnv |
70 */ |
67 */ |
71 TTstResourceFileId::TTstResourceFileId(CCoeEnv& aConeEnvironment, TInt aResourceFileId) |
68 TTstResourceFileId::TTstResourceFileId(CCoeEnv& aConeEnvironment, TInt aResourceFileId) |
72 :TCleanupItem(UnloadResourceFile, this), |
69 :TCleanupItem(UnloadResourceFile, this), |
73 iConeEnvironment(aConeEnvironment), |
70 iConeEnvironment(aConeEnvironment), |
74 iResourceFileId(aResourceFileId) |
71 iResourceFileId(aResourceFileId) |
101 inputCapabilities.SetCapabilities(TCoeInputCapabilities::EJapaneseKatakanaHalfWidth|TCoeInputCapabilities::ENavigation); |
98 inputCapabilities.SetCapabilities(TCoeInputCapabilities::EJapaneseKatakanaHalfWidth|TCoeInputCapabilities::ENavigation); |
102 halfWidthKatakanaEdwin.SetInputCapabilitiesL(inputCapabilities); |
99 halfWidthKatakanaEdwin.SetInputCapabilitiesL(inputCapabilities); |
103 CEikEdwin& phoneticAlphabetEdwin=*static_cast<CEikEdwin*>(Control(EControlIdPhoneticAlphabetEdwin)); |
100 CEikEdwin& phoneticAlphabetEdwin=*static_cast<CEikEdwin*>(Control(EControlIdPhoneticAlphabetEdwin)); |
104 inputCapabilities=phoneticAlphabetEdwin.InputCapabilities(); |
101 inputCapabilities=phoneticAlphabetEdwin.InputCapabilities(); |
105 phoneticAlphabetEdwin.SetInputCapabilitiesL(TCoeInputCapabilities(TCoeInputCapabilities::EWesternAlphabetic|TCoeInputCapabilities::ENavigation, inputCapabilities.FepAwareTextEditor(), inputCapabilities.CaptionRetrieverForFep(), TUid::Uid(KTfep1Uid), this)); |
102 phoneticAlphabetEdwin.SetInputCapabilitiesL(TCoeInputCapabilities(TCoeInputCapabilities::EWesternAlphabetic|TCoeInputCapabilities::ENavigation, inputCapabilities.FepAwareTextEditor(), inputCapabilities.CaptionRetrieverForFep(), TUid::Uid(KTfep1Uid), this)); |
106 CEikEdwin& cjkEdwin=*static_cast<CEikEdwin*>(Control(EControlIdCJKEdwin)); |
|
107 inputCapabilities=cjkEdwin.InputCapabilities(); |
|
108 inputCapabilities.SetCapabilities(TCoeInputCapabilities::EAllText|TCoeInputCapabilities::ENavigation); |
|
109 cjkEdwin.SetInputCapabilitiesL(inputCapabilities); |
|
110 } |
103 } |
111 |
104 |
112 |
105 |
113 TBool CTstTestTargetDialog::OkToExitL(TInt /*aKeyCode*/) |
106 TBool CTstTestTargetDialog::OkToExitL(TInt /*aKeyCode*/) |
114 { |
107 { |
115 RDebug::Print(_L("**************************************************************")); |
108 RDebug::Print(_L("**************************************************************")); |
116 RDebug::Print(_L("**** OK or CANCEL key pressed ")); |
109 RDebug::Print(_L("**** OK or CANCEL key pressed ")); |
117 RDebug::Print(_L("**************************************************************\n")); |
110 RDebug::Print(_L("**************************************************************\n")); |
118 |
111 |
119 // Get fields text values... |
112 // Get fields text values... |
120 CEikEdwin* edwinNormal = static_cast<CEikEdwin*>(Control(EControlIdNormalEdwin)); |
113 CEikEdwin* edwinNormal = static_cast<CEikEdwin*>(Control(EControlIdNormalEdwin)); |
121 edwinNormal->GetText(gTextNormalEdwin); |
114 edwinNormal->GetText(gTextNormalEdwin); |
122 |
115 |
123 CEikEdwin* edwinNormalNum = static_cast<CEikEdwin*>(Control(EControlIdNormalNumEdwin)); |
116 CEikEdwin* edwinNormalNum = static_cast<CEikEdwin*>(Control(EControlIdNormalNumEdwin)); |
228 TUint code = 'A' + aStep - 1; |
218 TUint code = 'A' + aStep - 1; |
229 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
219 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
230 SendKey(code); |
220 SendKey(code); |
231 } |
221 } |
232 break; |
222 break; |
233 |
223 |
234 case 4: |
224 case 4: |
235 { |
225 { |
236 INFO_PRINTF1(_L("...simulate Key Event Enter ---> Submits 'ABC'")); |
226 INFO_PRINTF1(_L("...simulate Key Event Enter ---> Submits 'ABC'")); |
237 SendKey(EKeyEnter); |
227 SendKey(EKeyEnter); |
238 } |
228 } |
239 break; |
229 break; |
240 |
230 |
241 case 5: case 6: case 7: |
231 case 5: case 6: case 7: |
242 { |
232 { |
243 TUint code = 'D' + aStep - 5; |
233 TUint code = 'D' + aStep - 5; |
244 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
234 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
245 SendKey(code); |
235 SendKey(code); |
246 } |
236 } |
247 break; |
237 break; |
248 |
238 |
249 case 8: |
239 case 8: |
250 { |
240 { |
251 INFO_PRINTF1(_L("...simulate Key Event Escape ---> Cancels 'DEF'")); |
241 INFO_PRINTF1(_L("...simulate Key Event Escape ---> Cancels 'DEF'")); |
252 SendKey(EKeyEscape); |
242 SendKey(EKeyEscape); |
253 } |
243 } |
254 break; |
244 break; |
255 |
245 |
256 case 9: case 10: case 11: |
246 case 9: case 10: case 11: |
257 { |
247 { |
258 TUint code = 'H' + aStep - 9; |
248 TUint code = 'H' + aStep - 9; |
259 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
249 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
260 SendKey(code); |
250 SendKey(code); |
261 } |
251 } |
262 break; |
252 break; |
263 |
253 |
264 case 12: case 13: case 14: case 15: case 16: |
254 case 12: case 13: case 14: case 15: case 16: |
265 { |
255 { |
266 INFO_PRINTF1(_L("...simulate Key Cursor Left ---> Go left 5 positions (should not go further than the previous 'H' however")); |
256 INFO_PRINTF1(_L("...simulate Key Cursor Left ---> Go left 5 positions (should not go further than the previous 'H' however")); |
267 SendKey(EKeyLeftArrow); |
257 SendKey(EKeyLeftArrow); |
268 } |
258 } |
269 break; |
259 break; |
270 |
260 |
271 case 17: |
261 case 17: |
272 { |
262 { |
312 |
302 |
313 case 51: |
303 case 51: |
314 { |
304 { |
315 SetTestStepID(_L("UIF-FEPTEST-0005")); |
305 SetTestStepID(_L("UIF-FEPTEST-0005")); |
316 INFO_PRINTF1(_L("...simulate Key Event 'Shift + I' ---> Changes fep mode!")); |
306 INFO_PRINTF1(_L("...simulate Key Event 'Shift + I' ---> Changes fep mode!")); |
317 SendKey('I', EModifierRightShift); |
307 SendKey('I', EModifierRightShift); |
318 } |
308 } |
319 break; |
309 break; |
320 |
310 |
321 case 52: case 53: case 54: |
311 case 52: case 53: case 54: |
322 { |
312 { |
323 TUint code = 'K' + aStep - 52; |
313 TUint code = 'K' + aStep - 52; |
324 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
314 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
325 SendKey(code); |
315 SendKey(code); |
326 } |
316 } |
327 break; |
317 break; |
328 |
318 |
329 case 55: |
319 case 55: |
330 { |
320 { |
331 INFO_PRINTF1(_L("...simulate Key Event Enter ---> Submits 'KLM'")); // Submit "KLM" ----> We should have "ABCGHIJKLM" |
321 INFO_PRINTF1(_L("...simulate Key Event Enter ---> Submits 'KLM'")); // Submit "KLM" ----> We should have "ABCGHIJKLM" |
332 SendKey(EKeyEnter); |
322 SendKey(EKeyEnter); |
333 } |
323 } |
334 break; |
324 break; |
335 |
325 |
336 case 56: case 57: case 58: |
326 case 56: case 57: case 58: |
337 { |
327 { |
338 TUint code = 'N' + aStep - 56; |
328 TUint code = 'N' + aStep - 56; |
339 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
329 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
340 SendKey(code); |
330 SendKey(code); |
341 } |
331 } |
342 break; |
332 break; |
343 |
333 |
344 case 59: |
334 case 59: |
345 { |
335 { |
346 INFO_PRINTF1(_L("...simulate Key Event Escape ---> Cancels 'NOP'")); |
336 INFO_PRINTF1(_L("...simulate Key Event Escape ---> Cancels 'NOP'")); |
347 SendKey(EKeyEscape); |
337 SendKey(EKeyEscape); |
348 } |
338 } |
349 break; |
339 break; |
350 |
340 |
351 case 60: case 61: case 62: |
341 case 60: case 61: case 62: |
352 { |
342 { |
353 TUint code = 'R' + aStep - 60; |
343 TUint code = 'R' + aStep - 60; |
354 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
344 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
355 SendKey(code); |
345 SendKey(code); |
356 } |
346 } |
357 break; |
347 break; |
358 |
348 |
359 case 63: case 64: case 65: case 66: case 67: |
349 case 63: case 64: case 65: case 66: case 67: |
360 { |
350 { |
361 INFO_PRINTF1(_L("...simulate Key Cursor Left ---> Go left 5 positions (should not go further than the previous 'R' however")); |
351 INFO_PRINTF1(_L("...simulate Key Cursor Left ---> Go left 5 positions (should not go further than the previous 'R' however")); |
362 SendKey(EKeyLeftArrow); |
352 SendKey(EKeyLeftArrow); |
363 } |
353 } |
364 break; |
354 break; |
365 |
355 |
366 case 68: |
356 case 68: |
367 { |
357 { |
680 |
672 |
681 /** |
673 /** |
682 @SYMTestCaseID UIF-FEPTEST-0009 |
674 @SYMTestCaseID UIF-FEPTEST-0009 |
683 @SYMPREQ 0000 |
675 @SYMPREQ 0000 |
684 @SYMTestCaseDesc Fep state within a dialog box editor. |
676 @SYMTestCaseDesc Fep state within a dialog box editor. |
685 @SYMTestPriority High |
677 @SYMTestPriority High |
686 @SYMTestStatus Implemented |
678 @SYMTestStatus Implemented |
687 @SYMTestActions To test this functionality we simulate a key event to go to change the state |
679 @SYMTestActions To test this functionality we simulate a key event to go to change the state |
688 variable (in TFEP1 case it's just a counter), repeating the same event few times. |
680 variable (in TFEP1 case it's just a counter), repeating the same event few times. |
689 he next dialog. |
681 he next dialog. |
690 Move to the next text editor box and go back to the previous one. State is maintained |
682 Move to the next text editor box and go back to the previous one. State is maintained |
691 @SYMTestExpectedResults The state is maintained even though we move across to other text editor boxes (partly manual) |
683 @SYMTestExpectedResults The state is maintained even though we move across to other text editor boxes (partly manual) |
692 */ |
684 */ |
693 |
685 |
694 //---------------------------------------------------------------------------------------------- |
686 //---------------------------------------------------------------------------------------------- |
695 case 251: |
687 case 251: |
696 SetTestStepID(_L("UIF-FEPTEST-0009")); |
688 SetTestStepID(_L("UIF-FEPTEST-0009")); |
697 |
689 |
698 case 252: case 253: case 254: case 255: |
690 case 252: case 253: case 254: case 255: |
699 { |
691 { |
700 INFO_PRINTF1(_L("...simulate Key Event 'Shift + T' ---> Changes State variable!")); |
692 INFO_PRINTF1(_L("...simulate Key Event 'Shift + T' ---> Changes State variable!")); |
701 SendKey('T', EModifierRightShift); |
693 SendKey('T', EModifierRightShift); |
702 } |
694 } |
703 break; |
695 break; |
704 |
696 |
705 case 256: |
697 case 256: |
706 { |
698 { |
707 INFO_PRINTF1(_L("Send cursor up events to move the next dialog")); |
699 INFO_PRINTF1(_L("Send cursor up events to move the next dialog")); |
708 SendKey(EKeyUpArrow); |
700 SendKey(EKeyUpArrow); |
709 } |
701 } |
710 break; |
702 break; |
711 |
703 |
712 case 257: |
704 case 257: |
713 { |
705 { |
714 INFO_PRINTF1(_L("Send cursor down events to move the next dialog")); |
706 INFO_PRINTF1(_L("Send cursor down events to move the next dialog")); |
715 SendKey(EKeyDownArrow); |
707 SendKey(EKeyDownArrow); |
716 } |
708 } |
717 break; |
709 break; |
718 |
710 |
719 case 258: case 259: case 260: case 261: case 262: |
711 case 258: case 259: case 260: case 261: case 262: |
720 { |
712 { |
721 INFO_PRINTF1(_L("...simulate Key Event 'Shift + T' ---> Changes State variable!")); |
713 INFO_PRINTF1(_L("...simulate Key Event 'Shift + T' ---> Changes State variable!")); |
722 SendKey('T', EModifierRightShift); |
714 SendKey('T', EModifierRightShift); |
723 if(aStep == 262) |
715 if(aStep == 262) |
724 { |
716 { |
725 RDebug::Print(_L("**************************************************************")); |
717 RDebug::Print(_L("**************************************************************")); |
726 RDebug::Print(_L("**** UIF-FEPTEST-0009 Finished ")); |
718 RDebug::Print(_L("**** UIF-FEPTEST-0009 Finished ")); |
727 RDebug::Print(_L("**************************************************************\n")); |
719 RDebug::Print(_L("**************************************************************\n")); |
736 |
728 |
737 /** |
729 /** |
738 @SYMTestCaseID UIF-FEPTEST-0010 |
730 @SYMTestCaseID UIF-FEPTEST-0010 |
739 @SYMPREQ 0000 |
731 @SYMPREQ 0000 |
740 @SYMTestCaseDesc Kata-kata dialog box editor. |
732 @SYMTestCaseDesc Kata-kata dialog box editor. |
741 @SYMTestPriority High |
733 @SYMTestPriority High |
742 @SYMTestStatus Implemented |
734 @SYMTestStatus Implemented |
743 @SYMTestActions To test this functionality we simulate a key event to go to next dialog box |
735 @SYMTestActions To test this functionality we simulate a key event to go to next dialog box |
744 editor (Katakana dialog box). Simulate some characters and check that |
736 editor (Katakana dialog box). Simulate some characters and check that |
745 they appear on the box accordingly. |
737 they appear on the box accordingly. |
746 @SYMTestExpectedResults When the dialog is dismissed, the text box reads as is expected. |
738 @SYMTestExpectedResults When the dialog is dismissed, the text box reads as is expected. |
747 */ |
739 */ |
748 |
740 |
749 //---------------------------------------------------------------------------------------------- |
741 //---------------------------------------------------------------------------------------------- |
750 |
742 |
751 case 351: |
743 case 351: |
752 { |
744 { |
753 SetTestStepID(_L("UIF-FEPTEST-0010")); |
745 SetTestStepID(_L("UIF-FEPTEST-0010")); |
754 INFO_PRINTF1(_L("Send cursor down events to move the next dialog")); |
746 INFO_PRINTF1(_L("Send cursor down events to move the next dialog")); |
755 SendKey(EKeyDownArrow); |
747 SendKey(EKeyDownArrow); |
756 } |
748 } |
757 break; |
749 break; |
758 |
750 |
759 case 352: case 353: case 354: |
751 case 352: case 353: case 354: |
760 { |
752 { |
761 SetTestStepID(_L("UIF-FEPTEST-0010")); |
753 SetTestStepID(_L("UIF-FEPTEST-0010")); |
762 TUint code = 'E' + aStep - 352; |
754 TUint code = 'E' + aStep - 352; |
763 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
755 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
764 SendKey(code); |
756 SendKey(code); |
774 |
766 |
775 /** |
767 /** |
776 @SYMTestCaseID UIF-FEPTEST-0011 |
768 @SYMTestCaseID UIF-FEPTEST-0011 |
777 @SYMPREQ 0000 |
769 @SYMPREQ 0000 |
778 @SYMTestCaseDesc Phoneticall dialog box editor. |
770 @SYMTestCaseDesc Phoneticall dialog box editor. |
779 @SYMTestPriority High |
771 @SYMTestPriority High |
780 @SYMTestStatus Implemented |
772 @SYMTestStatus Implemented |
781 @SYMTestActions To test this functionality we simulate a key event to go to next dialog box |
773 @SYMTestActions To test this functionality we simulate a key event to go to next dialog box |
782 editor (Phoneticall dialog box). Simulate some characters and check that |
774 editor (Phoneticall dialog box). Simulate some characters and check that |
783 they appear on the box accordingly, i.e, converting single characters to those |
775 they appear on the box accordingly, i.e, converting single characters to those |
784 in the phoneticall alphabet (A-->Alpha, B-->Bravo...) |
776 in the phoneticall alphabet (A-->Alpha, B-->Bravo...) |
785 In addition, uninstall the Fep and write more characters, so they are not |
777 In addition, uninstall the Fep and write more characters, so they are not |
786 phonetically 'translated' by the Fep. |
778 phonetically 'translated' by the Fep. |
787 @SYMTestExpectedResults When the dialog is dismissed, the text box reads as is expected. |
779 @SYMTestExpectedResults When the dialog is dismissed, the text box reads as is expected. |
788 */ |
780 */ |
789 |
781 |
790 //---------------------------------------------------------------------------------------------- |
782 //---------------------------------------------------------------------------------------------- |
791 |
783 |
792 case 451: |
784 case 451: |
793 { |
785 { |
794 SetTestStepID(_L("UIF-FEPTEST-0011")); |
786 SetTestStepID(_L("UIF-FEPTEST-0011")); |
795 INFO_PRINTF1(_L("Send cursor down events to move the next dialog")); |
787 INFO_PRINTF1(_L("Send cursor down events to move the next dialog")); |
796 SendKey(EKeyDownArrow); |
788 SendKey(EKeyDownArrow); |
797 } |
789 } |
798 break; |
790 break; |
799 |
791 |
800 case 452: case 453: case 454: |
792 case 452: case 453: case 454: |
801 { |
793 { |
802 TUint code = 'J' + aStep - 452; |
794 TUint code = 'J' + aStep - 452; |
803 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
795 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
804 SendKey(code); |
796 SendKey(code); |
805 } |
797 } |
806 break; |
798 break; |
807 |
799 |
808 case 455: |
800 case 455: |
809 { |
801 { |
810 INFO_PRINTF1(_L("...simulate Key Event Enter ---> Submits 'JulietteKiloLima'")); |
802 INFO_PRINTF1(_L("...simulate Key Event Enter ---> Submits 'JulietteKiloLima'")); |
811 SendKey(EKeyEnter); |
803 SendKey(EKeyEnter); |
812 } |
804 } |
813 break; |
805 break; |
814 |
806 |
815 case 456: |
807 case 456: |
816 { |
808 { |
825 TUint code = 'M' + aStep - 457; |
817 TUint code = 'M' + aStep - 457; |
826 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
818 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
827 SendKey(code); |
819 SendKey(code); |
828 } |
820 } |
829 break; |
821 break; |
830 |
822 |
831 case 460: |
823 case 460: |
832 { |
824 { |
833 //INFO_PRINTF1(_L("...simulate Key Event Enter ---> Submits 'MNO' (not Fep installed --> No Alphabetical!")); |
825 INFO_PRINTF1(_L("...simulate Key Event Enter ---> Submits 'MNO' (not Fep installed --> No Alphabetical!")); |
834 //SendKey(EKeyEnter); |
826 SendKey(EKeyEnter); |
835 |
827 |
836 RDebug::Print(_L("**************************************************************")); |
828 RDebug::Print(_L("**************************************************************")); |
837 RDebug::Print(_L("**** UIF-FEPTEST-0011 Finished ")); |
829 RDebug::Print(_L("**** UIF-FEPTEST-0011 Finished ")); |
838 RDebug::Print(_L("**************************************************************\n")); |
830 RDebug::Print(_L("**************************************************************\n")); |
839 |
831 |
840 RecordTestResultL(); |
832 RecordTestResultL(); |
841 } |
833 } |
842 break; |
834 break; |
843 |
835 |
844 //---------------------------------------------------------------------------------------------- |
|
845 |
|
846 /** |
|
847 @SYMTestCaseID TI18N-FEPBASE-CIT-4001 |
|
848 @SYMPREQ 2471 |
|
849 @SYMTestCaseDesc Check FEPBASE Unicode 5.0 support. |
|
850 @SYMTestPriority High |
|
851 @SYMTestStatus Implemented |
|
852 @SYMTestActions 1. Pass BMP code points to WORD.exe |
|
853 2. Pass non-BMP code points to WORD.exe |
|
854 |
|
855 @SYMTestExpectedResults When the dialog is dismissed, the text box reads as is expected. |
|
856 */ |
|
857 |
|
858 //---------------------------------------------------------------------------------------------- |
|
859 |
|
860 case 461: |
|
861 { |
|
862 SetTestStepID(_L("TI18N-FEPBASE-CIT-4001")); |
|
863 INFO_PRINTF1(_L("Send cursor down events to move the next dialog")); |
|
864 SendKey(EKeyDownArrow); |
|
865 // FEP 1 is already tested in above test cases. |
|
866 // Now install test FEP 4 to test UTF-16 support. |
|
867 INFO_PRINTF1(_L("Install the FEP 4")); |
|
868 iCoeEnv->InstallFepL(KUidTFep4); |
|
869 User::After(TTimeIntervalMicroSeconds32(2000000)); |
|
870 } |
|
871 break; |
|
872 case 462: |
|
873 { |
|
874 INFO_PRINTF1(_L("...simulate Key Event 'Shift + M' ---> Changes to hex fep!")); |
|
875 SendKey('M', EModifierRightShift); |
|
876 TUint codes[] = {'0', '0', '0', '2', '1'}; // FEP 4 supports UTF-16, and need 5 digits for one Unicode value |
|
877 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
|
878 { |
|
879 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
|
880 SendKey(codes[i]); |
|
881 } |
|
882 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
|
883 SendKey(EKeyEnter); |
|
884 } |
|
885 break; |
|
886 case 463: |
|
887 { |
|
888 TUint codes[] = {'0', '0', '4', '1', '1'}; // FEP 4 supports UTF-16, and need 5 digit for one Unicode value |
|
889 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
|
890 { |
|
891 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
|
892 SendKey(codes[i]); |
|
893 } |
|
894 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
|
895 SendKey(EKeyEnter); |
|
896 } |
|
897 break; |
|
898 case 464: |
|
899 { |
|
900 TUint codes[] = {'0', '0', 'E', '0', '2'}; // FEP 4 supports UTF-16, and need 5 digit for one Unicode value |
|
901 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
|
902 { |
|
903 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
|
904 SendKey(codes[i]); |
|
905 } |
|
906 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
|
907 SendKey(EKeyEnter); |
|
908 } |
|
909 break; |
|
910 case 465: |
|
911 { |
|
912 TUint codes[] = {'0', '2', 'E', '8', '1'}; // FEP 4 supports UTF-16, and need 5 digit for one Unicode value |
|
913 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
|
914 { |
|
915 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
|
916 SendKey(codes[i]); |
|
917 } |
|
918 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
|
919 SendKey(EKeyEnter); |
|
920 } |
|
921 break; |
|
922 case 466: |
|
923 { |
|
924 TUint codes[] = {'0', '3', '0', '3', 'A'}; // FEP 4 supports UTF-16, and need 5 digit for one Unicode value |
|
925 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
|
926 { |
|
927 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
|
928 SendKey(codes[i]); |
|
929 } |
|
930 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
|
931 SendKey(EKeyEnter); |
|
932 } |
|
933 break; |
|
934 case 467: |
|
935 { |
|
936 TUint codes[] = {'0', '4', 'E', '1', '9'}; // FEP 4 supports UTF-16, and need 5 digit for one Unicode value |
|
937 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
|
938 { |
|
939 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
|
940 SendKey(codes[i]); |
|
941 } |
|
942 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
|
943 SendKey(EKeyEnter); |
|
944 } |
|
945 break; |
|
946 case 468: |
|
947 { |
|
948 TUint codes[] = {'0', 'A', 'D', '0', '0'}; // FEP 4 supports UTF-16, and need 5 digit for one Unicode value |
|
949 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
|
950 { |
|
951 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
|
952 SendKey(codes[i]); |
|
953 } |
|
954 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
|
955 SendKey(EKeyEnter); |
|
956 } |
|
957 break; |
|
958 case 469: |
|
959 { |
|
960 TUint codes[] = {'2', '0', '0', '0', '0'}; |
|
961 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
|
962 { |
|
963 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
|
964 SendKey(codes[i]); |
|
965 } |
|
966 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
|
967 SendKey(EKeyEnter); |
|
968 } |
|
969 break; |
|
970 case 470: |
|
971 { |
|
972 TUint codes[] = {'2', 'F', '8', '0', '0'}; |
|
973 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
|
974 { |
|
975 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
|
976 SendKey(codes[i]); |
|
977 } |
|
978 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
|
979 SendKey(EKeyEnter); |
|
980 } |
|
981 break; |
|
982 case 471: |
|
983 { |
|
984 INFO_PRINTF1(_L("...simulate Key Event 'Shift + X' ---> test SimulateKeyEventsL!")); |
|
985 SendKey('X', EModifierRightShift); |
|
986 User::After(TTimeIntervalMicroSeconds32(2000000)); |
|
987 INFO_PRINTF1(_L("...simulate Key Event 'Shift + M' ---> Changes to Pinyin!")); |
|
988 SendKey('M', EModifierRightShift); |
|
989 User::After(TTimeIntervalMicroSeconds32(2000000)); |
|
990 } |
|
991 break; |
|
992 case 472: |
|
993 { |
|
994 INFO_PRINTF1(_L("Uninstall the FEP 4")); |
|
995 iCoeEnv->InstallFepL(KNullUid); |
|
996 User::After(TTimeIntervalMicroSeconds32(2000000)); |
|
997 SendKey(EKeyEnter); |
|
998 |
|
999 RDebug::Print(_L("**************************************************************")); |
|
1000 RDebug::Print(_L("**** TI18N-FEPBASE-CIT-4001 Finished ")); |
|
1001 RDebug::Print(_L("**************************************************************\n")); |
|
1002 |
|
1003 RecordTestResultL(); |
|
1004 } |
|
1005 break; |
|
1006 |
836 |
1007 //---------------------------------------------------------------------------------------------- |
837 //---------------------------------------------------------------------------------------------- |
1008 |
838 |
1009 /** |
839 /** |
1010 @SYMTestCaseID UIF-FEPTEST-0012 |
840 @SYMTestCaseID UIF-FEPTEST-0012 |
1011 @SYMPREQ 0000 |
841 @SYMPREQ 0000 |
1012 @SYMTestCaseDesc Dismiss dialog. |
842 @SYMTestCaseDesc Dismiss dialog. |
1013 @SYMTestPriority High |
843 @SYMTestPriority High |
1014 @SYMTestStatus Implemented |
844 @SYMTestStatus Implemented |
1015 @SYMTestActions To test this functionality we simulate a key event to dismiss the dialog. |
845 @SYMTestActions To test this functionality we simulate a key event to dismiss the dialog. |
1016 When the dialog is closed, CTstTestTargetDialog::OkToExitL() is called and |
846 When the dialog is closed, CTstTestTargetDialog::OkToExitL() is called and |
1017 general variables are set with the values from the dialog text editors. |
847 general variables are set with the values from the dialog text editors. |
1018 @SYMTestExpectedResults All global variables read as expected. |
848 @SYMTestExpectedResults All global variables read as expected. |
1019 */ |
849 */ |
1020 |
850 |
1021 //---------------------------------------------------------------------------------------------- |
851 //---------------------------------------------------------------------------------------------- |
1045 INFO_PRINTF1(_L("Checking dialog values...")); |
875 INFO_PRINTF1(_L("Checking dialog values...")); |
1046 INFO_PRINTF3(_L("gTextNormalEdwin was '%S' (expected '%S')"), &gTextNormalEdwin, &KExpectedTextNormalEdwin); |
876 INFO_PRINTF3(_L("gTextNormalEdwin was '%S' (expected '%S')"), &gTextNormalEdwin, &KExpectedTextNormalEdwin); |
1047 INFO_PRINTF3(_L("gTextNormalNumEdwin was '%S' (expected '%S')"), &gTextNormalNumEdwin, &KExpectedTextNormalNumEdwin); |
877 INFO_PRINTF3(_L("gTextNormalNumEdwin was '%S' (expected '%S')"), &gTextNormalNumEdwin, &KExpectedTextNormalNumEdwin); |
1048 INFO_PRINTF3(_L("gTextKatakanaEdwin was '%S' (expected '%S')"), &gTextKatakanaEdwin, &KExpectedTextKatakanaEdwin); |
878 INFO_PRINTF3(_L("gTextKatakanaEdwin was '%S' (expected '%S')"), &gTextKatakanaEdwin, &KExpectedTextKatakanaEdwin); |
1049 INFO_PRINTF3(_L("gTextPhoneticalEdwin was '%S' (expected '%S')"), &gTextPhoneticalEdwin, &KExpectedTextPhoneticalEdwin); |
879 INFO_PRINTF3(_L("gTextPhoneticalEdwin was '%S' (expected '%S')"), &gTextPhoneticalEdwin, &KExpectedTextPhoneticalEdwin); |
1050 INFO_PRINTF3(_L("gTextCJKEdwin was '%S' (expected '%S')"), &gTextCJKEdwin, &KExpectedTextCJKEdwin); |
|
1051 |
880 |
1052 TEST(gTextNormalEdwin == KExpectedTextNormalEdwin); |
881 TEST(gTextNormalEdwin == KExpectedTextNormalEdwin); |
1053 TEST(gTextNormalNumEdwin == KExpectedTextNormalNumEdwin); |
882 TEST(gTextNormalNumEdwin == KExpectedTextNormalNumEdwin); |
1054 TEST(gTextKatakanaEdwin == KExpectedTextKatakanaEdwin); |
883 TEST(gTextKatakanaEdwin == KExpectedTextKatakanaEdwin); |
1055 TEST(gTextPhoneticalEdwin == KExpectedTextPhoneticalEdwin); |
884 TEST(gTextPhoneticalEdwin == KExpectedTextPhoneticalEdwin); |
1056 TEST(gTextCJKEdwin == KExpectedTextCJKEdwin); |
|
1057 RecordTestResultL(); |
885 RecordTestResultL(); |
1058 CloseTMSGraphicsStep(); |
886 CloseTMSGraphicsStep(); |
1059 } |
887 } |
1060 break; |
888 break; |
1061 |
889 |
1080 theKey->iCode = aCode; |
908 theKey->iCode = aCode; |
1081 SendEventToWindowGroups(theEvent); |
909 SendEventToWindowGroups(theEvent); |
1082 } |
910 } |
1083 |
911 |
1084 |
912 |
1085 /** |
913 /** |
1086 Handle the window events.\n |
914 Handle the window events.\n |
1087 Create a window server session and connect the client\n |
915 Create a window server session and connect the client\n |
1088 Create a client side handle for the server.\n |
916 Create a client side handle for the server.\n |
1089 Set the window event type and call the SendEventToWindowGroup().\n |
917 Set the window event type and call the SendEventToWindowGroup().\n |
1090 Close the session on completion \n |
918 Close the session on completion \n |
1091 */ |
919 */ |
1092 void CFep1TestTargetUi::SendEventToWindowGroups(TWsEvent& aEvent) |
920 void CFep1TestTargetUi::SendEventToWindowGroups(TWsEvent& aEvent) |
1093 { |
921 { |
1094 User::After(100000); |
922 User::After(100000); |
1095 |
923 |
1096 RWsSession ws; |
924 RWsSession ws; |
1097 TInt theRes = ws.Connect(); |
925 TInt theRes = ws.Connect(); |
1098 TEST(theRes == KErrNone); |
926 TEST(theRes == KErrNone); |
1099 |
927 |
1100 RWindowGroup& winGroup = iCoeEnv->RootWin(); |
928 RWindowGroup& winGroup = iCoeEnv->RootWin(); |
1101 TInt theId = winGroup.Identifier(); |
929 TInt theId = winGroup.Identifier(); |
1102 |
930 |
1103 aEvent.SetType(EEventKeyDown); |
931 aEvent.SetType(EEventKeyDown); |
1104 aEvent.SetTimeNow(); |
932 aEvent.SetTimeNow(); |
1105 ws.SendEventToWindowGroup(theId, aEvent); |
933 ws.SendEventToWindowGroup(theId, aEvent); |
1106 |
934 |
1107 aEvent.SetType(EEventKey); |
935 aEvent.SetType(EEventKey); |
1108 aEvent.SetTimeNow(); |
936 aEvent.SetTimeNow(); |
1109 ws.SendEventToWindowGroup(theId, aEvent); |
937 ws.SendEventToWindowGroup(theId, aEvent); |
1110 |
938 |
1111 aEvent.SetType(EEventKeyUp); |
939 aEvent.SetType(EEventKeyUp); |
1112 aEvent.SetTimeNow(); |
940 aEvent.SetTimeNow(); |
1113 ws.SendEventToWindowGroup(theId, aEvent); |
941 ws.SendEventToWindowGroup(theId, aEvent); |
1114 |
942 |
1115 ws.Close(); |
943 ws.Close(); |
1116 } |
944 } |
1117 |
945 |
1118 /** |
946 /** |
1119 Handle the user defined events.\n |
947 Handle the user defined events.\n |
1120 Search for the resource file that support the language.\n |
948 Search for the resource file that support the language.\n |
1121 Adds the specified resource file to the list maintained by CCoeEnv. \n |
949 Adds the specified resource file to the list maintained by CCoeEnv. \n |
1122 */ |
950 */ |