sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #include "tdirectgdinoadapter.h" sl@0: #include sl@0: #include sl@0: sl@0: sl@0: CTNoAdapter::CTNoAdapter() sl@0: { sl@0: SetTestStepName(KTDirectGdiNoAdapter); sl@0: } sl@0: sl@0: CTNoAdapter::~CTNoAdapter() sl@0: { sl@0: } sl@0: sl@0: /** sl@0: @SYMTestCaseID sl@0: GRAPHICS-DIRECTGDI-NOADAPTER-0001 sl@0: sl@0: @SYMPREQ sl@0: PREQ39 sl@0: sl@0: @SYMREQ sl@0: REQ9229 sl@0: sl@0: @SYMTestCaseDesc sl@0: Test drivers return errors when attemptiong to load adaptation when it isn't present. sl@0: sl@0: @SYMTestStatus sl@0: Implemented sl@0: sl@0: @SYMTestPriority sl@0: High sl@0: sl@0: @SYMTestActions sl@0: 1. Attempt to open SgDriver sl@0: 2. Attempt to open DirectGDI Driver sl@0: sl@0: @SYMTestExpectedResults sl@0: 1. SgDriver returns KErrNotSupported as the adaptation layer is not present. sl@0: 2. DirectGDI Driver returns KErrNotSupoorted as the adaptation layer is not present. sl@0: */ sl@0: void CTNoAdapter::TestNoAdapter() sl@0: { sl@0: SetTestStepID(_L("GRAPHICS-DIRECTGDI-NOADAPTER-0001")); sl@0: _LIT(KTestName, "Test Calls to Open Drivers Return Error"); sl@0: INFO_PRINTF1(KTestName); sl@0: sl@0: TEST(KErrNotSupported == SgDriver::Open()); sl@0: TEST(KErrNotSupported == CDirectGdiDriver::Open()); sl@0: TRAPD(err,RecordTestResultL()); sl@0: if (err!=KErrNone) sl@0: INFO_PRINTF1(_L("Failed to record test result")); sl@0: } sl@0: sl@0: /** sl@0: Override of base class pure virtual sl@0: Our implementation only gets called if the base class doTestStepPreambleL() did sl@0: not leave. That being the case, the current test result value will be EPass. sl@0: @leave Gets system wide error code sl@0: @return TVerdict code sl@0: */ sl@0: TVerdict CTNoAdapter::doTestStepL() sl@0: { sl@0: #ifndef __WINS__ sl@0: TestNoAdapter(); sl@0: #else sl@0: INFO_PRINTF1(_L("These tests only run on hardware!")); sl@0: #endif sl@0: return TestStepResult(); sl@0: } sl@0: sl@0: