os/graphics/windowing/windowserver/test/tauto/THeartBeat.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 /**
    17  @file
    18  @test
    19  @internalComponent - Internal Symbian test code
    20 */
    21 
    22 #ifndef __THEARTBEAT_H__
    23 #define __THEARTBEAT_H__
    24 
    25 #include <e32std.h>
    26 #include <w32std.h>
    27 #include "AUTO.H"
    28 #include "TAUTODLL.H"
    29 
    30 class CTHeartBeatTest : public CTWsGraphicsBase
    31 	{
    32 public:
    33 	CTHeartBeatTest(CTestStep* aStep);
    34 	~CTHeartBeatTest();
    35 protected:
    36 //from MTestCases
    37 	void RunTestCaseL(TInt aCurTestCase);
    38 private:
    39 	enum TCursorTransWinTestMode
    40 		{
    41 		ECursorTransWinTestNA=-1,
    42 		ECursorTransWinTestModeFullTrans,
    43 		ECursorTransWinTestNoTrans,
    44 		ECursorTransWinTestPartialTransExposingCursor,
    45 		ECursorTransWinTestPartialTransCoveringCursor,
    46 		ENumCursorTransWinTestModes,
    47 		};
    48 private:
    49 	void SetCursor(const TPoint& aPos,const TSize& aSize, TUint aFlags=0);
    50 	void CancelTextCursor();
    51 	void ConstructL();
    52 	void TestTextCursorTimerL();
    53 	void TestTextCursorTimerTransL();
    54 	void RunTransWinTestsL(const TRect& aGraphicRect);
    55 	void LoopThroughTransWinTestModes(RWindow& aTransWin, const TRect& aGraphicRect, TInt aExtraWinTestMode);
    56 	TBool ChangeTransAndCheckHeartBeat(TInt aTestMode, RWindow& aTransWin, const TRect& aGraphicRect, TInt aExtraWinTestMode, const TDesC* aErrorMsg, TBool aSetVisibleAfterTransUpdate);
    57 	void FailCursorHbTest(const TDesC& aErrorBase, const TDesC* aExtraText, TBool aHbState, TBool aHbCheckState);
    58 	void TestHeartBeatStopStart(TBool aHeartbeatStateOff,TBool aHeartbeatStateOn,const TDesC& aOffText,const TDesC& aOnText);
    59 	TBool GetHeartBeatTimerState() const;
    60 	TBool SetAutoHeartBeatPauseState(TBool aState) const;
    61 	void TestActiveInactiveEvents();
    62 	void TestAnimDllL(TBool aSpriteMode, TUint aSpriteFlags);
    63 	void TestAnimDllTransL();
    64 	void doTestActiveInactiveEvents(TBool aCursorOn, TBool aAutoPauseOn);
    65 	static TInt DoPanicTest(TInt aInt, TAny* aScreenNumber);
    66 private:
    67 	RAnimDll iAnimDll;
    68 	CAnimWindow* iHbTestWin;
    69 	};
    70 
    71 class CTHeartBeatTestStep : public CTGraphicsStep
    72 	{
    73 public:
    74 	CTHeartBeatTestStep();
    75 protected:	
    76 	//from CTGraphicsStep
    77 	CTGraphicsBase* CreateTestL();
    78 	};
    79 
    80 _LIT(KTHeartBeatTestStep,"THeartBeatTest");
    81 
    82 #endif