|
1 #ifndef __TEST_CASE_PBASE_T_USBDI_0484_H |
|
2 #define __TEST_CASE_PBASE_T_USBDI_0484_H |
|
3 |
|
4 /* |
|
5 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
6 * All rights reserved. |
|
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". |
|
11 * |
|
12 * Initial Contributors: |
|
13 * Nokia Corporation - initial contribution. |
|
14 * |
|
15 * Contributors: |
|
16 * |
|
17 * Description: |
|
18 * @file PBASE-T_USBDI-0484.h |
|
19 * @internalComponent |
|
20 * |
|
21 * |
|
22 */ |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 #include "BaseBulkTestCase.h" |
|
28 #include "TestCaseFactory.h" |
|
29 #include "FDFActor.h" |
|
30 #include "modelleddevices.h" |
|
31 #include "controltransferrequests.h" |
|
32 #include "hosttransfers.h" |
|
33 #include <d32usbc.h> |
|
34 #include <d32usbdi.h> |
|
35 #include <e32debug.h> |
|
36 |
|
37 |
|
38 namespace NUnitTesting_USBDI |
|
39 { |
|
40 |
|
41 /** |
|
42 |
|
43 |
|
44 @SYMTestCaseID PBASE-T_USBDI-0484 |
|
45 @SYMTestCaseDesc Test clearing error states (stalls) in transfers |
|
46 @SYMFssID |
|
47 @SYMPREQ 1782 |
|
48 @SYMREQ 7057 [USBD : Clearing error states] |
|
49 @SYMTestType UT |
|
50 @SYMTestPriority 1 |
|
51 @SYMTestActions 1. Open interfaces to connected device |
|
52 2. Queue a bulk in transfer |
|
53 3. While transfer is queued, stall the relervant endpoint |
|
54 4. Acknowledge the stall in the transfer |
|
55 @SYMTestExpectedResults Bulk in transfer completes with stall |
|
56 @SYMTestStatus Implemented |
|
57 |
|
58 |
|
59 */ |
|
60 class CUT_PBASE_T_USBDI_0484 : public CBaseBulkTestCase, |
|
61 public MTransferObserver, |
|
62 public MCommandObserver |
|
63 { |
|
64 public: |
|
65 static CUT_PBASE_T_USBDI_0484* NewL(TBool aHostRole); |
|
66 ~CUT_PBASE_T_USBDI_0484(); |
|
67 |
|
68 public: // From MUsbBusObserver |
|
69 void DeviceInsertedL(TUint aDeviceHandle); |
|
70 |
|
71 public: // From MCommandObserver |
|
72 void Ep0TransferCompleteL(TInt aCompletionCode); |
|
73 |
|
74 public: // From MTransferObserver |
|
75 void TransferCompleteL(TInt aTransferId,TInt aCompletionCode); |
|
76 |
|
77 private: |
|
78 CUT_PBASE_T_USBDI_0484(TBool aHostRole); |
|
79 void ConstructL(); |
|
80 |
|
81 private: |
|
82 |
|
83 enum TCaseStep |
|
84 { |
|
85 EInProgress, |
|
86 EPassed, |
|
87 EFailed, |
|
88 EStalled, |
|
89 ETransferAfterStall |
|
90 }; |
|
91 |
|
92 TCaseStep iCaseStep; |
|
93 |
|
94 private: |
|
95 /** |
|
96 The functor for this test case |
|
97 */ |
|
98 const static TFunctorTestCase<CUT_PBASE_T_USBDI_0484,TBool> iFunctor; |
|
99 }; |
|
100 |
|
101 } |
|
102 |
|
103 |
|
104 #endif |