fep/frontendprocessor/test/src/TFEP1TESTTARGET.CPP
changeset 15 806570e85b3d
parent 0 eb1f2e154e89
child 23 f043c81198e3
equal deleted inserted replaced
13:3b79bedfdc20 15:806570e85b3d
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
   837 
   837 
   838 		case 461:
   838 		case 461:
   839 			{
   839 			{
   840 			SetTestStepID(_L("TI18N-FEPBASE-CIT-4001"));
   840 			SetTestStepID(_L("TI18N-FEPBASE-CIT-4001"));
   841 			INFO_PRINTF1(_L("Send cursor down events to move the next dialog"));
   841 			INFO_PRINTF1(_L("Send cursor down events to move the next dialog"));
   842 			SendKey(EKeyDownArrow);			
   842 			SendKey(EKeyDownArrow);
   843 			INFO_PRINTF1(_L("Install the FEP 1"));
   843 			// FEP 1 is already tested in above test cases.
   844 			iCoeEnv->InstallFepL(KUidTFep1);
   844 			// Now install test FEP 4 to test UTF-16 support.
       
   845 			INFO_PRINTF1(_L("Install the FEP 4"));
       
   846 			iCoeEnv->InstallFepL(KUidTFep4);
   845 			User::After(TTimeIntervalMicroSeconds32(2000000));
   847 			User::After(TTimeIntervalMicroSeconds32(2000000));
   846 			}
   848 			}
   847 			break;
   849 			break;
   848 
       
   849 		case 462:
   850 		case 462:
   850 			{
   851 			{
   851 			INFO_PRINTF1(_L("...simulate Key Event 'Shift + M' ---> Changes to hex fep!"));
   852 			INFO_PRINTF1(_L("...simulate Key Event 'Shift + M' ---> Changes to hex fep!"));
   852 			SendKey('M', EModifierRightShift);			
   853 			SendKey('M', EModifierRightShift);			
   853 			TUint codes[] = {'0', '0', '2', '1'};
   854 			TUint codes[] = {'0', '0', '0', '2', '1'};	// FEP 4 supports UTF-16, and need 5 digits for one Unicode value
   854 			for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++)
   855 			for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++)
   855 				{
   856 				{
   856 				INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]);
   857 				INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]);
   857 				SendKey(codes[i]);
   858 				SendKey(codes[i]);
   858 				User::After(TTimeIntervalMicroSeconds32(200000));
       
   859 				}
   859 				}
   860 			INFO_PRINTF1(_L("...simulate Key Event Enter"));
   860 			INFO_PRINTF1(_L("...simulate Key Event Enter"));
   861 			SendKey(EKeyEnter);			
   861 			SendKey(EKeyEnter);			
   862 			}
   862 			}
   863 			break;
   863 			break;
   864 		case 463:  
   864 		case 463:  
   865 			{
   865 			{
   866 			TUint codes[] = {'0', '4', '1', '1'};
   866 			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++)
   867 			for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++)
   868 				{
   868 				{
   869 				INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]);
   869 				INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]);
   870 				SendKey(codes[i]);
   870 				SendKey(codes[i]);
   871 				User::After(TTimeIntervalMicroSeconds32(200000));
       
   872 				}
   871 				}
   873 			INFO_PRINTF1(_L("...simulate Key Event Enter"));
   872 			INFO_PRINTF1(_L("...simulate Key Event Enter"));
   874 			SendKey(EKeyEnter);			
   873 			SendKey(EKeyEnter);			
   875 			}
   874 			}
   876 			break;
   875 			break;
   877 		case 464:  
   876 		case 464:  
   878 			{
   877 			{
   879 			TUint codes[] = {'0', 'E', '0', '2'};
   878 			TUint codes[] = {'0', '0', 'E', '0', '2'};	// FEP 4 supports UTF-16, and need 5 digit for one Unicode value
   880 			for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++)
   879 			for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++)
   881 				{
   880 				{
   882 				INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]);
   881 				INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]);
   883 				SendKey(codes[i]);
   882 				SendKey(codes[i]);
   884 				User::After(TTimeIntervalMicroSeconds32(200000));
       
   885 				}
   883 				}
   886 			INFO_PRINTF1(_L("...simulate Key Event Enter"));
   884 			INFO_PRINTF1(_L("...simulate Key Event Enter"));
   887 			SendKey(EKeyEnter);			
   885 			SendKey(EKeyEnter);			
   888 			}
   886 			}
   889 			break;
   887 			break;
   890 			
       
   891 		case 465:
   888 		case 465:
   892 			{
   889 			{
   893 			TUint codes[] = {'2', 'E', '8', '1'};
   890 			TUint codes[] = {'0', '2', 'E', '8', '1'};	// FEP 4 supports UTF-16, and need 5 digit for one Unicode value
   894 			for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++)
   891 			for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++)
   895 				{
   892 				{
   896 				INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]);
   893 				INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]);
   897 				SendKey(codes[i]);
   894 				SendKey(codes[i]);
   898 				User::After(TTimeIntervalMicroSeconds32(1000000));
       
   899 				}
   895 				}
   900 			INFO_PRINTF1(_L("...simulate Key Event Enter"));
   896 			INFO_PRINTF1(_L("...simulate Key Event Enter"));
   901 			SendKey(EKeyEnter);			
   897 			SendKey(EKeyEnter);			
   902 			}
   898 			}
   903 			break;
   899 			break;
   904 		case 466:
   900 		case 466:
   905 			{
   901 			{
   906 			TUint codes[] = {'3', '0', '3', 'A'};
   902 			TUint codes[] = {'0', '3', '0', '3', 'A'};	// FEP 4 supports UTF-16, and need 5 digit for one Unicode value
   907 			for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++)
   903 			for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++)
   908 				{
   904 				{
   909 				INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]);
   905 				INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]);
   910 				SendKey(codes[i]);
   906 				SendKey(codes[i]);
   911 				User::After(TTimeIntervalMicroSeconds32(1000000));
       
   912 				}
   907 				}
   913 			INFO_PRINTF1(_L("...simulate Key Event Enter"));
   908 			INFO_PRINTF1(_L("...simulate Key Event Enter"));
   914 			SendKey(EKeyEnter);			
   909 			SendKey(EKeyEnter);			
   915 			}
   910 			}
   916 			break;
   911 			break;
   917 		case 467:
   912 		case 467:
   918 			{
   913 			{
   919 			TUint codes[] = {'4', 'E', '1', '9'};
   914 			TUint codes[] = {'0', '4', 'E', '1', '9'};	// FEP 4 supports UTF-16, and need 5 digit for one Unicode value
   920 			for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++)
   915 			for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++)
   921 				{
   916 				{
   922 				INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]);
   917 				INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]);
   923 				SendKey(codes[i]);
   918 				SendKey(codes[i]);
   924 				User::After(TTimeIntervalMicroSeconds32(1000000));
       
   925 				}
   919 				}
   926 			INFO_PRINTF1(_L("...simulate Key Event Enter"));
   920 			INFO_PRINTF1(_L("...simulate Key Event Enter"));
   927 			SendKey(EKeyEnter);			
   921 			SendKey(EKeyEnter);			
   928 			}
   922 			}
   929 			break;
   923 			break;
   930 		case 468:
   924 		case 468:
   931 			{
   925 			{
   932 			TUint codes[] = {'A', 'D', '0', '0'};
   926 			TUint codes[] = {'0', 'A', 'D', '0', '0'};	// FEP 4 supports UTF-16, and need 5 digit for one Unicode value
   933 			for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++)
   927 			for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++)
   934 				{
   928 				{
   935 				INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]);
   929 				INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]);
   936 				SendKey(codes[i]);
   930 				SendKey(codes[i]);
   937 				User::After(TTimeIntervalMicroSeconds32(1000000));
       
   938 				}
   931 				}
   939 			INFO_PRINTF1(_L("...simulate Key Event Enter"));
   932 			INFO_PRINTF1(_L("...simulate Key Event Enter"));
   940 			SendKey(EKeyEnter);			
   933 			SendKey(EKeyEnter);			
   941 			}
   934 			}
   942 			break;
   935 			break;
   943 
       
   944 		case 469:
   936 		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 			{
   937 			{
   956 			TUint codes[] = {'2', '0', '0', '0', '0'};
   938 			TUint codes[] = {'2', '0', '0', '0', '0'};
   957 			for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++)
   939 			for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++)
   958 				{
   940 				{
   959 				INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]);
   941 				INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]);
   960 				SendKey(codes[i]);
   942 				SendKey(codes[i]);
   961 				User::After(TTimeIntervalMicroSeconds32(1000000));
       
   962 				}
   943 				}
   963 			INFO_PRINTF1(_L("...simulate Key Event Enter"));
   944 			INFO_PRINTF1(_L("...simulate Key Event Enter"));
   964 			SendKey(EKeyEnter);			
   945 			SendKey(EKeyEnter);			
   965 			}
   946 			}
   966 			break;
   947 			break;
   967 		case 472: 
   948 		case 470: 
   968 			{
   949 			{
   969 			TUint codes[] =  {'2', 'F', '8', '0', '0'};
   950 			TUint codes[] =  {'2', 'F', '8', '0', '0'};
   970 			for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++)
   951 			for (int i = 0; i < sizeof(codes)/sizeof(TUint); i++)
   971 				{
   952 				{
   972 				INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]);
   953 				INFO_PRINTF2(_L("...simulate Key Event '%d'"), codes[i]);
   973 				SendKey(codes[i]);
   954 				SendKey(codes[i]);
   974 				User::After(TTimeIntervalMicroSeconds32(1000000));
       
   975 				}
   955 				}
   976 			INFO_PRINTF1(_L("...simulate Key Event Enter"));
   956 			INFO_PRINTF1(_L("...simulate Key Event Enter"));
   977 			SendKey(EKeyEnter);			
   957 			SendKey(EKeyEnter);			
   978 			}
   958 			}
   979 			break;
   959 			break;
   980 			
   960 		case 471:
   981 		case 473:
   961 			{
   982 			{
   962 			INFO_PRINTF1(_L("...simulate Key Event 'Shift + X' ---> test SimulateKeyEventsL!"));
   983             INFO_PRINTF1(_L("...simulate Key Event 'Shift + X' ---> test SimulateKeyEventsL!"));
   963 			SendKey('X', EModifierRightShift);
   984             SendKey('X', EModifierRightShift);
   964 			User::After(TTimeIntervalMicroSeconds32(2000000));
   985             User::After(TTimeIntervalMicroSeconds32(2000000));
       
   986 			INFO_PRINTF1(_L("...simulate Key Event 'Shift + M' ---> Changes to Pinyin!"));
   965 			INFO_PRINTF1(_L("...simulate Key Event 'Shift + M' ---> Changes to Pinyin!"));
   987 			SendKey('M', EModifierRightShift);
   966 			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));
   967 			User::After(TTimeIntervalMicroSeconds32(2000000));
   996 			}
   968 			}
   997 			break;
   969 			break;
   998 		case 475:
   970 		case 472:
   999 			{
   971 			{
  1000 			INFO_PRINTF1(_L("Uninstall the FEP"));
   972 			INFO_PRINTF1(_L("Uninstall the FEP 4"));
  1001 			iCoeEnv->InstallFepL(KNullUid);
   973 			iCoeEnv->InstallFepL(KNullUid);
  1002 			SendKey(EKeyEnter);  
   974 			User::After(TTimeIntervalMicroSeconds32(2000000));
  1003 			RecordTestResultL();
   975             SendKey(EKeyEnter);  
  1004 			}
   976             RecordTestResultL();
  1005 			break;
   977 			}
  1006 						
   978 			break;
       
   979 
  1007 //----------------------------------------------------------------------------------------------
   980 //----------------------------------------------------------------------------------------------
  1008 
   981 
  1009 /**
   982 /**
  1010    @SYMTestCaseID 		UIF-FEPTEST-0012
   983    @SYMTestCaseID 		UIF-FEPTEST-0012
  1011    @SYMPREQ				0000
   984    @SYMPREQ				0000