First public contribution.
1 #ifndef __TEST_CASE_PBASE_T_USBDI_1236_H
2 #define __TEST_CASE_PBASE_T_USBDI_1236_H
5 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
7 * This component and the accompanying materials are made available
8 * under the terms of the License "Eclipse Public License v1.0"
9 * which accompanies this distribution, and is available
10 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
12 * Initial Contributors:
13 * Nokia Corporation - initial contribution.
18 * @file PBASE-T_USBDI-1236.h
26 #include "BaseTestCase.h"
27 #include "TestCaseFactory.h"
29 #include <d32usbdi_hubdriver.h>
31 #include "modelleddevices.h"
32 #include "controltransferrequests.h"
34 namespace NUnitTesting_USBDI
40 @SYMTestCaseID PBASE-T_USBDI-1236
41 @SYMTestCaseDesc Get Interface description string
44 @SYMREQ 7074 [USBD : Device suspension]
45 7075 [USBD : Device suspension: multiple interfaces]
46 7076 [USBD : Device resume]
47 7077 [USBD : Remote wakeup]
48 7078 [USBD : Suspend following a wake up]
51 @SYMTestActions 1. Suspend a connected device through its interfaces
53 3. Once device is resumed, enable remote wake-up and suspend all interfaces again
54 4. Remote wake up device
55 5. Following a remote wake-up, suspend device again
56 @SYMTestExpectedResults Correct suspension and device resumption can be established
57 @SYMTestStatus Implemented
61 class CUT_PBASE_T_USBDI_1236 : public CBaseTestCase, public MUsbBusObserver, public MCommandObserver
64 static CUT_PBASE_T_USBDI_1236* NewL(TBool aHostRole);
65 ~CUT_PBASE_T_USBDI_1236();
70 EStepGetInterfaceString,
75 public: // From MUsbBusObserver
76 void DeviceInsertedL(TUint aDeviceHandle);
77 void DeviceRemovedL(TUint aDeviceHandle);
78 void BusErrorL(TInt aError);
79 void DeviceStateChangeL(RUsbDevice::TDeviceState aPreviousState,RUsbDevice::TDeviceState aNewState,
80 TInt aCompletionCode);
82 public: // From MCommandObserver
83 void Ep0TransferCompleteL(TInt aCompletionCode);
86 CUT_PBASE_T_USBDI_1236(TBool aHostRole);
88 void ExecuteHostTestCaseL();
89 void ExecuteDeviceTestCaseL();
91 void DeviceDoCancel();
98 CEp0Transfer* iControlEp0;
99 RUsbInterface iUsbInterface0;
100 RUsbInterface iUsbInterface1;
103 TCaseSteps iCaseStep;
105 RUsbDeviceA* iTestDevice;
109 The functor for this test case for the factory
111 const static TFunctorTestCase<CUT_PBASE_T_USBDI_1236,TBool> iFunctor;