0
|
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 TESTCASE0461_H
|
|
19 |
#define TESTCASE0461_H
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
//----------------------------------------------------------------------------------------------
|
|
24 |
//! @SYMTestCaseID PBASE-T_OTGDI-0460
|
|
25 |
//! @SYMTestCaseDesc Cancel ID_PIN notifications.
|
|
26 |
//! @SYMFssID
|
|
27 |
//! @SYMPREQ 1782
|
|
28 |
//! @SYMREQ 7079
|
|
29 |
//! @SYMTestType UT
|
|
30 |
//! @SYMTestPriority 1
|
|
31 |
//! @SYMTestActions 1. Queue a request for notification of insertion/removal. QueueOtgEventRequest ()
|
|
32 |
//! 2. Cancel notification of insertion/removal: call CancelOtgEventRequest()
|
|
33 |
//! 3. Use internal API to manipulate ID pin state to simulate A plug removal
|
|
34 |
//! 4. Wait max 5 seconds for removal event
|
|
35 |
//! @SYMTestExpectedResults 1. Test must pass
|
|
36 |
//! 2. - none
|
|
37 |
//! 3. Removal event fires before 15 seconds (manual)
|
|
38 |
//----------------------------------------------------------------------------------------------
|
|
39 |
|
|
40 |
|
|
41 |
class CTestCase0461 : public CTestCaseRoot
|
|
42 |
{
|
|
43 |
public:
|
|
44 |
static CTestCase0461* NewL(TBool aHost);
|
|
45 |
virtual ~CTestCase0461();
|
|
46 |
|
|
47 |
virtual void ExecuteTestCaseL();
|
|
48 |
void DoCancel();
|
|
49 |
|
|
50 |
void RunStepL();
|
|
51 |
virtual void DescribePreconditions();
|
|
52 |
TInt GetStepIndex() { return(iCaseStep); };
|
|
53 |
static void CancelKB(CTestCaseRoot *pThis);
|
|
54 |
|
|
55 |
private:
|
|
56 |
CTestCase0461(TBool aHost);
|
|
57 |
void ConstructL();
|
|
58 |
|
|
59 |
CTestCaseWatchdog *iWDTimer;
|
|
60 |
// DATA
|
|
61 |
public:
|
|
62 |
|
|
63 |
private:
|
|
64 |
TInt iDequeAttempts;
|
|
65 |
TInt iRepeats; // loop counter,
|
|
66 |
TInt iExpectedEvents;
|
|
67 |
TInt iEventsInQueue;
|
|
68 |
|
|
69 |
enum TCaseSteps
|
|
70 |
{
|
|
71 |
EPreconditions,
|
|
72 |
ELoadLdd,
|
|
73 |
ERegisterForEvents, // QueueOtgEventRequest( event, status );
|
|
74 |
EEmptyQueue,
|
|
75 |
EGetAndCancelEvent,
|
|
76 |
ECancelNotify,
|
|
77 |
EInsertA,
|
|
78 |
ERemoveA,
|
|
79 |
ETallyEvents,
|
|
80 |
ETallyNewEvent,
|
|
81 |
EUnloadLdd,
|
|
82 |
ELastStep
|
|
83 |
};
|
|
84 |
|
|
85 |
|
|
86 |
TCaseSteps iCaseStep;
|
|
87 |
|
|
88 |
TTime iIDcheckStart; // start of checking for ID_PIN
|
|
89 |
TTime iIDcheckEnd;
|
|
90 |
|
|
91 |
const static TTestCaseFactoryReceipt<CTestCase0461> iFactoryReceipt;
|
|
92 |
|
|
93 |
};
|
|
94 |
|
|
95 |
|
|
96 |
#endif // TESTCASE0461_H
|