114 #include "mt_hsps_setactiveplugin_4.h" |
114 #include "mt_hsps_setactiveplugin_4.h" |
115 #include "mt_hsps_setactiveplugin_5.h" |
115 #include "mt_hsps_setactiveplugin_5.h" |
116 #include "mt_hsps_setactiveplugin_6.h" |
116 #include "mt_hsps_setactiveplugin_6.h" |
117 // restore configurations |
117 // restore configurations |
118 #include "mt_hsps_restoreconfigurations_1.h" |
118 #include "mt_hsps_restoreconfigurations_1.h" |
|
119 // customizations |
|
120 #include "mt_hsps_customization_1.h" |
119 |
121 |
120 // ======== LOCAL CONSTANTS ==================================================== |
122 // ======== LOCAL CONSTANTS ==================================================== |
121 |
123 |
122 // Resource files copied by minimal configuration. |
124 // Resource files copied by minimal configuration. |
123 _LIT( KMinimalResourceFile1, "c:\\private\\20000fb1\\2456\\270513751\\536916225\\1.0\\sources\\main.xml" ); |
125 _LIT( KMinimalResourceFile1, "c:\\private\\20000fb1\\2456\\270513751\\536916225\\1.0\\sources\\main.xml" ); |
220 installationService->UninstallConfigurationL( KHSPSMTAppUid, KHSPSActiveConfOperator ); |
222 installationService->UninstallConfigurationL( KHSPSMTAppUid, KHSPSActiveConfOperator ); |
221 installationService->UninstallConfigurationL( KHSPSMTInterfaceUid, KHSPSOperatorViewConf ); |
223 installationService->UninstallConfigurationL( KHSPSMTInterfaceUid, KHSPSOperatorViewConf ); |
222 installationService->UninstallConfigurationL( KHSPSMTInterfaceUid, KHSPSFinnishWidgetConf ); |
224 installationService->UninstallConfigurationL( KHSPSMTInterfaceUid, KHSPSFinnishWidgetConf ); |
223 installationService->UninstallConfigurationL( KHSPSMTInterfaceUid, KHSPSInstalledWidgetConf ); |
225 installationService->UninstallConfigurationL( KHSPSMTInterfaceUid, KHSPSInstalledWidgetConf ); |
224 |
226 |
225 // Remove test configurations from import folder |
227 // Remove test configurations from import & install folder at C drive |
226 CFileMan* fileManager = CFileMan::NewL( iFileserver ); |
228 CFileMan* fileManager = CFileMan::NewL( iFileserver ); |
227 CleanupStack::PushL( fileManager ); |
229 CleanupStack::PushL( fileManager ); |
228 fileManager->Delete( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133.dat" ) ); |
230 fileManager->Delete( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133.dat" ) ); |
229 fileManager->RmDir( _L( "c:\\private\\200159c0\\import\\0998\\" ) ); |
231 fileManager->RmDir( _L( "c:\\private\\200159c0\\import\\0998\\" ) ); |
|
232 fileManager->RmDir( _L( "d:\\data\\mt_hsps\\installed_widget\\widgetconfiguration.xml" ) ); |
230 CleanupStack::PopAndDestroy( fileManager ); |
233 CleanupStack::PopAndDestroy( fileManager ); |
231 |
234 |
232 // Install test configurations |
235 // Install test configurations |
233 installationService->InstallConfigurationL( KHSPSInstallMinimalRootConf ); |
236 installationService->InstallConfigurationL( KHSPSInstallMinimalRootConf ); |
234 installationService->InstallConfigurationL( KHSPSInstallMinimalViewConf ); |
237 installationService->InstallConfigurationL( KHSPSInstallMinimalViewConf ); |
2942 ( TUint8* )restoreconfigurations_1_ts_6_output ); |
2945 ( TUint8* )restoreconfigurations_1_ts_6_output ); |
2943 EUNIT_PRINT( _L8( "Test step passed" ) ); |
2946 EUNIT_PRINT( _L8( "Test step passed" ) ); |
2944 } |
2947 } |
2945 |
2948 |
2946 //------------------------------------------------------------------------------ |
2949 //------------------------------------------------------------------------------ |
|
2950 // Test case: Customization(1) |
|
2951 //------------------------------------------------------------------------------ |
|
2952 void MT_CHSPSConfigurationIf::Customization_1_L() |
|
2953 { |
|
2954 // Pre conditions |
|
2955 |
|
2956 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
2957 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
2958 |
|
2959 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
2960 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2961 |
|
2962 // Simulate customization by copying configuration files to D drive ("ROM" stuff is on C) |
|
2963 CFileMan* fileManager = CFileMan::NewL( iFileserver ); |
|
2964 CleanupStack::PushL( fileManager ); |
|
2965 User::LeaveIfError( |
|
2966 fileManager->Copy( |
|
2967 _L( "c:\\data\\mt_hsps\\installed_widget\\widgetconfiguration_customized.xml" ), |
|
2968 _L( "d:\\data\\mt_hsps\\installed_widget\\widgetconfiguration.xml" ), |
|
2969 CFileMan::ERecurse|CFileMan::EOverWrite |
|
2970 ) |
|
2971 ); |
|
2972 CleanupStack::PopAndDestroy( fileManager ); |
|
2973 |
|
2974 MT_CHspsInstallationService* installationService = MT_CHspsInstallationService::NewL(); |
|
2975 CleanupStack::PushL( installationService ); |
|
2976 |
|
2977 // Test step 1: install installed_widget which has customized content in D drive |
|
2978 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2979 installationService->InstallConfigurationL( KHSPSInstallInstalledWidgetConf ); |
|
2980 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2981 |
|
2982 // Test step 2: check settings from the installed_widget, it should hold |
|
2983 // settings from the widgetconfiguration_customized.xml file |
|
2984 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
2985 RunTestStepSyncL( |
|
2986 ( TUint8* )customization_1_ts_2_method, |
|
2987 ( TUint8* )customization_1_ts_2_input, |
|
2988 ( TUint8* )customization_1_ts_2_output ); |
|
2989 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2990 |
|
2991 CleanupStack::PopAndDestroy( installationService ); |
|
2992 } |
|
2993 |
|
2994 //------------------------------------------------------------------------------ |
2947 // Test case table |
2995 // Test case table |
2948 //------------------------------------------------------------------------------ |
2996 //------------------------------------------------------------------------------ |
2949 EUNIT_BEGIN_TEST_TABLE( |
2997 EUNIT_BEGIN_TEST_TABLE( |
2950 MT_CHSPSConfigurationIf, |
2998 MT_CHSPSConfigurationIf, |
2951 "This is a test suite for HSPS configuration interface.", |
2999 "This is a test suite for HSPS configuration interface.", |