kerneltest/e32test/usbho/t_otgdi/inc/testcase0469.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 // 
       
    16 //
       
    17 
       
    18 #ifndef TESTCASE0469_H
       
    19 #define TESTCASE0469_H
       
    20 
       
    21 
       
    22 	
       
    23 //----------------------------------------------------------------------------------------------		
       
    24 //! @SYMTestCaseID				PBASE-T_OTGDI-0469
       
    25 //! @SYMTestCaseDesc			Alternative ID_PIN detection API.
       
    26 //! @SYMFssID 
       
    27 //! @SYMPREQ					1782
       
    28 //! @SYMREQ						7080
       
    29 //! @SYMTestType				UT
       
    30 //! @SYMTestPriority			1 
       
    31 //! @SYMTestActions 			1. Load the LDD
       
    32 //!                             2. Register for Vbus notification method QueueOtgVbusNotification()
       
    33 //!                             3. Plug other end of cable into a PC Host
       
    34 //!                             4. Verify VBus High event received within 1 second.
       
    35 //!                             5. Remove plug from PC Host
       
    36 //!                             6. Verify VBus LOW event received within 1 second.
       
    37 //!                             7. Repeat Steps 1 through 6, 3 times over.
       
    38 //!                             8. Unload LDD
       
    39 //! @SYMTestExpectedResults 	Between steps 3 and 4, we expect to see Vbus HIGH event,
       
    40 //! 							Between steps 5,6 we expect Vbus LOW event. 
       
    41 //!                             Fail the test if event does not arrive in the 1 second time
       
    42 //----------------------------------------------------------------------------------------------	
       
    43 
       
    44 class CTestCase0469 : public CTestCaseB2BRoot
       
    45 	{
       
    46 public:
       
    47 	static CTestCase0469* NewL(TBool aHost);
       
    48 	virtual ~CTestCase0469(); 	
       
    49 	
       
    50 	virtual void ExecuteTestCaseL();
       
    51 	void DoCancel();
       
    52 	static void CancelKB(CTestCaseRoot *pThis);
       
    53 	
       
    54 	void RunStepL();
       
    55 	TInt GetStepIndex()	{ return(iCaseStep); };
       
    56 
       
    57 	static void CancelNotify(CTestCaseRoot *pThis);	
       
    58 	
       
    59 private:
       
    60 	CTestCase0469(TBool aHost);
       
    61 	void ConstructL();
       
    62 
       
    63 
       
    64 	// DATA
       
    65 private:		
       
    66 
       
    67 	TInt iRepeats;		// loop counter, 
       
    68 
       
    69 	enum TCaseSteps
       
    70 		{
       
    71         EPreconditions,
       
    72         ELoadLdd,
       
    73         ELoopControl,
       
    74         ETestVbusRise,
       
    75         ETestVbusFall,
       
    76         EUnloadLdd,
       
    77         ELastStep
       
    78 		};
       
    79 	
       
    80 	TCaseSteps iCaseStep;
       
    81 	
       
    82 	const static TTestCaseFactoryReceipt<CTestCase0469> iFactoryReceipt;
       
    83 	
       
    84 	void ContinueAfter(TTimeIntervalMicroSeconds32 aMicroSecs, TCaseSteps step);
       
    85 	};
       
    86 	
       
    87 	
       
    88 #endif // TESTCASE0469_H
       
    89