|
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 TESTCASE0468_H |
|
19 #define TESTCASE0468_H |
|
20 |
|
21 |
|
22 |
|
23 //---------------------------------------------------------------------------------------------- |
|
24 //! @SYMTestCaseID PBASE-T_OTGDI-0468 |
|
25 //! @SYMTestCaseDesc Alternative ID_PIN detection API. |
|
26 //! @SYMFssID |
|
27 //! @SYMPREQ 1782 |
|
28 //! @SYMREQ 7080 |
|
29 //! @SYMTestType UT |
|
30 //! @SYMTestPriority 1 |
|
31 //! @SYMTestActions 1. Drive VBus BusRequest() |
|
32 //! 2. Register for VBus notification method QueueOtgVbusNotification() Delay at least 200ms |
|
33 //! 3. Wait 1 second max for VBus HIGH event |
|
34 //! 4. Drop VBus BusDrop() |
|
35 //! 5. Register for VBus notification method QueueOtgVbusNotification() |
|
36 //! 6. Wait 1 second max for VBus LOW event |
|
37 //! 7. Repeat steps 1 through 6, 3 times over |
|
38 //! @SYMTestExpectedResults Between steps 2 and 3, we expect to see an HIGH vbus fire, |
|
39 //! Between steps 5,6 we expect another LOW vbus event. Fail the test |
|
40 //! if event does not arrive in the 200milli -second time |
|
41 //---------------------------------------------------------------------------------------------- |
|
42 |
|
43 class CTestCase0468 : public CTestCaseRoot |
|
44 { |
|
45 public: |
|
46 static CTestCase0468* NewL(TBool aHost); |
|
47 virtual ~CTestCase0468(); |
|
48 |
|
49 virtual void ExecuteTestCaseL(); |
|
50 void DoCancel(); |
|
51 static void CancelKB(CTestCaseRoot *pThis); |
|
52 |
|
53 void RunStepL(); |
|
54 virtual void DescribePreconditions(); |
|
55 TInt GetStepIndex() { return(iCaseStep); }; |
|
56 |
|
57 static void CancelNotify(CTestCaseRoot *pThis); |
|
58 |
|
59 private: |
|
60 CTestCase0468(TBool aHost); |
|
61 void ConstructL(); |
|
62 |
|
63 |
|
64 // DATA |
|
65 private: |
|
66 |
|
67 TInt iRepeats; // loop counter, |
|
68 |
|
69 |
|
70 enum TCaseSteps |
|
71 { |
|
72 EPreconditions, |
|
73 ELoadLdd, // load |
|
74 EDetectAPlug, // double-check before starting |
|
75 ELoopControl, // loop: loop control =3x3 times (wait 50ms) |
|
76 ELoopDriveVBus, // loop: drive |
|
77 ELoopVerifyVBus,// loop: check |
|
78 ELoopWait, // loop: wait (50ms) |
|
79 ELoopDropVBus, // loop: drop |
|
80 ELoopVerifyDrop,// loop: test Vbus dropped, and repeat ELoopDriveVBus |
|
81 EUnloadLdd, // unload |
|
82 ELastStep |
|
83 }; |
|
84 |
|
85 |
|
86 TCaseSteps iCaseStep; |
|
87 |
|
88 const static TTestCaseFactoryReceipt<CTestCase0468> iFactoryReceipt; |
|
89 |
|
90 CTestCaseWatchdog *iWDTimer; |
|
91 |
|
92 void ContinueAfter(TTimeIntervalMicroSeconds32 aMicroSecs, TCaseSteps step); |
|
93 }; |
|
94 |
|
95 |
|
96 #endif // TESTCASE0468_H |