|
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 // 'A' connector detection |
|
16 // |
|
17 // |
|
18 |
|
19 |
|
20 #ifndef TESTCASE0459_H |
|
21 #define TESTCASE0459_H |
|
22 |
|
23 |
|
24 |
|
25 //---------------------------------------------------------------------------------------------- |
|
26 //! @SYMTestCaseID PBASE-T_OTGDI-0459 |
|
27 //! @SYMTestCaseDesc Get ID_PIN notifications |
|
28 //! @SYMFssID |
|
29 //! @SYMPREQ 1782 |
|
30 //! @SYMREQ 7079 |
|
31 //! @SYMTestType UT |
|
32 //! @SYMTestPriority 1 |
|
33 //! @SYMTestActions 1. Fetch the OTG controller state (using QueueOtgStateRequest()) |
|
34 //! 2. Register for events with OtgEventNotification() |
|
35 //! 3. Use internal API to manipulate ID pin state to simulate A plug presence |
|
36 //! 4. Wait max 5 seconds for insertion event. |
|
37 //! 5. Fetch the OTG controller state (using QueueOtgStateRequest()) |
|
38 //! @SYMTestExpectedResults 1. |
|
39 //! Between 3. and 4., we expect to get an indication of A plug insertion. |
|
40 //! 5. |
|
41 //---------------------------------------------------------------------------------------------- |
|
42 |
|
43 class CTestCase0459 : public CTestCaseRoot |
|
44 { |
|
45 public: |
|
46 static CTestCase0459* NewL(TBool aHost); |
|
47 virtual ~CTestCase0459(); |
|
48 |
|
49 virtual void ExecuteTestCaseL(); |
|
50 void DoCancel(); |
|
51 |
|
52 void RunStepL(); |
|
53 virtual void DescribePreconditions(); |
|
54 TInt GetStepIndex() { return(iCaseStep); }; |
|
55 |
|
56 private: |
|
57 CTestCase0459(TBool aHost); |
|
58 void ConstructL(); |
|
59 |
|
60 // DATA |
|
61 public: |
|
62 |
|
63 private: |
|
64 |
|
65 TInt iDequeAttempts; |
|
66 |
|
67 |
|
68 enum TCaseSteps |
|
69 { |
|
70 EPreconditions, |
|
71 ELoadLdd, |
|
72 ERegisterForEvents, // QueueOtgEventRequest( event, status ); |
|
73 EDriveID_PIN, |
|
74 EWait5, |
|
75 ETestStateA, |
|
76 EUnloadLdd, |
|
77 ELastStep |
|
78 }; |
|
79 |
|
80 TCaseSteps iCaseStep; |
|
81 |
|
82 TTime iIDcheckStart; // start of checking for ID_PIN |
|
83 TTime iIDcheckEnd; |
|
84 |
|
85 const static TTestCaseFactoryReceipt<CTestCase0459> iFactoryReceipt; |
|
86 |
|
87 |
|
88 }; |
|
89 |
|
90 |
|
91 #endif // TESTCASE0459_H |