1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/tsrc/mmfunittest/videorenderer/inc/testrendererneg.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,219 @@
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 +#ifndef TESTRENDERERNEG_H
1.20 +#define TESTRENDERERNEG_H
1.21 +
1.22 +// INCLUDES
1.23 +#include "testrenderer.h"
1.24 +
1.25 +/*
1.26 +Test creating surface with different parameters
1.27 +MM-MMF-VIDREND-U-0100 to MM-MMF-VIDREND-U-0107
1.28 +*/
1.29 +class RTestRendererCreateSurfaceStep : public RTestRendererStep
1.30 + {
1.31 +public:
1.32 + static RTestRendererCreateSurfaceStep* NewL(const TDesC& aStepName,
1.33 + TInt aExpectedError,
1.34 + TRgbFormat aRgbFormat,
1.35 + TSize aSize,
1.36 + TInt aNumBuffers);
1.37 +
1.38 +protected:
1.39 + RTestRendererCreateSurfaceStep(const TDesC& aStepName,
1.40 + TInt aExpectedError,
1.41 + TRgbFormat aRgbFormat,
1.42 + TSize aSize,
1.43 + TInt aNumBuffers);
1.44 + TVerdict DoTestStepL();
1.45 + virtual void FsmL(TTestRendererEvents /*aEventCode*/) {};
1.46 +
1.47 +private:
1.48 + TInt iExpectedError;
1.49 + TInt iNumBuffers;
1.50 + TInt iDisplayId;
1.51 + };
1.52 +
1.53 +/*
1.54 +Test update buffer twice in timed and non-timed mode
1.55 +This test case is run by different script for udeb and urel mode to expect different behaviour
1.56 +MM-MMF-VIDREND-U-0108 and MM-MMF-VIDREND-U-0109
1.57 +*/
1.58 +class RTestRendererUpdateTwiceStep : public RTestRendererStep
1.59 + {
1.60 +public:
1.61 + static RTestRendererUpdateTwiceStep* NewL(const TDesC& aStepName, TBool aTimed);
1.62 +
1.63 +protected:
1.64 + RTestRendererUpdateTwiceStep(const TDesC& aStepName, TBool aTimed);
1.65 + void FsmL(TTestRendererEvents aEventCode);
1.66 + };
1.67 +
1.68 +/*
1.69 +Test release buffer twice
1.70 +This class is also base class for test steps that do not need to start active scheduler
1.71 +MM-MMF-VIDREND-U-0110
1.72 +*/
1.73 +class RTestRendererReleaseTwiceStep : public RTestRendererStep
1.74 + {
1.75 +public:
1.76 + static RTestRendererReleaseTwiceStep* NewL(const TDesC& aStepName, TBool aTimed);
1.77 +
1.78 +protected:
1.79 + RTestRendererReleaseTwiceStep(const TDesC& aStepName, TBool aTimed);
1.80 + void FsmL(TTestRendererEvents aEventCode);
1.81 + TVerdict DoTestStepL();
1.82 +
1.83 +protected:
1.84 + TVideoFrameBuffer* iBuffer;
1.85 + };
1.86 +
1.87 +/*
1.88 +Test using surface after destroying surface
1.89 +MM-MMF-VIDREND-U-0111
1.90 +*/
1.91 +class RTestRendererDestroySurfaceStep : public RTestRendererReleaseTwiceStep
1.92 + {
1.93 +public:
1.94 + static RTestRendererDestroySurfaceStep* NewL(const TDesC& aStepName, TBool aTimed);
1.95 +
1.96 +protected:
1.97 + RTestRendererDestroySurfaceStep(const TDesC& aStepName, TBool aTimed);
1.98 + void FsmL(TTestRendererEvents aEventCode);
1.99 + };
1.100 +
1.101 +/*
1.102 +Test update buffer immediately destroy surface in timed and non-timed mode
1.103 +MM-MMF-VIDREND-U-0112 and MM-MMF-VIDREND-U-0113
1.104 +*/
1.105 +class RTestRendererUpdateAndDestroyStep : public RTestRendererStep
1.106 + {
1.107 +public:
1.108 + static RTestRendererUpdateAndDestroyStep* NewL(const TDesC& aStepName, TBool aTimed);
1.109 + static TInt TimerCallbackFunc(TAny *aPtr);
1.110 + void FsmL(TTestRendererEvents aEventCode);
1.111 +
1.112 +protected:
1.113 + RTestRendererUpdateAndDestroyStep(const TDesC& aStepName, TBool aTimed);
1.114 + TVerdict DoTestStepPreambleL();
1.115 + TVerdict DoTestStepPostambleL();
1.116 +
1.117 +protected:
1.118 + CCallBackTimer* iCallbackTimer;
1.119 + };
1.120 +
1.121 +/*
1.122 +Test update buffer immediately delete video renderer in timed and non-timed mode
1.123 +MM-MMF-VIDREND-U-0114 and MM-MMF-VIDREND-U-0115
1.124 +*/
1.125 +class RTestRendererUpdateAndDeleteStep : public RTestRendererReleaseTwiceStep
1.126 + {
1.127 +public:
1.128 + static RTestRendererUpdateAndDeleteStep* NewL(const TDesC& aStepName, TBool aTimed);
1.129 +
1.130 +protected:
1.131 + RTestRendererUpdateAndDeleteStep(const TDesC& aStepName, TBool aTimed);
1.132 + void FsmL(TTestRendererEvents aEventCode);
1.133 + };
1.134 +
1.135 +/*
1.136 +Test update buffer with invalid buffer in timed and non-timed mode
1.137 +MM-MMF-VIDREND-U-0116 and MM-MMF-VIDREND-U-0117
1.138 +*/
1.139 +class RTestRendererUpdateInvalidStep : public RTestRendererReleaseTwiceStep
1.140 + {
1.141 +public:
1.142 + static RTestRendererUpdateInvalidStep* NewL(const TDesC& aStepName, TBool aTimed);
1.143 +
1.144 +protected:
1.145 + RTestRendererUpdateInvalidStep(const TDesC& aStepName, TBool aTimed);
1.146 + void FsmL(TTestRendererEvents aEventCode);
1.147 + };
1.148 +
1.149 +/*
1.150 +Test creating surface twice
1.151 +MM-MMF-VIDREND-U-0118
1.152 +*/
1.153 +class RTestRendererCreateTwiceStep : public RTestRendererReleaseTwiceStep
1.154 + {
1.155 +public:
1.156 + static RTestRendererCreateTwiceStep* NewL(const TDesC& aStepName, TBool aTimed);
1.157 +
1.158 +protected:
1.159 + RTestRendererCreateTwiceStep(const TDesC& aStepName, TBool aTimed);
1.160 + void FsmL(TTestRendererEvents aEventCode);
1.161 + };
1.162 +
1.163 +/*
1.164 +Test destroying surface that does not exist
1.165 +MM-MMF-VIDREND-U-0119
1.166 +*/
1.167 +class RTestRendererDestroyInvalidStep : public RTestRendererReleaseTwiceStep
1.168 + {
1.169 +public:
1.170 + static RTestRendererDestroyInvalidStep* NewL(const TDesC& aStepName, TBool aTimed);
1.171 +
1.172 +protected:
1.173 + RTestRendererDestroyInvalidStep(const TDesC& aStepName, TBool aTimed);
1.174 + void FsmL(TTestRendererEvents aEventCode);
1.175 + };
1.176 +
1.177 +/*
1.178 +Test resoure file reader
1.179 +MM-MMF-VIDREND-U-0120
1.180 +*/
1.181 +class RTestResourceFileReaderStep : public RTestStep
1.182 + {
1.183 +public:
1.184 + static RTestResourceFileReaderStep* NewL(const TDesC& aStepName,
1.185 + const TDesC& aFileName,
1.186 + TInt aExpectedFormatErr,
1.187 + TInt aExpectedTimerErr,
1.188 + TInt64 aExpectedDefaultDelay,
1.189 + TInt64 aExpectedDelay);
1.190 +
1.191 +protected:
1.192 + TVerdict DoTestStepL();
1.193 +
1.194 +private:
1.195 + RTestResourceFileReaderStep(const TDesC& aStepName,
1.196 + const TDesC& aFileName,
1.197 + TInt aExpectedFormatErr,
1.198 + TInt aExpectedTimerErr,
1.199 + TInt64 aExpectedDefaultDelay,
1.200 + TInt64 aExpectedDelay);
1.201 + TBuf<KMaxFileName> iFileName;
1.202 + TInt iExpectedFormatErr;
1.203 + TInt iExpectedTimerErr;
1.204 + TInt64 iExpectedDefaultDelay;
1.205 + TInt64 iExpectedMaxDelay;
1.206 + };
1.207 +
1.208 +/*
1.209 +Test creating a delay by delaying set background surface in timed mode
1.210 +MM-MMF-VIDREND-U-0121
1.211 +*/
1.212 +class RTestRendererDelayStep : public RTestRendererUpdateAndDestroyStep
1.213 + {
1.214 +public:
1.215 + static RTestRendererDelayStep* NewL(const TDesC& aStepName);
1.216 + void FsmL(TTestRendererEvents aEventCode);
1.217 +
1.218 +protected:
1.219 + RTestRendererDelayStep(const TDesC& aStepName);
1.220 + };
1.221 +
1.222 +#endif // TESTRENDERERNEG_H