author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Thu, 02 Sep 2010 21:54:16 +0300 | |
changeset 259 | 57b9594f5772 |
parent 0 | a41df078684a |
child 257 | 3e88ff8f41d5 |
permissions | -rw-r--r-- |
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1 |
// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 2 |
// All rights reserved. |
3 |
// This component and the accompanying materials are made available |
|
4 |
// under the terms of the License "Eclipse Public License v1.0" |
|
5 |
// which accompanies this distribution, and is available |
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 |
// |
|
8 |
// Initial Contributors: |
|
9 |
// Nokia Corporation - initial contribution. |
|
10 |
// |
|
11 |
// Contributors: |
|
12 |
// |
|
13 |
// Description: |
|
14 |
// @file PBASE-T_USBDI-0478.cpp |
|
15 |
// @internalComponent |
|
16 |
// |
|
17 |
// |
|
18 |
||
19 |
#include "PBASE-T_USBDI-0478.h" |
|
20 |
#include "testpolicy.h" |
|
21 |
#include "modelleddevices.h" |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
22 |
#include "OstTraceDefinitions.h" |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
23 |
#ifdef OST_TRACE_COMPILER_IN_USE |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
24 |
#include "PBASE-T_USBDI-0478Traces.h" |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
25 |
#endif |
0 | 26 |
|
27 |
||
28 |
namespace NUnitTesting_USBDI |
|
29 |
{ |
|
30 |
||
31 |
_LIT(KTestCaseId,"PBASE-T_USBDI-0478"); |
|
32 |
const TFunctorTestCase<CUT_PBASE_T_USBDI_0478,TBool> CUT_PBASE_T_USBDI_0478::iFunctor(KTestCaseId); |
|
33 |
||
34 |
CUT_PBASE_T_USBDI_0478* CUT_PBASE_T_USBDI_0478::NewL(TBool aHostRole) |
|
35 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
36 |
OstTraceFunctionEntry1( CUT_PBASE_T_USBDI_0478_NEWL_ENTRY, aHostRole ); |
0 | 37 |
CUT_PBASE_T_USBDI_0478* self = new (ELeave) CUT_PBASE_T_USBDI_0478(aHostRole); |
38 |
CleanupStack::PushL(self); |
|
39 |
self->ConstructL(); |
|
40 |
CleanupStack::Pop(self); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
41 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0478_NEWL_EXIT, ( TUint )( self ) ); |
0 | 42 |
return self; |
43 |
} |
|
44 |
||
45 |
||
46 |
CUT_PBASE_T_USBDI_0478::CUT_PBASE_T_USBDI_0478(TBool aHostRole) |
|
47 |
: CBaseTestCase(KTestCaseId,aHostRole), |
|
48 |
iCaseStep(EInProgress) |
|
49 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
50 |
OstTraceFunctionEntryExt( CUT_PBASE_T_USBDI_0478_CUT_PBASE_T_USBDI_0478_ENTRY, this ); |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
51 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0478_CUT_PBASE_T_USBDI_0478_EXIT, this ); |
0 | 52 |
} |
53 |
||
54 |
||
55 |
void CUT_PBASE_T_USBDI_0478::ConstructL() |
|
56 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
57 |
OstTraceFunctionEntry1( CUT_PBASE_T_USBDI_0478_CONSTRUCTL_ENTRY, this ); |
0 | 58 |
iTestDevice = new RUsbDeviceA(this); |
59 |
BaseConstructL(); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
60 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0478_CONSTRUCTL_EXIT, this ); |
0 | 61 |
} |
62 |
||
63 |
||
64 |
CUT_PBASE_T_USBDI_0478::~CUT_PBASE_T_USBDI_0478() |
|
65 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
66 |
OstTraceFunctionEntry1( CUT_PBASE_T_USBDI_0478_CUT_PBASE_T_USBDI_0478_ENTRY_DUP01, this ); |
0 | 67 |
|
68 |
Cancel(); |
|
69 |
||
70 |
// Close the interfaces |
|
71 |
||
72 |
iDuplicateUsbInterface1.Close(); |
|
73 |
iUsbInterface1.Close(); |
|
74 |
iUsbInterface0.Close(); |
|
75 |
||
76 |
delete iControlEp0; |
|
77 |
delete iActorFDF; |
|
78 |
if(!IsHost() && iTestDevice) |
|
79 |
{ |
|
80 |
iTestDevice->Close(); |
|
81 |
} |
|
82 |
delete iTestDevice; |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
83 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0478_CUT_PBASE_T_USBDI_0478_EXIT_DUP01, this ); |
0 | 84 |
} |
85 |
||
86 |
void CUT_PBASE_T_USBDI_0478::ExecuteHostTestCaseL() |
|
87 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
88 |
OstTraceFunctionEntry1( CUT_PBASE_T_USBDI_0478_EXECUTEHOSTTESTCASEL_ENTRY, this ); |
0 | 89 |
|
90 |
// Create the actor for the Function Driver Framework |
|
91 |
||
92 |
iActorFDF = CActorFDF::NewL(*this); |
|
93 |
||
94 |
// Create the control transfer for requests |
|
95 |
||
96 |
iControlEp0 = new (ELeave) CEp0Transfer(iUsbInterface0); |
|
97 |
||
98 |
// Monitor for devices |
|
99 |
||
100 |
iActorFDF->Monitor(); |
|
101 |
||
102 |
// Start the connection timeout timer |
|
103 |
||
104 |
TimeoutIn(30); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
105 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0478_EXECUTEHOSTTESTCASEL_EXIT, this ); |
0 | 106 |
} |
107 |
||
108 |
void CUT_PBASE_T_USBDI_0478::HostDoCancel() |
|
109 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
110 |
OstTraceFunctionEntry1( CUT_PBASE_T_USBDI_0478_HOSTDOCANCEL_ENTRY, this ); |
0 | 111 |
|
112 |
// Cancel the timeout timer for activity |
|
113 |
||
114 |
CancelTimeout(); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
115 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0478_HOSTDOCANCEL_EXIT, this ); |
0 | 116 |
} |
117 |
||
118 |
||
119 |
void CUT_PBASE_T_USBDI_0478::ExecuteDeviceTestCaseL() |
|
120 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
121 |
OstTraceFunctionEntry1( CUT_PBASE_T_USBDI_0478_EXECUTEDEVICETESTCASEL_ENTRY, this ); |
0 | 122 |
|
123 |
// Create the test device for this test case |
|
124 |
||
125 |
iTestDevice->OpenL(TestCaseId()); |
|
126 |
iTestDevice->SubscribeToReports(iStatus); |
|
127 |
SetActive(); |
|
128 |
||
129 |
// Connect the test device to the host |
|
130 |
||
131 |
iTestDevice->SoftwareConnect(); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
132 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0478_EXECUTEDEVICETESTCASEL_EXIT, this ); |
0 | 133 |
} |
134 |
||
135 |
void CUT_PBASE_T_USBDI_0478::DeviceDoCancel() |
|
136 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
137 |
OstTraceFunctionEntry1( CUT_PBASE_T_USBDI_0478_DEVICEDOCANCEL_ENTRY, this ); |
0 | 138 |
|
139 |
// Cancel the test device |
|
140 |
||
141 |
iTestDevice->CancelSubscriptionToReports(); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
142 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0478_DEVICEDOCANCEL_EXIT, this ); |
0 | 143 |
} |
144 |
||
145 |
||
146 |
void CUT_PBASE_T_USBDI_0478::DeviceStateChangeL(RUsbDevice::TDeviceState aPreviousState, |
|
147 |
RUsbDevice::TDeviceState aNewState,TInt aCompletionCode) |
|
148 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
149 |
OstTraceFunctionEntryExt( CUT_PBASE_T_USBDI_0478_DEVICESTATECHANGEL_ENTRY, this ); |
0 | 150 |
|
151 |
Cancel(); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
152 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0478_DEVICESTATECHANGEL_EXIT, this ); |
0 | 153 |
} |
154 |
||
155 |
||
156 |
void CUT_PBASE_T_USBDI_0478::DeviceInsertedL(TUint aDeviceHandle) |
|
157 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
158 |
OstTraceFunctionEntryExt( CUT_PBASE_T_USBDI_0478_DEVICEINSERTEDL_ENTRY, this ); |
0 | 159 |
|
160 |
Cancel(); |
|
161 |
TInt err(KErrNone); |
|
162 |
||
163 |
// Validate that device is as expected |
|
164 |
CUsbTestDevice& testDevice = iActorFDF->DeviceL(aDeviceHandle); |
|
165 |
if(testDevice.SerialNumber().Compare(TestCaseId()) != 0) |
|
166 |
{ |
|
167 |
// Incorrect device for this test case |
|
168 |
||
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
169 |
OstTraceExt3(TRACE_NORMAL, CUT_PBASE_T_USBDI_0478_DEVICEINSERTEDL, "<Warning %d> Incorrect device serial number (%S) connected for this test case (%S)", |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
170 |
KErrNotFound,testDevice.SerialNumber(),TestCaseId()); |
0 | 171 |
|
172 |
// Start the connection timeout again |
|
173 |
||
174 |
TimeoutIn(30); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
175 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0478_DEVICEINSERTEDL_EXIT, this ); |
0 | 176 |
return; |
177 |
} |
|
178 |
||
179 |
TUint32 token0,token1; |
|
180 |
err = testDevice.Device().GetTokenForInterface(0,token0); |
|
181 |
if(err != KErrNone) |
|
182 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
183 |
OstTrace1(TRACE_NORMAL, CUT_PBASE_T_USBDI_0478_DEVICEINSERTEDL_DUP01, "<Error %d> Token for interface 0 could not be retrieved",err); |
0 | 184 |
return TestFailed(err); |
185 |
} |
|
186 |
err = iUsbInterface0.Open(token0); // Default interface setting 0 |
|
187 |
if(err != KErrNone) |
|
188 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
189 |
OstTraceExt2(TRACE_NORMAL, CUT_PBASE_T_USBDI_0478_DEVICEINSERTEDL_DUP02, "<Error %d> Unable to open interface 0 using token %d",err,token0); |
0 | 190 |
return TestFailed(err); |
191 |
} |
|
192 |
||
193 |
err = testDevice.Device().GetTokenForInterface(1,token1); |
|
194 |
if(err != KErrNone) |
|
195 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
196 |
OstTrace1(TRACE_NORMAL, CUT_PBASE_T_USBDI_0478_DEVICEINSERTEDL_DUP03, "<Error %d> Token for interface 1 could not be retrieved",err); |
0 | 197 |
return TestFailed(err); |
198 |
} |
|
199 |
||
200 |
err = iUsbInterface1.Open(token1); |
|
201 |
if(err != KErrNone) |
|
202 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
203 |
OstTraceExt2(TRACE_NORMAL, CUT_PBASE_T_USBDI_0478_DEVICEINSERTEDL_DUP04, "<Error %d> Unable to open interface using token %d",err,token1); |
0 | 204 |
return TestFailed(err); |
205 |
} |
|
206 |
||
207 |
// Acting as another FD open the interface |
|
208 |
||
209 |
err = iDuplicateUsbInterface1.Open(token1); |
|
210 |
if(err == KErrNone) |
|
211 |
{ |
|
212 |
TBuf<64> msg; |
|
213 |
msg.Format(_L("<Error> Able to open a concurrent hande to an interface")); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
214 |
OstTrace0(TRACE_NORMAL, CUT_PBASE_T_USBDI_0478_DEVICEINSERTEDL_DUP05, msg); |
0 | 215 |
iCaseStep = EFailed; |
216 |
TTestCaseFailed request(KErrCompletion,msg); |
|
217 |
iControlEp0->SendRequest(request,this); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
218 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0478_DEVICEINSERTEDL_EXIT_DUP01, this ); |
0 | 219 |
return; |
220 |
} |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
221 |
OstTrace1(TRACE_NORMAL, CUT_PBASE_T_USBDI_0478_DEVICEINSERTEDL_DUP06, "Attempt to open concurrent interface handle failed with: %d",err); |
0 | 222 |
|
223 |
// Inform client device test case successful |
|
224 |
User::After(1000000); |
|
225 |
iCaseStep = EPassed; |
|
226 |
TTestCasePassed request; |
|
227 |
iControlEp0->SendRequest(request,this); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
228 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0478_DEVICEINSERTEDL_EXIT_DUP02, this ); |
0 | 229 |
} |
230 |
||
231 |
||
232 |
void CUT_PBASE_T_USBDI_0478::Ep0TransferCompleteL(TInt aCompletionCode) |
|
233 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
234 |
OstTraceFunctionEntryExt( CUT_PBASE_T_USBDI_0478_EP0TRANSFERCOMPLETEL_ENTRY, this ); |
0 | 235 |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
236 |
OstTrace1(TRACE_NORMAL, CUT_PBASE_T_USBDI_0478_EP0TRANSFERCOMPLETEL, "Ep0TransferCompleteL with aCompletionCode = %d",aCompletionCode); |
0 | 237 |
|
238 |
if(aCompletionCode != KErrNone) |
|
239 |
{ |
|
240 |
TBuf<256> msg; |
|
241 |
msg.Format(_L("<Error %d> Transfer to control endpoint 0 was not successful"),aCompletionCode); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
242 |
OstTrace0(TRACE_NORMAL, CUT_PBASE_T_USBDI_0478_EP0TRANSFERCOMPLETEL_DUP01, msg); |
0 | 243 |
} |
244 |
||
245 |
if(iCaseStep == EPassed) |
|
246 |
{ |
|
247 |
if(aCompletionCode == KErrNone) |
|
248 |
{ |
|
249 |
return TestPassed(); |
|
250 |
} |
|
251 |
// else error |
|
252 |
iCaseStep = EFailed; |
|
253 |
} |
|
254 |
||
255 |
if(iCaseStep == EFailed) |
|
256 |
{ |
|
257 |
return TestFailed(KErrCompletion); |
|
258 |
} |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
259 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0478_EP0TRANSFERCOMPLETEL_EXIT, this ); |
0 | 260 |
} |
261 |
||
262 |
||
263 |
void CUT_PBASE_T_USBDI_0478::DeviceRemovedL(TUint aDeviceHandle) |
|
264 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
265 |
OstTraceFunctionEntryExt( CUT_PBASE_T_USBDI_0478_DEVICEREMOVEDL_ENTRY, this ); |
0 | 266 |
|
267 |
// The test device should not be removed until the test case has passed |
|
268 |
// so this test case has not completed, and state this event as an error |
|
269 |
||
270 |
TestFailed(KErrDisconnected); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
271 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0478_DEVICEREMOVEDL_EXIT, this ); |
0 | 272 |
} |
273 |
||
274 |
||
275 |
void CUT_PBASE_T_USBDI_0478::BusErrorL(TInt aError) |
|
276 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
277 |
OstTraceFunctionEntryExt( CUT_PBASE_T_USBDI_0478_BUSERRORL_ENTRY, this ); |
0 | 278 |
|
279 |
// This test case handles no failiures on the bus |
|
280 |
||
281 |
TestFailed(aError); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
282 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0478_BUSERRORL_EXIT, this ); |
0 | 283 |
} |
284 |
||
285 |
void CUT_PBASE_T_USBDI_0478::HostRunL() |
|
286 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
287 |
OstTraceFunctionEntry1( CUT_PBASE_T_USBDI_0478_HOSTRUNL_ENTRY, this ); |
0 | 288 |
|
289 |
// Obtain the completion code |
|
290 |
TInt completionCode(iStatus.Int()); |
|
291 |
||
292 |
if(completionCode == KErrNone) |
|
293 |
{ |
|
294 |
// Action timeout |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
295 |
OstTrace0(TRACE_NORMAL, CUT_PBASE_T_USBDI_0478_HOSTRUNL, "<Error> Action timeout"); |
0 | 296 |
TestFailed(KErrTimedOut); |
297 |
} |
|
298 |
else |
|
299 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
300 |
OstTrace1(TRACE_NORMAL, CUT_PBASE_T_USBDI_0478_HOSTRUNL_DUP01, "<Error %d> Timeout timer could not complete",completionCode); |
0 | 301 |
TestFailed(completionCode); |
302 |
} |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
303 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0478_HOSTRUNL_EXIT, this ); |
0 | 304 |
} |
305 |
||
306 |
void CUT_PBASE_T_USBDI_0478::DeviceRunL() |
|
307 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
308 |
OstTraceFunctionEntry1( CUT_PBASE_T_USBDI_0478_DEVICERUNL_ENTRY, this ); |
0 | 309 |
|
310 |
// Disconnect the device |
|
311 |
||
312 |
iTestDevice->SoftwareDisconnect(); |
|
313 |
||
314 |
// Complete the test case request |
|
315 |
||
316 |
TestPolicy().SignalTestComplete(iStatus.Int()); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
317 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0478_DEVICERUNL_EXIT, this ); |
0 | 318 |
} |
319 |
||
320 |
||
321 |
} |