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 |
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 { |
811 } |
801 } |
812 break; |
802 break; |
813 |
803 |
814 case 460: |
804 case 460: |
815 { |
805 { |
816 //INFO_PRINTF1(_L("...simulate Key Event Enter ---> Submits 'MNO' (not Fep installed --> No Alphabetical!")); |
806 INFO_PRINTF1(_L("...simulate Key Event Enter ---> Submits 'MNO' (not Fep installed --> No Alphabetical!")); |
817 //SendKey(EKeyEnter); |
807 SendKey(EKeyEnter); |
818 RecordTestResultL(); |
808 RecordTestResultL(); |
819 } |
809 } |
820 break; |
810 break; |
821 |
811 |
822 //---------------------------------------------------------------------------------------------- |
812 |
823 |
|
824 /** |
|
825 @SYMTestCaseID TI18N-FEPBASE-CIT-4001 |
|
826 @SYMPREQ 2471 |
|
827 @SYMTestCaseDesc Check FEPBASE Unicode 5.0 support. |
|
828 @SYMTestPriority High |
|
829 @SYMTestStatus Implemented |
|
830 @SYMTestActions 1. Pass BMP code points to WORD.exe |
|
831 2. Pass non-BMP code points to WORD.exe |
|
832 |
|
833 @SYMTestExpectedResults When the dialog is dismissed, the text box reads as is expected. |
|
834 */ |
|
835 |
|
836 //---------------------------------------------------------------------------------------------- |
|
837 |
|
838 case 461: |
|
839 { |
|
840 SetTestStepID(_L("TI18N-FEPBASE-CIT-4001")); |
|
841 INFO_PRINTF1(_L("Send cursor down events to move the next dialog")); |
|
842 SendKey(EKeyDownArrow); |
|
843 INFO_PRINTF1(_L("Install the FEP 1")); |
|
844 iCoeEnv->InstallFepL(KUidTFep1); |
|
845 User::After(TTimeIntervalMicroSeconds32(2000000)); |
|
846 } |
|
847 break; |
|
848 |
|
849 case 462: |
|
850 { |
|
851 INFO_PRINTF1(_L("...simulate Key Event 'Shift + M' ---> Changes to hex fep!")); |
|
852 SendKey('M', EModifierRightShift); |
|
853 TUint codes[] = {'0', '0', '2', '1'}; |
|
854 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
|
855 { |
|
856 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
|
857 SendKey(codes[i]); |
|
858 User::After(TTimeIntervalMicroSeconds32(200000)); |
|
859 } |
|
860 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
|
861 SendKey(EKeyEnter); |
|
862 } |
|
863 break; |
|
864 case 463: |
|
865 { |
|
866 TUint codes[] = {'0', '4', '1', '1'}; |
|
867 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
|
868 { |
|
869 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
|
870 SendKey(codes[i]); |
|
871 User::After(TTimeIntervalMicroSeconds32(200000)); |
|
872 } |
|
873 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
|
874 SendKey(EKeyEnter); |
|
875 } |
|
876 break; |
|
877 case 464: |
|
878 { |
|
879 TUint codes[] = {'0', 'E', '0', '2'}; |
|
880 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
|
881 { |
|
882 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
|
883 SendKey(codes[i]); |
|
884 User::After(TTimeIntervalMicroSeconds32(200000)); |
|
885 } |
|
886 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
|
887 SendKey(EKeyEnter); |
|
888 } |
|
889 break; |
|
890 |
|
891 case 465: |
|
892 { |
|
893 TUint codes[] = {'2', 'E', '8', '1'}; |
|
894 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
|
895 { |
|
896 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
|
897 SendKey(codes[i]); |
|
898 User::After(TTimeIntervalMicroSeconds32(1000000)); |
|
899 } |
|
900 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
|
901 SendKey(EKeyEnter); |
|
902 } |
|
903 break; |
|
904 case 466: |
|
905 { |
|
906 TUint codes[] = {'3', '0', '3', 'A'}; |
|
907 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
|
908 { |
|
909 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
|
910 SendKey(codes[i]); |
|
911 User::After(TTimeIntervalMicroSeconds32(1000000)); |
|
912 } |
|
913 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
|
914 SendKey(EKeyEnter); |
|
915 } |
|
916 break; |
|
917 case 467: |
|
918 { |
|
919 TUint codes[] = {'4', 'E', '1', '9'}; |
|
920 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
|
921 { |
|
922 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
|
923 SendKey(codes[i]); |
|
924 User::After(TTimeIntervalMicroSeconds32(1000000)); |
|
925 } |
|
926 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
|
927 SendKey(EKeyEnter); |
|
928 } |
|
929 break; |
|
930 case 468: |
|
931 { |
|
932 TUint codes[] = {'A', 'D', '0', '0'}; |
|
933 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
|
934 { |
|
935 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
|
936 SendKey(codes[i]); |
|
937 User::After(TTimeIntervalMicroSeconds32(1000000)); |
|
938 } |
|
939 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
|
940 SendKey(EKeyEnter); |
|
941 } |
|
942 break; |
|
943 |
|
944 case 469: |
|
945 { |
|
946 INFO_PRINTF1(_L("Uninstall the FEP")); |
|
947 iCoeEnv->InstallFepL(KNullUid); |
|
948 INFO_PRINTF1(_L("Install the FEP 4")); |
|
949 iCoeEnv->InstallFepL(KUidTFep4); |
|
950 User::After(TTimeIntervalMicroSeconds32(2000000)); |
|
951 } |
|
952 break; |
|
953 |
|
954 case 471: |
|
955 { |
|
956 TUint codes[] = {'2', '0', '0', '0', '0'}; |
|
957 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
|
958 { |
|
959 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
|
960 SendKey(codes[i]); |
|
961 User::After(TTimeIntervalMicroSeconds32(1000000)); |
|
962 } |
|
963 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
|
964 SendKey(EKeyEnter); |
|
965 } |
|
966 break; |
|
967 case 472: |
|
968 { |
|
969 TUint codes[] = {'2', 'F', '8', '0', '0'}; |
|
970 for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++) |
|
971 { |
|
972 INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]); |
|
973 SendKey(codes[i]); |
|
974 User::After(TTimeIntervalMicroSeconds32(1000000)); |
|
975 } |
|
976 INFO_PRINTF1(_L("...simulate Key Event Enter")); |
|
977 SendKey(EKeyEnter); |
|
978 } |
|
979 break; |
|
980 |
|
981 case 473: |
|
982 { |
|
983 INFO_PRINTF1(_L("...simulate Key Event 'Shift + X' ---> test SimulateKeyEventsL!")); |
|
984 SendKey('X', EModifierRightShift); |
|
985 User::After(TTimeIntervalMicroSeconds32(2000000)); |
|
986 INFO_PRINTF1(_L("...simulate Key Event 'Shift + M' ---> Changes to Pinyin!")); |
|
987 SendKey('M', EModifierRightShift); |
|
988 User::After(TTimeIntervalMicroSeconds32(2000000)); |
|
989 } |
|
990 break; |
|
991 case 474: |
|
992 { |
|
993 INFO_PRINTF1(_L("...simulate Key Event 'Shift + M' ---> Changes back to Plain!")); |
|
994 SendKey('M', EModifierRightShift); |
|
995 User::After(TTimeIntervalMicroSeconds32(2000000)); |
|
996 } |
|
997 break; |
|
998 case 475: |
|
999 { |
|
1000 INFO_PRINTF1(_L("Uninstall the FEP")); |
|
1001 iCoeEnv->InstallFepL(KNullUid); |
|
1002 SendKey(EKeyEnter); |
|
1003 RecordTestResultL(); |
|
1004 } |
|
1005 break; |
|
1006 |
|
1007 //---------------------------------------------------------------------------------------------- |
813 //---------------------------------------------------------------------------------------------- |
1008 |
814 |
1009 /** |
815 /** |
1010 @SYMTestCaseID UIF-FEPTEST-0012 |
816 @SYMTestCaseID UIF-FEPTEST-0012 |
1011 @SYMPREQ 0000 |
817 @SYMPREQ 0000 |
1041 INFO_PRINTF1(_L("Checking dialog values...")); |
847 INFO_PRINTF1(_L("Checking dialog values...")); |
1042 INFO_PRINTF3(_L("gTextNormalEdwin was '%S' (expected '%S')"), &gTextNormalEdwin, &KExpectedTextNormalEdwin); |
848 INFO_PRINTF3(_L("gTextNormalEdwin was '%S' (expected '%S')"), &gTextNormalEdwin, &KExpectedTextNormalEdwin); |
1043 INFO_PRINTF3(_L("gTextNormalNumEdwin was '%S' (expected '%S')"), &gTextNormalNumEdwin, &KExpectedTextNormalNumEdwin); |
849 INFO_PRINTF3(_L("gTextNormalNumEdwin was '%S' (expected '%S')"), &gTextNormalNumEdwin, &KExpectedTextNormalNumEdwin); |
1044 INFO_PRINTF3(_L("gTextKatakanaEdwin was '%S' (expected '%S')"), &gTextKatakanaEdwin, &KExpectedTextKatakanaEdwin); |
850 INFO_PRINTF3(_L("gTextKatakanaEdwin was '%S' (expected '%S')"), &gTextKatakanaEdwin, &KExpectedTextKatakanaEdwin); |
1045 INFO_PRINTF3(_L("gTextPhoneticalEdwin was '%S' (expected '%S')"), &gTextPhoneticalEdwin, &KExpectedTextPhoneticalEdwin); |
851 INFO_PRINTF3(_L("gTextPhoneticalEdwin was '%S' (expected '%S')"), &gTextPhoneticalEdwin, &KExpectedTextPhoneticalEdwin); |
1046 INFO_PRINTF3(_L("gTextCJKEdwin was '%S' (expected '%S')"), &gTextCJKEdwin, &KExpectedTextCJKEdwin); |
|
1047 |
852 |
1048 TEST(gTextNormalEdwin == KExpectedTextNormalEdwin); |
853 TEST(gTextNormalEdwin == KExpectedTextNormalEdwin); |
1049 TEST(gTextNormalNumEdwin == KExpectedTextNormalNumEdwin); |
854 TEST(gTextNormalNumEdwin == KExpectedTextNormalNumEdwin); |
1050 TEST(gTextKatakanaEdwin == KExpectedTextKatakanaEdwin); |
855 TEST(gTextKatakanaEdwin == KExpectedTextKatakanaEdwin); |
1051 TEST(gTextPhoneticalEdwin == KExpectedTextPhoneticalEdwin); |
856 TEST(gTextPhoneticalEdwin == KExpectedTextPhoneticalEdwin); |
1052 TEST(gTextCJKEdwin == KExpectedTextCJKEdwin); |
|
1053 RecordTestResultL(); |
857 RecordTestResultL(); |
1054 CloseTMSGraphicsStep(); |
858 CloseTMSGraphicsStep(); |
1055 } |
859 } |
1056 break; |
860 break; |
1057 |
861 |