author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 31 Aug 2010 16:34:26 +0300 | |
branch | RCL_3 |
changeset 43 | c1f20ce4abcf |
parent 0 | a41df078684a |
child 44 | 3e88ff8f41d5 |
permissions | -rw-r--r-- |
43
c1f20ce4abcf
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 "testcasewd.h" |
|
26 |
#include "testcase0465.h" |
|
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
27 |
#include "OstTraceDefinitions.h" |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
28 |
#ifdef OST_TRACE_COMPILER_IN_USE |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
29 |
#include "testcase0465Traces.h" |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
30 |
#endif |
0 | 31 |
|
32 |
||
33 |
||
34 |
||
35 |
// the name below is used to add a pointer to our construction method to a pointer MAP in |
|
36 |
// the class factory |
|
37 |
_LIT(KTestCaseId,"PBASE-USB_OTGDI-0465"); |
|
38 |
const TTestCaseFactoryReceipt<CTestCase0465> CTestCase0465::iFactoryReceipt(KTestCaseId); |
|
39 |
||
40 |
CTestCase0465* CTestCase0465::NewL(TBool aHost) |
|
41 |
{ |
|
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
42 |
if(gVerboseOutput) |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
43 |
{ |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
44 |
OstTraceFunctionEntry0(CTESTCASE0465_NEWL); |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
45 |
} |
0 | 46 |
CTestCase0465* self = new (ELeave) CTestCase0465(aHost); |
47 |
CleanupStack::PushL(self); |
|
48 |
self->ConstructL(); |
|
49 |
CleanupStack::Pop(self); |
|
50 |
return self; |
|
51 |
} |
|
52 |
||
53 |
||
54 |
CTestCase0465::CTestCase0465(TBool aHost) |
|
55 |
: CTestCaseRoot(KTestCaseId, aHost) |
|
56 |
{ |
|
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
57 |
if(gVerboseOutput) |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
58 |
{ |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
59 |
OstTraceFunctionEntry0(CTESTCASE0465_CTESTCASE0465); |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
60 |
} |
0 | 61 |
|
62 |
} |
|
63 |
||
64 |
||
65 |
/** |
|
66 |
ConstructL |
|
67 |
*/ |
|
68 |
void CTestCase0465::ConstructL() |
|
69 |
{ |
|
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
70 |
if(gVerboseOutput) |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
71 |
{ |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
72 |
OstTraceFunctionEntry0(CTESTCASE0465_CONSTRUCTL); |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
73 |
} |
0 | 74 |
iWDTimer = CTestCaseWatchdog::NewL(); |
75 |
||
76 |
BaseConstructL(); |
|
77 |
} |
|
78 |
||
79 |
||
80 |
CTestCase0465::~CTestCase0465() |
|
81 |
{ |
|
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
82 |
if(gVerboseOutput) |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
83 |
{ |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
84 |
OstTraceFunctionEntry0(CTESTCASE0465_DCTESTCASE0465); |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
85 |
} |
0 | 86 |
|
87 |
Cancel(); |
|
88 |
delete iWDTimer; |
|
89 |
||
90 |
} |
|
91 |
||
92 |
||
93 |
void CTestCase0465::ExecuteTestCaseL() |
|
94 |
{ |
|
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
95 |
if(gVerboseOutput) |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
96 |
{ |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
97 |
OstTraceFunctionEntry0(CTESTCASE0465_EXECUTETESTCASEL); |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
98 |
} |
0 | 99 |
iCaseStep = EPreconditions; |
100 |
||
101 |
iRepeats = KOperationRetriesMax; // VBus event rise retries |
|
102 |
||
103 |
CActiveScheduler::Add(this); |
|
104 |
SelfComplete(); |
|
105 |
||
106 |
} |
|
107 |
||
108 |
||
109 |
void CTestCase0465::DoCancel() |
|
110 |
{ |
|
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
111 |
if(gVerboseOutput) |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
112 |
{ |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
113 |
OstTraceFunctionEntry0(CTESTCASE0465_DOCANCEL); |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
114 |
} |
0 | 115 |
|
116 |
// cancel our timer |
|
117 |
iTimer.Cancel(); |
|
118 |
} |
|
119 |
||
120 |
||
121 |
void CTestCase0465::CancelKB(CTestCaseRoot *pThis) |
|
122 |
{ |
|
123 |
CTestCase0465 * p = REINTERPRET_CAST(CTestCase0465 *,pThis); |
|
124 |
// cancel the pending call |
|
125 |
||
126 |
p->iConsole->ReadCancel(); |
|
127 |
||
128 |
} |
|
129 |
||
130 |
||
131 |
void CTestCase0465::CancelDrive(CTestCaseRoot *pThis) |
|
132 |
{ |
|
133 |
CTestCase0465 * p = REINTERPRET_CAST(CTestCase0465 *,pThis); |
|
134 |
// cancel any pending call, and then complete our active obj with a timeout value |
|
135 |
p->SelfComplete(KTestCaseWatchdogTO); |
|
136 |
} |
|
137 |
||
138 |
||
139 |
// This test result depends on all the ID detection tests and the VBus driving and dropping tests have not yet passed |
|
140 |
void CTestCase0465::DescribePreconditions() |
|
141 |
{ |
|
142 |
test.Printf(_L("BEFORE running this test\n")); |
|
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
143 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_DESCRIBEPRECONDITIONS, "BEFORE running this test\n"); |
0 | 144 |
test.Printf(_L("\n")); |
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
145 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_DESCRIBEPRECONDITIONS_DUP01, "\n"); |
0 | 146 |
test.Printf(_L("Insert 'A' connector\n")); |
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
147 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_DESCRIBEPRECONDITIONS_DUP02, "Insert 'A' connector\n"); |
0 | 148 |
test.Printf(_L("\n")); |
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
149 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_DESCRIBEPRECONDITIONS_DUP03, "\n"); |
0 | 150 |
test.Printf(_L("Confirm passing tests\n")); |
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
151 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_DESCRIBEPRECONDITIONS_DUP04, "Confirm passing tests\n"); |
0 | 152 |
test.Printf(_L("\n")); |
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
153 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_DESCRIBEPRECONDITIONS_DUP05, "\n"); |
0 | 154 |
test.Printf(_L("ID_PIN detection\n")); |
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
155 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_DESCRIBEPRECONDITIONS_DUP06, "ID_PIN detection\n"); |
0 | 156 |
test.Printf(_L("VBus Driving\n")); |
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
157 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_DESCRIBEPRECONDITIONS_DUP07, "VBus Driving\n"); |
0 | 158 |
test.Printf(_L("\n")); |
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
159 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_DESCRIBEPRECONDITIONS_DUP08, "\n"); |
0 | 160 |
} |
161 |
||
162 |
||
163 |
// handle event completion |
|
164 |
void CTestCase0465::RunStepL() |
|
165 |
{ |
|
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
166 |
if(gVerboseOutput) |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
167 |
{ |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
168 |
OstTraceFunctionEntry0(CTESTCASE0465_RUNSTEPL); |
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
169 |
} |
0 | 170 |
// Obtain the completion code for this CActive obj. |
171 |
TInt completionCode(iStatus.Int()); |
|
172 |
TBuf<MAX_DSTRLEN> aDescription; |
|
173 |
TInt err(0); |
|
174 |
||
175 |
switch(iCaseStep) |
|
176 |
{ |
|
177 |
case EPreconditions: |
|
178 |
iCaseStep = ELoadLdd; |
|
179 |
if (iAutomated) |
|
180 |
{ |
|
181 |
iCaseStep = ELoadLdd; |
|
182 |
SelfComplete(); |
|
183 |
break; |
|
184 |
} |
|
185 |
// prompt to insert connector |
|
186 |
test.Printf(_L("\n")); |
|
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
187 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_RUNSTEPL_DUP01, "\n"); |
0 | 188 |
test.Printf(KInsertAConnectorPrompt); |
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
189 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_RUNSTEPL_DUP02, KInsertAConnectorPrompt); |
0 | 190 |
test.Printf(_L("\n")); |
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
191 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_RUNSTEPL_DUP03, "\n"); |
0 | 192 |
test.Printf(KPressAnyKeyToContinue); |
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
193 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_RUNSTEPL_DUP04, KPressAnyKeyToContinue); |
0 | 194 |
test.Printf(_L("\n")); |
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
195 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_RUNSTEPL_DUP05, "\n"); |
0 | 196 |
RequestCharacter(); |
197 |
break; |
|
198 |
||
199 |
case ELoadLdd: |
|
200 |
// 1. load the LDD and init. |
|
201 |
if (!StepLoadLDD()) |
|
202 |
{ |
|
203 |
break; |
|
204 |
} |
|
205 |
iCaseStep = EDriveVBus; |
|
206 |
SelfComplete(); |
|
207 |
break; |
|
208 |
||
209 |
case EDriveVBus: |
|
210 |
// 2. DRIVE VBUS |
|
211 |
// wait for 100 ms to allow the stack time to settle |
|
212 |
User::After(100000); |
|
213 |
err = otgBusRequest(); |
|
214 |
if (KErrNone != err) |
|
215 |
{ |
|
216 |
return TestFailed(KErrAbort, _L("Raise VBus - RUsbOtgDriver::BusRequest() FAILED!")); |
|
217 |
} |
|
218 |
||
219 |
// wait for 1000 ms as per test document |
|
220 |
User::After(1000000); |
|
221 |
||
222 |
// test for VBus rise next |
|
223 |
otgQueueOtgEventRequest( iOTGEvent, iStatus ); |
|
224 |
SetActive(); |
|
225 |
iCaseStep = EVerifyVBus; |
|
226 |
break; |
|
227 |
||
228 |
case EVerifyVBus: |
|
229 |
// 3. get VBus rise event |
|
230 |
iCaseStep = EUnloadLdd; |
|
231 |
OtgEventString(iOTGEvent, aDescription); |
|
232 |
test.Printf(_L("Received event %d '%S' status(%d)\n"), iOTGEvent, &aDescription, completionCode); |
|
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
233 |
OstTraceExt3(TRACE_NORMAL, CTESTCASE0465_RUNSTEPL_DUP06, "Received event %d '%S' status(%d)\n", iOTGEvent, aDescription, completionCode); |
0 | 234 |
|
235 |
if (iOTGEvent != RUsbOtgDriver::EEventVbusRaised) |
|
236 |
{ |
|
237 |
iCaseStep = EVerifyVBus; |
|
238 |
iRepeats--; |
|
239 |
if (iRepeats <0) |
|
240 |
{ |
|
241 |
return TestFailed(KErrAbort, _L("Raise VBus event not detected. FAILED!")); |
|
242 |
} |
|
243 |
||
244 |
otgQueueOtgEventRequest( iOTGEvent, iStatus ); |
|
245 |
SetActive(); |
|
246 |
break; |
|
247 |
} |
|
248 |
test.Printf(_L("VBus seen OK.\n")); |
|
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
249 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_RUNSTEPL_DUP07, "VBus seen OK.\n"); |
0 | 250 |
|
251 |
SelfComplete(); |
|
252 |
break; |
|
253 |
||
254 |
case EUnloadLdd: |
|
255 |
// unload |
|
256 |
if (EFalse == StepUnloadLDD()) |
|
257 |
{ |
|
258 |
return TestFailed(KErrAbort,_L("unload Ldd failure")); |
|
259 |
} |
|
260 |
||
261 |
// wait for 100 ms to allow the stack time to settle |
|
262 |
User::After(100000); |
|
263 |
||
264 |
test.Printf(_L("Use meter or oscilloscope\n")); |
|
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
265 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_RUNSTEPL_DUP08, "Use meter or oscilloscope\n"); |
0 | 266 |
test.Printf(_L("to measure VBUS, which should\n")); |
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
267 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_RUNSTEPL_DUP09, "to measure VBUS, which should\n"); |
0 | 268 |
test.Printf(_L("have dropped\n")); |
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
269 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_RUNSTEPL_DUP10, "have dropped\n"); |
0 | 270 |
test.Printf(_L("\n")); |
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
271 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_RUNSTEPL_DUP11, "\n"); |
0 | 272 |
test.Printf(_L("Is it below 0.2 volts?\n")); |
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
273 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_RUNSTEPL_DUP12, "Is it below 0.2 volts?\n"); |
0 | 274 |
test.Printf(_L("\n")); |
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
275 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_RUNSTEPL_DUP13, "\n"); |
0 | 276 |
test.Printf(_L("Select Y or N to continue\n")); |
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
277 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_RUNSTEPL_DUP14, "Select Y or N to continue\n"); |
0 | 278 |
RequestCharacter(); |
279 |
iWDTimer->IssueRequest(KDelayDurationForUserActivityMS, this, &CancelKB); |
|
280 |
iCaseStep = EVerifyBusGone; |
|
281 |
break; |
|
282 |
||
283 |
case EVerifyBusGone: |
|
284 |
// since the LDD is gone, there is no OTGDI API from here on |
|
285 |
if (KTestCaseWatchdogTO == iStatus.Int()) |
|
286 |
{ |
|
287 |
return TestFailed(KErrAbort, _L("Operator response timeout")); |
|
288 |
} |
|
289 |
iWDTimer->Cancel(); |
|
290 |
// user intput |
|
291 |
if (('y' == iKeyCodeInput) ||('Y' == iKeyCodeInput)) |
|
292 |
{ |
|
293 |
test.Printf(_L("VBUS 'drop' seen\n")); |
|
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
294 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_RUNSTEPL_DUP15, "VBUS 'drop' seen\n"); |
0 | 295 |
SelfComplete(); |
296 |
} |
|
297 |
else |
|
298 |
{ |
|
299 |
return TestFailed(KErrAbort, _L("VBus drop NOT 'seen' - FAILED!")); |
|
300 |
} |
|
301 |
iCaseStep = ELastStep; |
|
302 |
break; |
|
303 |
||
304 |
case ELastStep: |
|
305 |
TestPassed(); |
|
306 |
break; |
|
307 |
||
308 |
default: |
|
309 |
test.Printf(_L("<Error> unknown test step\n")); |
|
43
c1f20ce4abcf
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
310 |
OstTrace0(TRACE_NORMAL, CTESTCASE0465_RUNSTEPL_DUP16, "<Error> unknown test step\n"); |
0 | 311 |
Cancel(); |
312 |
return (TestFailed(KErrCorrupt, _L("<Error> unknown test step"))); |
|
313 |
} |
|
314 |
} |
|
315 |
||
316 |