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 the License "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: // @internalComponent sl@0: // sl@0: // sl@0: sl@0: #ifndef TESTCASE0675_H sl@0: #define TESTCASE0675_H sl@0: sl@0: sl@0: sl@0: //---------------------------------------------------------------------------------------------- sl@0: //! @SYMTestCaseID PBASE-T_OTGDI-0675 sl@0: //! @SYMTestCaseDesc A-Device requests bus, VBUS is high (PBASE-USB_OTGDI-0675) sl@0: //! @SYMFssID sl@0: //! @SYMPREQ 1305 sl@0: //! @SYMREQ 8927 sl@0: //! @SYMTestType UT sl@0: //! @SYMTestPriority 1 sl@0: //! @SYMTestActions 1. Call function on OTGDI to trigger raise VBUS - BusRequest() sl@0: //! 2. Retrieve error event from error callback sl@0: //! @SYMTestExpectedResults Error KErrUsbOtgVbusAlreadyRaised should be observed sl@0: //! @SYMTestStatus Implemented sl@0: //---------------------------------------------------------------------------------------------- sl@0: sl@0: class CTestCase0675 : public CTestCaseRoot sl@0: { sl@0: public: sl@0: static CTestCase0675* NewL(TBool aHost); sl@0: virtual ~CTestCase0675(); sl@0: sl@0: virtual void ExecuteTestCaseL(); sl@0: void DoCancel(); sl@0: static void CancelKB(CTestCaseRoot *pThis); sl@0: protected: sl@0: void RunStepL(); sl@0: virtual void DescribePreconditions(); sl@0: TInt GetStepIndex() { return(iCaseStep); }; sl@0: sl@0: static void CancelNotify(CTestCaseRoot *pThis); sl@0: sl@0: private: sl@0: CTestCase0675(TBool aHost); sl@0: void ConstructL(); sl@0: sl@0: // DATA sl@0: private: sl@0: TInt iRepeats; // loop counter, sl@0: sl@0: sl@0: enum TCaseSteps sl@0: { sl@0: EPreconditions, sl@0: ELoadLdd, // load sl@0: EDetectAPlug, // double-check before starting sl@0: ELoopControl, // loop: START = 3x3 times (wait 50ms) sl@0: ELoopDriveVBus1, // loop: drive1 sl@0: ELoopVerifyVBus1, // loop: check1 sl@0: ELoopDriveVBus2, // loop: drive2 (error event fires ok) sl@0: ELoopVerifyVBus2, // loop: check2 sl@0: ELoopWait, // loop: wait (50ms) sl@0: ELoopDropVBus, // loop: drop (prepare for next itteration) sl@0: ELoopVerifyDrop, // loop: check (prepare for next itteration) sl@0: EUnloadLdd, // unload sl@0: ELastStep sl@0: }; sl@0: sl@0: sl@0: TCaseSteps iCaseStep; sl@0: sl@0: const static TTestCaseFactoryReceipt iFactoryReceipt; sl@0: sl@0: CTestCaseWatchdog *iWDTimer; sl@0: sl@0: void ContinueAfter(TTimeIntervalMicroSeconds32 aMicroSecs, TCaseSteps step); sl@0: }; sl@0: sl@0: sl@0: #endif // TESTCASE0675_H