idlehomescreen/widgetmanager/tsrc/wmunittest/inc/wmunittest.h
branchRCL_3
changeset 11 ff572dfe6d86
parent 2 08c6ee43b396
child 19 79311d856354
equal deleted inserted replaced
9:f966699dea19 11:ff572dfe6d86
    23 #include <testscripterinternal.h>
    23 #include <testscripterinternal.h>
    24 #include <stiftestmodule.h>
    24 #include <stiftestmodule.h>
    25 #include <testclassassert.h>
    25 #include <testclassassert.h>
    26 #include <s32file.h> // RFs
    26 #include <s32file.h> // RFs
    27 
    27 
       
    28 #include "wmwidgetorderdata.h"
    28 #include "wmimageconverter.h" // MConverterObserver
    29 #include "wmimageconverter.h" // MConverterObserver
    29 #include <hscontentcontroller.h>
    30 #include <hscontentcontroller.h>
       
    31 #include "wminstaller.h"
    30 
    32 
    31 // MACROS
    33 // MACROS
    32 #define TEST_CLASS_VERSION_MAJOR 0
    34 #define TEST_CLASS_VERSION_MAJOR 0
    33 #define TEST_CLASS_VERSION_MINOR 0
    35 #define TEST_CLASS_VERSION_MINOR 0
    34 #define TEST_CLASS_VERSION_BUILD 0
    36 #define TEST_CLASS_VERSION_BUILD 0
    56 class CWmPersistentWidgetOrder;
    58 class CWmPersistentWidgetOrder;
    57 class CWmImageConverter;
    59 class CWmImageConverter;
    58 class CHsContentInfo;
    60 class CHsContentInfo;
    59 class CHsContentInfoArray;
    61 class CHsContentInfoArray;
    60 class RWidgetDataValues;
    62 class RWidgetDataValues;
    61 
    63 class CWmInstaller;
    62 
    64 
    63 // CLASS DECLARATION
    65 // CLASS DECLARATION
    64 /**
    66 /**
    65 *  test class for STIF Test Framework TestScripter.
    67 *  test class for STIF Test Framework TestScripter.
    66 */
    68 */
    93 
    95 
    94     public: // from MHsContentController
    96     public: // from MHsContentController
    95 
    97 
    96         
    98         
    97         TInt WidgetListL( CHsContentInfoArray& aArray );
    99         TInt WidgetListL( CHsContentInfoArray& aArray );
       
   100         TInt WidgetListL( CHsContentInfo& aInfo, CHsContentInfoArray& aArray );
    98         TInt ViewListL( CHsContentInfoArray& aArray );
   101         TInt ViewListL( CHsContentInfoArray& aArray );
    99         TInt AppListL( CHsContentInfoArray& aArray );
   102         TInt AppListL( CHsContentInfoArray& aArray );
   100         TInt AddWidgetL( CHsContentInfo& aInfo );
   103         TInt AddWidgetL( CHsContentInfo& aInfo );
   101         TInt RemoveWidgetL( CHsContentInfo& aInfo );
   104         TInt RemoveWidgetL( CHsContentInfo& aInfo );
   102         TInt AddViewL( CHsContentInfo& aInfo );
   105         TInt AddViewL( CHsContentInfo& aInfo );
   167         // gets and checks the conversion method from image converter
   170         // gets and checks the conversion method from image converter
   168         TInt ImageConverterConversionMethodL( CStifItemParser& aItem );
   171         TInt ImageConverterConversionMethodL( CStifItemParser& aItem );
   169         // cancel ongoing convert
   172         // cancel ongoing convert
   170         TInt CancelConvertL( CStifItemParser& aItem );
   173         TInt CancelConvertL( CStifItemParser& aItem );
   171 
   174 
   172 
   175         // TESTING UNISTALL
       
   176         TInt UninstallL( CStifItemParser& aItem );
       
   177         TInt WaitUninstallToFinnishL( CStifItemParser& aItem );
       
   178         TInt UninstallUidL( CStifItemParser& aItem );
       
   179         TInt CleanUninstall( CStifItemParser& aItem );
       
   180         TInt WasUnistalledL( CStifItemParser& aItem );
       
   181         TInt CancelUninstall( CStifItemParser& aItem );
       
   182         
       
   183     private: // helper functions for test cases
       
   184 
       
   185         void CreateContentInfoArrayL( CHsContentInfoArray& aArray, TInt aCount );
       
   186         void CreateWidgetDataArrayL( ROrderArray& aArray, TInt aCount );
       
   187         TUid UidFromString( const TDesC8& aUidString ) const;
       
   188         void StartTimerL();
       
   189         static TInt Timeout( TAny* aPtr );
       
   190         
   173     private: // members used in testing
   191     private: // members used in testing
   174 
   192         
   175         void CreateContentInfoArrayL( CHsContentInfoArray& aArray, TInt aCount );
       
   176         void CreateWidgetDataArrayL( RWidgetDataValues& aArray, TInt aCount );
       
   177 
       
   178         // file server
   193         // file server
   179         RFs iFs;
   194         RFs iFs;
   180 
   195 
   181         // the WM plugin instance
   196         // the WM plugin instance
   182         CWmPlugin* iWmPlugin;
   197         CWmPlugin* iWmPlugin;
   200         TBool iWaiting;
   215         TBool iWaiting;
   201 
   216 
   202         // multipurpose test data count
   217         // multipurpose test data count
   203         TInt iMass;
   218         TInt iMass;
   204 
   219 
       
   220         // uninstall uid
       
   221         TUid iUninstallUid;
       
   222         
       
   223         // timer for waiting uninstall to finnish
       
   224         CPeriodic* iTimer;
       
   225         
   205         // requested changes to the content
   226         // requested changes to the content
   206         TInt iChangeIndex;
   227         TInt iChangeIndex;
   207         TInt iChangeType;
   228         TInt iChangeType;
   208         HBufC16* iChangeValue;
   229         HBufC16* iChangeValue;
   209     };
   230     };