author | William Roberts <williamr@symbian.org> |
Fri, 24 Sep 2010 16:08:16 +0100 | |
changeset 272 | 70a6efdb753f |
parent 259 | 57b9594f5772 |
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 |
// @internalComponent |
|
15 |
// |
|
16 |
// |
|
17 |
||
18 |
#include <e32std.h> |
|
19 |
#include <e32std_private.h> |
|
20 |
#include <u32std.h> // unicode builds |
|
21 |
#include <e32base.h> |
|
22 |
#include <e32base_private.h> |
|
23 |
#include <e32Test.h> // RTest headder |
|
24 |
#include "testcaseroot.h" |
|
25 |
#include "b2bwatchers.h" |
|
26 |
#include "testcase1233.h" |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
27 |
#include "OstTraceDefinitions.h" |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
28 |
#ifdef OST_TRACE_COMPILER_IN_USE |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
29 |
#include "testcase1233Traces.h" |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
30 |
#endif |
0 | 31 |
|
32 |
#include <e32debug.h> |
|
33 |
||
34 |
#define LOG_INTO_STEP(a) test.Printf(_L("\nInto Step [%S]\n\n"), &a); |
|
35 |
||
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
36 |
|
0 | 37 |
/* ************************************************************************************** |
38 |
* the name below is used to add a pointer to our construction method to a pointer MAP in |
|
39 |
* the class factory |
|
40 |
*/ |
|
41 |
_LIT(KTestCaseId,"PBASE-USB_OTGDI-1233"); |
|
42 |
const TTestCaseFactoryReceipt<CTestCase1233> CTestCase1233::iFactoryReceipt(KTestCaseId); |
|
43 |
||
44 |
CTestCase1233* CTestCase1233::NewL(TBool aHost) |
|
45 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
46 |
if(gVerboseOutput) |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
47 |
{ |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
48 |
OstTraceFunctionEntry0(CTESTCASE1233_NEWL); |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
49 |
} |
0 | 50 |
CTestCase1233* self = new (ELeave) CTestCase1233(aHost); |
51 |
CleanupStack::PushL(self); |
|
52 |
self->ConstructL(); |
|
53 |
CleanupStack::Pop(self); |
|
54 |
return self; |
|
55 |
} |
|
56 |
||
57 |
||
58 |
CTestCase1233::CTestCase1233(TBool aHost) |
|
59 |
: CTestCaseB2BRoot(KTestCaseId, aHost, iStatus) |
|
60 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
61 |
if(gVerboseOutput) |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
62 |
{ |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
63 |
OstTraceFunctionEntry0(CTESTCASE1233_CTESTCASE1233); |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
64 |
} |
0 | 65 |
|
66 |
} |
|
67 |
||
68 |
||
69 |
/** |
|
70 |
ConstructL |
|
71 |
*/ |
|
72 |
void CTestCase1233::ConstructL() |
|
73 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
74 |
if(gVerboseOutput) |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
75 |
{ |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
76 |
OstTraceFunctionEntry0(CTESTCASE1233_CONSTRUCTL); |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
77 |
} |
0 | 78 |
|
79 |
iTestVID = 0x0E22; // Symbian |
|
80 |
iTestPID = 0xF000 + 1233; // Test 1233 |
|
81 |
||
82 |
BaseConstructL(); |
|
83 |
} |
|
84 |
||
85 |
||
86 |
CTestCase1233::~CTestCase1233() |
|
87 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
88 |
if(gVerboseOutput) |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
89 |
{ |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
90 |
OstTraceFunctionEntry0(CTESTCASE1233_DCTESTCASE1233); |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
91 |
} |
0 | 92 |
iCollector.DestroyObservers(); |
93 |
Cancel(); |
|
94 |
} |
|
95 |
||
96 |
||
97 |
void CTestCase1233::ExecuteTestCaseL() |
|
98 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
99 |
if(gVerboseOutput) |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
100 |
{ |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
101 |
OstTraceFunctionEntry0(CTESTCASE1233_EXECUTETESTCASEL); |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
102 |
} |
0 | 103 |
iCaseStep = EPreconditions; |
104 |
CActiveScheduler::Add(this); |
|
105 |
SelfComplete(); |
|
106 |
} |
|
107 |
||
108 |
||
109 |
void CTestCase1233::DoCancel() |
|
110 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
111 |
if(gVerboseOutput) |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
112 |
{ |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
113 |
OstTraceFunctionEntry0(CTESTCASE1233_DOCANCEL); |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
114 |
} |
0 | 115 |
// cancel our timer |
116 |
iTimer.Cancel(); |
|
117 |
} |
|
118 |
||
119 |
||
120 |
void CTestCase1233::RunStepL() |
|
121 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
122 |
if(gVerboseOutput) |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
123 |
{ |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
124 |
OstTraceFunctionEntry0(CTESTCASE1233_RUNSTEPL); |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
125 |
} |
0 | 126 |
|
127 |
// Obtain the completion code for this CActive obj. |
|
128 |
TInt completionCode(iStatus.Int()); |
|
129 |
TBuf<MAX_DSTRLEN> aDescription; |
|
130 |
||
131 |
switch(iCaseStep) |
|
132 |
{ |
|
133 |
/*==================================================*/ |
|
134 |
/* Fixed 'pre' steps */ |
|
135 |
/*==================================================*/ |
|
136 |
case EPreconditions: |
|
137 |
{ |
|
138 |
LOG_INTO_STEP(_L("EPreconditions")) |
|
139 |
||
140 |
iCaseStep = ELoadLdd; |
|
141 |
StepB2BPreconditions(); |
|
142 |
break; |
|
143 |
} |
|
144 |
||
145 |
case ELoadLdd: |
|
146 |
{ |
|
147 |
LOG_INTO_STEP(_L("ELoadLdd")) |
|
148 |
||
149 |
// Note we use here the hex equivalent of #1233 for the PID |
|
150 |
||
151 |
if (!StepLoadClient(0xF4D1/*use default settings for SRP/HNP support*/)) |
|
152 |
{ |
|
153 |
return TestFailed(KErrAbort, _L("Client Load Failure")); |
|
154 |
} |
|
155 |
||
156 |
// load OTG ldd and init. |
|
157 |
if (!StepLoadLDD()) |
|
158 |
{ |
|
159 |
return TestFailed(KErrAbort, _L("OTG Load Failure")); |
|
160 |
} |
|
161 |
||
162 |
if(otgActivateFdfActor()!=KErrNone) |
|
163 |
{ |
|
164 |
return TestFailed(KErrAbort, _L("Couldn't load FDF Actor")); |
|
165 |
} |
|
166 |
||
167 |
// test that the right cable is in |
|
168 |
CheckRoleConnections(); |
|
169 |
||
170 |
// subscribe to OTG states,events and messages now that it has loaded OK |
|
171 |
TRAPD(result, iCollector.CreateObserversL(*this)); |
|
172 |
if (KErrNone != result) |
|
173 |
{ |
|
174 |
return(TestFailed(KErrNoMemory, _L("Unable to create observers"))); |
|
175 |
} |
|
176 |
||
177 |
// Allow enough time for 8 enumerations, say a second each, plus two of the |
|
178 |
// tests require 15 seconds of SOF traffic |
|
179 |
||
180 |
const TInt KTestCase1233Timeout = 45000; |
|
181 |
iCollector.AddStepTimeout(KTestCase1233Timeout); |
|
182 |
||
183 |
iCollector.ClearAllEvents(); |
|
184 |
iCaseStep = ERaiseVBus; |
|
185 |
||
186 |
SelfComplete(); |
|
187 |
break; |
|
188 |
} |
|
189 |
||
190 |
/*==================================================*/ |
|
191 |
/* Steps for this test case only */ |
|
192 |
/*==================================================*/ |
|
193 |
||
194 |
case ELoopToNextPID: |
|
195 |
{ |
|
196 |
LOG_INTO_STEP(_L("ELoopToNextPID")); |
|
197 |
||
198 |
if (KTestCaseWatchdogTO == iStatus.Int()) |
|
199 |
{ |
|
200 |
iCollector.DestroyObservers(); |
|
201 |
return TestFailed(KErrAbort, _L("Timeout")); |
|
202 |
} |
|
203 |
||
204 |
if ( iTestVID == 0x0E22 ) |
|
205 |
{ |
|
206 |
iTestVID = 0x1A0A; // OPT and test devices |
|
207 |
iTestPID = 0x0100; // One *before* the first HS test ID |
|
208 |
} |
|
209 |
||
210 |
iTestPID++; |
|
211 |
||
212 |
if ( iTestPID > 0x0108 ) |
|
213 |
{ |
|
214 |
test.Printf(_L("All VID/PID pairs done\n")); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
215 |
OstTrace0(TRACE_NORMAL, CTESTCASE1233_RUNSTEPL_DUP01, "All VID/PID pairs done\n"); |
0 | 216 |
|
217 |
iCaseStep = EUnloadLdd; |
|
218 |
} |
|
219 |
else |
|
220 |
{ |
|
221 |
if(gTestRoleMaster) |
|
222 |
{ |
|
223 |
// B |
|
224 |
test.Printf(_L("Setting VID/PID of 0x%04x/0x%04x\n"),iTestVID,iTestPID); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
225 |
OstTraceExt2(TRACE_NORMAL, CTESTCASE1233_RUNSTEPL_DUP02, "Setting VID/PID of 0x%04x/0x%04x\n",(TUint32)iTestVID,(TUint32)iTestPID); |
0 | 226 |
|
227 |
if (!StepChangeVidPid(iTestVID,iTestPID)) |
|
228 |
{ |
|
229 |
return TestFailed(KErrAbort, _L("VID/PID Change Failure")); |
|
230 |
} |
|
231 |
} |
|
232 |
else |
|
233 |
{ |
|
234 |
// A |
|
235 |
test.Printf(_L("Expecting VID/PID of 0x%04x/0x%04x\n"),iTestVID,iTestPID); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
236 |
OstTraceExt2(TRACE_NORMAL, CTESTCASE1233_RUNSTEPL_DUP03, "Expecting VID/PID of 0x%04x/0x%04x\n",(TUint32)iTestVID,(TUint32)iTestPID); |
0 | 237 |
} |
238 |
||
239 |
iCollector.ClearAllEvents(); |
|
240 |
iCaseStep = ERaiseVBus; |
|
241 |
} |
|
242 |
||
243 |
SelfComplete(); |
|
244 |
break; |
|
245 |
} |
|
246 |
||
247 |
case ERaiseVBus: |
|
248 |
{ |
|
249 |
LOG_INTO_STEP(_L("ERaiseVBus")); |
|
250 |
||
251 |
if (KTestCaseWatchdogTO == iStatus.Int()) |
|
252 |
{ |
|
253 |
iCollector.DestroyObservers(); |
|
254 |
return TestFailed(KErrAbort, _L("Timeout")); |
|
255 |
} |
|
256 |
||
257 |
if (gTestRoleMaster) |
|
258 |
{ |
|
259 |
// B device |
|
260 |
iCollector.AddRequiredNotification(EWatcherEvent, RUsbOtgDriver::EEventVbusRaised); |
|
261 |
iCollector.AddRequiredNotification(EWatcherState, RUsbOtgDriver::EStateBPeripheral); |
|
262 |
iCollector.AddRequiredNotification(EWatcherPeripheralState, EUsbcDeviceStateDefault); |
|
263 |
iCollector.AddRequiredNotification(EWatcherPeripheralState, EUsbcDeviceStateAddress); |
|
264 |
iCollector.AddRequiredNotification(EWatcherEvent, RUsbOtgDriver::EEventHnpEnabled); |
|
265 |
iCollector.AddRequiredNotification(EWatcherPeripheralState, EUsbcDeviceStateConfigured); |
|
266 |
} |
|
267 |
else |
|
268 |
{ |
|
269 |
// A device |
|
270 |
test.Printf(_L("Raising VBUS for VID/PID = 0x%04x/0x%04x\n"),iTestVID,iTestPID); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
271 |
OstTraceExt2(TRACE_NORMAL, CTESTCASE1233_RUNSTEPL_DUP04, "Raising VBUS for VID/PID = 0x%04x/0x%04x\n",(TUint32)iTestVID,(TUint32)iTestPID); |
0 | 272 |
|
273 |
if ( otgBusRequest() != KErrNone ) |
|
274 |
{ |
|
275 |
return TestFailed(KErrAbort, _L("Raise Vbus - RUsbOtgDriver::BusRequest() FAILED!")); |
|
276 |
} |
|
277 |
||
278 |
iCollector.AddRequiredNotification(EWatcherEvent, RUsbOtgDriver::EEventVbusRaised); |
|
279 |
iCollector.AddRequiredNotification(EWatcherAConnectionIdle, RUsbOtgDriver::EConnectionBusy); |
|
280 |
iCollector.AddRequiredNotification(EWatcherState, RUsbOtgDriver::EStateAHost); |
|
281 |
} |
|
282 |
||
283 |
iCaseStep = EVBusRaised; |
|
284 |
SetActive(); |
|
285 |
break; |
|
286 |
} |
|
287 |
||
288 |
case EVBusRaised: |
|
289 |
{ |
|
290 |
LOG_INTO_STEP(_L("EVBusRaised")); |
|
291 |
||
292 |
if (KTestCaseWatchdogTO == iStatus.Int()) |
|
293 |
{ |
|
294 |
return TestFailed(KErrAbort, _L("Timeout")); |
|
295 |
} |
|
296 |
||
297 |
if ( otgVbusPresent() ) |
|
298 |
{ |
|
299 |
test.Printf(_L("...VBUS is UP\n")); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
300 |
OstTrace0(TRACE_NORMAL, CTESTCASE1233_RUNSTEPL_DUP05, "...VBUS is UP\n"); |
0 | 301 |
iCaseStep = EDropVBus; |
302 |
} |
|
303 |
else |
|
304 |
{ |
|
305 |
test.Printf(_L("...VBUS is DOWN\n")); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
306 |
OstTrace0(TRACE_NORMAL, CTESTCASE1233_RUNSTEPL_DUP06, "...VBUS is DOWN\n"); |
0 | 307 |
return TestFailed(KErrAbort, _L("Vbus did not rise - FAILED!")); |
308 |
} |
|
309 |
||
310 |
if (gTestRoleMaster) |
|
311 |
{ |
|
312 |
// B device |
|
313 |
SelfComplete(); |
|
314 |
} |
|
315 |
else |
|
316 |
{ |
|
317 |
// A device |
|
318 |
||
319 |
// The default device (0x0E22/0xB4D1) is passed to the FDF, which will (eventually) |
|
320 |
// suspend and enter connection idle state. |
|
321 |
||
322 |
// The HS test devices (0x1A0A) will not be presented to FDF, so there will be no |
|
323 |
// trailing connection idle to find. |
|
324 |
||
325 |
if ( iTestVID == 0x0E22 ) |
|
326 |
{ |
|
327 |
iCollector.AddRequiredNotification(EWatcherAConnectionIdle, RUsbOtgDriver::EConnectionIdle); |
|
328 |
SetActive(); |
|
329 |
} |
|
330 |
else |
|
331 |
{ |
|
332 |
SelfComplete(); |
|
333 |
} |
|
334 |
} |
|
335 |
||
336 |
break; |
|
337 |
} |
|
338 |
||
339 |
case EDropVBus: |
|
340 |
{ |
|
341 |
LOG_INTO_STEP(_L("EDropVBus")); |
|
342 |
||
343 |
if (KTestCaseWatchdogTO == iStatus.Int()) |
|
344 |
{ |
|
345 |
iCollector.DestroyObservers(); |
|
346 |
return TestFailed(KErrAbort, _L("Timeout")); |
|
347 |
} |
|
348 |
||
349 |
if ( gTestRoleMaster) |
|
350 |
{ |
|
351 |
// B device |
|
352 |
iCollector.AddRequiredNotification(EWatcherEvent, RUsbOtgDriver::EEventVbusDropped); |
|
353 |
} |
|
354 |
else |
|
355 |
{ |
|
356 |
// A device |
|
357 |
otgBusDrop(); |
|
358 |
||
359 |
iCollector.AddRequiredNotification(EWatcherEvent, RUsbOtgDriver::EEventVbusDropped); |
|
360 |
} |
|
361 |
||
362 |
iCaseStep = EVBusDropped; |
|
363 |
SetActive(); |
|
364 |
break; |
|
365 |
} |
|
366 |
||
367 |
case EVBusDropped: |
|
368 |
{ |
|
369 |
LOG_INTO_STEP(_L("EVBusDropped")); |
|
370 |
||
371 |
if (KTestCaseWatchdogTO == iStatus.Int()) |
|
372 |
{ |
|
373 |
return TestFailed(KErrAbort, _L("Timeout")); |
|
374 |
} |
|
375 |
||
376 |
if ( otgVbusPresent() ) |
|
377 |
{ |
|
378 |
test.Printf(_L("...VBUS is UP\n")); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
379 |
OstTrace0(TRACE_NORMAL, CTESTCASE1233_RUNSTEPL_DUP07, "...VBUS is UP\n"); |
0 | 380 |
return TestFailed(KErrAbort, _L("Vbus did not rise - FAILED!")); |
381 |
} |
|
382 |
else |
|
383 |
{ |
|
384 |
test.Printf(_L("...VBUS is DOWN\n")); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
385 |
OstTrace0(TRACE_NORMAL, CTESTCASE1233_RUNSTEPL_DUP08, "...VBUS is DOWN\n"); |
0 | 386 |
iCaseStep = ELoopToNextPID; |
387 |
} |
|
388 |
||
389 |
SelfComplete(); |
|
390 |
break; |
|
391 |
} |
|
392 |
||
393 |
/*==================================================*/ |
|
394 |
/* Fixed 'post' steps */ |
|
395 |
/*==================================================*/ |
|
396 |
||
397 |
case EUnloadLdd: |
|
398 |
{ |
|
399 |
LOG_INTO_STEP(_L("EUnloadLdd")) |
|
400 |
||
401 |
otgDeactivateFdfActor(); |
|
402 |
iCollector.DestroyObservers(); |
|
403 |
if (EFalse == StepUnloadLDD()){ |
|
404 |
return TestFailed(KErrAbort,_L("unload Ldd failure")); |
|
405 |
} |
|
406 |
if (!StepUnloadClient()){ |
|
407 |
return TestFailed(KErrAbort,_L("Client Unload Failure")); |
|
408 |
} |
|
409 |
||
410 |
iCaseStep = ELastStep; |
|
411 |
SelfComplete(); |
|
412 |
break; |
|
413 |
} |
|
414 |
||
415 |
case ELastStep: |
|
416 |
{ |
|
417 |
LOG_INTO_STEP(_L("ELastStep")) |
|
418 |
||
419 |
TestPassed(); |
|
420 |
RequestCharacter(); |
|
421 |
break; |
|
422 |
} |
|
423 |
||
424 |
default: |
|
425 |
{ |
|
426 |
LOG_INTO_STEP(_L("DEFAULT! (unknown test step)")); |
|
427 |
Cancel(); |
|
428 |
RequestCharacter(); |
|
429 |
return (TestFailed(KErrCorrupt, _L("<Error> unknown test step"))); |
|
430 |
} |
|
431 |
} |
|
432 |
||
433 |
} |