kerneltest/e32test/usbho/t_otgdi/inc/testcase0458.h
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     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 // Open/Close 'powered peripheral' test
       
    16 // 
       
    17 //
       
    18 
       
    19 #ifndef TESTCASE_0458_H
       
    20 #define TESTCASE_0458_H
       
    21 
       
    22 
       
    23 	
       
    24 //----------------------------------------------------------------------------------------------		
       
    25 //!	@SYMTestCaseID				PBASE-T_OTGDI-0458
       
    26 //!	@SYMTestCaseDesc			OTGDI driver session can be repeatedly opened and closed without a) panicking or b) leaking resources.
       
    27 //!	@SYMFssID 
       
    28 //!	@SYMPREQ					1782
       
    29 //!	@SYMREQ						n/a
       
    30 //!	@SYMTestType				UT
       
    31 //!	@SYMTestPriority			1 
       
    32 //!	@SYMTestActions 			1. B plug and and plugged into Host. Call function to open OTGDI driver session.
       
    33 //!								2. Call function to close OTGDI driver session.
       
    34 //!								3. Repeat from step 1 (x 3)
       
    35 //!	@SYMTestExpectedResults 	No panic occurs, no error code returned, we get session handle; session gets closed
       
    36 //!	@SYMTestStatus				Proto
       
    37 //----------------------------------------------------------------------------------------------		
       
    38 
       
    39 	class CTestCase0458 : public CTestCaseRoot
       
    40 	{
       
    41 public:
       
    42 	static CTestCase0458* NewL(TBool aHost);
       
    43 	virtual ~CTestCase0458(); 	
       
    44 
       
    45 	virtual void ExecuteTestCaseL();
       
    46 	void DoCancel();
       
    47 	void RunStepL();
       
    48 
       
    49 	virtual void DescribePreconditions();
       
    50 	TInt GetStepIndex()	{ return(iCaseStep); };
       
    51 	
       
    52 private:
       
    53 	CTestCase0458(TBool aHost);
       
    54 	void ConstructL();
       
    55 
       
    56 
       
    57 	// DATA	
       
    58 private:
       
    59 	enum TCaseSteps
       
    60 		{
       
    61 		EPreconditions,
       
    62 		ELoadLdd,
       
    63 		EUnloadLdd,
       
    64 		ELoopDecrement,
       
    65 		ELastStep	
       
    66 		};
       
    67 	
       
    68 	TCaseSteps iCaseStep;
       
    69 	TInt       iRepeats;		// loop counter, set to run 3 times over
       
    70 	
       
    71 	const static TTestCaseFactoryReceipt<CTestCase0458> iFactoryReceipt;
       
    72 	
       
    73 	};
       
    74 	
       
    75 	
       
    76 #endif // TESTCASE_0458_H