sl@0: // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @test sl@0: @internalComponent sl@0: */ sl@0: sl@0: #ifndef T_WSERVRATELIMITERTESTSTEP_H_ sl@0: #define T_WSERVRATELIMITERTESTSTEP_H_ sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include "../tratelimitdrawer/wsratelimitdrawer.h" sl@0: sl@0: const TUint32 KNullWsHandle = 0xFFFFFFFF; sl@0: sl@0: /** sl@0: A main interface for implementation test cases sl@0: */ sl@0: class MTestCases sl@0: { sl@0: public: sl@0: virtual void RunTestCaseL(TInt aCurTestCase) = 0; sl@0: }; sl@0: sl@0: class CTestManager; sl@0: sl@0: class CT_WServRateLimiterTestStep : public CTestStep, public MTestCases sl@0: { sl@0: public: sl@0: CT_WServRateLimiterTestStep(); sl@0: ~CT_WServRateLimiterTestStep(); sl@0: // from CTestStep sl@0: virtual enum TVerdict doTestStepL(); sl@0: void RunTestCaseL(TInt aCurTestCase); sl@0: sl@0: private: sl@0: void CreateRWindowL(const RWindowGroup& aWinGroup, RWindow& aWin, const TPoint& aPos, const TRgb& aBkgdColor, const TSize& aWinSize, const TUint32 aHandle = KNullWsHandle ); sl@0: void DrawGraphic(RWindow& aWin, CWsGraphic* aGraphic, CWindowGc* aGc); sl@0: // Test cases sl@0: void TestRateLimitedAnimationL(); sl@0: TBool IsRunningAtExpectedFrameRate(TReal aActualFrameRate, TReal aExpectedFrameRate, TReal aErrorThreshHold); sl@0: sl@0: private: // Data members sl@0: TInt iTestId; sl@0: TDisplayMode iDisplayMode; sl@0: CWindowGc* iGc; sl@0: CWindowGc* iGc2; sl@0: CWsScreenDevice* iScreen; sl@0: CWsScreenDevice* iScreen1; sl@0: RWsSession iWsSession; sl@0: RWindowGroup iWinGroup; sl@0: RWindowGroup iWinGroup1; sl@0: CTestManager* iTestManager; sl@0: TBool iTwoScreens; sl@0: }; sl@0: sl@0: #endif /*T_WSERVRATELIMITERTESTSTEP_H_*/