windowing/windowserver/test/tauto/TSCRDEV.H
author hgs
Tue, 20 Jul 2010 13:27:44 +0300
changeset 121 d72fc2aace31
parent 103 2717213c588a
permissions -rw-r--r--
201027_1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
103
hgs
parents:
diff changeset
     1
// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     2
// All rights reserved.
hgs
parents:
diff changeset
     3
// This component and the accompanying materials are made available
hgs
parents:
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     5
// which accompanies this distribution, and is available
hgs
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     7
//
hgs
parents:
diff changeset
     8
// Initial Contributors:
hgs
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    10
//
hgs
parents:
diff changeset
    11
// Contributors:
hgs
parents:
diff changeset
    12
//
hgs
parents:
diff changeset
    13
// Description:
hgs
parents:
diff changeset
    14
//
hgs
parents:
diff changeset
    15
hgs
parents:
diff changeset
    16
/**
hgs
parents:
diff changeset
    17
 @file
hgs
parents:
diff changeset
    18
 @test
hgs
parents:
diff changeset
    19
 @internalComponent - Internal Symbian test code
hgs
parents:
diff changeset
    20
*/
hgs
parents:
diff changeset
    21
hgs
parents:
diff changeset
    22
#ifndef __TSCRDEV_H__
hgs
parents:
diff changeset
    23
#define __TSCRDEV_H__
hgs
parents:
diff changeset
    24
hgs
parents:
diff changeset
    25
#include <e32std.h>
hgs
parents:
diff changeset
    26
#include "w32std.h"
hgs
parents:
diff changeset
    27
#include "../tlib/testbase.h"
hgs
parents:
diff changeset
    28
#include "AUTO.H"
hgs
parents:
diff changeset
    29
#include "TGraphicsHarness.h"
hgs
parents:
diff changeset
    30
hgs
parents:
diff changeset
    31
class CTScreenDevice : public CTWsGraphicsBase
hgs
parents:
diff changeset
    32
	{
hgs
parents:
diff changeset
    33
public:
hgs
parents:
diff changeset
    34
	CTScreenDevice(CTestStep* aStep);
hgs
parents:
diff changeset
    35
	~CTScreenDevice();
hgs
parents:
diff changeset
    36
	void ConstructL();
hgs
parents:
diff changeset
    37
	void TestTwipPixelConversions();
hgs
parents:
diff changeset
    38
	void TestTwipPixelOverflow();
hgs
parents:
diff changeset
    39
	void TwipsCacheFlushL();
hgs
parents:
diff changeset
    40
	void CheckBitmapL(CFbsBitmap *aBitmap, const TRect &aRect);
hgs
parents:
diff changeset
    41
	void TestScreenToBitmap();
hgs
parents:
diff changeset
    42
protected:
hgs
parents:
diff changeset
    43
	virtual void RunTestCaseL(TInt aCurTestCase);
hgs
parents:
diff changeset
    44
private:
hgs
parents:
diff changeset
    45
	void doTestScreenToBitmapL();
hgs
parents:
diff changeset
    46
	};
hgs
parents:
diff changeset
    47
hgs
parents:
diff changeset
    48
class CTScreenDeviceStep : public CTGraphicsStep
hgs
parents:
diff changeset
    49
	{
hgs
parents:
diff changeset
    50
public:
hgs
parents:
diff changeset
    51
	CTScreenDeviceStep();
hgs
parents:
diff changeset
    52
protected:
hgs
parents:
diff changeset
    53
	//from CTGraphicsStep
hgs
parents:
diff changeset
    54
	virtual CTGraphicsBase* CreateTestL();
hgs
parents:
diff changeset
    55
	};
hgs
parents:
diff changeset
    56
hgs
parents:
diff changeset
    57
class CCachePanic : public CBase
hgs
parents:
diff changeset
    58
	{
hgs
parents:
diff changeset
    59
protected:
hgs
parents:
diff changeset
    60
	CCachePanic()
hgs
parents:
diff changeset
    61
		{
hgs
parents:
diff changeset
    62
		};
hgs
parents:
diff changeset
    63
	~CCachePanic();
hgs
parents:
diff changeset
    64
	virtual void TestL();
hgs
parents:
diff changeset
    65
	void ConstructL(TInt aScreenNumber, TInt aInt);
hgs
parents:
diff changeset
    66
	static TInt DoTest(CCachePanic* aTestClass);
hgs
parents:
diff changeset
    67
hgs
parents:
diff changeset
    68
protected:
hgs
parents:
diff changeset
    69
	RWsSession iWs;
hgs
parents:
diff changeset
    70
	CWsScreenDevice* iWsScrDev;
hgs
parents:
diff changeset
    71
	TInt iScreenNumber;
hgs
parents:
diff changeset
    72
	TInt iInt;
hgs
parents:
diff changeset
    73
	};
hgs
parents:
diff changeset
    74
hgs
parents:
diff changeset
    75
class CTwipsPanic : public CCachePanic
hgs
parents:
diff changeset
    76
	{
hgs
parents:
diff changeset
    77
public:
hgs
parents:
diff changeset
    78
	static TInt RunTest(TInt aInt, TAny* aPtr);
hgs
parents:
diff changeset
    79
hgs
parents:
diff changeset
    80
private:
hgs
parents:
diff changeset
    81
	virtual void TestL();
hgs
parents:
diff changeset
    82
	};
hgs
parents:
diff changeset
    83
hgs
parents:
diff changeset
    84
class CScanLinePanic : public CCachePanic
hgs
parents:
diff changeset
    85
	{
hgs
parents:
diff changeset
    86
public:
hgs
parents:
diff changeset
    87
	enum ScanLineTestCases
hgs
parents:
diff changeset
    88
		{
hgs
parents:
diff changeset
    89
		TESTCASE_GRAPHICS_WSERV_0473 = 0,
hgs
parents:
diff changeset
    90
		TESTCASE_GRAPHICS_WSERV_0474
hgs
parents:
diff changeset
    91
		};
hgs
parents:
diff changeset
    92
public:
hgs
parents:
diff changeset
    93
	static TInt RunTest(TInt aInt, TAny* aPtr);
hgs
parents:
diff changeset
    94
hgs
parents:
diff changeset
    95
private:
hgs
parents:
diff changeset
    96
	virtual void TestL();
hgs
parents:
diff changeset
    97
hgs
parents:
diff changeset
    98
	// Methods for test cases go here
hgs
parents:
diff changeset
    99
private:
hgs
parents:
diff changeset
   100
	void TestLengthInvariant();
hgs
parents:
diff changeset
   101
	void TestBufferInvariant();
hgs
parents:
diff changeset
   102
hgs
parents:
diff changeset
   103
	};
hgs
parents:
diff changeset
   104
hgs
parents:
diff changeset
   105
_LIT(KTScreenDeviceStep,"TScreenDevice");
hgs
parents:
diff changeset
   106
hgs
parents:
diff changeset
   107
#endif