|
1 // |
|
2 // Copyright (c) 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 // |
|
16 //! @file |
|
17 //! @SYMTestSuiteName NET-BEARERMOBILITY |
|
18 //! @SYMScriptTestEnvironment Standard Symbian HRP or emulator environment |
|
19 |
|
20 START_TESTCASE COMINF-ESOCK-RConnection-Mobility-780120 |
|
21 //! @SYMTestCaseID COMINF-ESOCK-RConnection-Mobility-780120 |
|
22 //!@SYMPREQ |
|
23 //!@SYMAPI |
|
24 // TODO_CDG |
|
25 //!@SYMTestPriority Critical |
|
26 //!@SYMTestActions |
|
27 // TODO_CDG |
|
28 //!@SYMTestType CIT |
|
29 |
|
30 PRINT NET_BMOBILITY_780120: |
|
31 PRINT RCommsMobilityApiExt::Open(), |
|
32 PRINT RCommsMobilityApiExt::RegisterForMobilityNotification(), |
|
33 PRINT Provision for the most preferred carrier (AP11) non available, and the second best (AP12) available; |
|
34 PRINT Start the connection |
|
35 PRINT RCommsMobilityApiExt::RegisterForMobilityNotification(), |
|
36 PRINT Set (AP11) as available; |
|
37 PRINT Receive PreferredCarrierAvaialble(AP12->AP11) |
|
38 PRINT RCommsMobilityApiExt::MigrateToPreferredCarrier(), |
|
39 PRINT AP11 fails to start |
|
40 PRINT Receive PreferredCarrierAvaialble(AP11->AP12) |
|
41 PRINT AP12 fails to start |
|
42 PRINT Application should recive a -1 |
|
43 |
|
44 // Load the test suite |
|
45 LOAD_SUITE te_esockteststepsSuite -SharedData |
|
46 |
|
47 // Set up the comms database and start esock in preparation for the test |
|
48 RUN_SCRIPT Z:\TestData\scripts\te_esock_test_unloadesockForced.script |
|
49 CED -i z:\testdata\configs\BearerMobility\BearerMobility_DummyProviders_003.ced.cfg |
|
50 |
|
51 |
|
52 RUN_SCRIPT z:\TestData\scripts\te_esock_test_loadesock.script |
|
53 |
|
54 // Create and connect socketserver and connectionserver instances |
|
55 RUN_TEST_STEP 150 te_esockteststepsSuite creatersocketservStep z:\testdata\configs\BearerMobility\Mobility_780120.ini CreateSockSvr |
|
56 RUN_TEST_STEP 150 te_esockteststepsSuite connectrsocketservStep z:\testdata\configs\BearerMobility\Mobility_780120.ini ConnectSockSvr |
|
57 |
|
58 // Create and open a connection (conn1) |
|
59 RUN_TEST_STEP 150 te_esockteststepsSuite createrconnectionStep z:\testdata\configs\BearerMobility\Mobility_780120.ini CreateConn |
|
60 RUN_TEST_STEP 150 te_esockteststepsSuite openrconnectionStep z:\testdata\configs\BearerMobility\Mobility_780120.ini OpenConn |
|
61 |
|
62 RUN_TEST_STEP 150 te_esockteststepsSuite startrconnectionStep z:\testdata\configs\BearerMobility\Mobility_780120.ini StartConnSnap10 |
|
63 |
|
64 // Make bearer1 available and connect with associated snap |
|
65 RUN_TEST_STEP 150 te_esockteststepsSuite SetAccessPointAvailabilityStep z:\testdata\configs\BearerMobility\Mobility_780120.ini ChangeAvailabilityDownAp11 |
|
66 RUN_TEST_STEP 150 te_esockteststepsSuite SetAccessPointAvailabilityStep z:\testdata\configs\BearerMobility\Mobility_780120.ini ChangeAvailabilityUpAp12 |
|
67 |
|
68 // Prepare mobility APIs which we will subscribe on |
|
69 RUN_TEST_STEP 150 te_esockteststepsSuite OpenRCommsMobilityAPIExtStep z:\testdata\configs\BearerMobility\Mobility_780120.ini OpenMobilityExtension |
|
70 |
|
71 //Register |
|
72 RUN_TEST_STEP 150 te_esockteststepsSuite RegisterForMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_780120.ini RegisterForMobility |
|
73 |
|
74 //The preferred carrier is not available so we will get a PreferredCarrierAvailable(11->12) |
|
75 RUN_TEST_STEP 150 te_esockteststepsSuite CheckMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_780120.ini CheckPreferredCarrierAvailableFirst |
|
76 |
|
77 //Migrate to preferred carrier |
|
78 RUN_TEST_STEP 150 te_esockteststepsSuite migratercommsmobilityapiextStep z:\testdata\configs\BearerMobility\Mobility_780120.ini MigrateToPreferredCarrier |
|
79 |
|
80 //Register |
|
81 RUN_TEST_STEP 150 te_esockteststepsSuite RegisterForMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_780120.ini RegisterForMobility |
|
82 |
|
83 //Check the new carrier is active now |
|
84 RUN_TEST_STEP 150 te_esockteststepsSuite CheckMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_780120.ini CheckErrorAfterDowngrade |
|
85 |
|
86 |
|
87 //Do not register, accept the new carrier |
|
88 //RUN_TEST_STEP 150 te_esockteststepsSuite acceptcarrierrcommsmobilityapiextStep z:\testdata\configs\BearerMobility\Mobility_780120.ini AcceptNewCarrier |
|
89 |
|
90 // Clean up what we used |
|
91 RUN_TEST_STEP 150 te_esockteststepsSuite CloseRCommsMobilityAPIExtStep z:\testdata\configs\BearerMobility\Mobility_780120.ini CloseMobilityExtension |
|
92 RUN_TEST_STEP 150 te_esockteststepsSuite CloseRConnectionStep z:\testdata\configs\BearerMobility\Mobility_780120.ini CloseConn |
|
93 RUN_TEST_STEP 150 te_esockteststepsSuite closersocketservStep z:\testdata\configs\BearerMobility\Mobility_780120.ini CloseSocketSvr |
|
94 |
|
95 PRINT Completed NET_BMOBILITY_780120 |
|
96 |
|
97 // Clean up |
|
98 RUN_SCRIPT Z:\TestData\scripts\te_esock_test_unloadesockForced.script |