os/kernelhwsrv/kerneltest/e32test/usbho/t_otgdi/inc/testcase0467.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/testcase0467.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,92 @@
     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 TESTCASE0467_H
    1.22 +#define TESTCASE0467_H
    1.23 +
    1.24 +
    1.25 +	
    1.26 +//----------------------------------------------------------------------------------------------		
    1.27 +//! @SYMTestCaseID				PBASE-T_OTGDI-0467
    1.28 +//! @SYMTestCaseDesc			Must be able to detect an A plug insertion using simplified API
    1.29 +//! @SYMFssID 
    1.30 +//! @SYMPREQ					1782
    1.31 +//! @SYMREQ						7080
    1.32 +//! @SYMTestType				UT
    1.33 +//! @SYMTestPriority			1 
    1.34 +//! @SYMTestActions 			1. Register for events with QueueOtgIdPinNotification()
    1.35 +//!                             2. Manually plug in mini A plug into DEV-board without anything on the other end of cable.
    1.36 +//!                             3. Wait max 1 second for insertion event.
    1.37 +//!                             4. Register for events with QueueOtgIdPinNotification()
    1.38 +//!                             5. Remove plug	
    1.39 +//! 							6. Wait max 1 second for remove event.
    1.40 +//! 							7. Repeat steps 1 through 6, 3 times over.
    1.41 +//! @SYMTestExpectedResults 	Between steps 2 and 3, we expect to see an event,
    1.42 +//! 							Between steps 4,5 we expect another event. Fail the test 
    1.43 +//!                             if event does not arrive in the 1 second time
    1.44 +//----------------------------------------------------------------------------------------------	
    1.45 +
    1.46 +	class CTestCase0467 : public CTestCaseRoot
    1.47 +	{
    1.48 +public:
    1.49 +	static CTestCase0467* NewL(TBool aHost);
    1.50 +	virtual ~CTestCase0467(); 	
    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 +	virtual void DescribePreconditions();
    1.58 +	TInt GetStepIndex()	{ return(iCaseStep); };
    1.59 +
    1.60 +	static void CancelIdPin(CTestCaseRoot *pThis);
    1.61 +	
    1.62 +private:
    1.63 +	CTestCase0467(TBool aHost);
    1.64 +	void ConstructL();
    1.65 +
    1.66 +
    1.67 +	// DATA
    1.68 +private:		
    1.69 +
    1.70 +	enum TCaseSteps
    1.71 +		{
    1.72 +		EPreconditions,
    1.73 +		ELoadLdd,		// load and prompt
    1.74 +		ERepeatLoop,		// set up to repeat the test
    1.75 +		EWaitForIDPresent,	// Q
    1.76 +		EVerifyIDPresent,	// checker step
    1.77 +		EWaitForIDGone,		// Q
    1.78 +		EVerifyIDGone,		// checker step
    1.79 +		EUnloadLdd,		// unload 
    1.80 +		ELastStep	
    1.81 +		};
    1.82 +	
    1.83 +		
    1.84 +	TCaseSteps iCaseStep;
    1.85 +	TInt       iRepeats;		// loop counter, set to run 3 times over
    1.86 +	TInt       iDetectionRetry;	// swallow other events
    1.87 +	
    1.88 +	const static TTestCaseFactoryReceipt<CTestCase0467> iFactoryReceipt;
    1.89 +	
    1.90 +	CTestCaseWatchdog *iWDTimer;	
    1.91 +	
    1.92 +	};
    1.93 +	
    1.94 +	
    1.95 +#endif // TESTCASE0467_H