windowing/windowserver/test/tscreenconstruct/src/twservscreenconstructstepload.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 31 Mar 2010 23:34:07 +0300
branchRCL_3
changeset 26 15986eb6c500
parent 0 5d03bc08d59c
permissions -rw-r--r--
Revision: 201010 Kit: 201013

// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//

/**
 @file
 @test
 @internalComponent
*/

#include "twservscreenconstructstepload.h"
#include <test/tefunit.h>
#include <e32const.h>	//KNullUidValue
#include <gdi.h>

/**
Constructor of CTWServScreenConstructStepLoad
*/
CTWServScreenConstructStepLoad::CTWServScreenConstructStepLoad()
	{
	SetTestStepName(KTWServScreenConstructStepLoad);
	}

/**
Destructor of CTWServScreenConstructStepLoad
*/
CTWServScreenConstructStepLoad::~CTWServScreenConstructStepLoad()
	{
	delete iGc;
	delete iScreen;
	iWinGroup.Close();
	iWsSession.Flush();
	iWsSession.Close();
	}

/**
Overrides test step preamble.
*/
enum TVerdict CTWServScreenConstructStepLoad::doTestStepPreambleL()
	{
	TVerdict ret = CTestStep::doTestStepPreambleL();

	User::LeaveIfError(iWsSession.Connect());

	iScreen = new (ELeave) CWsScreenDevice(iWsSession);
	User::LeaveIfError(iScreen->Construct());
	iWinGroup = RWindowGroup(iWsSession);
	User::LeaveIfError(iWinGroup.Construct(KNullWsHandle, iScreen));
	iWinGroup.AutoForeground(ETrue);
	iGc = new (ELeave) CWindowGc(iScreen);
	User::LeaveIfError(iGc->Construct());

	return ret;
	}

/**
Overrides test step prostamble.
*/
enum TVerdict CTWServScreenConstructStepLoad::doTestStepPostambleL()
	{
	return TestStepResult();
	}

/**
Starts test step
@return TVerdict pass / fail
*/
enum TVerdict CTWServScreenConstructStepLoad::doTestStepL()
	{
	return TestStepResult();
	}