os/graphics/windowing/windowserver/test/tauto/THeartBeat.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/windowing/windowserver/test/tauto/THeartBeat.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,82 @@
     1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +/**
    1.20 + @file
    1.21 + @test
    1.22 + @internalComponent - Internal Symbian test code
    1.23 +*/
    1.24 +
    1.25 +#ifndef __THEARTBEAT_H__
    1.26 +#define __THEARTBEAT_H__
    1.27 +
    1.28 +#include <e32std.h>
    1.29 +#include <w32std.h>
    1.30 +#include "AUTO.H"
    1.31 +#include "TAUTODLL.H"
    1.32 +
    1.33 +class CTHeartBeatTest : public CTWsGraphicsBase
    1.34 +	{
    1.35 +public:
    1.36 +	CTHeartBeatTest(CTestStep* aStep);
    1.37 +	~CTHeartBeatTest();
    1.38 +protected:
    1.39 +//from MTestCases
    1.40 +	void RunTestCaseL(TInt aCurTestCase);
    1.41 +private:
    1.42 +	enum TCursorTransWinTestMode
    1.43 +		{
    1.44 +		ECursorTransWinTestNA=-1,
    1.45 +		ECursorTransWinTestModeFullTrans,
    1.46 +		ECursorTransWinTestNoTrans,
    1.47 +		ECursorTransWinTestPartialTransExposingCursor,
    1.48 +		ECursorTransWinTestPartialTransCoveringCursor,
    1.49 +		ENumCursorTransWinTestModes,
    1.50 +		};
    1.51 +private:
    1.52 +	void SetCursor(const TPoint& aPos,const TSize& aSize, TUint aFlags=0);
    1.53 +	void CancelTextCursor();
    1.54 +	void ConstructL();
    1.55 +	void TestTextCursorTimerL();
    1.56 +	void TestTextCursorTimerTransL();
    1.57 +	void RunTransWinTestsL(const TRect& aGraphicRect);
    1.58 +	void LoopThroughTransWinTestModes(RWindow& aTransWin, const TRect& aGraphicRect, TInt aExtraWinTestMode);
    1.59 +	TBool ChangeTransAndCheckHeartBeat(TInt aTestMode, RWindow& aTransWin, const TRect& aGraphicRect, TInt aExtraWinTestMode, const TDesC* aErrorMsg, TBool aSetVisibleAfterTransUpdate);
    1.60 +	void FailCursorHbTest(const TDesC& aErrorBase, const TDesC* aExtraText, TBool aHbState, TBool aHbCheckState);
    1.61 +	void TestHeartBeatStopStart(TBool aHeartbeatStateOff,TBool aHeartbeatStateOn,const TDesC& aOffText,const TDesC& aOnText);
    1.62 +	TBool GetHeartBeatTimerState() const;
    1.63 +	TBool SetAutoHeartBeatPauseState(TBool aState) const;
    1.64 +	void TestActiveInactiveEvents();
    1.65 +	void TestAnimDllL(TBool aSpriteMode, TUint aSpriteFlags);
    1.66 +	void TestAnimDllTransL();
    1.67 +	void doTestActiveInactiveEvents(TBool aCursorOn, TBool aAutoPauseOn);
    1.68 +	static TInt DoPanicTest(TInt aInt, TAny* aScreenNumber);
    1.69 +private:
    1.70 +	RAnimDll iAnimDll;
    1.71 +	CAnimWindow* iHbTestWin;
    1.72 +	};
    1.73 +
    1.74 +class CTHeartBeatTestStep : public CTGraphicsStep
    1.75 +	{
    1.76 +public:
    1.77 +	CTHeartBeatTestStep();
    1.78 +protected:	
    1.79 +	//from CTGraphicsStep
    1.80 +	CTGraphicsBase* CreateTestL();
    1.81 +	};
    1.82 +
    1.83 +_LIT(KTHeartBeatTestStep,"THeartBeatTest");
    1.84 +
    1.85 +#endif