First public contribution.
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
18 #ifndef TESTCASE0680_H
19 #define TESTCASE0680_H
22 //----------------------------------------------------------------------------------------------
23 //! @SYMTestCaseID PBASE-T_OTGDI-0680
24 //! @SYMTestCaseDesc A-Device requests bus, VBUS is high, device is b_hnp_enabled, but not suspended
29 //! @SYMTestPriority 1
30 //! @SYMTestActions 1. A-Device raises VBus
31 //! 2. A-Device and B-Device wait to arrive in default roles (A-Host, B-Peripheral)
32 //! 3. B-Peripheral waits to arrive in configured state, A-Device waits to become A-Peripheral
33 //! 4. A-Host enumerates newly attached peripheral, but does not suspend it
34 //! 6. B-Device makes a bus request
35 //! 7. No HNP occurs, B-Device generates message to say HNP is not possible
36 //! 8. A-Device drops VBus
37 //! 9. A-Device and B-Device both observe VBus dropping.
39 //! @SYMTestExpectedResults There should be no role swap, and error message should be generated at step 7.
40 //! @SYMTestStatus Defined
41 //----------------------------------------------------------------------------------------------
43 class CTestCase0680 : public CTestCaseB2BRoot
46 static CTestCase0680* NewL(TBool aHost);
47 virtual ~CTestCase0680();
49 virtual void ExecuteTestCaseL();
51 static void CancelKB(CTestCaseRoot *pThis);
55 TInt GetStepIndex() { return(iCaseStep); };
58 CTestCase0680(TBool aHost);
67 ELoadLdd, // Load LDDs, trigger FDFActor
68 EReadyToRaiseVBus, // Wait until VBus arrives
69 EDefaultRoles, // B-device as peripheral, A-device as host
70 EBConfigured, // B-Device is configured
71 EBErrorReceived, // B-device receives error message (refusal to role-swap because we're not suspended)
72 EDropVBus, // Tidyup steps...
80 TInt iStateRetry; // swallow other events
82 const static TTestCaseFactoryReceipt<CTestCase0680> iFactoryReceipt;
87 #endif // TESTCASE0680_H