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: // Open/Close 'powered peripheral' test sl@0: // sl@0: // sl@0: sl@0: #ifndef TESTCASE_0458_H sl@0: #define TESTCASE_0458_H sl@0: sl@0: sl@0: sl@0: //---------------------------------------------------------------------------------------------- sl@0: //! @SYMTestCaseID PBASE-T_OTGDI-0458 sl@0: //! @SYMTestCaseDesc OTGDI driver session can be repeatedly opened and closed without a) panicking or b) leaking resources. sl@0: //! @SYMFssID sl@0: //! @SYMPREQ 1782 sl@0: //! @SYMREQ n/a sl@0: //! @SYMTestType UT sl@0: //! @SYMTestPriority 1 sl@0: //! @SYMTestActions 1. B plug and and plugged into Host. Call function to open OTGDI driver session. sl@0: //! 2. Call function to close OTGDI driver session. sl@0: //! 3. Repeat from step 1 (x 3) sl@0: //! @SYMTestExpectedResults No panic occurs, no error code returned, we get session handle; session gets closed sl@0: //! @SYMTestStatus Proto sl@0: //---------------------------------------------------------------------------------------------- sl@0: sl@0: class CTestCase0458 : public CTestCaseRoot sl@0: { sl@0: public: sl@0: static CTestCase0458* NewL(TBool aHost); sl@0: virtual ~CTestCase0458(); sl@0: sl@0: virtual void ExecuteTestCaseL(); sl@0: void DoCancel(); sl@0: void RunStepL(); sl@0: sl@0: virtual void DescribePreconditions(); sl@0: TInt GetStepIndex() { return(iCaseStep); }; sl@0: sl@0: private: sl@0: CTestCase0458(TBool aHost); sl@0: void ConstructL(); sl@0: sl@0: sl@0: // DATA sl@0: private: sl@0: enum TCaseSteps sl@0: { sl@0: EPreconditions, sl@0: ELoadLdd, sl@0: EUnloadLdd, sl@0: ELoopDecrement, sl@0: ELastStep sl@0: }; sl@0: sl@0: TCaseSteps iCaseStep; sl@0: TInt iRepeats; // loop counter, set to run 3 times over sl@0: sl@0: const static TTestCaseFactoryReceipt iFactoryReceipt; sl@0: sl@0: }; sl@0: sl@0: sl@0: #endif // TESTCASE_0458_H