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 TESTCASE0682_H
19 #define TESTCASE0682_H
22 //----------------------------------------------------------------------------------------------
23 //! @SYMTestCaseID PBASE-T_OTGDI-0682
24 //! @SYMTestCaseDesc B-Device SRP/HNP attempt, A-Device detects SRP, responds with BusRequest
29 //! @SYMTestPriority 1
30 //! @SYMTestActions 1. B-Device triggers SRP, A-Device waits to detect SRP
31 //! 2. A-Device calls BusRequest
32 //! 2. A-Device and B-Device wait to arrive in default roles (A-Host, B-Peripheral)
33 //! 3. B-Peripheral waits to arrive in configured state, A-Device waits to become A-Peripheral
34 //! 4. A-Host enumerates newly attached peripheral, and suspends it
35 //! 5. B-Peripheral waits to arrive in suspended state
36 //! 6. B-Device makes a bus request (except 1st time around loop!), HNP occurs
37 //! 7. A-Device and B-Device arrive in swapped roles (B-Host, A-Peripheral)
38 //! 8. A-Peripheral waits to arrive in configured state, B-Device waits to become B-Peripheral
39 //! 9. B-Host enumerates newly attached peripheral, and suspends it
40 //! 11. A-Peripheral waits to arrive in suspended state
41 //! 12. Role swap occurs automatically. Test repeats from step 2, 3 times.
42 //! 13. A-Device drops VBus
43 //! 14. A-Device and B-Device both observe VBus dropping.
45 //! @SYMTestExpectedResults VBus rises, followed by multiple role swaps, followed by VBus dropping (within 30 seconds)
46 //! @SYMTestStatus Defined
47 //----------------------------------------------------------------------------------------------
50 class CTestCase0682 : public CTestCaseB2BRoot
53 static CTestCase0682* NewL(TBool aHost);
54 virtual ~CTestCase0682();
56 virtual void ExecuteTestCaseL();
58 static void CancelKB(CTestCaseRoot *pThis);
62 TInt GetStepIndex() { return(iCaseStep); };
65 CTestCase0682(TBool aHost);
68 virtual void StepB2BPreconditions();
76 ELoadLdd, // Load LDDs, trigger FDFActor
77 EPerformSrp, // B-device performs SRP, A-device prepares to detect it
78 EAReceivedSrp, // A-device responds to SRP
79 EDefaultRoles, // B-device as peripheral, A-device as host
80 EBConfigured, // B-Device is configured
81 EBSuspended, // B-device is suspended
82 ESwappedRoles, // B-device as peripheral, A-device as host
83 EAConfigured, // A-Device is configured
84 EASuspended, // A-device is suspended
86 EDropVBus, // Tidyup steps
94 TInt iStateRetry; // swallow other events
96 TInt iHNPCounter; // We want to do a full HNP cycle (A-Host->A-Peripheral->A-Host) x 3
98 const static TTestCaseFactoryReceipt<CTestCase0682> iFactoryReceipt;
101 #endif // TESTCASE0682_H