classicui_plat/stylus_activated_popup_api/tsrc/inc/testdomstylusactivepopup.h
changeset 0 2f259fa3e83a
child 14 3320e4e6e8bb
child 23 3d340a0166ff
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Test api of stylus activated popup
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_TESTDOMSTYLUSACTIVEPOPUP_H
       
    20 #define C_TESTDOMSTYLUSACTIVEPOPUP_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <stiflogger.h>
       
    24 #include <testscripterinternal.h>
       
    25 #include <stiftestmodule.h>
       
    26 #include <testclassassert.h>
       
    27 #include <eikenv.h>
       
    28 #include <e32std.h>
       
    29 #include <aknlayout2scalabledef.h>
       
    30 #include <aknstylusactivatedpopupcontent.h>
       
    31 
       
    32 #include "testdomstylusactivepopupcontainer.h"
       
    33 
       
    34 // MACROS
       
    35 #define TEST_CLASS_VERSION_MAJOR 0
       
    36 #define TEST_CLASS_VERSION_MINOR 0
       
    37 #define TEST_CLASS_VERSION_BUILD 0
       
    38 
       
    39 // Logging path
       
    40 _LIT( KtestdomstylusactivepopupLogPath, "\\logs\\testframework\\testdomstylusactivepopup\\" ); 
       
    41 // Log file
       
    42 _LIT( KtestdomstylusactivepopupLogFile, "testdomstylusactivepopup.txt" ); 
       
    43 _LIT( KtestdomstylusactivepopupLogFileWithTitle, "testdomstylusactivepopup_[%S].txt" );
       
    44 
       
    45 /**
       
    46 *  CTestDomStylusActivePopup test class for STIF Test Framework TestScripter.
       
    47 *  @since S60 5.0
       
    48 */
       
    49 NONSHARABLE_CLASS( CTestDomStylusActivePopup ) : public CScriptBase
       
    50     {
       
    51 public:  // Constructors and destructor
       
    52 
       
    53     /**
       
    54     * Two-phased constructor.
       
    55     */
       
    56     static CTestDomStylusActivePopup* NewL( CTestModuleIf& aTestModuleIf );
       
    57 
       
    58     /**
       
    59     * Destructor.
       
    60     */
       
    61     virtual ~CTestDomStylusActivePopup();
       
    62 
       
    63 public: // Functions from base classes
       
    64 
       
    65     /**
       
    66     * From CScriptBase Runs a script line.
       
    67     * @since S60 5.0
       
    68     * @param aItem Script line containing method name and parameters
       
    69     * @return Symbian OS error code
       
    70     */
       
    71     virtual TInt RunMethodL( CStifItemParser& aItem );
       
    72 
       
    73 private:
       
    74 
       
    75     /**
       
    76     * C++ default constructor.
       
    77     */
       
    78     CTestDomStylusActivePopup( CTestModuleIf& aTestModuleIf );
       
    79 
       
    80     /**
       
    81     * By default Symbian 2nd phase constructor is private.
       
    82     */
       
    83     void ConstructL();
       
    84     
       
    85     /**
       
    86      * Method used to log version of test class
       
    87      */
       
    88     void SendTestClassVersion();
       
    89     
       
    90         /**
       
    91      * Turn off ScreenSaver
       
    92      * @since S60 5.0
       
    93      * @return Symbian OS error code.
       
    94      */
       
    95     void TurnOffScreenSaver();
       
    96 
       
    97     /**
       
    98      * Restore ScreenSaver
       
    99      * @since S60 5.0
       
   100      * @return Symbian OS error code.
       
   101      */
       
   102     void RestoreScreenSaver();
       
   103 
       
   104 private: // [TestMethods]
       
   105     
       
   106     /**
       
   107     * TestCAknStylActivePopUpContentNewL test four overload function
       
   108     * NewL of CAknStylusActivatedPopUpContent
       
   109     * @since S60 5.0
       
   110     * @param aItem is a number, 1 test NewL only with text parameters,
       
   111     * 2 test function with array parameters, 3 test function with resource
       
   112     * and 4 test function with reader.
       
   113     * @return Symbian OS error code.
       
   114     */
       
   115     virtual TInt TestCAknStylActivePopUpContentNewL( CStifItemParser& aItem );
       
   116     
       
   117     /**
       
   118     * TestCAknStylActivePopUpContentConstructFromResourceL test two overload function
       
   119     * ConstructFromResourceL of CAknStylusActivatedPopUpContent in 
       
   120     * aknstylusactivatedpopupcontent.h
       
   121     * @since S60 5.0
       
   122     * @param aItem is a number, 1 test function with resource id,
       
   123     * 2 test function with resource reader
       
   124     * @return Symbian OS error code.
       
   125     */
       
   126     virtual TInt TestCAknStylActivePopUpContentConstructFromResourceL( CStifItemParser& aItem );
       
   127     
       
   128     /**
       
   129     * TestCAknStylActivePopUpContentConstructFromResourceL test SetCommandObserver
       
   130     * of CAknStylusActivatedPopUpContent in aknstylusactivatedpopupcontent.h
       
   131     * @since S60 5.0
       
   132     * @param aItem is not used.
       
   133     * @return Symbian OS error code.
       
   134     */
       
   135     virtual TInt TestCAknStylActivePopUpContentSetCommandObserverL( CStifItemParser& aItem );
       
   136     
       
   137     /**
       
   138     * TestCAknStylActivePopUpContentSetContainerWindowLL test SetContainerWindowL
       
   139     * of CAknStylusActivatedPopUpContent in aknstylusactivatedpopupcontent.h
       
   140     * @since S60 5.0
       
   141     * @param aItem is not used.
       
   142     * @return Symbian OS error code.
       
   143     */
       
   144     virtual TInt TestCAknStylActivePopUpContentSetContainerWindowLL( CStifItemParser& aItem );
       
   145     
       
   146     /**
       
   147     * TestCAknStylActivePopUpContentHandleEventL test HandleResourceChange and
       
   148     * HandleControlEventL of CAknStylusActivatedPopUpContent 
       
   149     * in aknstylusactivatedpopupcontent.h
       
   150     * @since S60 5.0
       
   151     * @param aItem is not used.
       
   152     * @return Symbian OS error code.
       
   153     */
       
   154     virtual TInt TestCAknStylActivePopUpContentHandleEventL( CStifItemParser& aItem );
       
   155     
       
   156     
       
   157     
       
   158     
       
   159     
       
   160 
       
   161 private:    // Data
       
   162 
       
   163     /**
       
   164      * ScreenSaver Property
       
   165      */
       
   166     TInt iOldScreenSaverProperty;
       
   167     
       
   168     /**
       
   169      * Container with window
       
   170      * Own
       
   171      */
       
   172     CTestStyleActivePopUpContainer* iContainer;
       
   173     
       
   174      /*
       
   175       * Switch case Id
       
   176       * */
       
   177      enum SwitchId
       
   178          {
       
   179          ECaseOne = 1,
       
   180          ECaseTwo,
       
   181          ECaseThree,
       
   182          ECaseFour
       
   183          };
       
   184     // Resource file offset
       
   185     TInt iOffset;
       
   186     };
       
   187 
       
   188 #endif      // C_TESTDOMSTYLUSACTIVEPOPUP_H
       
   189 
       
   190 // End of File