sl@0
|
1 |
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// @internalComponent
|
sl@0
|
15 |
// 'A' connector detection
|
sl@0
|
16 |
//
|
sl@0
|
17 |
//
|
sl@0
|
18 |
|
sl@0
|
19 |
|
sl@0
|
20 |
#ifndef TESTCASE0459_H
|
sl@0
|
21 |
#define TESTCASE0459_H
|
sl@0
|
22 |
|
sl@0
|
23 |
|
sl@0
|
24 |
|
sl@0
|
25 |
//----------------------------------------------------------------------------------------------
|
sl@0
|
26 |
//! @SYMTestCaseID PBASE-T_OTGDI-0459
|
sl@0
|
27 |
//! @SYMTestCaseDesc Get ID_PIN notifications
|
sl@0
|
28 |
//! @SYMFssID
|
sl@0
|
29 |
//! @SYMPREQ 1782
|
sl@0
|
30 |
//! @SYMREQ 7079
|
sl@0
|
31 |
//! @SYMTestType UT
|
sl@0
|
32 |
//! @SYMTestPriority 1
|
sl@0
|
33 |
//! @SYMTestActions 1. Fetch the OTG controller state (using QueueOtgStateRequest())
|
sl@0
|
34 |
//! 2. Register for events with OtgEventNotification()
|
sl@0
|
35 |
//! 3. Use internal API to manipulate ID pin state to simulate A plug presence
|
sl@0
|
36 |
//! 4. Wait max 5 seconds for insertion event.
|
sl@0
|
37 |
//! 5. Fetch the OTG controller state (using QueueOtgStateRequest())
|
sl@0
|
38 |
//! @SYMTestExpectedResults 1.
|
sl@0
|
39 |
//! Between 3. and 4., we expect to get an indication of A plug insertion.
|
sl@0
|
40 |
//! 5.
|
sl@0
|
41 |
//----------------------------------------------------------------------------------------------
|
sl@0
|
42 |
|
sl@0
|
43 |
class CTestCase0459 : public CTestCaseRoot
|
sl@0
|
44 |
{
|
sl@0
|
45 |
public:
|
sl@0
|
46 |
static CTestCase0459* NewL(TBool aHost);
|
sl@0
|
47 |
virtual ~CTestCase0459();
|
sl@0
|
48 |
|
sl@0
|
49 |
virtual void ExecuteTestCaseL();
|
sl@0
|
50 |
void DoCancel();
|
sl@0
|
51 |
|
sl@0
|
52 |
void RunStepL();
|
sl@0
|
53 |
virtual void DescribePreconditions();
|
sl@0
|
54 |
TInt GetStepIndex() { return(iCaseStep); };
|
sl@0
|
55 |
|
sl@0
|
56 |
private:
|
sl@0
|
57 |
CTestCase0459(TBool aHost);
|
sl@0
|
58 |
void ConstructL();
|
sl@0
|
59 |
|
sl@0
|
60 |
// DATA
|
sl@0
|
61 |
public:
|
sl@0
|
62 |
|
sl@0
|
63 |
private:
|
sl@0
|
64 |
|
sl@0
|
65 |
TInt iDequeAttempts;
|
sl@0
|
66 |
|
sl@0
|
67 |
|
sl@0
|
68 |
enum TCaseSteps
|
sl@0
|
69 |
{
|
sl@0
|
70 |
EPreconditions,
|
sl@0
|
71 |
ELoadLdd,
|
sl@0
|
72 |
ERegisterForEvents, // QueueOtgEventRequest( event, status );
|
sl@0
|
73 |
EDriveID_PIN,
|
sl@0
|
74 |
EWait5,
|
sl@0
|
75 |
ETestStateA,
|
sl@0
|
76 |
EUnloadLdd,
|
sl@0
|
77 |
ELastStep
|
sl@0
|
78 |
};
|
sl@0
|
79 |
|
sl@0
|
80 |
TCaseSteps iCaseStep;
|
sl@0
|
81 |
|
sl@0
|
82 |
TTime iIDcheckStart; // start of checking for ID_PIN
|
sl@0
|
83 |
TTime iIDcheckEnd;
|
sl@0
|
84 |
|
sl@0
|
85 |
const static TTestCaseFactoryReceipt<CTestCase0459> iFactoryReceipt;
|
sl@0
|
86 |
|
sl@0
|
87 |
|
sl@0
|
88 |
};
|
sl@0
|
89 |
|
sl@0
|
90 |
|
sl@0
|
91 |
#endif // TESTCASE0459_H
|