2637 ( TUint8* )requestnotify_6_ts_6_method, |
2637 ( TUint8* )requestnotify_6_ts_6_method, |
2638 ( TUint8* )requestnotify_6_ts_6_input, |
2638 ( TUint8* )requestnotify_6_ts_6_input, |
2639 ( TUint8* )requestnotify_6_ts_6_output ); |
2639 ( TUint8* )requestnotify_6_ts_6_output ); |
2640 EUNIT_PRINT( _L8( "Test step passed" ) ); |
2640 EUNIT_PRINT( _L8( "Test step passed" ) ); |
2641 } |
2641 } |
|
2642 |
|
2643 |
|
2644 //------------------------------------------------------------------------------ |
|
2645 // Test case: SisxUpgrade(1) |
|
2646 //------------------------------------------------------------------------------ |
|
2647 void MT_CHSPSConfigurationIf::SisxUpgrade_1_L() |
|
2648 { |
|
2649 // Pre conditions |
|
2650 |
|
2651 // Attach to HSPS |
|
2652 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
2653 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2654 |
|
2655 // Test step 1: |
|
2656 EUNIT_PRINT( _L8( "Test step 1: simulate installation of a SISX package" ) ); |
|
2657 |
|
2658 CFileMan* fileManager = CFileMan::NewL( iFileserver ); |
|
2659 CleanupStack::PushL( fileManager ); |
|
2660 |
|
2661 // Copy installation files to c\private\200159c0\import |
|
2662 User::LeaveIfError( fileManager->Copy( |
|
2663 _L( "c:\\data\\mt_hsps\\installed_widget\\0\\" ), |
|
2664 _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\0\\" ), |
|
2665 CFileMan::ERecurse|CFileMan::EOverWrite ) ); |
|
2666 User::LeaveIfError( fileManager->Copy( |
|
2667 _L( "c:\\data\\mt_hsps\\installed_widget\\1\\" ), |
|
2668 _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\1\\" ), |
|
2669 CFileMan::ERecurse|CFileMan::EOverWrite ) ); |
|
2670 User::LeaveIfError( fileManager->Copy( |
|
2671 _L( "c:\\data\\mt_hsps\\installed_widget\\9\\" ), |
|
2672 _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\9\\" ), |
|
2673 CFileMan::ERecurse|CFileMan::EOverWrite ) ); |
|
2674 User::LeaveIfError( fileManager->Copy( |
|
2675 _L( "c:\\data\\mt_hsps\\installed_widget\\widgetconfiguration.xml" ), |
|
2676 _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\" ), |
|
2677 CFileMan::EOverWrite ) ); |
|
2678 User::LeaveIfError( fileManager->Copy( |
|
2679 _L( "c:\\data\\mt_hsps\\installed_widget\\manifest.dat" ), |
|
2680 _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\" ), |
|
2681 CFileMan::EOverWrite ) ); |
|
2682 User::LeaveIfError( fileManager->Copy( |
|
2683 _L( "c:\\data\\mt_hsps\\installed_widget\\plugin_0998_101FB657_2000B133_1.0.dat" ), |
|
2684 _L( "c:\\private\\200159c0\\import\\" ), |
|
2685 CFileMan::EOverWrite ) ); |
|
2686 |
|
2687 // Wait until configuration is installed |
|
2688 User::After( 4000000 ); |
|
2689 |
|
2690 // Make sure "InstalledWidget" is installed |
|
2691 if ( !BaflUtils::FileExists( iFileserver, _L( "c:\\private\\200159c0\\themes\\2456\\270513751\\536916275\\1.0\\InstallWidgetConf.o0000" ) ) ) |
|
2692 { |
|
2693 // Installation failed - remove imports to be able to re-run the test again |
|
2694 // The ChspsThemeServer::HandleConfigurationImportsL does handle newly |
|
2695 // added files only |
|
2696 User::LeaveIfError( fileManager->RmDir( _L( "c:\\private\\200159c0\\import\\0998\\" ) ) ); |
|
2697 fileManager->Attribs( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133.dat" ), |
|
2698 0, KEntryAttReadOnly, TTime( 0 ) ); // TTime(0) = preserve original time stamp. |
|
2699 User::LeaveIfError( fileManager->Delete( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_1.0.dat" ) ) ); |
|
2700 |
|
2701 // Leave - the test was not successfull |
|
2702 User::Leave( KErrGeneral ); |
|
2703 } |
|
2704 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2705 |
|
2706 // Test step 1: |
|
2707 EUNIT_PRINT( _L8( "Test step 2: simulate upgrade to v2 of a SISX package" ) ); |
|
2708 // Copy installation files to c\private\200159c0\import |
|
2709 User::LeaveIfError( fileManager->Copy( |
|
2710 _L( "c:\\data\\mt_hsps\\installed_widget_v2\\0\\" ), |
|
2711 _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\2.0\\0\\" ), |
|
2712 CFileMan::ERecurse|CFileMan::EOverWrite ) ); |
|
2713 User::LeaveIfError( fileManager->Copy( |
|
2714 _L( "c:\\data\\mt_hsps\\installed_widget_v2\\1\\" ), |
|
2715 _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\2.0\\1\\" ), |
|
2716 CFileMan::ERecurse|CFileMan::EOverWrite ) ); |
|
2717 User::LeaveIfError( fileManager->Copy( |
|
2718 _L( "c:\\data\\mt_hsps\\installed_widget_v2\\9\\" ), |
|
2719 _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\2.0\\9\\" ), |
|
2720 CFileMan::ERecurse|CFileMan::EOverWrite ) ); |
|
2721 User::LeaveIfError( fileManager->Copy( |
|
2722 _L( "c:\\data\\mt_hsps\\installed_widget_v2\\widgetconfiguration.xml" ), |
|
2723 _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\2.0\\" ), |
|
2724 CFileMan::EOverWrite ) ); |
|
2725 User::LeaveIfError( fileManager->Copy( |
|
2726 _L( "c:\\data\\mt_hsps\\installed_widget_v2\\manifest.dat" ), |
|
2727 _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\2.0\\" ), |
|
2728 CFileMan::EOverWrite ) ); |
|
2729 User::LeaveIfError( fileManager->Copy( |
|
2730 _L( "c:\\data\\mt_hsps\\installed_widget_v2\\plugin_0998_101FB657_2000B133_2.0.dat" ), |
|
2731 _L( "c:\\private\\200159c0\\import\\" ), |
|
2732 CFileMan::EOverWrite ) ); |
|
2733 |
|
2734 // Wait until configuration is installed |
|
2735 User::After( 4000000 ); |
|
2736 |
|
2737 // Make sure "InstalledWidget v1" is removed |
|
2738 if ( BaflUtils::FileExists( iFileserver, _L( "c:\\private\\200159c0\\themes\\2456\\270513751\\536916275\\1.0\\InstallWidgetConf.o0000" ) ) ) |
|
2739 { |
|
2740 // Installation failed - remove imports to be able to re-run the test again |
|
2741 // The ChspsThemeServer::HandleConfigurationImportsL does handle newly |
|
2742 // added files only |
|
2743 User::LeaveIfError( fileManager->RmDir( _L( "c:\\private\\200159c0\\import\\0998\\" ) ) ); |
|
2744 fileManager->Attribs( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_1.0.dat" ), |
|
2745 0, KEntryAttReadOnly, TTime( 0 ) ); // TTime(0) = preserve original time stamp. |
|
2746 fileManager->Attribs( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_2.0.dat" ), |
|
2747 0, KEntryAttReadOnly, TTime( 0 ) ); // TTime(0) = preserve original time stamp. |
|
2748 |
|
2749 User::LeaveIfError( fileManager->Delete( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_1.0.dat" ) ) ); |
|
2750 User::LeaveIfError( fileManager->Delete( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_2.0.dat" ) ) ); |
|
2751 // Leave - the test was not successfull |
|
2752 User::Leave( KErrGeneral ); |
|
2753 } |
|
2754 |
|
2755 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2756 |
|
2757 |
|
2758 // Test step 3: |
|
2759 EUNIT_PRINT( _L8( "Test step 3: simulate uninstalation of a SISX package" ) ); |
|
2760 // Remove installation files to c\private\200159c0\import |
|
2761 User::LeaveIfError( fileManager->RmDir( _L( "c:\\private\\200159c0\\import\\0998\\" ) ) ); |
|
2762 fileManager->Attribs( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_1.0.dat" ), |
|
2763 0, KEntryAttReadOnly, TTime( 0 ) ); // TTime(0) = preserve original time stamp. |
|
2764 fileManager->Attribs( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_2.0.dat" ), |
|
2765 0, KEntryAttReadOnly, TTime( 0 ) ); // TTime(0) = preserve original time stamp. |
|
2766 User::LeaveIfError( fileManager->Delete( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_1.0.dat" ) ) ); |
|
2767 User::LeaveIfError( fileManager->Delete( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_2.0.dat" ) ) ); |
|
2768 |
|
2769 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2770 User::After( 4000000 ); |
|
2771 |
|
2772 // check |
|
2773 // Copy installation files to c\private\200159c0\import |
|
2774 EUNIT_PRINT( _L8( "Test step 4: simulate installation of a SISX package" ) ); |
|
2775 User::LeaveIfError( fileManager->Copy( |
|
2776 _L( "c:\\data\\mt_hsps\\installed_widget\\0\\" ), |
|
2777 _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\0\\" ), |
|
2778 CFileMan::ERecurse|CFileMan::EOverWrite ) ); |
|
2779 User::LeaveIfError( fileManager->Copy( |
|
2780 _L( "c:\\data\\mt_hsps\\installed_widget\\1\\" ), |
|
2781 _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\1\\" ), |
|
2782 CFileMan::ERecurse|CFileMan::EOverWrite ) ); |
|
2783 User::LeaveIfError( fileManager->Copy( |
|
2784 _L( "c:\\data\\mt_hsps\\installed_widget\\9\\" ), |
|
2785 _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\9\\" ), |
|
2786 CFileMan::ERecurse|CFileMan::EOverWrite ) ); |
|
2787 User::LeaveIfError( fileManager->Copy( |
|
2788 _L( "c:\\data\\mt_hsps\\installed_widget\\widgetconfiguration.xml" ), |
|
2789 _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\" ), |
|
2790 CFileMan::EOverWrite ) ); |
|
2791 User::LeaveIfError( fileManager->Copy( |
|
2792 _L( "c:\\data\\mt_hsps\\installed_widget\\manifest.dat" ), |
|
2793 _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\" ), |
|
2794 CFileMan::EOverWrite ) ); |
|
2795 User::LeaveIfError( fileManager->Copy( |
|
2796 _L( "c:\\data\\mt_hsps\\installed_widget\\plugin_0998_101FB657_2000B133_1.0.dat" ), |
|
2797 _L( "c:\\private\\200159c0\\import\\" ), |
|
2798 CFileMan::EOverWrite ) ); |
|
2799 |
|
2800 // Wait until configuration is installed |
|
2801 User::After( 4000000 ); |
|
2802 |
|
2803 // Make sure "InstalledWidget" is installed |
|
2804 if ( !BaflUtils::FileExists( iFileserver, _L( "c:\\private\\200159c0\\themes\\2456\\270513751\\536916275\\1.0\\InstallWidgetConf.o0000" ) ) ) |
|
2805 { |
|
2806 // Installation failed - remove imports to be able to re-run the test again |
|
2807 // The ChspsThemeServer::HandleConfigurationImportsL does handle newly |
|
2808 // added files only |
|
2809 User::LeaveIfError( fileManager->RmDir( _L( "c:\\private\\200159c0\\import\\0998\\" ) ) ); |
|
2810 fileManager->Attribs( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_1.0.dat" ), |
|
2811 0, KEntryAttReadOnly, TTime( 0 ) ); // TTime(0) = preserve original time stamp. |
|
2812 User::LeaveIfError( fileManager->Delete( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_1.0.dat" ) ) ); |
|
2813 |
|
2814 // Leave - the test was not successfull |
|
2815 User::Leave( KErrGeneral ); |
|
2816 } |
|
2817 |
|
2818 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2819 |
|
2820 // Test step 2: |
|
2821 EUNIT_PRINT( _L8( "Test step 5: simulate un-installation of the SISX package" ) ); |
|
2822 |
|
2823 // Remove installation files from c\private\200159c0\import |
|
2824 User::LeaveIfError( fileManager->RmDir( _L( "c:\\private\\200159c0\\import\\0998\\" ) ) ); |
|
2825 fileManager->Attribs( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133.dat" ), |
|
2826 0, |
|
2827 KEntryAttReadOnly, |
|
2828 TTime( 0 ) ); // TTime(0) = preserve original time stamp. |
|
2829 User::LeaveIfError( fileManager->Delete( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_1.0.dat" ) ) ); |
|
2830 // Removing of *.dat file causes configuration uninstallation |
|
2831 // Wait until configuration is uninstalled |
|
2832 User::After( 4000000 ); |
|
2833 |
|
2834 // Make sure "InstalledWidget" is uninstalled |
|
2835 if ( BaflUtils::FileExists( iFileserver, _L( "c:\\private\\200159c0\\themes\\2456\\270513751\\536916275\\1.0\\InstallWidgetConf.o0000" ) ) ) |
|
2836 { |
|
2837 User::Leave( KErrGeneral ); |
|
2838 } |
|
2839 |
|
2840 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2841 |
|
2842 CleanupStack::PopAndDestroy( fileManager ); |
|
2843 }; |
|
2844 |
|
2845 |
|
2846 |
2642 |
2847 |
2643 //------------------------------------------------------------------------------ |
2848 //------------------------------------------------------------------------------ |
2644 // Test case: SisxInstallation(1) |
2849 // Test case: SisxInstallation(1) |
2645 //------------------------------------------------------------------------------ |
2850 //------------------------------------------------------------------------------ |
2646 void MT_CHSPSConfigurationIf::SisxInstallation_1_L() |
2851 void MT_CHSPSConfigurationIf::SisxInstallation_1_L() |