os/graphics/windowing/windowserver/test/tauto/TSCRDEV.H
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/windowing/windowserver/test/tauto/TSCRDEV.H	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,107 @@
     1.4 +// Copyright (c) 1996-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 +/**
    1.20 + @file
    1.21 + @test
    1.22 + @internalComponent - Internal Symbian test code
    1.23 +*/
    1.24 +
    1.25 +#ifndef __TSCRDEV_H__
    1.26 +#define __TSCRDEV_H__
    1.27 +
    1.28 +#include <e32std.h>
    1.29 +#include "w32std.h"
    1.30 +#include "../tlib/testbase.h"
    1.31 +#include "AUTO.H"
    1.32 +#include "TGraphicsHarness.h"
    1.33 +
    1.34 +class CTScreenDevice : public CTWsGraphicsBase
    1.35 +	{
    1.36 +public:
    1.37 +	CTScreenDevice(CTestStep* aStep);
    1.38 +	~CTScreenDevice();
    1.39 +	void ConstructL();
    1.40 +	void TestTwipPixelConversions();
    1.41 +	void TestTwipPixelOverflow();
    1.42 +	void TwipsCacheFlushL();
    1.43 +	void CheckBitmapL(CFbsBitmap *aBitmap, const TRect &aRect);
    1.44 +	void TestScreenToBitmap();
    1.45 +protected:
    1.46 +	virtual void RunTestCaseL(TInt aCurTestCase);
    1.47 +private:
    1.48 +	void doTestScreenToBitmapL();
    1.49 +	};
    1.50 +
    1.51 +class CTScreenDeviceStep : public CTGraphicsStep
    1.52 +	{
    1.53 +public:
    1.54 +	CTScreenDeviceStep();
    1.55 +protected:
    1.56 +	//from CTGraphicsStep
    1.57 +	virtual CTGraphicsBase* CreateTestL();
    1.58 +	};
    1.59 +
    1.60 +class CCachePanic : public CBase
    1.61 +	{
    1.62 +protected:
    1.63 +	CCachePanic()
    1.64 +		{
    1.65 +		};
    1.66 +	~CCachePanic();
    1.67 +	virtual void TestL();
    1.68 +	void ConstructL(TInt aScreenNumber, TInt aInt);
    1.69 +	static TInt DoTest(CCachePanic* aTestClass);
    1.70 +
    1.71 +protected:
    1.72 +	RWsSession iWs;
    1.73 +	CWsScreenDevice* iWsScrDev;
    1.74 +	TInt iScreenNumber;
    1.75 +	TInt iInt;
    1.76 +	};
    1.77 +
    1.78 +class CTwipsPanic : public CCachePanic
    1.79 +	{
    1.80 +public:
    1.81 +	static TInt RunTest(TInt aInt, TAny* aPtr);
    1.82 +
    1.83 +private:
    1.84 +	virtual void TestL();
    1.85 +	};
    1.86 +
    1.87 +class CScanLinePanic : public CCachePanic
    1.88 +	{
    1.89 +public:
    1.90 +	enum ScanLineTestCases
    1.91 +		{
    1.92 +		TESTCASE_GRAPHICS_WSERV_0473 = 0,
    1.93 +		TESTCASE_GRAPHICS_WSERV_0474
    1.94 +		};
    1.95 +public:
    1.96 +	static TInt RunTest(TInt aInt, TAny* aPtr);
    1.97 +
    1.98 +private:
    1.99 +	virtual void TestL();
   1.100 +
   1.101 +	// Methods for test cases go here
   1.102 +private:
   1.103 +	void TestLengthInvariant();
   1.104 +	void TestBufferInvariant();
   1.105 +
   1.106 +	};
   1.107 +
   1.108 +_LIT(KTScreenDeviceStep,"TScreenDevice");
   1.109 +
   1.110 +#endif