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 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
#ifndef TESTCASE0675_H
|
sl@0
|
19 |
#define TESTCASE0675_H
|
sl@0
|
20 |
|
sl@0
|
21 |
|
sl@0
|
22 |
|
sl@0
|
23 |
//----------------------------------------------------------------------------------------------
|
sl@0
|
24 |
//! @SYMTestCaseID PBASE-T_OTGDI-0675
|
sl@0
|
25 |
//! @SYMTestCaseDesc A-Device requests bus, VBUS is high (PBASE-USB_OTGDI-0675)
|
sl@0
|
26 |
//! @SYMFssID
|
sl@0
|
27 |
//! @SYMPREQ 1305
|
sl@0
|
28 |
//! @SYMREQ 8927
|
sl@0
|
29 |
//! @SYMTestType UT
|
sl@0
|
30 |
//! @SYMTestPriority 1
|
sl@0
|
31 |
//! @SYMTestActions 1. Call function on OTGDI to trigger raise VBUS - BusRequest()
|
sl@0
|
32 |
//! 2. Retrieve error event from error callback
|
sl@0
|
33 |
//! @SYMTestExpectedResults Error KErrUsbOtgVbusAlreadyRaised should be observed
|
sl@0
|
34 |
//! @SYMTestStatus Implemented
|
sl@0
|
35 |
//----------------------------------------------------------------------------------------------
|
sl@0
|
36 |
|
sl@0
|
37 |
class CTestCase0675 : public CTestCaseRoot
|
sl@0
|
38 |
{
|
sl@0
|
39 |
public:
|
sl@0
|
40 |
static CTestCase0675* NewL(TBool aHost);
|
sl@0
|
41 |
virtual ~CTestCase0675();
|
sl@0
|
42 |
|
sl@0
|
43 |
virtual void ExecuteTestCaseL();
|
sl@0
|
44 |
void DoCancel();
|
sl@0
|
45 |
static void CancelKB(CTestCaseRoot *pThis);
|
sl@0
|
46 |
protected:
|
sl@0
|
47 |
void RunStepL();
|
sl@0
|
48 |
virtual void DescribePreconditions();
|
sl@0
|
49 |
TInt GetStepIndex() { return(iCaseStep); };
|
sl@0
|
50 |
|
sl@0
|
51 |
static void CancelNotify(CTestCaseRoot *pThis);
|
sl@0
|
52 |
|
sl@0
|
53 |
private:
|
sl@0
|
54 |
CTestCase0675(TBool aHost);
|
sl@0
|
55 |
void ConstructL();
|
sl@0
|
56 |
|
sl@0
|
57 |
// DATA
|
sl@0
|
58 |
private:
|
sl@0
|
59 |
TInt iRepeats; // loop counter,
|
sl@0
|
60 |
|
sl@0
|
61 |
|
sl@0
|
62 |
enum TCaseSteps
|
sl@0
|
63 |
{
|
sl@0
|
64 |
EPreconditions,
|
sl@0
|
65 |
ELoadLdd, // load
|
sl@0
|
66 |
EDetectAPlug, // double-check before starting
|
sl@0
|
67 |
ELoopControl, // loop: START = 3x3 times (wait 50ms)
|
sl@0
|
68 |
ELoopDriveVBus1, // loop: drive1
|
sl@0
|
69 |
ELoopVerifyVBus1, // loop: check1
|
sl@0
|
70 |
ELoopDriveVBus2, // loop: drive2 (error event fires ok)
|
sl@0
|
71 |
ELoopVerifyVBus2, // loop: check2
|
sl@0
|
72 |
ELoopWait, // loop: wait (50ms)
|
sl@0
|
73 |
ELoopDropVBus, // loop: drop (prepare for next itteration)
|
sl@0
|
74 |
ELoopVerifyDrop, // loop: check (prepare for next itteration)
|
sl@0
|
75 |
EUnloadLdd, // unload
|
sl@0
|
76 |
ELastStep
|
sl@0
|
77 |
};
|
sl@0
|
78 |
|
sl@0
|
79 |
|
sl@0
|
80 |
TCaseSteps iCaseStep;
|
sl@0
|
81 |
|
sl@0
|
82 |
const static TTestCaseFactoryReceipt<CTestCase0675> iFactoryReceipt;
|
sl@0
|
83 |
|
sl@0
|
84 |
CTestCaseWatchdog *iWDTimer;
|
sl@0
|
85 |
|
sl@0
|
86 |
void ContinueAfter(TTimeIntervalMicroSeconds32 aMicroSecs, TCaseSteps step);
|
sl@0
|
87 |
};
|
sl@0
|
88 |
|
sl@0
|
89 |
|
sl@0
|
90 |
#endif // TESTCASE0675_H
|