os/kernelhwsrv/kerneltest/e32test/usbho/t_otgdi/inc/testcase0679.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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 TESTCASE0679_H
    19 #define TESTCASE0679_H
    20 
    21 	
    22 //----------------------------------------------------------------------------------------------		
    23 //! @SYMTestCaseID				PBASE-T_OTGDI-0679
    24 //! @SYMTestCaseDesc			A-Device requests bus, VBUS is high, device not b_hnp_enabled
    25 //! @SYMFssID 
    26 //! @SYMPREQ					1305
    27 //! @SYMREQ						8929
    28 //! @SYMTestType				UT
    29 //! @SYMTestPriority			1 
    30 //! @SYMTestActions 			1.	A-Device raises VBus
    31 //!                             2.	A-Device and B-Device wait to arrive in default roles (A-Host, B-Peripheral)
    32 //!								3.	B-Peripheral waits to arrive in configured state, A-Device waits to become A-Peripheral
    33 //!								4.	A-Host enumerates newly attached peripheral, and suspends it
    34 //!								5.	B-Peripheral waits to arrive in suspended state
    35 //!								6.	B-Device makes a bus request
    36 //!								7.	No HNP occurs, B-Device generates message to say HNP is not possible
    37 //!								8.	A-Device drops VBus
    38 //!								9.	A-Device and B-Device both observe VBus dropping.
    39 //!                             
    40 //! @SYMTestExpectedResults		There should be no role swap, and error message should be generated at step 7.
    41 //!                             No state changes will have occurred and A-Host and B-Peripheral should be observed.
    42 //! @SYMTestStatus              Defined	
    43 //----------------------------------------------------------------------------------------------	
    44 
    45 class CTestCase0679 : public CTestCaseB2BRoot
    46 	{
    47 public:
    48 	static CTestCase0679* NewL(TBool aHost);
    49 	virtual ~CTestCase0679(); 	
    50 	
    51 	virtual void ExecuteTestCaseL();
    52 	void DoCancel();
    53 	static void CancelKB(CTestCaseRoot *pThis);
    54 	
    55 	void RunStepL();
    56 	
    57 	TInt GetStepIndex()	{ return(iCaseStep); };	
    58 	
    59 private:
    60 	CTestCase0679(TBool aHost);
    61 	void ConstructL();
    62 
    63 	// DATA
    64 private:		
    65 
    66 	enum TCaseSteps
    67 		{
    68 		EPreconditions,
    69 		ELoadLdd,				//	Load LDDs, trigger FDFActor
    70 		EReadyToRaiseVBus,		//	Wait until VBus arrives
    71 		EDefaultRoles,   		//	B-device as peripheral, A-device as host
    72 		EBConfigured,			//	B-Device is configured
    73 		EBSuspended,			//	B-device is suspended
    74 		EBErrorReceived,		//	B-device receives error message (refusal to role-swap because HNP is not enabled)
    75 
    76 		EDropVBus,				//	Tidyup steps
    77 		EVBusDropped,
    78 		EUnloadLdd,
    79 		EUnloadClient,
    80 		ELastStep
    81 		};
    82 	
    83 	TCaseSteps iCaseStep;
    84 	TInt       iStateRetry;	// swallow other events
    85 	
    86 	const static TTestCaseFactoryReceipt<CTestCase0679> iFactoryReceipt;
    87 	};
    88 	
    89 	
    90 	
    91 #endif // TESTCASE0679_H