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 TESTCASE0684_H
19 #define TESTCASE0684_H
22 //----------------------------------------------------------------------------------------------
23 //! @SYMTestCaseID PBASE-T_OTGDI-0684
24 //! @SYMTestCaseDesc 'B' Device should accept all bMaxPower levels from 'A' device
29 //! @SYMTestPriority 1
31 //! 1. Set the bMaxPower to zero for B device. Set the bMaxPower to Zero for A Device.
32 //! 2. Calling BusRequest() on A Device to Raise VBus
33 //! 3. Checking: A device is in A_Host state ,
34 //! B device is in B_Peripheral state,
35 //! B device received B_HNP_ENABLE ,
37 //! 4. call BusRequest() on B device to request a role swap
38 //! 5. Checking: B device temporarily get the host role, (since there are no Function driver load)
39 //! A device received a SET_CONFIGURATION
40 //! 6. Checking: The end state of role swapping is:
41 //! A in A_Peripheral and B in B_Host,
42 //! B device received B_HNP_ENABLE,
44 //! 7. On A device, set the bMaxPower to 50 ma,
45 //! 8. On B device, Issue BusRequest()
46 //! 9. Checking: B device temporarily get the host role,
47 //! A device received a SET_CONFIGURATION
49 //! @SYMTestExpectedResults B device should not complain about A device's power request is too high since now it is in B IdPin mode
50 //! and never supply power to VBus.
51 //! @SYMTestStatus Defined
52 //----------------------------------------------------------------------------------------------
55 class CTestCase0684 : public CTestCaseB2BRoot
58 static CTestCase0684* NewL(TBool aHost);
59 virtual ~CTestCase0684();
61 virtual void ExecuteTestCaseL();
63 static void CancelKB(CTestCaseRoot *pThis);
67 TInt GetStepIndex() { return(iCaseStep); };
70 CTestCase0684(TBool aHost);
80 ELoadLdd, // Load LDDs, trigger FDFActor
81 ESetMaxPower2Zero, // Set bMaxPower in the configure descriptor to 0
82 EReadyToRaiseVBus, // Wait until VBus arrives
83 EDefaultRoles, // B-device as peripheral, A-device as host (and link is "busy")
85 // Steps for this test case only
86 EAWaitForHNPEnabled, // A wait for HNPEnbaled
92 EBConfigured, // B-Device is configured
93 EBSuspended, // B-device is suspended
95 EAIdleHostPriorToAPeripheral,
99 EIdleHostPriorToVBusDown,
100 EDropVBus, // Tidyup steps
107 TCaseSteps iCaseStep;
108 TInt iStateRetry; // swallow other events
109 TInt iBusRequestCounter;
111 const static TTestCaseFactoryReceipt<CTestCase0684> iFactoryReceipt;
115 #endif // TESTCASE0683_H