os/mm/mmlibs/mmfw/tsrc/mmfunittest/videorenderer/inc/testrendererneg.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
#ifndef TESTRENDERERNEG_H
sl@0
    17
#define TESTRENDERERNEG_H
sl@0
    18
sl@0
    19
// INCLUDES
sl@0
    20
#include "testrenderer.h"
sl@0
    21
sl@0
    22
/* 
sl@0
    23
Test creating surface with different parameters
sl@0
    24
MM-MMF-VIDREND-U-0100 to MM-MMF-VIDREND-U-0107
sl@0
    25
*/
sl@0
    26
class RTestRendererCreateSurfaceStep : public RTestRendererStep
sl@0
    27
	{
sl@0
    28
public:
sl@0
    29
	static RTestRendererCreateSurfaceStep* NewL(const TDesC& aStepName, 
sl@0
    30
													TInt aExpectedError, 
sl@0
    31
													TRgbFormat aRgbFormat, 
sl@0
    32
													TSize aSize, 
sl@0
    33
													TInt aNumBuffers);
sl@0
    34
sl@0
    35
protected:
sl@0
    36
	RTestRendererCreateSurfaceStep(const TDesC& aStepName,
sl@0
    37
									TInt aExpectedError, 
sl@0
    38
									TRgbFormat aRgbFormat, 
sl@0
    39
									TSize aSize, 
sl@0
    40
									TInt aNumBuffers);
sl@0
    41
    TVerdict DoTestStepL();
sl@0
    42
	virtual void FsmL(TTestRendererEvents /*aEventCode*/) {};
sl@0
    43
    
sl@0
    44
private:
sl@0
    45
	TInt iExpectedError;
sl@0
    46
	TInt iNumBuffers;
sl@0
    47
	TInt iDisplayId;
sl@0
    48
	};
sl@0
    49
sl@0
    50
/* 
sl@0
    51
Test update buffer twice in timed and non-timed mode
sl@0
    52
This test case is run by different script for udeb and urel mode to expect different behaviour
sl@0
    53
MM-MMF-VIDREND-U-0108 and MM-MMF-VIDREND-U-0109
sl@0
    54
*/
sl@0
    55
class RTestRendererUpdateTwiceStep : public RTestRendererStep
sl@0
    56
	{
sl@0
    57
public:
sl@0
    58
	static RTestRendererUpdateTwiceStep* NewL(const TDesC& aStepName, TBool aTimed);
sl@0
    59
sl@0
    60
protected:
sl@0
    61
	RTestRendererUpdateTwiceStep(const TDesC& aStepName, TBool aTimed);
sl@0
    62
	void FsmL(TTestRendererEvents aEventCode);
sl@0
    63
	};
sl@0
    64
sl@0
    65
/*
sl@0
    66
Test release buffer twice
sl@0
    67
This class is also base class for test steps that do not need to start active scheduler
sl@0
    68
MM-MMF-VIDREND-U-0110
sl@0
    69
*/
sl@0
    70
class RTestRendererReleaseTwiceStep : public RTestRendererStep
sl@0
    71
	{
sl@0
    72
public:
sl@0
    73
	static RTestRendererReleaseTwiceStep* NewL(const TDesC& aStepName, TBool aTimed);
sl@0
    74
sl@0
    75
protected:
sl@0
    76
	RTestRendererReleaseTwiceStep(const TDesC& aStepName, TBool aTimed);
sl@0
    77
	void FsmL(TTestRendererEvents aEventCode);
sl@0
    78
	TVerdict DoTestStepL();
sl@0
    79
	
sl@0
    80
protected:
sl@0
    81
	TVideoFrameBuffer* iBuffer;
sl@0
    82
	};
sl@0
    83
sl@0
    84
/*
sl@0
    85
Test using surface after destroying surface
sl@0
    86
MM-MMF-VIDREND-U-0111
sl@0
    87
*/
sl@0
    88
class RTestRendererDestroySurfaceStep : public RTestRendererReleaseTwiceStep
sl@0
    89
	{
sl@0
    90
public:
sl@0
    91
	static RTestRendererDestroySurfaceStep* NewL(const TDesC& aStepName, TBool aTimed);
sl@0
    92
sl@0
    93
protected:
sl@0
    94
	RTestRendererDestroySurfaceStep(const TDesC& aStepName, TBool aTimed);
sl@0
    95
	void FsmL(TTestRendererEvents aEventCode);
sl@0
    96
	};
sl@0
    97
sl@0
    98
/* 
sl@0
    99
Test update buffer immediately destroy surface in timed and non-timed mode
sl@0
   100
MM-MMF-VIDREND-U-0112 and MM-MMF-VIDREND-U-0113
sl@0
   101
*/
sl@0
   102
class RTestRendererUpdateAndDestroyStep : public RTestRendererStep
sl@0
   103
	{
sl@0
   104
public:
sl@0
   105
	static RTestRendererUpdateAndDestroyStep* NewL(const TDesC& aStepName, TBool aTimed);
sl@0
   106
	static TInt TimerCallbackFunc(TAny *aPtr);
sl@0
   107
	void FsmL(TTestRendererEvents aEventCode);
sl@0
   108
sl@0
   109
protected:
sl@0
   110
	RTestRendererUpdateAndDestroyStep(const TDesC& aStepName, TBool aTimed);
sl@0
   111
    TVerdict DoTestStepPreambleL();
sl@0
   112
    TVerdict DoTestStepPostambleL();
sl@0
   113
	
sl@0
   114
protected:
sl@0
   115
	CCallBackTimer* iCallbackTimer;
sl@0
   116
	};
sl@0
   117
sl@0
   118
/* 
sl@0
   119
Test update buffer immediately delete video renderer in timed and non-timed mode
sl@0
   120
MM-MMF-VIDREND-U-0114 and MM-MMF-VIDREND-U-0115
sl@0
   121
*/
sl@0
   122
class RTestRendererUpdateAndDeleteStep : public RTestRendererReleaseTwiceStep
sl@0
   123
	{
sl@0
   124
public:
sl@0
   125
	static RTestRendererUpdateAndDeleteStep* NewL(const TDesC& aStepName, TBool aTimed);
sl@0
   126
sl@0
   127
protected:
sl@0
   128
	RTestRendererUpdateAndDeleteStep(const TDesC& aStepName, TBool aTimed);
sl@0
   129
	void FsmL(TTestRendererEvents aEventCode);
sl@0
   130
	};
sl@0
   131
sl@0
   132
/* 
sl@0
   133
Test update buffer with invalid buffer in timed and non-timed mode
sl@0
   134
MM-MMF-VIDREND-U-0116 and MM-MMF-VIDREND-U-0117
sl@0
   135
*/
sl@0
   136
class RTestRendererUpdateInvalidStep : public RTestRendererReleaseTwiceStep
sl@0
   137
	{
sl@0
   138
public:
sl@0
   139
	static RTestRendererUpdateInvalidStep* NewL(const TDesC& aStepName, TBool aTimed);
sl@0
   140
sl@0
   141
protected:
sl@0
   142
	RTestRendererUpdateInvalidStep(const TDesC& aStepName, TBool aTimed);
sl@0
   143
	void FsmL(TTestRendererEvents aEventCode);
sl@0
   144
	};
sl@0
   145
sl@0
   146
/* 
sl@0
   147
Test creating surface twice
sl@0
   148
MM-MMF-VIDREND-U-0118
sl@0
   149
*/
sl@0
   150
class RTestRendererCreateTwiceStep : public RTestRendererReleaseTwiceStep
sl@0
   151
	{
sl@0
   152
public:
sl@0
   153
	static RTestRendererCreateTwiceStep* NewL(const TDesC& aStepName, TBool aTimed);
sl@0
   154
sl@0
   155
protected:
sl@0
   156
	RTestRendererCreateTwiceStep(const TDesC& aStepName, TBool aTimed);
sl@0
   157
	void FsmL(TTestRendererEvents aEventCode);
sl@0
   158
	};
sl@0
   159
sl@0
   160
/* 
sl@0
   161
Test destroying surface that does not exist
sl@0
   162
MM-MMF-VIDREND-U-0119
sl@0
   163
*/
sl@0
   164
class RTestRendererDestroyInvalidStep : public RTestRendererReleaseTwiceStep
sl@0
   165
	{
sl@0
   166
public:
sl@0
   167
	static RTestRendererDestroyInvalidStep* NewL(const TDesC& aStepName, TBool aTimed);
sl@0
   168
sl@0
   169
protected:
sl@0
   170
	RTestRendererDestroyInvalidStep(const TDesC& aStepName, TBool aTimed);
sl@0
   171
	void FsmL(TTestRendererEvents aEventCode);
sl@0
   172
	};
sl@0
   173
sl@0
   174
/* 
sl@0
   175
Test resoure file reader
sl@0
   176
MM-MMF-VIDREND-U-0120
sl@0
   177
*/
sl@0
   178
class RTestResourceFileReaderStep : public RTestStep
sl@0
   179
	{
sl@0
   180
public:
sl@0
   181
	static RTestResourceFileReaderStep* NewL(const TDesC& aStepName, 
sl@0
   182
												const TDesC& aFileName, 
sl@0
   183
												TInt aExpectedFormatErr, 
sl@0
   184
												TInt aExpectedTimerErr, 
sl@0
   185
												TInt64 aExpectedDefaultDelay, 
sl@0
   186
												TInt64 aExpectedDelay);
sl@0
   187
sl@0
   188
protected:
sl@0
   189
	TVerdict DoTestStepL();
sl@0
   190
sl@0
   191
private:
sl@0
   192
	RTestResourceFileReaderStep(const TDesC& aStepName, 
sl@0
   193
								const TDesC& aFileName, 
sl@0
   194
								TInt aExpectedFormatErr, 
sl@0
   195
								TInt aExpectedTimerErr, 
sl@0
   196
								TInt64 aExpectedDefaultDelay, 
sl@0
   197
								TInt64 aExpectedDelay);
sl@0
   198
	TBuf<KMaxFileName> iFileName;
sl@0
   199
	TInt iExpectedFormatErr;
sl@0
   200
	TInt iExpectedTimerErr;
sl@0
   201
	TInt64 iExpectedDefaultDelay;
sl@0
   202
	TInt64 iExpectedMaxDelay;
sl@0
   203
	};
sl@0
   204
sl@0
   205
/* 
sl@0
   206
Test creating a delay by delaying set background surface in timed mode
sl@0
   207
MM-MMF-VIDREND-U-0121
sl@0
   208
*/
sl@0
   209
class RTestRendererDelayStep : public RTestRendererUpdateAndDestroyStep
sl@0
   210
	{
sl@0
   211
public:
sl@0
   212
	static RTestRendererDelayStep* NewL(const TDesC& aStepName);
sl@0
   213
	void FsmL(TTestRendererEvents aEventCode);
sl@0
   214
sl@0
   215
protected:
sl@0
   216
	RTestRendererDelayStep(const TDesC& aStepName);
sl@0
   217
	};
sl@0
   218
sl@0
   219
#endif // TESTRENDERERNEG_H