First public contribution.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
18 #ifndef TESTCASE0467_H
19 #define TESTCASE0467_H
23 //----------------------------------------------------------------------------------------------
24 //! @SYMTestCaseID PBASE-T_OTGDI-0467
25 //! @SYMTestCaseDesc Must be able to detect an A plug insertion using simplified API
30 //! @SYMTestPriority 1
31 //! @SYMTestActions 1. Register for events with QueueOtgIdPinNotification()
32 //! 2. Manually plug in mini A plug into DEV-board without anything on the other end of cable.
33 //! 3. Wait max 1 second for insertion event.
34 //! 4. Register for events with QueueOtgIdPinNotification()
36 //! 6. Wait max 1 second for remove event.
37 //! 7. Repeat steps 1 through 6, 3 times over.
38 //! @SYMTestExpectedResults Between steps 2 and 3, we expect to see an event,
39 //! Between steps 4,5 we expect another event. Fail the test
40 //! if event does not arrive in the 1 second time
41 //----------------------------------------------------------------------------------------------
43 class CTestCase0467 : public CTestCaseRoot
46 static CTestCase0467* NewL(TBool aHost);
47 virtual ~CTestCase0467();
49 virtual void ExecuteTestCaseL();
51 static void CancelKB(CTestCaseRoot *pThis);
54 virtual void DescribePreconditions();
55 TInt GetStepIndex() { return(iCaseStep); };
57 static void CancelIdPin(CTestCaseRoot *pThis);
60 CTestCase0467(TBool aHost);
70 ELoadLdd, // load and prompt
71 ERepeatLoop, // set up to repeat the test
72 EWaitForIDPresent, // Q
73 EVerifyIDPresent, // checker step
75 EVerifyIDGone, // checker step
82 TInt iRepeats; // loop counter, set to run 3 times over
83 TInt iDetectionRetry; // swallow other events
85 const static TTestCaseFactoryReceipt<CTestCase0467> iFactoryReceipt;
87 CTestCaseWatchdog *iWDTimer;
92 #endif // TESTCASE0467_H