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 }; |
43 |
44 |
44 // String literal to represent the language-specific resource file path. |
45 // String literal to represent the language-specific resource file path. |
45 _LIT(KFep1TestTargetResourceFilePath, "z:\\system\\test\\fepbasetest\\tfep1testtarget.r01"); |
46 _LIT(KFep1TestTargetResourceFilePath, "z:\\system\\test\\fepbasetest\\tfep1testtarget.r01"); |
46 |
47 |
47 // global variables |
48 // global variables |
48 TBuf<16> gTextNormalEdwin; |
49 TBuf<16> gTextNormalEdwin; |
49 TBuf<16> gTextNormalNumEdwin; |
50 TBuf<16> gTextNormalNumEdwin; |
50 TBuf<16> gTextKatakanaEdwin; |
51 TBuf<16> gTextKatakanaEdwin; |
51 TBuf<32> gTextPhoneticalEdwin; |
52 TBuf<32> gTextPhoneticalEdwin; |
|
53 TBuf<32> gTextCJKEdwin; |
52 |
54 |
53 // expected results (according to FEP1 settings and the actions performed in the CFep1TestTargetUi::RunTestStepL method below) |
55 // expected results (according to FEP1 settings and the actions performed in the CFep1TestTargetUi::RunTestStepL method below) |
54 _LIT(KExpectedTextNormalEdwin, "ABCGHIJKLMQRST@"); |
56 _LIT(KExpectedTextNormalEdwin, "ABCGHIJKLMQRST@"); |
55 _LIT(KExpectedTextNormalNumEdwin, "1230056"); |
57 _LIT(KExpectedTextNormalNumEdwin, "1230056"); |
56 _LIT(KExpectedTextKatakanaEdwin, "EFG"); |
58 _LIT(KExpectedTextKatakanaEdwin, "EFG"); |
57 _LIT(KExpectedTextPhoneticalEdwin, "JulietteKiloLimaMNO"); |
59 _LIT(KExpectedTextPhoneticalEdwin, "JulietteKiloLimaMNO"); |
|
60 _LIT(KExpectedTextCJKEdwin, "!\x0411\x0E02\x2E81\x303A\x4E19\xAD00\xD840\xDC00\xD87E\xDC00 !\"#"); |
58 |
61 |
59 |
62 |
60 /************************************************************* |
63 /************************************************************* |
61 ** |
64 ** |
62 ** TTstResourceFileId - TCleanupItem derived class |
65 ** TTstResourceFileId - TCleanupItem derived class |
63 ** |
66 ** |
64 *************************************************************/ |
67 *************************************************************/ |
65 /* |
68 /* |
66 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 |
67 */ |
70 */ |
68 TTstResourceFileId::TTstResourceFileId(CCoeEnv& aConeEnvironment, TInt aResourceFileId) |
71 TTstResourceFileId::TTstResourceFileId(CCoeEnv& aConeEnvironment, TInt aResourceFileId) |
69 :TCleanupItem(UnloadResourceFile, this), |
72 :TCleanupItem(UnloadResourceFile, this), |
70 iConeEnvironment(aConeEnvironment), |
73 iConeEnvironment(aConeEnvironment), |
71 iResourceFileId(aResourceFileId) |
74 iResourceFileId(aResourceFileId) |
98 inputCapabilities.SetCapabilities(TCoeInputCapabilities::EJapaneseKatakanaHalfWidth|TCoeInputCapabilities::ENavigation); |
101 inputCapabilities.SetCapabilities(TCoeInputCapabilities::EJapaneseKatakanaHalfWidth|TCoeInputCapabilities::ENavigation); |
99 halfWidthKatakanaEdwin.SetInputCapabilitiesL(inputCapabilities); |
102 halfWidthKatakanaEdwin.SetInputCapabilitiesL(inputCapabilities); |
100 CEikEdwin& phoneticAlphabetEdwin=*static_cast<CEikEdwin*>(Control(EControlIdPhoneticAlphabetEdwin)); |
103 CEikEdwin& phoneticAlphabetEdwin=*static_cast<CEikEdwin*>(Control(EControlIdPhoneticAlphabetEdwin)); |
101 inputCapabilities=phoneticAlphabetEdwin.InputCapabilities(); |
104 inputCapabilities=phoneticAlphabetEdwin.InputCapabilities(); |
102 phoneticAlphabetEdwin.SetInputCapabilitiesL(TCoeInputCapabilities(TCoeInputCapabilities::EWesternAlphabetic|TCoeInputCapabilities::ENavigation, inputCapabilities.FepAwareTextEditor(), inputCapabilities.CaptionRetrieverForFep(), TUid::Uid(KTfep1Uid), this)); |
105 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); |
103 } |
110 } |
104 |
111 |
105 |
112 |
106 TBool CTstTestTargetDialog::OkToExitL(TInt /*aKeyCode*/) |
113 TBool CTstTestTargetDialog::OkToExitL(TInt /*aKeyCode*/) |
107 { |
114 { |
108 RDebug::Print(_L("**************************************************************")); |
115 RDebug::Print(_L("**************************************************************")); |
109 RDebug::Print(_L("**** OK or CANCEL key pressed ")); |
116 RDebug::Print(_L("**** OK or CANCEL key pressed ")); |
110 RDebug::Print(_L("**************************************************************\n")); |
117 RDebug::Print(_L("**************************************************************\n")); |
111 |
118 |
112 // Get fields text values... |
119 // Get fields text values... |
113 CEikEdwin* edwinNormal = static_cast<CEikEdwin*>(Control(EControlIdNormalEdwin)); |
120 CEikEdwin* edwinNormal = static_cast<CEikEdwin*>(Control(EControlIdNormalEdwin)); |
114 edwinNormal->GetText(gTextNormalEdwin); |
121 edwinNormal->GetText(gTextNormalEdwin); |
115 |
122 |
116 CEikEdwin* edwinNormalNum = static_cast<CEikEdwin*>(Control(EControlIdNormalNumEdwin)); |
123 CEikEdwin* edwinNormalNum = static_cast<CEikEdwin*>(Control(EControlIdNormalNumEdwin)); |
218 TUint code = 'A' + aStep - 1; |
228 TUint code = 'A' + aStep - 1; |
219 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
229 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
220 SendKey(code); |
230 SendKey(code); |
221 } |
231 } |
222 break; |
232 break; |
223 |
233 |
224 case 4: |
234 case 4: |
225 { |
235 { |
226 INFO_PRINTF1(_L("...simulate Key Event Enter ---> Submits 'ABC'")); |
236 INFO_PRINTF1(_L("...simulate Key Event Enter ---> Submits 'ABC'")); |
227 SendKey(EKeyEnter); |
237 SendKey(EKeyEnter); |
228 } |
238 } |
229 break; |
239 break; |
230 |
240 |
231 case 5: case 6: case 7: |
241 case 5: case 6: case 7: |
232 { |
242 { |
233 TUint code = 'D' + aStep - 5; |
243 TUint code = 'D' + aStep - 5; |
234 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
244 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
235 SendKey(code); |
245 SendKey(code); |
236 } |
246 } |
237 break; |
247 break; |
238 |
248 |
239 case 8: |
249 case 8: |
240 { |
250 { |
241 INFO_PRINTF1(_L("...simulate Key Event Escape ---> Cancels 'DEF'")); |
251 INFO_PRINTF1(_L("...simulate Key Event Escape ---> Cancels 'DEF'")); |
242 SendKey(EKeyEscape); |
252 SendKey(EKeyEscape); |
243 } |
253 } |
244 break; |
254 break; |
245 |
255 |
246 case 9: case 10: case 11: |
256 case 9: case 10: case 11: |
247 { |
257 { |
248 TUint code = 'H' + aStep - 9; |
258 TUint code = 'H' + aStep - 9; |
249 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
259 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
250 SendKey(code); |
260 SendKey(code); |
251 } |
261 } |
252 break; |
262 break; |
253 |
263 |
254 case 12: case 13: case 14: case 15: case 16: |
264 case 12: case 13: case 14: case 15: case 16: |
255 { |
265 { |
256 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")); |
257 SendKey(EKeyLeftArrow); |
267 SendKey(EKeyLeftArrow); |
258 } |
268 } |
259 break; |
269 break; |
260 |
270 |
261 case 17: |
271 case 17: |
262 { |
272 { |
302 |
312 |
303 case 51: |
313 case 51: |
304 { |
314 { |
305 SetTestStepID(_L("UIF-FEPTEST-0005")); |
315 SetTestStepID(_L("UIF-FEPTEST-0005")); |
306 INFO_PRINTF1(_L("...simulate Key Event 'Shift + I' ---> Changes fep mode!")); |
316 INFO_PRINTF1(_L("...simulate Key Event 'Shift + I' ---> Changes fep mode!")); |
307 SendKey('I', EModifierRightShift); |
317 SendKey('I', EModifierRightShift); |
308 } |
318 } |
309 break; |
319 break; |
310 |
320 |
311 case 52: case 53: case 54: |
321 case 52: case 53: case 54: |
312 { |
322 { |
313 TUint code = 'K' + aStep - 52; |
323 TUint code = 'K' + aStep - 52; |
314 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
324 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
315 SendKey(code); |
325 SendKey(code); |
316 } |
326 } |
317 break; |
327 break; |
318 |
328 |
319 case 55: |
329 case 55: |
320 { |
330 { |
321 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" |
322 SendKey(EKeyEnter); |
332 SendKey(EKeyEnter); |
323 } |
333 } |
324 break; |
334 break; |
325 |
335 |
326 case 56: case 57: case 58: |
336 case 56: case 57: case 58: |
327 { |
337 { |
328 TUint code = 'N' + aStep - 56; |
338 TUint code = 'N' + aStep - 56; |
329 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
339 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
330 SendKey(code); |
340 SendKey(code); |
331 } |
341 } |
332 break; |
342 break; |
333 |
343 |
334 case 59: |
344 case 59: |
335 { |
345 { |
336 INFO_PRINTF1(_L("...simulate Key Event Escape ---> Cancels 'NOP'")); |
346 INFO_PRINTF1(_L("...simulate Key Event Escape ---> Cancels 'NOP'")); |
337 SendKey(EKeyEscape); |
347 SendKey(EKeyEscape); |
338 } |
348 } |
339 break; |
349 break; |
340 |
350 |
341 case 60: case 61: case 62: |
351 case 60: case 61: case 62: |
342 { |
352 { |
343 TUint code = 'R' + aStep - 60; |
353 TUint code = 'R' + aStep - 60; |
344 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
354 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
345 SendKey(code); |
355 SendKey(code); |
346 } |
356 } |
347 break; |
357 break; |
348 |
358 |
349 case 63: case 64: case 65: case 66: case 67: |
359 case 63: case 64: case 65: case 66: case 67: |
350 { |
360 { |
351 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")); |
352 SendKey(EKeyLeftArrow); |
362 SendKey(EKeyLeftArrow); |
353 } |
363 } |
354 break; |
364 break; |
355 |
365 |
356 case 68: |
366 case 68: |
357 { |
367 { |
672 |
680 |
673 /** |
681 /** |
674 @SYMTestCaseID UIF-FEPTEST-0009 |
682 @SYMTestCaseID UIF-FEPTEST-0009 |
675 @SYMPREQ 0000 |
683 @SYMPREQ 0000 |
676 @SYMTestCaseDesc Fep state within a dialog box editor. |
684 @SYMTestCaseDesc Fep state within a dialog box editor. |
677 @SYMTestPriority High |
685 @SYMTestPriority High |
678 @SYMTestStatus Implemented |
686 @SYMTestStatus Implemented |
679 @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 |
680 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. |
681 he next dialog. |
689 he next dialog. |
682 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 |
683 @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) |
684 */ |
692 */ |
685 |
693 |
686 //---------------------------------------------------------------------------------------------- |
694 //---------------------------------------------------------------------------------------------- |
687 case 251: |
695 case 251: |
688 SetTestStepID(_L("UIF-FEPTEST-0009")); |
696 SetTestStepID(_L("UIF-FEPTEST-0009")); |
689 |
697 |
690 case 252: case 253: case 254: case 255: |
698 case 252: case 253: case 254: case 255: |
691 { |
699 { |
692 INFO_PRINTF1(_L("...simulate Key Event 'Shift + T' ---> Changes State variable!")); |
700 INFO_PRINTF1(_L("...simulate Key Event 'Shift + T' ---> Changes State variable!")); |
693 SendKey('T', EModifierRightShift); |
701 SendKey('T', EModifierRightShift); |
694 } |
702 } |
695 break; |
703 break; |
696 |
704 |
697 case 256: |
705 case 256: |
698 { |
706 { |
699 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")); |
700 SendKey(EKeyUpArrow); |
708 SendKey(EKeyUpArrow); |
701 } |
709 } |
702 break; |
710 break; |
703 |
711 |
704 case 257: |
712 case 257: |
705 { |
713 { |
706 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")); |
707 SendKey(EKeyDownArrow); |
715 SendKey(EKeyDownArrow); |
708 } |
716 } |
709 break; |
717 break; |
710 |
718 |
711 case 258: case 259: case 260: case 261: case 262: |
719 case 258: case 259: case 260: case 261: case 262: |
712 { |
720 { |
713 INFO_PRINTF1(_L("...simulate Key Event 'Shift + T' ---> Changes State variable!")); |
721 INFO_PRINTF1(_L("...simulate Key Event 'Shift + T' ---> Changes State variable!")); |
714 SendKey('T', EModifierRightShift); |
722 SendKey('T', EModifierRightShift); |
715 if(aStep == 262) |
723 if(aStep == 262) |
716 { |
724 { |
717 RDebug::Print(_L("**************************************************************")); |
725 RDebug::Print(_L("**************************************************************")); |
718 RDebug::Print(_L("**** UIF-FEPTEST-0009 Finished ")); |
726 RDebug::Print(_L("**** UIF-FEPTEST-0009 Finished ")); |
719 RDebug::Print(_L("**************************************************************\n")); |
727 RDebug::Print(_L("**************************************************************\n")); |
728 |
736 |
729 /** |
737 /** |
730 @SYMTestCaseID UIF-FEPTEST-0010 |
738 @SYMTestCaseID UIF-FEPTEST-0010 |
731 @SYMPREQ 0000 |
739 @SYMPREQ 0000 |
732 @SYMTestCaseDesc Kata-kata dialog box editor. |
740 @SYMTestCaseDesc Kata-kata dialog box editor. |
733 @SYMTestPriority High |
741 @SYMTestPriority High |
734 @SYMTestStatus Implemented |
742 @SYMTestStatus Implemented |
735 @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 |
736 editor (Katakana dialog box). Simulate some characters and check that |
744 editor (Katakana dialog box). Simulate some characters and check that |
737 they appear on the box accordingly. |
745 they appear on the box accordingly. |
738 @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. |
739 */ |
747 */ |
740 |
748 |
741 //---------------------------------------------------------------------------------------------- |
749 //---------------------------------------------------------------------------------------------- |
742 |
750 |
743 case 351: |
751 case 351: |
744 { |
752 { |
745 SetTestStepID(_L("UIF-FEPTEST-0010")); |
753 SetTestStepID(_L("UIF-FEPTEST-0010")); |
746 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")); |
747 SendKey(EKeyDownArrow); |
755 SendKey(EKeyDownArrow); |
748 } |
756 } |
749 break; |
757 break; |
750 |
758 |
751 case 352: case 353: case 354: |
759 case 352: case 353: case 354: |
752 { |
760 { |
753 SetTestStepID(_L("UIF-FEPTEST-0010")); |
761 SetTestStepID(_L("UIF-FEPTEST-0010")); |
754 TUint code = 'E' + aStep - 352; |
762 TUint code = 'E' + aStep - 352; |
755 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
763 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
756 SendKey(code); |
764 SendKey(code); |
766 |
774 |
767 /** |
775 /** |
768 @SYMTestCaseID UIF-FEPTEST-0011 |
776 @SYMTestCaseID UIF-FEPTEST-0011 |
769 @SYMPREQ 0000 |
777 @SYMPREQ 0000 |
770 @SYMTestCaseDesc Phoneticall dialog box editor. |
778 @SYMTestCaseDesc Phoneticall dialog box editor. |
771 @SYMTestPriority High |
779 @SYMTestPriority High |
772 @SYMTestStatus Implemented |
780 @SYMTestStatus Implemented |
773 @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 |
774 editor (Phoneticall dialog box). Simulate some characters and check that |
782 editor (Phoneticall dialog box). Simulate some characters and check that |
775 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 |
776 in the phoneticall alphabet (A-->Alpha, B-->Bravo...) |
784 in the phoneticall alphabet (A-->Alpha, B-->Bravo...) |
777 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 |
778 phonetically 'translated' by the Fep. |
786 phonetically 'translated' by the Fep. |
779 @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. |
780 */ |
788 */ |
781 |
789 |
782 //---------------------------------------------------------------------------------------------- |
790 //---------------------------------------------------------------------------------------------- |
783 |
791 |
784 case 451: |
792 case 451: |
785 { |
793 { |
786 SetTestStepID(_L("UIF-FEPTEST-0011")); |
794 SetTestStepID(_L("UIF-FEPTEST-0011")); |
787 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")); |
788 SendKey(EKeyDownArrow); |
796 SendKey(EKeyDownArrow); |
789 } |
797 } |
790 break; |
798 break; |
791 |
799 |
792 case 452: case 453: case 454: |
800 case 452: case 453: case 454: |
793 { |
801 { |
794 TUint code = 'J' + aStep - 452; |
802 TUint code = 'J' + aStep - 452; |
795 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
803 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
796 SendKey(code); |
804 SendKey(code); |
797 } |
805 } |
798 break; |
806 break; |
799 |
807 |
800 case 455: |
808 case 455: |
801 { |
809 { |
802 INFO_PRINTF1(_L("...simulate Key Event Enter ---> Submits 'JulietteKiloLima'")); |
810 INFO_PRINTF1(_L("...simulate Key Event Enter ---> Submits 'JulietteKiloLima'")); |
803 SendKey(EKeyEnter); |
811 SendKey(EKeyEnter); |
804 } |
812 } |
805 break; |
813 break; |
806 |
814 |
807 case 456: |
815 case 456: |
808 { |
816 { |
817 TUint code = 'M' + aStep - 457; |
825 TUint code = 'M' + aStep - 457; |
818 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
826 INFO_PRINTF2(_L("...simulate Key Event '%d'"), code); |
819 SendKey(code); |
827 SendKey(code); |
820 } |
828 } |
821 break; |
829 break; |
822 |
830 |
823 case 460: |
831 case 460: |
824 { |
832 { |
825 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!")); |
826 SendKey(EKeyEnter); |
834 //SendKey(EKeyEnter); |
827 |
835 |
828 RDebug::Print(_L("**************************************************************")); |
836 RDebug::Print(_L("**************************************************************")); |
829 RDebug::Print(_L("**** UIF-FEPTEST-0011 Finished ")); |
837 RDebug::Print(_L("**** UIF-FEPTEST-0011 Finished ")); |
830 RDebug::Print(_L("**************************************************************\n")); |
838 RDebug::Print(_L("**************************************************************\n")); |
831 |
839 |
832 RecordTestResultL(); |
840 RecordTestResultL(); |
833 } |
841 } |
834 break; |
842 break; |
835 |
843 |
|
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; |
836 |
1006 |
837 //---------------------------------------------------------------------------------------------- |
1007 //---------------------------------------------------------------------------------------------- |
838 |
1008 |
839 /** |
1009 /** |
840 @SYMTestCaseID UIF-FEPTEST-0012 |
1010 @SYMTestCaseID UIF-FEPTEST-0012 |
841 @SYMPREQ 0000 |
1011 @SYMPREQ 0000 |
842 @SYMTestCaseDesc Dismiss dialog. |
1012 @SYMTestCaseDesc Dismiss dialog. |
843 @SYMTestPriority High |
1013 @SYMTestPriority High |
844 @SYMTestStatus Implemented |
1014 @SYMTestStatus Implemented |
845 @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. |
846 When the dialog is closed, CTstTestTargetDialog::OkToExitL() is called and |
1016 When the dialog is closed, CTstTestTargetDialog::OkToExitL() is called and |
847 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. |
848 @SYMTestExpectedResults All global variables read as expected. |
1018 @SYMTestExpectedResults All global variables read as expected. |
849 */ |
1019 */ |
850 |
1020 |
851 //---------------------------------------------------------------------------------------------- |
1021 //---------------------------------------------------------------------------------------------- |
875 INFO_PRINTF1(_L("Checking dialog values...")); |
1045 INFO_PRINTF1(_L("Checking dialog values...")); |
876 INFO_PRINTF3(_L("gTextNormalEdwin was '%S' (expected '%S')"), &gTextNormalEdwin, &KExpectedTextNormalEdwin); |
1046 INFO_PRINTF3(_L("gTextNormalEdwin was '%S' (expected '%S')"), &gTextNormalEdwin, &KExpectedTextNormalEdwin); |
877 INFO_PRINTF3(_L("gTextNormalNumEdwin was '%S' (expected '%S')"), &gTextNormalNumEdwin, &KExpectedTextNormalNumEdwin); |
1047 INFO_PRINTF3(_L("gTextNormalNumEdwin was '%S' (expected '%S')"), &gTextNormalNumEdwin, &KExpectedTextNormalNumEdwin); |
878 INFO_PRINTF3(_L("gTextKatakanaEdwin was '%S' (expected '%S')"), &gTextKatakanaEdwin, &KExpectedTextKatakanaEdwin); |
1048 INFO_PRINTF3(_L("gTextKatakanaEdwin was '%S' (expected '%S')"), &gTextKatakanaEdwin, &KExpectedTextKatakanaEdwin); |
879 INFO_PRINTF3(_L("gTextPhoneticalEdwin was '%S' (expected '%S')"), &gTextPhoneticalEdwin, &KExpectedTextPhoneticalEdwin); |
1049 INFO_PRINTF3(_L("gTextPhoneticalEdwin was '%S' (expected '%S')"), &gTextPhoneticalEdwin, &KExpectedTextPhoneticalEdwin); |
|
1050 INFO_PRINTF3(_L("gTextCJKEdwin was '%S' (expected '%S')"), &gTextCJKEdwin, &KExpectedTextCJKEdwin); |
880 |
1051 |
881 TEST(gTextNormalEdwin == KExpectedTextNormalEdwin); |
1052 TEST(gTextNormalEdwin == KExpectedTextNormalEdwin); |
882 TEST(gTextNormalNumEdwin == KExpectedTextNormalNumEdwin); |
1053 TEST(gTextNormalNumEdwin == KExpectedTextNormalNumEdwin); |
883 TEST(gTextKatakanaEdwin == KExpectedTextKatakanaEdwin); |
1054 TEST(gTextKatakanaEdwin == KExpectedTextKatakanaEdwin); |
884 TEST(gTextPhoneticalEdwin == KExpectedTextPhoneticalEdwin); |
1055 TEST(gTextPhoneticalEdwin == KExpectedTextPhoneticalEdwin); |
|
1056 TEST(gTextCJKEdwin == KExpectedTextCJKEdwin); |
885 RecordTestResultL(); |
1057 RecordTestResultL(); |
886 CloseTMSGraphicsStep(); |
1058 CloseTMSGraphicsStep(); |
887 } |
1059 } |
888 break; |
1060 break; |
889 |
1061 |
908 theKey->iCode = aCode; |
1080 theKey->iCode = aCode; |
909 SendEventToWindowGroups(theEvent); |
1081 SendEventToWindowGroups(theEvent); |
910 } |
1082 } |
911 |
1083 |
912 |
1084 |
913 /** |
1085 /** |
914 Handle the window events.\n |
1086 Handle the window events.\n |
915 Create a window server session and connect the client\n |
1087 Create a window server session and connect the client\n |
916 Create a client side handle for the server.\n |
1088 Create a client side handle for the server.\n |
917 Set the window event type and call the SendEventToWindowGroup().\n |
1089 Set the window event type and call the SendEventToWindowGroup().\n |
918 Close the session on completion \n |
1090 Close the session on completion \n |
919 */ |
1091 */ |
920 void CFep1TestTargetUi::SendEventToWindowGroups(TWsEvent& aEvent) |
1092 void CFep1TestTargetUi::SendEventToWindowGroups(TWsEvent& aEvent) |
921 { |
1093 { |
922 User::After(100000); |
1094 User::After(100000); |
923 |
1095 |
924 RWsSession ws; |
1096 RWsSession ws; |
925 TInt theRes = ws.Connect(); |
1097 TInt theRes = ws.Connect(); |
926 TEST(theRes == KErrNone); |
1098 TEST(theRes == KErrNone); |
927 |
1099 |
928 RWindowGroup& winGroup = iCoeEnv->RootWin(); |
1100 RWindowGroup& winGroup = iCoeEnv->RootWin(); |
929 TInt theId = winGroup.Identifier(); |
1101 TInt theId = winGroup.Identifier(); |
930 |
1102 |
931 aEvent.SetType(EEventKeyDown); |
1103 aEvent.SetType(EEventKeyDown); |
932 aEvent.SetTimeNow(); |
1104 aEvent.SetTimeNow(); |
933 ws.SendEventToWindowGroup(theId, aEvent); |
1105 ws.SendEventToWindowGroup(theId, aEvent); |
934 |
1106 |
935 aEvent.SetType(EEventKey); |
1107 aEvent.SetType(EEventKey); |
936 aEvent.SetTimeNow(); |
1108 aEvent.SetTimeNow(); |
937 ws.SendEventToWindowGroup(theId, aEvent); |
1109 ws.SendEventToWindowGroup(theId, aEvent); |
938 |
1110 |
939 aEvent.SetType(EEventKeyUp); |
1111 aEvent.SetType(EEventKeyUp); |
940 aEvent.SetTimeNow(); |
1112 aEvent.SetTimeNow(); |
941 ws.SendEventToWindowGroup(theId, aEvent); |
1113 ws.SendEventToWindowGroup(theId, aEvent); |
942 |
1114 |
943 ws.Close(); |
1115 ws.Close(); |
944 } |
1116 } |
945 |
1117 |
946 /** |
1118 /** |
947 Handle the user defined events.\n |
1119 Handle the user defined events.\n |
948 Search for the resource file that support the language.\n |
1120 Search for the resource file that support the language.\n |
949 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 |
950 */ |
1122 */ |