Update contrib.
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 TESTCASE0678_H
19 #define TESTCASE0678_H
22 //----------------------------------------------------------------------------------------------
23 //! @SYMTestCaseID PBASE-T_OTGDI-0678
24 //! @SYMTestCaseDesc B-Device Role-swap attempt. VBUS up, b_hnp_enable, bus 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, and suspends it
34 //! 5. B-Peripheral waits to arrive in suspended state
35 //! 6. B-Device makes a bus request, HNP occurs
36 //! 7. A-Device and B-Device arrive in swapped roles (B-Host, A-Peripheral)
37 //! 8. A-Peripheral waits to arrive in configured state, B-Device waits to become B-Peripheral
38 //! 9. B-Host enumerates newly attached peripheral, and suspends it
39 //! 11. A-Peripheral waits to arrive in suspended state
40 //! 12. Role swap occurs automatically. Test repeats from step 2, 3 times.
41 //! 13. A-Device drops VBus
42 //! 14. A-Device and B-Device both observe VBus dropping.
44 //! @SYMTestExpectedResults VBus rises, followed by multiple role swaps, followed by VBus dropping (within 30 seconds)
45 //! @SYMTestStatus Defined
46 //----------------------------------------------------------------------------------------------
49 class CTestCase0678 : public CTestCaseB2BRoot
52 static CTestCase0678* NewL(TBool aHost);
53 virtual ~CTestCase0678();
55 virtual void ExecuteTestCaseL();
57 static void CancelKB(CTestCaseRoot *pThis);
61 TInt GetStepIndex() { return(iCaseStep); };
64 CTestCase0678(TBool aHost);
73 ELoadLdd, // Load LDDs, trigger FDFActor
74 EReadyToRaiseVBus, // Wait until VBus arrives
75 EDefaultRoles, // B-device as peripheral, A-device as host
76 EBConfigured, // B-Device is configured
77 EBSuspended, // B-device is suspended
78 ESwappedRoles, // B-device as peripheral, A-device as host
79 EAConfigured, // A-Device is configured
80 EASuspended, // A-device is suspended
82 EDropVBus, // Tidyup steps
90 TInt iStateRetry; // swallow other events
92 TInt iHNPCounter; // We want to do a full HNP cycle (A-Host->A-Peripheral->A-Host) x 3
94 const static TTestCaseFactoryReceipt<CTestCase0678> iFactoryReceipt;
98 #endif // TESTCASE0678_H