sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // @internalComponent sl@0: // sl@0: // sl@0: sl@0: #ifndef TESTCASE0467_H sl@0: #define TESTCASE0467_H sl@0: sl@0: sl@0: sl@0: //---------------------------------------------------------------------------------------------- sl@0: //! @SYMTestCaseID PBASE-T_OTGDI-0467 sl@0: //! @SYMTestCaseDesc Must be able to detect an A plug insertion using simplified API sl@0: //! @SYMFssID sl@0: //! @SYMPREQ 1782 sl@0: //! @SYMREQ 7080 sl@0: //! @SYMTestType UT sl@0: //! @SYMTestPriority 1 sl@0: //! @SYMTestActions 1. Register for events with QueueOtgIdPinNotification() sl@0: //! 2. Manually plug in mini A plug into DEV-board without anything on the other end of cable. sl@0: //! 3. Wait max 1 second for insertion event. sl@0: //! 4. Register for events with QueueOtgIdPinNotification() sl@0: //! 5. Remove plug sl@0: //! 6. Wait max 1 second for remove event. sl@0: //! 7. Repeat steps 1 through 6, 3 times over. sl@0: //! @SYMTestExpectedResults Between steps 2 and 3, we expect to see an event, sl@0: //! Between steps 4,5 we expect another event. Fail the test sl@0: //! if event does not arrive in the 1 second time sl@0: //---------------------------------------------------------------------------------------------- sl@0: sl@0: class CTestCase0467 : public CTestCaseRoot sl@0: { sl@0: public: sl@0: static CTestCase0467* NewL(TBool aHost); sl@0: virtual ~CTestCase0467(); sl@0: sl@0: virtual void ExecuteTestCaseL(); sl@0: void DoCancel(); sl@0: static void CancelKB(CTestCaseRoot *pThis); sl@0: sl@0: void RunStepL(); sl@0: virtual void DescribePreconditions(); sl@0: TInt GetStepIndex() { return(iCaseStep); }; sl@0: sl@0: static void CancelIdPin(CTestCaseRoot *pThis); sl@0: sl@0: private: sl@0: CTestCase0467(TBool aHost); sl@0: void ConstructL(); sl@0: sl@0: sl@0: // DATA sl@0: private: sl@0: sl@0: enum TCaseSteps sl@0: { sl@0: EPreconditions, sl@0: ELoadLdd, // load and prompt sl@0: ERepeatLoop, // set up to repeat the test sl@0: EWaitForIDPresent, // Q sl@0: EVerifyIDPresent, // checker step sl@0: EWaitForIDGone, // Q sl@0: EVerifyIDGone, // checker step sl@0: EUnloadLdd, // unload sl@0: ELastStep sl@0: }; sl@0: sl@0: sl@0: TCaseSteps iCaseStep; sl@0: TInt iRepeats; // loop counter, set to run 3 times over sl@0: TInt iDetectionRetry; // swallow other events sl@0: sl@0: const static TTestCaseFactoryReceipt iFactoryReceipt; sl@0: sl@0: CTestCaseWatchdog *iWDTimer; sl@0: sl@0: }; sl@0: sl@0: sl@0: #endif // TESTCASE0467_H