|
1 /* |
|
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * This contains Usb Test Section 1 |
|
16 * |
|
17 */ |
|
18 |
|
19 // EPOC includes |
|
20 #include <e32base.h> |
|
21 |
|
22 // Usb Test system includes |
|
23 #include <networking/log.h> |
|
24 #include "UsbStep.h" |
|
25 #include "UsbSuite.h" |
|
26 #include "UsbTest1.h" |
|
27 |
|
28 //////////////////////////////////////////////////////////////////////////////////// |
|
29 //////////////////////////////////////////////////////////////////////////////////// |
|
30 // Test 1.1 |
|
31 CTestStartUsb::CTestStartUsb() |
|
32 { |
|
33 // store the name of this test case |
|
34 iTestStepName = _L("StartUsb"); |
|
35 } |
|
36 |
|
37 // Test 1.1 Destructor |
|
38 CTestStartUsb::~CTestStartUsb() |
|
39 { |
|
40 } |
|
41 |
|
42 // Test 1.1 Main Code |
|
43 enum TVerdict CTestStartUsb::doTestStepL() |
|
44 { |
|
45 if (!iUsbSuite->iUsbOpen) |
|
46 { |
|
47 TESTL(iUsbSuite->iUsb.Connect() == KErrNone); |
|
48 iUsbSuite->iUsbOpen = ETrue; |
|
49 } |
|
50 |
|
51 iUsbSuite->iUsb.Start(iUsbSuite->iStartStatus); |
|
52 Log(_L("CTestStartUsb::doTestStepL() - Requested USB service start")); |
|
53 return iTestStepResult; |
|
54 } |
|
55 |
|
56 |
|
57 //////////////////////////////////////////////////////////////////////////////////// |
|
58 //////////////////////////////////////////////////////////////////////////////////// |
|
59 // Test 1.2 |
|
60 CTestWaitForUsb::CTestWaitForUsb() |
|
61 { |
|
62 // store the name of this test case |
|
63 iTestStepName = _L("WaitForUsb"); |
|
64 } |
|
65 |
|
66 // Test 1.2 Destructor |
|
67 CTestWaitForUsb::~CTestWaitForUsb() |
|
68 { |
|
69 } |
|
70 |
|
71 // Test 1.2 Main Code |
|
72 enum TVerdict CTestWaitForUsb::doTestStepL() |
|
73 { |
|
74 User::WaitForRequest(iUsbSuite->iStartStatus); |
|
75 Log(_L("CTestWaitForUsb::doTestStepL() - Usb Start returned %d"), iUsbSuite->iStartStatus.Int()); |
|
76 TESTL(iUsbSuite->iStartStatus.Int() == KErrNone); |
|
77 return iTestStepResult; |
|
78 } |
|
79 |
|
80 |
|
81 //////////////////////////////////////////////////////////////////////////////////// |
|
82 //////////////////////////////////////////////////////////////////////////////////// |
|
83 // Test 1.3 |
|
84 CTestStartCsy::CTestStartCsy() |
|
85 { |
|
86 // store the name of this test case |
|
87 iTestStepName = _L("StartCSY"); |
|
88 } |
|
89 |
|
90 // destructor |
|
91 CTestStartCsy::~CTestStartCsy() |
|
92 { |
|
93 } |
|
94 |
|
95 // Test 1.3 Main Code |
|
96 enum TVerdict CTestStartCsy::doTestStepL() |
|
97 { |
|
98 OpenCommServerL(); |
|
99 return iTestStepResult; |
|
100 } |
|
101 |
|
102 |
|
103 //////////////////////////////////////////////////////////////////////////////////// |
|
104 //////////////////////////////////////////////////////////////////////////////////// |
|
105 // Test 1.4 |
|
106 CTestOpenDTEPort::CTestOpenDTEPort() |
|
107 { |
|
108 // store the name of this test case |
|
109 iTestStepName = _L("OpenDTE"); |
|
110 } |
|
111 |
|
112 // Test 1.4 Destructor |
|
113 CTestOpenDTEPort::~CTestOpenDTEPort() |
|
114 { |
|
115 } |
|
116 |
|
117 // Test 1.4 Main Code |
|
118 enum TVerdict CTestOpenDTEPort::doTestStepL() |
|
119 { |
|
120 OpenCommServerL(); |
|
121 |
|
122 if (!iUsbSuite->iPortOpen) |
|
123 { |
|
124 TInt err = iUsbSuite->iCommPort.Open(iUsbSuite->iCommServer, PORT_NAME, ECommExclusive, ECommRoleDTE); |
|
125 TESTL(err == KErrNone); |
|
126 iUsbSuite->iPortOpen = ETrue; |
|
127 Log(_L("CTestOpenDTEPort::doTestStepL() - Opened ACM comm port, role DTE")); |
|
128 } |
|
129 else |
|
130 { |
|
131 TEST(ETrue); |
|
132 } |
|
133 |
|
134 return iTestStepResult; |
|
135 } |
|
136 |
|
137 //////////////////////////////////////////////////////////////////////////////////// |
|
138 //////////////////////////////////////////////////////////////////////////////////// |
|
139 // Test 1.5 |
|
140 CTestOpenDCEPort::CTestOpenDCEPort() |
|
141 { |
|
142 // store the name of this test case |
|
143 iTestStepName = _L("OpenDCE"); |
|
144 } |
|
145 |
|
146 // Test 1.5 Destructor |
|
147 CTestOpenDCEPort::~CTestOpenDCEPort() |
|
148 { |
|
149 } |
|
150 |
|
151 // Test 1.5 Main Code |
|
152 enum TVerdict CTestOpenDCEPort::doTestStepL() |
|
153 { |
|
154 OpenCommServerL(); |
|
155 |
|
156 if (!iUsbSuite->iPortOpen) |
|
157 { |
|
158 TInt err = iUsbSuite->iCommPort.Open(iUsbSuite->iCommServer, PORT_NAME, ECommExclusive, ECommRoleDCE); |
|
159 TESTL(err == KErrNone); |
|
160 iUsbSuite->iPortOpen = ETrue; |
|
161 |
|
162 Log(_L("CTestOpenDCEPort::doTestStepL() - Opened ACM comm port, role DCE")); |
|
163 } |
|
164 else |
|
165 { |
|
166 TEST(ETrue); |
|
167 } |
|
168 |
|
169 return iTestStepResult; |
|
170 } |
|
171 |
|
172 //////////////////////////////////////////////////////////////////////////////////// |
|
173 //////////////////////////////////////////////////////////////////////////////////// |
|
174 // Test 1.6 |
|
175 CTestPostRead::CTestPostRead() |
|
176 { |
|
177 // store the name of this test case |
|
178 iTestStepName = _L("Read"); |
|
179 } |
|
180 |
|
181 // Test 1.6 Destructor |
|
182 CTestPostRead::~CTestPostRead() |
|
183 { |
|
184 } |
|
185 |
|
186 // Test 1.6 Main Code |
|
187 enum TVerdict CTestPostRead::doTestStepL() |
|
188 { |
|
189 iUsbSuite->iCommPort.Read(iUsbSuite->iReadStatus, iUsbSuite->iReadBuffer); |
|
190 Log(_L("CTestPostRead::doTestStepL() - Read posted on ACM comm port")); |
|
191 TEST(ETrue); |
|
192 return iTestStepResult; |
|
193 } |
|
194 |
|
195 //////////////////////////////////////////////////////////////////////////////////// |
|
196 //////////////////////////////////////////////////////////////////////////////////// |
|
197 // Test 1.7 |
|
198 CTestPostWrite::CTestPostWrite() |
|
199 { |
|
200 // store the name of this test case |
|
201 iTestStepName = _L("Write"); |
|
202 } |
|
203 |
|
204 // Test 1.7 Destructor |
|
205 CTestPostWrite::~CTestPostWrite() |
|
206 { |
|
207 } |
|
208 |
|
209 // Test 1.7 Main Code |
|
210 enum TVerdict CTestPostWrite::doTestStepL() |
|
211 { |
|
212 iUsbSuite->iWriteBuffer.SetLength(24); |
|
213 iUsbSuite->iWriteBuffer.Copy(_L("Hello There!")); |
|
214 iUsbSuite->iCommPort.Write(iUsbSuite->iWriteStatus, iUsbSuite->iWriteBuffer); |
|
215 Log(_L("CTestPostWrite::doTestStepL() - Write posted on ACM comm port")); |
|
216 TEST(ETrue); |
|
217 return iTestStepResult; |
|
218 } |
|
219 //////////////////////////////////////////////////////////////////////////////////// |
|
220 //////////////////////////////////////////////////////////////////////////////////// |
|
221 // Test 1.8 |
|
222 CTestCancelRead::CTestCancelRead() |
|
223 { |
|
224 // store the name of this test case |
|
225 iTestStepName = _L("CancelRead"); |
|
226 } |
|
227 |
|
228 // Test 1.8 Destructor |
|
229 CTestCancelRead::~CTestCancelRead() |
|
230 { |
|
231 } |
|
232 |
|
233 // Test 1.8 Main Code |
|
234 enum TVerdict CTestCancelRead::doTestStepL() |
|
235 { |
|
236 iUsbSuite->iCommPort.ReadCancel(); |
|
237 Log(_L("CTestCancelRead::doTestStepL() - Read Cancelled")); |
|
238 TEST(ETrue); |
|
239 return iTestStepResult; |
|
240 } |
|
241 //////////////////////////////////////////////////////////////////////////////////// |
|
242 //////////////////////////////////////////////////////////////////////////////////// |
|
243 // Test 1.9 |
|
244 CTestCancelWrite::CTestCancelWrite() |
|
245 { |
|
246 // store the name of this test case |
|
247 iTestStepName = _L("CancelWrite"); |
|
248 } |
|
249 |
|
250 // Test 1.9 Destructor |
|
251 CTestCancelWrite::~CTestCancelWrite() |
|
252 { |
|
253 } |
|
254 |
|
255 // Test 1.9 Main Code |
|
256 enum TVerdict CTestCancelWrite::doTestStepL() |
|
257 { |
|
258 iUsbSuite->iCommPort.WriteCancel(); |
|
259 Log(_L("CTestCancelWrite::doTestStepL() - Write Cancelled")); |
|
260 TEST(ETrue); |
|
261 return iTestStepResult; |
|
262 } |
|
263 //////////////////////////////////////////////////////////////////////////////////// |
|
264 //////////////////////////////////////////////////////////////////////////////////// |
|
265 // Test 1.10 |
|
266 CTestWaitForRead::CTestWaitForRead() |
|
267 { |
|
268 // store the name of this test case |
|
269 iTestStepName = _L("WaitForRead"); |
|
270 } |
|
271 |
|
272 // Test 1.10 Destructor |
|
273 CTestWaitForRead::~CTestWaitForRead() |
|
274 { |
|
275 } |
|
276 |
|
277 // Test 1.10 Main Code |
|
278 enum TVerdict CTestWaitForRead::doTestStepL() |
|
279 { |
|
280 User::WaitForRequest(iUsbSuite->iReadStatus); |
|
281 Log(_L("CTestWaitForRead::doTestStepL() - Read request returned %d"), iUsbSuite->iReadStatus.Int()); |
|
282 TESTL(iUsbSuite->iReadStatus.Int() == KErrNone); |
|
283 return iTestStepResult; |
|
284 } |
|
285 |
|
286 //////////////////////////////////////////////////////////////////////////////////// |
|
287 //////////////////////////////////////////////////////////////////////////////////// |
|
288 // Test 1.11 |
|
289 CTestWaitForWrite::CTestWaitForWrite() |
|
290 { |
|
291 // store the name of this test case |
|
292 iTestStepName = _L("WaitForWrite"); |
|
293 } |
|
294 |
|
295 // Test 1.11 Destructor |
|
296 CTestWaitForWrite::~CTestWaitForWrite() |
|
297 { |
|
298 } |
|
299 |
|
300 // Test 1.11 Main Code |
|
301 enum TVerdict CTestWaitForWrite::doTestStepL() |
|
302 { |
|
303 User::WaitForRequest(iUsbSuite->iWriteStatus); |
|
304 Log(_L("CTestWaitForWrite::doTestStepL() - Write request returned %d"), iUsbSuite->iWriteStatus.Int()); |
|
305 TESTL(iUsbSuite->iWriteStatus.Int() == KErrNone); |
|
306 return iTestStepResult; |
|
307 } |
|
308 |
|
309 //////////////////////////////////////////////////////////////////////////////////// |
|
310 //////////////////////////////////////////////////////////////////////////////////// |
|
311 // Test 1.12 |
|
312 CTestPostReadOneOrMore::CTestPostReadOneOrMore() |
|
313 { |
|
314 // store the name of this test case |
|
315 iTestStepName = _L("ReadOneOrMore"); |
|
316 } |
|
317 |
|
318 // Test 1.12 Destructor |
|
319 CTestPostReadOneOrMore::~CTestPostReadOneOrMore() |
|
320 { |
|
321 } |
|
322 |
|
323 // Test 1.12 Main Code |
|
324 enum TVerdict CTestPostReadOneOrMore::doTestStepL() |
|
325 { |
|
326 iUsbSuite->iCommPort.ReadOneOrMore(iUsbSuite->iReadStatus, iUsbSuite->iReadBuffer); |
|
327 Log(_L("CTestPostReadOneOrMore::doTestStepL() - Read posted on ACM comm port")); |
|
328 TEST(ETrue); |
|
329 return iTestStepResult; |
|
330 } |
|
331 |
|
332 //////////////////////////////////////////////////////////////////////////////////// |
|
333 //////////////////////////////////////////////////////////////////////////////////// |
|
334 // Test 1.13 |
|
335 CTestClosePort::CTestClosePort() |
|
336 { |
|
337 // store the name of this test case |
|
338 iTestStepName = _L("ClosePort"); |
|
339 } |
|
340 |
|
341 // Test 1.13 Destructor |
|
342 CTestClosePort::~CTestClosePort() |
|
343 { |
|
344 } |
|
345 |
|
346 // Test 1.13 Main Code |
|
347 enum TVerdict CTestClosePort::doTestStepL() |
|
348 { |
|
349 iUsbSuite->iCommPort.Close(); |
|
350 iUsbSuite->iPortOpen = EFalse; |
|
351 Log(_L("CTestClosePort::doTestStepL() - ACM comm port closed")); |
|
352 TEST(ETrue); |
|
353 return iTestStepResult; |
|
354 } |
|
355 |
|
356 //////////////////////////////////////////////////////////////////////////////////// |
|
357 //////////////////////////////////////////////////////////////////////////////////// |
|
358 // Test 1.14 |
|
359 CTestCloseCommServer::CTestCloseCommServer() |
|
360 { |
|
361 // store the name of this test case |
|
362 iTestStepName = _L("CloseCommServer"); |
|
363 } |
|
364 |
|
365 // Test 1.14 Destructor |
|
366 CTestCloseCommServer::~CTestCloseCommServer() |
|
367 { |
|
368 } |
|
369 |
|
370 // Test 1.14 Main Code |
|
371 enum TVerdict CTestCloseCommServer::doTestStepL() |
|
372 { |
|
373 iUsbSuite->iCommServer.Close(); |
|
374 iUsbSuite->iCommServerOpen = EFalse; |
|
375 Log(_L("CTestCloseCommServer::doTestStepL() - Comm Server handle closed")); |
|
376 TEST(ETrue); |
|
377 return iTestStepResult; |
|
378 } |
|
379 |
|
380 //////////////////////////////////////////////////////////////////////////////////// |
|
381 //////////////////////////////////////////////////////////////////////////////////// |
|
382 // Test 1.15 |
|
383 CTestCloseUsbServer::CTestCloseUsbServer() |
|
384 { |
|
385 // store the name of this test case |
|
386 iTestStepName = _L("CloseUsb"); |
|
387 } |
|
388 |
|
389 // Test 1.15 Destructor |
|
390 CTestCloseUsbServer::~CTestCloseUsbServer() |
|
391 { |
|
392 } |
|
393 |
|
394 // Test 1.15 Main Code |
|
395 enum TVerdict CTestCloseUsbServer::doTestStepL() |
|
396 { |
|
397 iUsbSuite->iUsb.Close(); |
|
398 iUsbSuite->iUsbOpen = EFalse; |
|
399 Log(_L("CTestCloseUsbServer::doTestStepL() - Usb Server handle closed")); |
|
400 TEST(ETrue); |
|
401 return iTestStepResult; |
|
402 } |
|
403 |
|
404 //////////////////////////////////////////////////////////////////////////////////// |
|
405 //////////////////////////////////////////////////////////////////////////////////// |
|
406 // Test 1.16 |
|
407 CTestStopUsb::CTestStopUsb() |
|
408 { |
|
409 // store the name of this test case |
|
410 iTestStepName = _L("StopUsb"); |
|
411 } |
|
412 |
|
413 // Test 1.16 Destructor |
|
414 CTestStopUsb::~CTestStopUsb() |
|
415 { |
|
416 } |
|
417 |
|
418 // Test 1.16 Main Code |
|
419 enum TVerdict CTestStopUsb::doTestStepL() |
|
420 { |
|
421 iUsbSuite->iUsb.Stop(); |
|
422 Log(_L("CTestCloseUsbServer::doTestStepL() - Usb Services stopped")); |
|
423 TEST(ETrue); |
|
424 return iTestStepResult; |
|
425 } |
|
426 |
|
427 //////////////////////////////////////////////////////////////////////////////////// |
|
428 //////////////////////////////////////////////////////////////////////////////////// |
|
429 // Test 1.17 |
|
430 CTestNotifySignalChange::CTestNotifySignalChange() |
|
431 { |
|
432 // store the name of this test case |
|
433 iTestStepName = _L("NotifySignalChange"); |
|
434 } |
|
435 |
|
436 // Test 1.17 Destructor |
|
437 CTestNotifySignalChange::~CTestNotifySignalChange() |
|
438 { |
|
439 } |
|
440 |
|
441 // Test 1.17 Main Code |
|
442 enum TVerdict CTestNotifySignalChange::doTestStepL() |
|
443 { |
|
444 iUsbSuite->iCommPort.NotifySignalChange(iUsbSuite->iNotifySignalChangeStatus, iUsbSuite->iSignals); |
|
445 Log(_L("CTestNotifySignalChange::doTestStepL() - Posted signal change notification request")); |
|
446 TEST(ETrue); |
|
447 return iTestStepResult; |
|
448 } |
|
449 |
|
450 //////////////////////////////////////////////////////////////////////////////////// |
|
451 //////////////////////////////////////////////////////////////////////////////////// |
|
452 // Test 1.18 |
|
453 CTestWaitForSignalChange::CTestWaitForSignalChange() |
|
454 { |
|
455 // store the name of this test case |
|
456 iTestStepName = _L("WaitForSignalChange"); |
|
457 } |
|
458 |
|
459 // Test 1.18 Destructor |
|
460 CTestWaitForSignalChange::~CTestWaitForSignalChange() |
|
461 { |
|
462 } |
|
463 |
|
464 // Test 1.18 Main Code |
|
465 enum TVerdict CTestWaitForSignalChange::doTestStepL() |
|
466 { |
|
467 Log(_L("CTestWaitForSignalChange::doTestStepL() - Waiting for signal change")); |
|
468 User::WaitForRequest(iUsbSuite->iNotifySignalChangeStatus); |
|
469 Log(_L("CTestNotifySignalChange::doTestStepL() - Signal status completed with %d"), iUsbSuite->iNotifySignalChangeStatus.Int()); |
|
470 TESTL(iUsbSuite->iNotifySignalChangeStatus.Int() == KErrNone); |
|
471 Log(_L("CTestNotifySignalChange::doTestStepL() - Signal = %d"), iUsbSuite->iSignals); |
|
472 return iTestStepResult; |
|
473 } |
|
474 |
|
475 //////////////////////////////////////////////////////////////////////////////////// |
|
476 //////////////////////////////////////////////////////////////////////////////////// |
|
477 // Test 1.19 |
|
478 CTestWaitForReadCancel::CTestWaitForReadCancel() |
|
479 { |
|
480 // store the name of this test case |
|
481 iTestStepName = _L("WaitForReadCancel"); |
|
482 } |
|
483 |
|
484 // Test 1.19 Destructor |
|
485 CTestWaitForReadCancel::~CTestWaitForReadCancel() |
|
486 { |
|
487 } |
|
488 |
|
489 // Test 1.19 Main Code |
|
490 enum TVerdict CTestWaitForReadCancel::doTestStepL() |
|
491 { |
|
492 Log(_L("CTestWaitForReadCancel::doTestStepL() - Waiting for read status to be cancelled")); |
|
493 User::WaitForRequest(iUsbSuite->iReadStatus); |
|
494 Log(_L("CTestWaitForReadCancel::doTestStepL() - Signal status completed with %d"), iUsbSuite->iReadStatus.Int()); |
|
495 TESTL(iUsbSuite->iReadStatus.Int() == KErrCancel); |
|
496 return iTestStepResult; |
|
497 } |
|
498 |
|
499 //////////////////////////////////////////////////////////////////////////////////// |
|
500 //////////////////////////////////////////////////////////////////////////////////// |
|
501 // Test 1.20 |
|
502 CTestPostReadThenCancel::CTestPostReadThenCancel() |
|
503 { |
|
504 // store the name of this test case |
|
505 iTestStepName = _L("ReadThenCancel"); |
|
506 } |
|
507 |
|
508 // Test 1.20 Destructor |
|
509 CTestPostReadThenCancel::~CTestPostReadThenCancel() |
|
510 { |
|
511 } |
|
512 |
|
513 // Test 1.20 Main Code |
|
514 enum TVerdict CTestPostReadThenCancel::doTestStepL() |
|
515 { |
|
516 iUsbSuite->iCommPort.Read(iUsbSuite->iReadStatus, iUsbSuite->iReadBuffer); |
|
517 Log(_L("CTestPostReadThenCancel::doTestStepL() - Read posted on ACM comm port")); |
|
518 iUsbSuite->iCommPort.ReadCancel(); |
|
519 Log(_L("CTestPostReadThenCancel::doTestStepL() - Cancelling read")); |
|
520 User::WaitForRequest(iUsbSuite->iReadStatus); |
|
521 Log(_L("CTestPostReadThenCancel::doTestStepL() - Read status completed with %d"), iUsbSuite->iReadStatus.Int()); |
|
522 TESTL(iUsbSuite->iReadStatus.Int() == KErrCancel); |
|
523 return iTestStepResult; |
|
524 } |
|
525 |
|
526 //////////////////////////////////////////////////////////////////////////////////// |
|
527 //////////////////////////////////////////////////////////////////////////////////// |
|
528 // Test 1.21 |
|
529 CTestNotifyConfigChange::CTestNotifyConfigChange() |
|
530 { |
|
531 // store the name of this test case |
|
532 iTestStepName = _L("NotifyConfigChange"); |
|
533 } |
|
534 |
|
535 // Test 1.21 Destructor |
|
536 CTestNotifyConfigChange::~CTestNotifyConfigChange() |
|
537 { |
|
538 } |
|
539 |
|
540 // Test 1.21 Main Code |
|
541 enum TVerdict CTestNotifyConfigChange::doTestStepL() |
|
542 { |
|
543 iUsbSuite->iCommPort.NotifyConfigChange(iUsbSuite->iNotifyConfigChangeStatus, iUsbSuite->iConfig); |
|
544 Log(_L("CTestNotifyConfigChange::doTestStepL() - Posted config change notification request")); |
|
545 TEST(ETrue); |
|
546 return iTestStepResult; |
|
547 } |
|
548 |
|
549 //////////////////////////////////////////////////////////////////////////////////// |
|
550 //////////////////////////////////////////////////////////////////////////////////// |
|
551 // Test 1.23 |
|
552 CTestNotifyBreak::CTestNotifyBreak() |
|
553 { |
|
554 // store the name of this test case |
|
555 iTestStepName = _L("NotifyBreak"); |
|
556 } |
|
557 |
|
558 // Test 1.23 Destructor |
|
559 CTestNotifyBreak::~CTestNotifyBreak() |
|
560 { |
|
561 } |
|
562 |
|
563 // Test 1.23 Main Code |
|
564 enum TVerdict CTestNotifyBreak::doTestStepL() |
|
565 { |
|
566 iUsbSuite->iCommPort.NotifyBreak(iUsbSuite->iNotifyBreakStatus); |
|
567 Log(_L("CTestNotifyBreak::doTestStepL() - Posted break notification request")); |
|
568 TEST(ETrue); |
|
569 return iTestStepResult; |
|
570 } |
|
571 |
|
572 //////////////////////////////////////////////////////////////////////////////////// |
|
573 //////////////////////////////////////////////////////////////////////////////////// |
|
574 // Test 1.24 |
|
575 CTestWaitForBreak::CTestWaitForBreak() |
|
576 { |
|
577 // store the name of this test case |
|
578 iTestStepName = _L("WaitForBreak"); |
|
579 } |
|
580 |
|
581 // Test 1.24 Destructor |
|
582 CTestWaitForBreak::~CTestWaitForBreak() |
|
583 { |
|
584 } |
|
585 |
|
586 // Test 1.24 Main Code |
|
587 enum TVerdict CTestWaitForBreak::doTestStepL() |
|
588 { |
|
589 Log(_L("CTestWaitForBreak::doTestStepL() - Waiting for break")); |
|
590 User::WaitForRequest(iUsbSuite->iNotifyBreakStatus); |
|
591 Log(_L("CTestWaitForBreak::doTestStepL() - Break status completed with %d"), iUsbSuite->iNotifyBreakStatus.Int()); |
|
592 TESTL(iUsbSuite->iNotifyBreakStatus.Int() == KErrNone); |
|
593 return iTestStepResult; |
|
594 } |
|
595 |
|
596 //////////////////////////////////////////////////////////////////////////////////// |
|
597 //////////////////////////////////////////////////////////////////////////////////// |
|
598 // Test 1.25 |
|
599 CTestCloseAll::CTestCloseAll() |
|
600 { |
|
601 // store the name of this test case |
|
602 iTestStepName = _L("CloseAll"); |
|
603 } |
|
604 |
|
605 // Test 1.25 Destructor |
|
606 CTestCloseAll::~CTestCloseAll() |
|
607 { |
|
608 } |
|
609 |
|
610 // Test 1.25 Main Code |
|
611 enum TVerdict CTestCloseAll::doTestStepL() |
|
612 { |
|
613 iUsbSuite->CloseAll(); |
|
614 TESTL(ETrue); |
|
615 return iTestStepResult; |
|
616 } |
|
617 |