os/kernelhwsrv/kerneltest/e32test/usbho/t_otgdi/inc/testcase0680.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kerneltest/e32test/usbho/t_otgdi/inc/testcase0680.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,87 @@
     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 TESTCASE0680_H
    1.22 +#define TESTCASE0680_H
    1.23 +
    1.24 +	
    1.25 +//----------------------------------------------------------------------------------------------		
    1.26 +//! @SYMTestCaseID				PBASE-T_OTGDI-0680
    1.27 +//! @SYMTestCaseDesc			A-Device requests bus, VBUS is high, device is b_hnp_enabled, but not suspended
    1.28 +//! @SYMFssID 
    1.29 +//! @SYMPREQ					1305
    1.30 +//! @SYMREQ						8929
    1.31 +//! @SYMTestType				UT
    1.32 +//! @SYMTestPriority			1 
    1.33 +//! @SYMTestActions 			1.	A-Device raises VBus
    1.34 +//!                             2.	A-Device and B-Device wait to arrive in default roles (A-Host, B-Peripheral)
    1.35 +//!								3.	B-Peripheral waits to arrive in configured state, A-Device waits to become A-Peripheral
    1.36 +//!								4.	A-Host enumerates newly attached peripheral, but does not suspend it
    1.37 +//!								6.	B-Device makes a bus request
    1.38 +//!								7.	No HNP occurs, B-Device generates message to say HNP is not possible
    1.39 +//!								8.	A-Device drops VBus
    1.40 +//!								9.	A-Device and B-Device both observe VBus dropping.
    1.41 +//!                             
    1.42 +//! @SYMTestExpectedResults		There should be no role swap, and error message should be generated at step 7.
    1.43 +//! @SYMTestStatus              Defined	
    1.44 +//----------------------------------------------------------------------------------------------	
    1.45 +
    1.46 +class CTestCase0680 : public CTestCaseB2BRoot
    1.47 +	{
    1.48 +public:
    1.49 +	static CTestCase0680* NewL(TBool aHost);
    1.50 +	virtual ~CTestCase0680(); 	
    1.51 +	
    1.52 +	virtual void ExecuteTestCaseL();
    1.53 +	void DoCancel();
    1.54 +	static void CancelKB(CTestCaseRoot *pThis);
    1.55 +	
    1.56 +	void RunStepL();
    1.57 +	
    1.58 +	TInt GetStepIndex()	{ return(iCaseStep); };	
    1.59 +	
    1.60 +private:
    1.61 +	CTestCase0680(TBool aHost);
    1.62 +	void ConstructL();
    1.63 +
    1.64 +	// DATA
    1.65 +private:		
    1.66 +
    1.67 +	enum TCaseSteps
    1.68 +		{
    1.69 +		EPreconditions,
    1.70 +		ELoadLdd,			//	Load LDDs, trigger FDFActor
    1.71 +		EReadyToRaiseVBus,	//	Wait until VBus arrives
    1.72 +		EDefaultRoles, 		//	B-device as peripheral, A-device as host
    1.73 +		EBConfigured,		//	B-Device is configured
    1.74 +		EBErrorReceived,	//	B-device receives error message (refusal to role-swap because we're not suspended)
    1.75 +		EDropVBus,			//	Tidyup steps...
    1.76 +		EVBusDropped,
    1.77 +		EUnloadLdd,
    1.78 +		EUnloadClient,
    1.79 +		ELastStep
    1.80 +		};
    1.81 +	
    1.82 +	TCaseSteps iCaseStep;
    1.83 +	TInt       iStateRetry;	// swallow other events
    1.84 +	
    1.85 +	const static TTestCaseFactoryReceipt<CTestCase0680> iFactoryReceipt;
    1.86 +	};
    1.87 +	
    1.88 +	
    1.89 +	
    1.90 +#endif // TESTCASE0680_H