os/kernelhwsrv/kerneltest/e32test/usbho/t_otgdi/inc/testcase0680.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// @internalComponent
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
#ifndef TESTCASE0680_H
sl@0
    19
#define TESTCASE0680_H
sl@0
    20
sl@0
    21
	
sl@0
    22
//----------------------------------------------------------------------------------------------		
sl@0
    23
//! @SYMTestCaseID				PBASE-T_OTGDI-0680
sl@0
    24
//! @SYMTestCaseDesc			A-Device requests bus, VBUS is high, device is b_hnp_enabled, but not suspended
sl@0
    25
//! @SYMFssID 
sl@0
    26
//! @SYMPREQ					1305
sl@0
    27
//! @SYMREQ						8929
sl@0
    28
//! @SYMTestType				UT
sl@0
    29
//! @SYMTestPriority			1 
sl@0
    30
//! @SYMTestActions 			1.	A-Device raises VBus
sl@0
    31
//!                             2.	A-Device and B-Device wait to arrive in default roles (A-Host, B-Peripheral)
sl@0
    32
//!								3.	B-Peripheral waits to arrive in configured state, A-Device waits to become A-Peripheral
sl@0
    33
//!								4.	A-Host enumerates newly attached peripheral, but does not suspend it
sl@0
    34
//!								6.	B-Device makes a bus request
sl@0
    35
//!								7.	No HNP occurs, B-Device generates message to say HNP is not possible
sl@0
    36
//!								8.	A-Device drops VBus
sl@0
    37
//!								9.	A-Device and B-Device both observe VBus dropping.
sl@0
    38
//!                             
sl@0
    39
//! @SYMTestExpectedResults		There should be no role swap, and error message should be generated at step 7.
sl@0
    40
//! @SYMTestStatus              Defined	
sl@0
    41
//----------------------------------------------------------------------------------------------	
sl@0
    42
sl@0
    43
class CTestCase0680 : public CTestCaseB2BRoot
sl@0
    44
	{
sl@0
    45
public:
sl@0
    46
	static CTestCase0680* NewL(TBool aHost);
sl@0
    47
	virtual ~CTestCase0680(); 	
sl@0
    48
	
sl@0
    49
	virtual void ExecuteTestCaseL();
sl@0
    50
	void DoCancel();
sl@0
    51
	static void CancelKB(CTestCaseRoot *pThis);
sl@0
    52
	
sl@0
    53
	void RunStepL();
sl@0
    54
	
sl@0
    55
	TInt GetStepIndex()	{ return(iCaseStep); };	
sl@0
    56
	
sl@0
    57
private:
sl@0
    58
	CTestCase0680(TBool aHost);
sl@0
    59
	void ConstructL();
sl@0
    60
sl@0
    61
	// DATA
sl@0
    62
private:		
sl@0
    63
sl@0
    64
	enum TCaseSteps
sl@0
    65
		{
sl@0
    66
		EPreconditions,
sl@0
    67
		ELoadLdd,			//	Load LDDs, trigger FDFActor
sl@0
    68
		EReadyToRaiseVBus,	//	Wait until VBus arrives
sl@0
    69
		EDefaultRoles, 		//	B-device as peripheral, A-device as host
sl@0
    70
		EBConfigured,		//	B-Device is configured
sl@0
    71
		EBErrorReceived,	//	B-device receives error message (refusal to role-swap because we're not suspended)
sl@0
    72
		EDropVBus,			//	Tidyup steps...
sl@0
    73
		EVBusDropped,
sl@0
    74
		EUnloadLdd,
sl@0
    75
		EUnloadClient,
sl@0
    76
		ELastStep
sl@0
    77
		};
sl@0
    78
	
sl@0
    79
	TCaseSteps iCaseStep;
sl@0
    80
	TInt       iStateRetry;	// swallow other events
sl@0
    81
	
sl@0
    82
	const static TTestCaseFactoryReceipt<CTestCase0680> iFactoryReceipt;
sl@0
    83
	};
sl@0
    84
	
sl@0
    85
	
sl@0
    86
	
sl@0
    87
#endif // TESTCASE0680_H