|
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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // @internalComponent |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef TESTCASE0680_H |
|
19 #define TESTCASE0680_H |
|
20 |
|
21 |
|
22 //---------------------------------------------------------------------------------------------- |
|
23 //! @SYMTestCaseID PBASE-T_OTGDI-0680 |
|
24 //! @SYMTestCaseDesc A-Device requests bus, VBUS is high, device is b_hnp_enabled, but not suspended |
|
25 //! @SYMFssID |
|
26 //! @SYMPREQ 1305 |
|
27 //! @SYMREQ 8929 |
|
28 //! @SYMTestType UT |
|
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. |
|
38 //! |
|
39 //! @SYMTestExpectedResults There should be no role swap, and error message should be generated at step 7. |
|
40 //! @SYMTestStatus Defined |
|
41 //---------------------------------------------------------------------------------------------- |
|
42 |
|
43 class CTestCase0680 : public CTestCaseB2BRoot |
|
44 { |
|
45 public: |
|
46 static CTestCase0680* NewL(TBool aHost); |
|
47 virtual ~CTestCase0680(); |
|
48 |
|
49 virtual void ExecuteTestCaseL(); |
|
50 void DoCancel(); |
|
51 static void CancelKB(CTestCaseRoot *pThis); |
|
52 |
|
53 void RunStepL(); |
|
54 |
|
55 TInt GetStepIndex() { return(iCaseStep); }; |
|
56 |
|
57 private: |
|
58 CTestCase0680(TBool aHost); |
|
59 void ConstructL(); |
|
60 |
|
61 // DATA |
|
62 private: |
|
63 |
|
64 enum TCaseSteps |
|
65 { |
|
66 EPreconditions, |
|
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... |
|
73 EVBusDropped, |
|
74 EUnloadLdd, |
|
75 EUnloadClient, |
|
76 ELastStep |
|
77 }; |
|
78 |
|
79 TCaseSteps iCaseStep; |
|
80 TInt iStateRetry; // swallow other events |
|
81 |
|
82 const static TTestCaseFactoryReceipt<CTestCase0680> iFactoryReceipt; |
|
83 }; |
|
84 |
|
85 |
|
86 |
|
87 #endif // TESTCASE0680_H |