|
1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "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 // This contains PsdAgx TestCase Test 3.1 - 3.31 |
|
15 // |
|
16 // |
|
17 |
|
18 // EPOC includes |
|
19 #include <e32base.h> |
|
20 #include <in_sock.h> |
|
21 |
|
22 // Test system includes |
|
23 #include "networking/log.h" |
|
24 #include "networking/teststep.h" |
|
25 #include "TestStepPsdAgt.h" |
|
26 #include "TestSuitePsdAgt.h" |
|
27 |
|
28 // RPacketContext |
|
29 #include <etelpckt.h> |
|
30 |
|
31 // EConnectionOpen |
|
32 #include <connectprog.h> |
|
33 |
|
34 //RPacketQoS |
|
35 #include "etelQoS.h" |
|
36 |
|
37 // COMMDB Database Undo |
|
38 #include "DbUndo.h" |
|
39 |
|
40 // Class definitions |
|
41 #include "PsdAgtTestQoSChange.h" |
|
42 |
|
43 |
|
44 // Test case 3.1, Context Config change, Assured Mode changes from True to False, disconnect |
|
45 enum TVerdict CPsdAgtTest3_1::doPsdAgtTestStepL( void ) |
|
46 { |
|
47 // COMMDB must be setup in assured mode before running the test suite |
|
48 // Otherwise this test will fail |
|
49 |
|
50 TRealAgtNotify agtNotify; |
|
51 agtNotify.SetTestCase(301); |
|
52 // Call QoSChange connection function |
|
53 QoSChangeDisconnectL(agtNotify); |
|
54 |
|
55 return iTestStepResult; |
|
56 } |
|
57 |
|
58 void CPsdAgtTest3_1::DialogHasAppeared() |
|
59 { |
|
60 // Should only display the dialog once before the disconnect request |
|
61 TEST(iStage==0); |
|
62 |
|
63 iStage++; |
|
64 } |
|
65 |
|
66 void CPsdAgtTest3_1::PsdAgtDisconnectRequest() |
|
67 { |
|
68 // Should only receive a disconnect request immediately |
|
69 // after displaying the first dialog |
|
70 TEST(iStage==1); |
|
71 iStage++; |
|
72 |
|
73 // Unblock the call to QoSChangeDisconnectL(agtNotify); |
|
74 CActiveScheduler::Stop(); |
|
75 } |
|
76 |
|
77 |
|
78 // Test case 3.2, Context Config change, Assured Mode changes from True to False, don't disconnect |
|
79 enum TVerdict CPsdAgtTest3_2::doPsdAgtTestStepL( void ) |
|
80 { |
|
81 // COMMDB must be setup in assured mode before running the test suite |
|
82 // Otherwise this test will fail |
|
83 |
|
84 TRealAgtNotify agtNotify; |
|
85 agtNotify.SetTestCase(302); |
|
86 // Call QoSChange connection function |
|
87 QoSChangeNoDisconnectL(agtNotify); |
|
88 |
|
89 return iTestStepResult; |
|
90 } |
|
91 |
|
92 void CPsdAgtTest3_2::DialogHasAppeared() |
|
93 { |
|
94 // Should only display the dialog once |
|
95 TEST(iStage==0); |
|
96 |
|
97 iStage++; |
|
98 |
|
99 // Unblock the call to QoSChangeNoDisconnectL(agtNotify); |
|
100 CActiveScheduler::Stop(); |
|
101 } |
|
102 |
|
103 |
|
104 |
|
105 // Test case 3.3, Context Config change, Assured Mode changes from True to False before timeout |
|
106 enum TVerdict CPsdAgtTest3_3::doPsdAgtTestStepL( void ) |
|
107 { |
|
108 // COMMDB must be setup in assured mode before running the test suite |
|
109 // Otherwise this test will fail |
|
110 |
|
111 TRealAgtNotify agtNotify; |
|
112 agtNotify.SetTestCase(303); |
|
113 // Call QoSChange connection function |
|
114 QoSChangeWithinTimeoutL(agtNotify); |
|
115 |
|
116 return iTestStepResult; |
|
117 } |
|
118 |
|
119 |
|
120 // Test case 3.4, Context Config change, RLP mode changed from Transparent to NonTransparent |
|
121 enum TVerdict CPsdAgtTest3_4::doPsdAgtTestStepL( void ) |
|
122 { |
|
123 TRealAgtNotify agtNotify; |
|
124 agtNotify.SetTestCase(304); |
|
125 // Call QoSChange connection function |
|
126 QoSChangeDisconnectL(agtNotify); |
|
127 |
|
128 // Undo change to RLPMode |
|
129 Log(_L("Reverting COMMDB changes")); |
|
130 |
|
131 return iTestStepResult; |
|
132 } |
|
133 |
|
134 void CPsdAgtTest3_4::DialogHasAppeared() |
|
135 { |
|
136 // Should only display the dialog once before the disconnect request |
|
137 TEST(iStage==0); |
|
138 |
|
139 iStage++; |
|
140 } |
|
141 |
|
142 void CPsdAgtTest3_4::PsdAgtDisconnectRequest() |
|
143 { |
|
144 // Should only receive a disconnect request immediately |
|
145 // after displaying the first dialog |
|
146 TEST(iStage==1); |
|
147 iStage++; |
|
148 |
|
149 // Unblock the call to QoSChangeDisconnectL(agtNotify); |
|
150 CActiveScheduler::Stop(); |
|
151 } |
|
152 |
|
153 |
|
154 // Test case 3.5, Context Config change, RLP mode changed from Transparent to NonTransparent, don't disconnect |
|
155 enum TVerdict CPsdAgtTest3_5::doPsdAgtTestStepL( void ) |
|
156 { |
|
157 TRealAgtNotify agtNotify; |
|
158 agtNotify.SetTestCase(305); |
|
159 |
|
160 // Call QoSChange connection function |
|
161 QoSChangeNoDisconnectL(agtNotify); |
|
162 |
|
163 // Undo change to RLPMode |
|
164 Log(_L("Reverting COMMDB changes")); |
|
165 |
|
166 return iTestStepResult; |
|
167 } |
|
168 |
|
169 void CPsdAgtTest3_5::DialogHasAppeared() |
|
170 { |
|
171 // Should only display the dialog once |
|
172 TEST(iStage==0); |
|
173 |
|
174 iStage++; |
|
175 |
|
176 // Unblock the call to QoSChangeNoDisconnectL(agtNotify); |
|
177 CActiveScheduler::Stop(); |
|
178 } |
|
179 |
|
180 |
|
181 // Test case 3.6, Context Config change, RLP mode changed from Transparent to NonTransparent |
|
182 enum TVerdict CPsdAgtTest3_6::doPsdAgtTestStepL( void ) |
|
183 { |
|
184 TRealAgtNotify agtNotify; |
|
185 agtNotify.SetTestCase(306); |
|
186 |
|
187 |
|
188 // Call QoSChange connection function |
|
189 QoSChangeWithinTimeoutL(agtNotify); |
|
190 |
|
191 // Undo change to RLPMode |
|
192 Log(_L("Reverting COMMDB changes")); |
|
193 |
|
194 return iTestStepResult; |
|
195 } |
|
196 |
|
197 |
|
198 // Test case 3.7, Context Config change, RLP mode changed from NonTransparent to Transparent, disconnect |
|
199 enum TVerdict CPsdAgtTest3_7::doPsdAgtTestStepL( void ) |
|
200 { |
|
201 TRealAgtNotify agtNotify; |
|
202 agtNotify.SetTestCase(307); |
|
203 |
|
204 // Call QoSChange connection function |
|
205 QoSChangeDisconnectL(agtNotify); |
|
206 |
|
207 // Undo change to RLPMode |
|
208 Log(_L("Reverting COMMDB changes")); |
|
209 |
|
210 return iTestStepResult; |
|
211 } |
|
212 |
|
213 void CPsdAgtTest3_7::DialogHasAppeared() |
|
214 { |
|
215 // Should only display the dialog once before the disconnect request |
|
216 TEST(iStage==0); |
|
217 |
|
218 iStage++; |
|
219 } |
|
220 |
|
221 void CPsdAgtTest3_7::PsdAgtDisconnectRequest() |
|
222 { |
|
223 // Should only receive a disconnect request immediately |
|
224 // after displaying the first dialog |
|
225 TEST(iStage==1); |
|
226 iStage++; |
|
227 |
|
228 // Unblock the call to QoSChangeDisconnectL(agtNotify); |
|
229 CActiveScheduler::Stop(); |
|
230 } |
|
231 |
|
232 |
|
233 // Test case 3.8, Context Config change, RLP mode changed from NonTransparent to Transparent, don't disconnect |
|
234 enum TVerdict CPsdAgtTest3_8::doPsdAgtTestStepL( void ) |
|
235 { |
|
236 TRealAgtNotify agtNotify; |
|
237 agtNotify.SetTestCase(308); |
|
238 |
|
239 // Call QoSChange connection function |
|
240 QoSChangeNoDisconnectL(agtNotify); |
|
241 |
|
242 // Undo change to RLPMode |
|
243 Log(_L("Reverting COMMDB changes")); |
|
244 |
|
245 return iTestStepResult; |
|
246 } |
|
247 |
|
248 void CPsdAgtTest3_8::DialogHasAppeared() |
|
249 { |
|
250 // Should only display the dialog once |
|
251 TEST(iStage==0); |
|
252 |
|
253 iStage++; |
|
254 |
|
255 // Unblock the call to QoSChangeNoDisconnectL(agtNotify); |
|
256 CActiveScheduler::Stop(); |
|
257 } |
|
258 |
|
259 |
|
260 |
|
261 // Test case 3.9, Context Config change, RLP mode changed from NonTransparent to Transparent |
|
262 enum TVerdict CPsdAgtTest3_9::doPsdAgtTestStepL( void ) |
|
263 { |
|
264 TRealAgtNotify agtNotify; |
|
265 agtNotify.SetTestCase(309); |
|
266 |
|
267 // Call QoSChange connection function |
|
268 QoSChangeWithinTimeoutL(agtNotify); |
|
269 |
|
270 // Undo change to RLPMode |
|
271 Log(_L("Reverting COMMDB changes")); |
|
272 |
|
273 return iTestStepResult; |
|
274 } |
|
275 |
|
276 |
|
277 |
|
278 // Test case 3.10, Context Config change, Priority reduced, disconnect |
|
279 enum TVerdict CPsdAgtTest3_10::doPsdAgtTestStepL( void ) |
|
280 { |
|
281 TRealAgtNotify agtNotify; |
|
282 agtNotify.SetTestCase(310); |
|
283 |
|
284 // Call QoSChange connection function |
|
285 QoSChangeDisconnectL(agtNotify); |
|
286 |
|
287 return iTestStepResult; |
|
288 } |
|
289 |
|
290 void CPsdAgtTest3_10::DialogHasAppeared() |
|
291 { |
|
292 // Should only display the dialog once before the disconnect request |
|
293 TEST(iStage==0); |
|
294 |
|
295 iStage++; |
|
296 } |
|
297 |
|
298 void CPsdAgtTest3_10::PsdAgtDisconnectRequest() |
|
299 { |
|
300 // Should only receive a disconnect request immediately |
|
301 // after displaying the first dialog |
|
302 TEST(iStage==1); |
|
303 iStage++; |
|
304 |
|
305 // Unblock the call to QoSChangeDisconnectL(agtNotify); |
|
306 CActiveScheduler::Stop(); |
|
307 } |
|
308 |
|
309 |
|
310 // Test case 3.11, Context Config change, Priority reduced, don't disconnect |
|
311 enum TVerdict CPsdAgtTest3_11::doPsdAgtTestStepL( void ) |
|
312 { |
|
313 TRealAgtNotify agtNotify; |
|
314 agtNotify.SetTestCase(311); |
|
315 |
|
316 // Call QoSChange connection function |
|
317 QoSChangeNoDisconnectL(agtNotify); |
|
318 |
|
319 return iTestStepResult; |
|
320 } |
|
321 |
|
322 void CPsdAgtTest3_11::DialogHasAppeared() |
|
323 { |
|
324 // Should only display the dialog once |
|
325 TEST(iStage==0); |
|
326 |
|
327 iStage++; |
|
328 |
|
329 // Unblock the call to QoSChangeNoDisconnectL(agtNotify); |
|
330 CActiveScheduler::Stop(); |
|
331 } |
|
332 |
|
333 |
|
334 |
|
335 // Test case 3.12, Context Config change, Priority reduced |
|
336 enum TVerdict CPsdAgtTest3_12::doPsdAgtTestStepL( void ) |
|
337 { |
|
338 TRealAgtNotify agtNotify; |
|
339 agtNotify.SetTestCase(312); |
|
340 |
|
341 // Call QoSChange connection function |
|
342 QoSChangeWithinTimeoutL(agtNotify); |
|
343 |
|
344 return iTestStepResult; |
|
345 } |
|
346 |
|
347 |
|
348 // Test case 3.13, Context Config change, UplinkRate reduced, disconnect |
|
349 enum TVerdict CPsdAgtTest3_13::doPsdAgtTestStepL( void ) |
|
350 { |
|
351 TRealAgtNotify agtNotify; |
|
352 agtNotify.SetTestCase(313); |
|
353 |
|
354 // Call QoSChange connection function |
|
355 QoSChangeDisconnectL(agtNotify); |
|
356 |
|
357 return iTestStepResult; |
|
358 } |
|
359 |
|
360 void CPsdAgtTest3_13::DialogHasAppeared() |
|
361 { |
|
362 // Should only display the dialog once before the disconnect request |
|
363 TEST(iStage==0); |
|
364 |
|
365 iStage++; |
|
366 } |
|
367 |
|
368 void CPsdAgtTest3_13::PsdAgtDisconnectRequest() |
|
369 { |
|
370 // Should only receive a disconnect request immediately |
|
371 // after displaying the first dialog |
|
372 TEST(iStage==1); |
|
373 iStage++; |
|
374 |
|
375 // Unblock the call to QoSChangeDisconnectL(agtNotify); |
|
376 CActiveScheduler::Stop(); |
|
377 } |
|
378 |
|
379 |
|
380 // Test case 3.14, Context Config change, UplinkRate reduced, don't disconnect |
|
381 enum TVerdict CPsdAgtTest3_14::doPsdAgtTestStepL( void ) |
|
382 { |
|
383 TRealAgtNotify agtNotify; |
|
384 agtNotify.SetTestCase(314); |
|
385 |
|
386 // Call QoSChange connection function |
|
387 QoSChangeNoDisconnectL(agtNotify); |
|
388 |
|
389 return iTestStepResult; |
|
390 } |
|
391 |
|
392 void CPsdAgtTest3_14::DialogHasAppeared() |
|
393 { |
|
394 // Should only display the dialog once |
|
395 TEST(iStage==0); |
|
396 |
|
397 iStage++; |
|
398 |
|
399 // Unblock the call to QoSChangeNoDisconnectL(agtNotify); |
|
400 CActiveScheduler::Stop(); |
|
401 } |
|
402 |
|
403 |
|
404 |
|
405 // Test case 3.15, Context Config change, UplinkRate reduced |
|
406 enum TVerdict CPsdAgtTest3_15::doPsdAgtTestStepL( void ) |
|
407 { |
|
408 TRealAgtNotify agtNotify; |
|
409 agtNotify.SetTestCase(315); |
|
410 |
|
411 // Call QoSChange connection function |
|
412 QoSChangeWithinTimeoutL(agtNotify); |
|
413 |
|
414 return iTestStepResult; |
|
415 } |
|
416 |
|
417 // Test case 3.16, Context Config change, DownlinkRate reduced, disconnect |
|
418 enum TVerdict CPsdAgtTest3_16::doPsdAgtTestStepL( void ) |
|
419 { |
|
420 TRealAgtNotify agtNotify; |
|
421 agtNotify.SetTestCase(316); |
|
422 |
|
423 // Call QoSChange connection function |
|
424 QoSChangeDisconnectL(agtNotify); |
|
425 |
|
426 return iTestStepResult; |
|
427 } |
|
428 |
|
429 void CPsdAgtTest3_16::DialogHasAppeared() |
|
430 { |
|
431 // Should only display the dialog once before the disconnect request |
|
432 TEST(iStage==0); |
|
433 |
|
434 iStage++; |
|
435 } |
|
436 |
|
437 void CPsdAgtTest3_16::PsdAgtDisconnectRequest() |
|
438 { |
|
439 // Should only receive a disconnect request immediately |
|
440 // after displaying the first dialog |
|
441 TEST(iStage==1); |
|
442 iStage++; |
|
443 |
|
444 // Unblock the call to QoSChangeDisconnectL(agtNotify); |
|
445 CActiveScheduler::Stop(); |
|
446 } |
|
447 |
|
448 |
|
449 // Test case 3.17, Context Config change, DownlinkRate reduced, don't disconnect |
|
450 enum TVerdict CPsdAgtTest3_17::doPsdAgtTestStepL( void ) |
|
451 { |
|
452 TRealAgtNotify agtNotify; |
|
453 agtNotify.SetTestCase(317); |
|
454 |
|
455 // Call QoSChange connection function |
|
456 QoSChangeNoDisconnectL(agtNotify); |
|
457 |
|
458 return iTestStepResult; |
|
459 } |
|
460 |
|
461 void CPsdAgtTest3_17::DialogHasAppeared() |
|
462 { |
|
463 // Should only display the dialog once |
|
464 TEST(iStage==0); |
|
465 |
|
466 iStage++; |
|
467 |
|
468 // Unblock the call to QoSChangeNoDisconnectL(agtNotify); |
|
469 CActiveScheduler::Stop(); |
|
470 } |
|
471 |
|
472 |
|
473 |
|
474 // Test case 3.18, Context Config change, DownlinkRate reduced |
|
475 enum TVerdict CPsdAgtTest3_18::doPsdAgtTestStepL( void ) |
|
476 { |
|
477 TRealAgtNotify agtNotify; |
|
478 agtNotify.SetTestCase(318); |
|
479 |
|
480 // Call QoSChange connection function |
|
481 QoSChangeWithinTimeoutL(agtNotify); |
|
482 |
|
483 return iTestStepResult; |
|
484 } |
|
485 |
|
486 |
|
487 // Test case 3.19, Context Config change, FwdDataLossRate increased, disconnect |
|
488 enum TVerdict CPsdAgtTest3_19::doPsdAgtTestStepL( void ) |
|
489 { |
|
490 TRealAgtNotify agtNotify; |
|
491 agtNotify.SetTestCase(319); |
|
492 |
|
493 // Call QoSChange connection function |
|
494 QoSChangeDisconnectL(agtNotify); |
|
495 |
|
496 return iTestStepResult; |
|
497 } |
|
498 |
|
499 void CPsdAgtTest3_19::DialogHasAppeared() |
|
500 { |
|
501 // Should only display the dialog once before the disconnect request |
|
502 TEST(iStage==0); |
|
503 |
|
504 iStage++; |
|
505 } |
|
506 |
|
507 void CPsdAgtTest3_19::PsdAgtDisconnectRequest() |
|
508 { |
|
509 // Should only receive a disconnect request immediately |
|
510 // after displaying the first dialog |
|
511 TEST(iStage==1); |
|
512 iStage++; |
|
513 |
|
514 // Unblock the call to QoSChangeDisconnectL(agtNotify); |
|
515 CActiveScheduler::Stop(); |
|
516 } |
|
517 |
|
518 |
|
519 // Test case 3.20, Context Config change, FwdDataLossRate increased, don't disconnect |
|
520 enum TVerdict CPsdAgtTest3_20::doPsdAgtTestStepL( void ) |
|
521 { |
|
522 TRealAgtNotify agtNotify; |
|
523 agtNotify.SetTestCase(320); |
|
524 |
|
525 // Call QoSChange connection function |
|
526 QoSChangeNoDisconnectL(agtNotify); |
|
527 |
|
528 return iTestStepResult; |
|
529 } |
|
530 |
|
531 void CPsdAgtTest3_20::DialogHasAppeared() |
|
532 { |
|
533 // Should only display the dialog once |
|
534 TEST(iStage==0); |
|
535 |
|
536 iStage++; |
|
537 |
|
538 // Unblock the call to QoSChangeNoDisconnectL(agtNotify); |
|
539 CActiveScheduler::Stop(); |
|
540 } |
|
541 |
|
542 |
|
543 |
|
544 // Test case 3.21, Context Config change, FwdDataLossRate increased |
|
545 enum TVerdict CPsdAgtTest3_21::doPsdAgtTestStepL( void ) |
|
546 { |
|
547 TRealAgtNotify agtNotify; |
|
548 agtNotify.SetTestCase(321); |
|
549 |
|
550 // Call QoSChange connection function |
|
551 QoSChangeWithinTimeoutL(agtNotify); |
|
552 |
|
553 return iTestStepResult; |
|
554 } |
|
555 |
|
556 |
|
557 // Test case 3.22, Context Config change, RevDataLossRate increased, disconnect |
|
558 enum TVerdict CPsdAgtTest3_22::doPsdAgtTestStepL( void ) |
|
559 { |
|
560 TRealAgtNotify agtNotify; |
|
561 agtNotify.SetTestCase(322); |
|
562 |
|
563 // Call QoSChange connection function |
|
564 QoSChangeDisconnectL(agtNotify); |
|
565 |
|
566 return iTestStepResult; |
|
567 } |
|
568 |
|
569 void CPsdAgtTest3_22::DialogHasAppeared() |
|
570 { |
|
571 // Should only display the dialog once before the disconnect request |
|
572 TEST(iStage==0); |
|
573 |
|
574 iStage++; |
|
575 } |
|
576 |
|
577 void CPsdAgtTest3_22::PsdAgtDisconnectRequest() |
|
578 { |
|
579 // Should only receive a disconnect request immediately |
|
580 // after displaying the first dialog |
|
581 TEST(iStage==1); |
|
582 iStage++; |
|
583 |
|
584 // Unblock the call to QoSChangeDisconnectL(agtNotify); |
|
585 CActiveScheduler::Stop(); |
|
586 } |
|
587 |
|
588 |
|
589 // Test case 3.23, Context Config change, RevDataLossRate increased, don't disconnect |
|
590 enum TVerdict CPsdAgtTest3_23::doPsdAgtTestStepL( void ) |
|
591 { |
|
592 TRealAgtNotify agtNotify; |
|
593 agtNotify.SetTestCase(323); |
|
594 |
|
595 // Call QoSChange connection function |
|
596 QoSChangeNoDisconnectL(agtNotify); |
|
597 |
|
598 return iTestStepResult; |
|
599 } |
|
600 |
|
601 void CPsdAgtTest3_23::DialogHasAppeared() |
|
602 { |
|
603 // Should only display the dialog once |
|
604 TEST(iStage==0); |
|
605 |
|
606 iStage++; |
|
607 |
|
608 // Unblock the call to QoSChangeNoDisconnectL(agtNotify); |
|
609 CActiveScheduler::Stop(); |
|
610 } |
|
611 |
|
612 |
|
613 |
|
614 // Test case 3.24, Context Config change, RevDataLossRate increased |
|
615 enum TVerdict CPsdAgtTest3_24::doPsdAgtTestStepL( void ) |
|
616 { |
|
617 TRealAgtNotify agtNotify; |
|
618 agtNotify.SetTestCase(324); |
|
619 |
|
620 // Call QoSChange connection function |
|
621 QoSChangeWithinTimeoutL(agtNotify); |
|
622 |
|
623 return iTestStepResult; |
|
624 } |
|
625 |
|
626 |
|
627 |
|
628 // Test case 3.25, Context Config change, FwdMaxDelay increased, disconnect |
|
629 enum TVerdict CPsdAgtTest3_25::doPsdAgtTestStepL( void ) |
|
630 { |
|
631 TRealAgtNotify agtNotify; |
|
632 agtNotify.SetTestCase(325); |
|
633 |
|
634 // Call QoSChange connection function |
|
635 QoSChangeDisconnectL(agtNotify); |
|
636 |
|
637 return iTestStepResult; |
|
638 } |
|
639 |
|
640 void CPsdAgtTest3_25::DialogHasAppeared() |
|
641 { |
|
642 // Should only display the dialog once before the disconnect request |
|
643 TEST(iStage==0); |
|
644 |
|
645 iStage++; |
|
646 } |
|
647 |
|
648 void CPsdAgtTest3_25::PsdAgtDisconnectRequest() |
|
649 { |
|
650 // Should only receive a disconnect request immediately |
|
651 // after displaying the first dialog |
|
652 TEST(iStage==1); |
|
653 iStage++; |
|
654 |
|
655 // Unblock the call to QoSChangeDisconnectL(agtNotify); |
|
656 CActiveScheduler::Stop(); |
|
657 } |
|
658 |
|
659 |
|
660 // Test case 3.26, Context Config change, FwdMaxDelay increased, don't disconnect |
|
661 enum TVerdict CPsdAgtTest3_26::doPsdAgtTestStepL( void ) |
|
662 { |
|
663 TRealAgtNotify agtNotify; |
|
664 agtNotify.SetTestCase(326); |
|
665 |
|
666 // Call QoSChange connection function |
|
667 QoSChangeNoDisconnectL(agtNotify); |
|
668 |
|
669 return iTestStepResult; |
|
670 } |
|
671 |
|
672 void CPsdAgtTest3_26::DialogHasAppeared() |
|
673 { |
|
674 // Should only display the dialog once |
|
675 TEST(iStage==0); |
|
676 |
|
677 iStage++; |
|
678 |
|
679 // Unblock the call to QoSChangeNoDisconnectL(agtNotify); |
|
680 CActiveScheduler::Stop(); |
|
681 } |
|
682 |
|
683 |
|
684 |
|
685 // Test case 3.27, Context Config change, FwdMaxDelay increased |
|
686 enum TVerdict CPsdAgtTest3_27::doPsdAgtTestStepL( void ) |
|
687 { |
|
688 TRealAgtNotify agtNotify; |
|
689 agtNotify.SetTestCase(327); |
|
690 |
|
691 // Call QoSChange connection function |
|
692 QoSChangeWithinTimeoutL(agtNotify); |
|
693 |
|
694 return iTestStepResult; |
|
695 } |
|
696 |
|
697 // Test case 3.28, Context Config change, RevMaxDelay increased, disconnect |
|
698 enum TVerdict CPsdAgtTest3_28::doPsdAgtTestStepL( void ) |
|
699 { |
|
700 TRealAgtNotify agtNotify; |
|
701 agtNotify.SetTestCase(328); |
|
702 |
|
703 // Call QoSChange connection function |
|
704 QoSChangeDisconnectL(agtNotify); |
|
705 |
|
706 return iTestStepResult; |
|
707 } |
|
708 |
|
709 void CPsdAgtTest3_28::DialogHasAppeared() |
|
710 { |
|
711 // Should only display the dialog once before the disconnect request |
|
712 TEST(iStage==0); |
|
713 |
|
714 iStage++; |
|
715 } |
|
716 |
|
717 void CPsdAgtTest3_28::PsdAgtDisconnectRequest() |
|
718 { |
|
719 // Should only receive a disconnect request immediately |
|
720 // after displaying the first dialog |
|
721 TEST(iStage==1); |
|
722 iStage++; |
|
723 |
|
724 // Unblock the call to QoSChangeDisconnectL(agtNotify); |
|
725 CActiveScheduler::Stop(); |
|
726 } |
|
727 |
|
728 |
|
729 // Test case 3.29, Context Config change, RevMaxDelay increased, don't disconnect |
|
730 enum TVerdict CPsdAgtTest3_29::doPsdAgtTestStepL( void ) |
|
731 { |
|
732 TRealAgtNotify agtNotify; |
|
733 agtNotify.SetTestCase(329); |
|
734 |
|
735 // Call QoSChange connection function |
|
736 QoSChangeNoDisconnectL(agtNotify); |
|
737 |
|
738 return iTestStepResult; |
|
739 } |
|
740 |
|
741 void CPsdAgtTest3_29::DialogHasAppeared() |
|
742 { |
|
743 // Should only display the dialog once |
|
744 TEST(iStage==0); |
|
745 |
|
746 iStage++; |
|
747 |
|
748 // Unblock the call to QoSChangeNoDisconnectL(agtNotify); |
|
749 CActiveScheduler::Stop(); |
|
750 } |
|
751 |
|
752 |
|
753 |
|
754 // Test case 3.30, Context Config change, RevMaxDelay increased |
|
755 enum TVerdict CPsdAgtTest3_30::doPsdAgtTestStepL( void ) |
|
756 { |
|
757 TRealAgtNotify agtNotify; |
|
758 agtNotify.SetTestCase(330); |
|
759 |
|
760 // Call QoSChange connection function |
|
761 QoSChangeWithinTimeoutL(agtNotify); |
|
762 |
|
763 return iTestStepResult; |
|
764 } |
|
765 |
|
766 // Test case 3.31, GPRS Context Config change, no effect |
|
767 enum TVerdict CPsdAgtTest3_31::doPsdAgtTestStepL( void ) |
|
768 { |
|
769 TInt err; |
|
770 TInt stage; |
|
771 CNifAgentRefN1 *agent; |
|
772 |
|
773 TRealAgtNotify agtNotify; |
|
774 agtNotify.SetTestCase(331); |
|
775 SetGPRSModeL(agtNotify); |
|
776 |
|
777 // Construct a new Dummy Nifman Instance |
|
778 Log(_L("Loading DUMMYNIF.DLL")); |
|
779 agent = CNifAgentRefN1::NewL(this,EFalse); |
|
780 CleanupStack::PushL(agent); |
|
781 |
|
782 // Attempt connection |
|
783 Log(_L("Connecting...")); |
|
784 agent->Connect(); |
|
785 |
|
786 // Check result codes |
|
787 agent->GetCompletionCode(err); |
|
788 TESTEL(err==KErrNone, err); |
|
789 |
|
790 // Check ConnectComplete was reported at the correct stage in the state machine |
|
791 agent->GetProgressStage(stage); |
|
792 TESTEL(stage==KConnectionOpen,stage); |
|
793 |
|
794 Log(_L("Connect Successful")); |
|
795 |
|
796 // Predetermined QoS warning response |
|
797 iDlgSvr->SetQoSWarnResponse(EFalse); |
|
798 |
|
799 DelayL(3000000); |
|
800 |
|
801 // Tell the ETEL layer to send a QoS change to PSDAGX |
|
802 Log(_L("Notify PSDAGT of QoS change")); |
|
803 agtNotify.NotifyAgt(EReduce); |
|
804 |
|
805 // Wait to make sure that no dialog appears |
|
806 DelayL(3000000); |
|
807 |
|
808 // Disconnect |
|
809 Log(_L("Disconnecting...")); |
|
810 agent->Disconnect(); |
|
811 |
|
812 // Check result code |
|
813 agent->GetCompletionCode(err); |
|
814 TESTEL(err==KErrNone, err); |
|
815 |
|
816 Log(_L("Disconnect Successful")); |
|
817 |
|
818 // Finished with Dummy Nifman so delete it |
|
819 CleanupStack::PopAndDestroy(agent); |
|
820 Log(_L("DUMMYNIF.DLL Unloaded")); |
|
821 |
|
822 return iTestStepResult; |
|
823 } |
|
824 |