1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/kerneltest/e32test/usbho/t_otgdi/inc/testcase0461.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,96 @@
1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of the License "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// @internalComponent
1.18 +//
1.19 +//
1.20 +
1.21 +#ifndef TESTCASE0461_H
1.22 +#define TESTCASE0461_H
1.23 +
1.24 +
1.25 +
1.26 +//----------------------------------------------------------------------------------------------
1.27 +//! @SYMTestCaseID PBASE-T_OTGDI-0460
1.28 +//! @SYMTestCaseDesc Cancel ID_PIN notifications.
1.29 +//! @SYMFssID
1.30 +//! @SYMPREQ 1782
1.31 +//! @SYMREQ 7079
1.32 +//! @SYMTestType UT
1.33 +//! @SYMTestPriority 1
1.34 +//! @SYMTestActions 1. Queue a request for notification of insertion/removal. QueueOtgEventRequest ()
1.35 +//! 2. Cancel notification of insertion/removal: call CancelOtgEventRequest()
1.36 +//! 3. Use internal API to manipulate ID pin state to simulate A plug removal
1.37 +//! 4. Wait max 5 seconds for removal event
1.38 +//! @SYMTestExpectedResults 1. Test must pass
1.39 +//! 2. - none
1.40 +//! 3. Removal event fires before 15 seconds (manual)
1.41 +//----------------------------------------------------------------------------------------------
1.42 +
1.43 +
1.44 + class CTestCase0461 : public CTestCaseRoot
1.45 + {
1.46 +public:
1.47 + static CTestCase0461* NewL(TBool aHost);
1.48 + virtual ~CTestCase0461();
1.49 +
1.50 + virtual void ExecuteTestCaseL();
1.51 + void DoCancel();
1.52 +
1.53 + void RunStepL();
1.54 + virtual void DescribePreconditions();
1.55 + TInt GetStepIndex() { return(iCaseStep); };
1.56 + static void CancelKB(CTestCaseRoot *pThis);
1.57 +
1.58 +private:
1.59 + CTestCase0461(TBool aHost);
1.60 + void ConstructL();
1.61 +
1.62 + CTestCaseWatchdog *iWDTimer;
1.63 + // DATA
1.64 +public:
1.65 +
1.66 +private:
1.67 + TInt iDequeAttempts;
1.68 + TInt iRepeats; // loop counter,
1.69 + TInt iExpectedEvents;
1.70 + TInt iEventsInQueue;
1.71 +
1.72 + enum TCaseSteps
1.73 + {
1.74 + EPreconditions,
1.75 + ELoadLdd,
1.76 + ERegisterForEvents, // QueueOtgEventRequest( event, status );
1.77 + EEmptyQueue,
1.78 + EGetAndCancelEvent,
1.79 + ECancelNotify,
1.80 + EInsertA,
1.81 + ERemoveA,
1.82 + ETallyEvents,
1.83 + ETallyNewEvent,
1.84 + EUnloadLdd,
1.85 + ELastStep
1.86 + };
1.87 +
1.88 +
1.89 + TCaseSteps iCaseStep;
1.90 +
1.91 + TTime iIDcheckStart; // start of checking for ID_PIN
1.92 + TTime iIDcheckEnd;
1.93 +
1.94 + const static TTestCaseFactoryReceipt<CTestCase0461> iFactoryReceipt;
1.95 +
1.96 + };
1.97 +
1.98 +
1.99 +#endif // TESTCASE0461_H