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 TESTCASE0680_H sl@0: #define TESTCASE0680_H sl@0: sl@0: sl@0: //---------------------------------------------------------------------------------------------- sl@0: //! @SYMTestCaseID PBASE-T_OTGDI-0680 sl@0: //! @SYMTestCaseDesc A-Device requests bus, VBUS is high, device is b_hnp_enabled, but not suspended sl@0: //! @SYMFssID sl@0: //! @SYMPREQ 1305 sl@0: //! @SYMREQ 8929 sl@0: //! @SYMTestType UT sl@0: //! @SYMTestPriority 1 sl@0: //! @SYMTestActions 1. A-Device raises VBus sl@0: //! 2. A-Device and B-Device wait to arrive in default roles (A-Host, B-Peripheral) sl@0: //! 3. B-Peripheral waits to arrive in configured state, A-Device waits to become A-Peripheral sl@0: //! 4. A-Host enumerates newly attached peripheral, but does not suspend it sl@0: //! 6. B-Device makes a bus request sl@0: //! 7. No HNP occurs, B-Device generates message to say HNP is not possible sl@0: //! 8. A-Device drops VBus sl@0: //! 9. A-Device and B-Device both observe VBus dropping. sl@0: //! sl@0: //! @SYMTestExpectedResults There should be no role swap, and error message should be generated at step 7. sl@0: //! @SYMTestStatus Defined sl@0: //---------------------------------------------------------------------------------------------- sl@0: sl@0: class CTestCase0680 : public CTestCaseB2BRoot sl@0: { sl@0: public: sl@0: static CTestCase0680* NewL(TBool aHost); sl@0: virtual ~CTestCase0680(); sl@0: sl@0: virtual void ExecuteTestCaseL(); sl@0: void DoCancel(); sl@0: static void CancelKB(CTestCaseRoot *pThis); sl@0: sl@0: void RunStepL(); sl@0: sl@0: TInt GetStepIndex() { return(iCaseStep); }; sl@0: sl@0: private: sl@0: CTestCase0680(TBool aHost); sl@0: void ConstructL(); sl@0: sl@0: // DATA sl@0: private: sl@0: sl@0: enum TCaseSteps sl@0: { sl@0: EPreconditions, sl@0: ELoadLdd, // Load LDDs, trigger FDFActor sl@0: EReadyToRaiseVBus, // Wait until VBus arrives sl@0: EDefaultRoles, // B-device as peripheral, A-device as host sl@0: EBConfigured, // B-Device is configured sl@0: EBErrorReceived, // B-device receives error message (refusal to role-swap because we're not suspended) sl@0: EDropVBus, // Tidyup steps... sl@0: EVBusDropped, sl@0: EUnloadLdd, sl@0: EUnloadClient, sl@0: ELastStep sl@0: }; sl@0: sl@0: TCaseSteps iCaseStep; sl@0: TInt iStateRetry; // swallow other events sl@0: sl@0: const static TTestCaseFactoryReceipt iFactoryReceipt; sl@0: }; sl@0: sl@0: sl@0: sl@0: #endif // TESTCASE0680_H