sl@0: // Copyright (c) 2007-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: #ifndef TESTRENDERERNEG_H sl@0: #define TESTRENDERERNEG_H sl@0: sl@0: // INCLUDES sl@0: #include "testrenderer.h" sl@0: sl@0: /* sl@0: Test creating surface with different parameters sl@0: MM-MMF-VIDREND-U-0100 to MM-MMF-VIDREND-U-0107 sl@0: */ sl@0: class RTestRendererCreateSurfaceStep : public RTestRendererStep sl@0: { sl@0: public: sl@0: static RTestRendererCreateSurfaceStep* NewL(const TDesC& aStepName, sl@0: TInt aExpectedError, sl@0: TRgbFormat aRgbFormat, sl@0: TSize aSize, sl@0: TInt aNumBuffers); sl@0: sl@0: protected: sl@0: RTestRendererCreateSurfaceStep(const TDesC& aStepName, sl@0: TInt aExpectedError, sl@0: TRgbFormat aRgbFormat, sl@0: TSize aSize, sl@0: TInt aNumBuffers); sl@0: TVerdict DoTestStepL(); sl@0: virtual void FsmL(TTestRendererEvents /*aEventCode*/) {}; sl@0: sl@0: private: sl@0: TInt iExpectedError; sl@0: TInt iNumBuffers; sl@0: TInt iDisplayId; sl@0: }; sl@0: sl@0: /* sl@0: Test update buffer twice in timed and non-timed mode sl@0: This test case is run by different script for udeb and urel mode to expect different behaviour sl@0: MM-MMF-VIDREND-U-0108 and MM-MMF-VIDREND-U-0109 sl@0: */ sl@0: class RTestRendererUpdateTwiceStep : public RTestRendererStep sl@0: { sl@0: public: sl@0: static RTestRendererUpdateTwiceStep* NewL(const TDesC& aStepName, TBool aTimed); sl@0: sl@0: protected: sl@0: RTestRendererUpdateTwiceStep(const TDesC& aStepName, TBool aTimed); sl@0: void FsmL(TTestRendererEvents aEventCode); sl@0: }; sl@0: sl@0: /* sl@0: Test release buffer twice sl@0: This class is also base class for test steps that do not need to start active scheduler sl@0: MM-MMF-VIDREND-U-0110 sl@0: */ sl@0: class RTestRendererReleaseTwiceStep : public RTestRendererStep sl@0: { sl@0: public: sl@0: static RTestRendererReleaseTwiceStep* NewL(const TDesC& aStepName, TBool aTimed); sl@0: sl@0: protected: sl@0: RTestRendererReleaseTwiceStep(const TDesC& aStepName, TBool aTimed); sl@0: void FsmL(TTestRendererEvents aEventCode); sl@0: TVerdict DoTestStepL(); sl@0: sl@0: protected: sl@0: TVideoFrameBuffer* iBuffer; sl@0: }; sl@0: sl@0: /* sl@0: Test using surface after destroying surface sl@0: MM-MMF-VIDREND-U-0111 sl@0: */ sl@0: class RTestRendererDestroySurfaceStep : public RTestRendererReleaseTwiceStep sl@0: { sl@0: public: sl@0: static RTestRendererDestroySurfaceStep* NewL(const TDesC& aStepName, TBool aTimed); sl@0: sl@0: protected: sl@0: RTestRendererDestroySurfaceStep(const TDesC& aStepName, TBool aTimed); sl@0: void FsmL(TTestRendererEvents aEventCode); sl@0: }; sl@0: sl@0: /* sl@0: Test update buffer immediately destroy surface in timed and non-timed mode sl@0: MM-MMF-VIDREND-U-0112 and MM-MMF-VIDREND-U-0113 sl@0: */ sl@0: class RTestRendererUpdateAndDestroyStep : public RTestRendererStep sl@0: { sl@0: public: sl@0: static RTestRendererUpdateAndDestroyStep* NewL(const TDesC& aStepName, TBool aTimed); sl@0: static TInt TimerCallbackFunc(TAny *aPtr); sl@0: void FsmL(TTestRendererEvents aEventCode); sl@0: sl@0: protected: sl@0: RTestRendererUpdateAndDestroyStep(const TDesC& aStepName, TBool aTimed); sl@0: TVerdict DoTestStepPreambleL(); sl@0: TVerdict DoTestStepPostambleL(); sl@0: sl@0: protected: sl@0: CCallBackTimer* iCallbackTimer; sl@0: }; sl@0: sl@0: /* sl@0: Test update buffer immediately delete video renderer in timed and non-timed mode sl@0: MM-MMF-VIDREND-U-0114 and MM-MMF-VIDREND-U-0115 sl@0: */ sl@0: class RTestRendererUpdateAndDeleteStep : public RTestRendererReleaseTwiceStep sl@0: { sl@0: public: sl@0: static RTestRendererUpdateAndDeleteStep* NewL(const TDesC& aStepName, TBool aTimed); sl@0: sl@0: protected: sl@0: RTestRendererUpdateAndDeleteStep(const TDesC& aStepName, TBool aTimed); sl@0: void FsmL(TTestRendererEvents aEventCode); sl@0: }; sl@0: sl@0: /* sl@0: Test update buffer with invalid buffer in timed and non-timed mode sl@0: MM-MMF-VIDREND-U-0116 and MM-MMF-VIDREND-U-0117 sl@0: */ sl@0: class RTestRendererUpdateInvalidStep : public RTestRendererReleaseTwiceStep sl@0: { sl@0: public: sl@0: static RTestRendererUpdateInvalidStep* NewL(const TDesC& aStepName, TBool aTimed); sl@0: sl@0: protected: sl@0: RTestRendererUpdateInvalidStep(const TDesC& aStepName, TBool aTimed); sl@0: void FsmL(TTestRendererEvents aEventCode); sl@0: }; sl@0: sl@0: /* sl@0: Test creating surface twice sl@0: MM-MMF-VIDREND-U-0118 sl@0: */ sl@0: class RTestRendererCreateTwiceStep : public RTestRendererReleaseTwiceStep sl@0: { sl@0: public: sl@0: static RTestRendererCreateTwiceStep* NewL(const TDesC& aStepName, TBool aTimed); sl@0: sl@0: protected: sl@0: RTestRendererCreateTwiceStep(const TDesC& aStepName, TBool aTimed); sl@0: void FsmL(TTestRendererEvents aEventCode); sl@0: }; sl@0: sl@0: /* sl@0: Test destroying surface that does not exist sl@0: MM-MMF-VIDREND-U-0119 sl@0: */ sl@0: class RTestRendererDestroyInvalidStep : public RTestRendererReleaseTwiceStep sl@0: { sl@0: public: sl@0: static RTestRendererDestroyInvalidStep* NewL(const TDesC& aStepName, TBool aTimed); sl@0: sl@0: protected: sl@0: RTestRendererDestroyInvalidStep(const TDesC& aStepName, TBool aTimed); sl@0: void FsmL(TTestRendererEvents aEventCode); sl@0: }; sl@0: sl@0: /* sl@0: Test resoure file reader sl@0: MM-MMF-VIDREND-U-0120 sl@0: */ sl@0: class RTestResourceFileReaderStep : public RTestStep sl@0: { sl@0: public: sl@0: static RTestResourceFileReaderStep* NewL(const TDesC& aStepName, sl@0: const TDesC& aFileName, sl@0: TInt aExpectedFormatErr, sl@0: TInt aExpectedTimerErr, sl@0: TInt64 aExpectedDefaultDelay, sl@0: TInt64 aExpectedDelay); sl@0: sl@0: protected: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: private: sl@0: RTestResourceFileReaderStep(const TDesC& aStepName, sl@0: const TDesC& aFileName, sl@0: TInt aExpectedFormatErr, sl@0: TInt aExpectedTimerErr, sl@0: TInt64 aExpectedDefaultDelay, sl@0: TInt64 aExpectedDelay); sl@0: TBuf iFileName; sl@0: TInt iExpectedFormatErr; sl@0: TInt iExpectedTimerErr; sl@0: TInt64 iExpectedDefaultDelay; sl@0: TInt64 iExpectedMaxDelay; sl@0: }; sl@0: sl@0: /* sl@0: Test creating a delay by delaying set background surface in timed mode sl@0: MM-MMF-VIDREND-U-0121 sl@0: */ sl@0: class RTestRendererDelayStep : public RTestRendererUpdateAndDestroyStep sl@0: { sl@0: public: sl@0: static RTestRendererDelayStep* NewL(const TDesC& aStepName); sl@0: void FsmL(TTestRendererEvents aEventCode); sl@0: sl@0: protected: sl@0: RTestRendererDelayStep(const TDesC& aStepName); sl@0: }; sl@0: sl@0: #endif // TESTRENDERERNEG_H