24
|
1 |
// Copyright (c) 2007-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 |
// Test step definitions for the NetworkControl functional unit.
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
/**
|
|
19 |
@internalTechnology
|
|
20 |
*/
|
|
21 |
|
|
22 |
#include <etelpckt.h>
|
|
23 |
#include <pcktcs.h>
|
|
24 |
|
|
25 |
#include "cctsyintegrationtestnetworkcontrol.h"
|
|
26 |
#include "listretrievalhelpers.h"
|
|
27 |
#include "cctsyinidata.h"
|
|
28 |
|
|
29 |
|
|
30 |
CCTSYIntegrationTestNetworkControlBase::CCTSYIntegrationTestNetworkControlBase(CEtelSessionMgr& aEtelSessionMgr)
|
|
31 |
: CCTSYIntegrationTestSuiteStepBase(aEtelSessionMgr),
|
|
32 |
iNetworkTestHelper(*this),
|
|
33 |
iCallControlTestHelper(*this),
|
|
34 |
iPacketServiceTestHelper(*this)
|
|
35 |
|
|
36 |
/**
|
|
37 |
* Constructor
|
|
38 |
*/
|
|
39 |
{
|
|
40 |
}
|
|
41 |
|
|
42 |
CCTSYIntegrationTestNetworkControlBase::~CCTSYIntegrationTestNetworkControlBase()
|
|
43 |
/*
|
|
44 |
* Destructor
|
|
45 |
*/
|
|
46 |
{
|
|
47 |
}
|
|
48 |
|
|
49 |
|
|
50 |
/**
|
|
51 |
* Check a preferred network entry is in the list
|
|
52 |
*
|
|
53 |
* @param aList The list to search.
|
|
54 |
* @param aTarget The network to search for in aList.
|
|
55 |
*
|
|
56 |
* @return ETrue if aTarget is found in aList, EFalse otherwise.
|
|
57 |
*/
|
|
58 |
TBool CCTSYIntegrationTestNetworkControlBase::IsPreferredNetworkInListL(
|
|
59 |
CMobilePhoneStoredNetworkList& aList,
|
|
60 |
RMobilePhone::TMobilePreferredNetworkEntryV3& aTarget)
|
|
61 |
{
|
|
62 |
TInt listCount = aList.Enumerate();
|
|
63 |
|
|
64 |
for( TInt i=0; i < listCount; i++ )
|
|
65 |
{
|
|
66 |
const RMobilePhone::TMobilePreferredNetworkEntryV3 &netInfo = aList.GetEntryL(i);
|
|
67 |
|
|
68 |
if( netInfo.iAccess == aTarget.iAccess &&
|
|
69 |
netInfo.iCountryCode == aTarget.iCountryCode &&
|
|
70 |
netInfo.iNetworkId == aTarget.iNetworkId )
|
|
71 |
{
|
|
72 |
return ETrue;
|
|
73 |
}
|
|
74 |
}
|
|
75 |
|
|
76 |
return EFalse;
|
|
77 |
|
|
78 |
}
|
|
79 |
|
|
80 |
void CCTSYIntegrationTestNetworkControlBase::SetAttachModeToWhenPossibleAndWaitForAttachL(RPacketService& aPacketService)
|
|
81 |
/**
|
|
82 |
* Attaches the phone to the packet service by setting the
|
|
83 |
* attach mode to RPacketService::EAttachWhenPossible. Requests
|
|
84 |
* that the phone attaches to the packet service and waits for
|
|
85 |
* attach to complete.
|
|
86 |
*
|
|
87 |
* @param aPacketService Reference to packet service subsession.
|
|
88 |
*/
|
|
89 |
{
|
|
90 |
RPacketService::TAttachMode attachMode;
|
|
91 |
CHECK_EQUALS_L(aPacketService.GetAttachMode(attachMode), KErrNone, _L("RPacketService::GetAttachMode returned with an error."));
|
|
92 |
|
|
93 |
TExtEtelRequestStatus notifyServiceStatusChStatus(aPacketService, EPacketNotifyStatusChange);
|
|
94 |
CleanupStack::PushL(notifyServiceStatusChStatus);
|
|
95 |
RPacketService::TStatus packetServiceStatus;
|
|
96 |
aPacketService.NotifyStatusChange(notifyServiceStatusChStatus, packetServiceStatus);
|
|
97 |
|
|
98 |
if(attachMode != RPacketService::EAttachWhenPossible)
|
|
99 |
{
|
|
100 |
CHECK_EQUALS_L(aPacketService.SetAttachMode(RPacketService::EAttachWhenPossible), KErrNone,
|
|
101 |
_L("RPacketService::SetAttachMode returned with an error."));
|
|
102 |
}
|
|
103 |
|
|
104 |
CHECK_EQUALS_L(aPacketService.GetAttachMode(attachMode), KErrNone, _L("RPacketService::GetAttachMode returned with an error."));
|
|
105 |
CHECK_EQUALS_L(attachMode, RPacketService::EAttachWhenPossible, _L("RPacketService::GetAttachMode did not return EAttachWhenPossible."));
|
|
106 |
|
|
107 |
// Ensure phone is attached to the packet service (RPacketService::GetStatus returns EStatusAttached).
|
|
108 |
RPacketService::TStatus packetStatus;
|
|
109 |
CHECK_EQUALS_L(aPacketService.GetStatus(packetStatus), KErrNone, _L("RPacketService::GetStatus returned with an error"));
|
|
110 |
|
|
111 |
// Wait for phone to attach to packet service if it is not attached.
|
|
112 |
if (packetStatus == RPacketService::EStatusUnattached)
|
|
113 |
{
|
|
114 |
iPacketServiceTestHelper.WaitForPacketServiceNotifyStatusChange(
|
|
115 |
aPacketService,
|
|
116 |
notifyServiceStatusChStatus,
|
|
117 |
packetServiceStatus,
|
|
118 |
RPacketService::EStatusAttached,
|
|
119 |
KErrNone);
|
|
120 |
CHECK_EQUALS_L(aPacketService.GetStatus(packetStatus), KErrNone, _L("RPacketService::GetStatus returned with an error"));
|
|
121 |
CHECK_EQUALS_L(packetStatus, RPacketService::EStatusAttached, _L("RPacketService::GetStatus did not return EStatusAttached"));
|
|
122 |
}
|
|
123 |
|
|
124 |
CleanupStack::PopAndDestroy(1, ¬ifyServiceStatusChStatus);
|
|
125 |
}
|
|
126 |
|
|
127 |
/**************************************************************************/
|
|
128 |
|
|
129 |
CCTSYIntegrationTestNetworkControl0001::CCTSYIntegrationTestNetworkControl0001(CEtelSessionMgr& aEtelSessionMgr)
|
|
130 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
131 |
/**
|
|
132 |
* Constructor.
|
|
133 |
*/
|
|
134 |
{
|
|
135 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0001::GetTestStepName());
|
|
136 |
}
|
|
137 |
|
|
138 |
CCTSYIntegrationTestNetworkControl0001::~CCTSYIntegrationTestNetworkControl0001()
|
|
139 |
/**
|
|
140 |
* Destructor.
|
|
141 |
*/
|
|
142 |
{
|
|
143 |
}
|
|
144 |
|
|
145 |
TVerdict CCTSYIntegrationTestNetworkControl0001::doTestStepL()
|
|
146 |
/**
|
|
147 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0001
|
|
148 |
* @SYMFssID BA/CTSY/NTWC-0001
|
|
149 |
* @SYMTestCaseDesc Manually select home and non-home network.
|
|
150 |
|
|
151 |
* @SYMTestPriority High
|
|
152 |
* @SYMTestActions CRetrieveMobilePhonePreferredNetworks::NewL, RMobilePhone::SelectNetwork, RMobilePhone::StorePreferredNetworksListL, RMobilePhone::SetNetworkSelectionSetting, RMobilePhone::GetNetworkSelectionSetting, RMobilePhone::NotifyNetworkSelectionSettingChange
|
|
153 |
* @SYMTestExpectedResults Pass - Can register onto home network and this does not change preferred network list.
|
|
154 |
* @SYMTestType CIT
|
|
155 |
* @SYMTestCaseDependencies live/automatic
|
|
156 |
*
|
|
157 |
* Reason for test: Verify home network can be selected, non-home network cannot be selected and preferred network list does not change after manual network selection.
|
|
158 |
*
|
|
159 |
* @return - TVerdict code
|
|
160 |
*/
|
|
161 |
{
|
|
162 |
|
|
163 |
//
|
|
164 |
// SET UP
|
|
165 |
//
|
|
166 |
|
|
167 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
168 |
|
|
169 |
iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone);
|
|
170 |
|
|
171 |
// Ensure that RMobilePhone::GetNetworkCaps returns caps in set of KCapsGetDetectedNetworks | KCapsManualNetworkSelection
|
|
172 |
TUint32 caps;
|
|
173 |
CHECK_EQUALS_L( phone.GetNetworkCaps( caps ), KErrNone, _L("RMobilePhone::GetNetworkCaps returned an error") );
|
|
174 |
TUint32 wantedCaps = RMobilePhone::KCapsGetDetectedNetworks | RMobilePhone::KCapsManualNetworkSelection;
|
|
175 |
CHECK_BITS_SET_L( caps, wantedCaps, KNoUnwantedBits, _L("RMobilePhone::GetNetworkCaps returned wrong caps") );
|
|
176 |
|
|
177 |
// Ensure RMobilePhone::GetNetworkSelectionSetting returns aSetting.iMethod = ENetworkSelectionAutomatic
|
|
178 |
RMobilePhone::TMobilePhoneNetworkSelectionV1 netSelSetting;
|
|
179 |
RMobilePhone::TMobilePhoneNetworkSelectionV1Pckg netSelSettingPkg(netSelSetting);
|
|
180 |
|
|
181 |
CHECK_EQUALS_L( phone.GetNetworkSelectionSetting( netSelSettingPkg ), KErrNone,
|
|
182 |
_L("RMobilePhone::GetNetworkSelectionSetting returned an error") );
|
|
183 |
|
|
184 |
if (netSelSetting.iMethod != RMobilePhone::ENetworkSelectionAutomatic)
|
|
185 |
{
|
|
186 |
DEBUG_PRINTF1(_L("Setting network selection setting to auto"));
|
|
187 |
TExtEtelRequestStatus setNetSelSettingStatus(phone, EMobilePhoneSetNetworkSelectionSetting);
|
|
188 |
CleanupStack::PushL(setNetSelSettingStatus);
|
|
189 |
netSelSetting.iMethod = RMobilePhone::ENetworkSelectionAutomatic;
|
|
190 |
phone.SetNetworkSelectionSetting( setNetSelSettingStatus, netSelSettingPkg );
|
|
191 |
|
|
192 |
CHECK_EQUALS_L(WaitForRequestWithTimeOut(setNetSelSettingStatus, ETimeLong), KErrNone,
|
|
193 |
_L("RMobilePhone::SetNetworkSelectionSetting timed out") );
|
|
194 |
CHECK_EQUALS_L( setNetSelSettingStatus.Int(), KErrNone,
|
|
195 |
_L("RMobilePhone::SetNetworkSelectionSetting returned error") );
|
|
196 |
|
|
197 |
CleanupStack::Pop(&setNetSelSettingStatus);
|
|
198 |
}
|
|
199 |
|
|
200 |
CHECK_EQUALS_L( phone.GetNetworkSelectionSetting( netSelSettingPkg ), KErrNone,
|
|
201 |
_L("RMobilePhone::GetNetworkSelectionSetting returned an error") );
|
|
202 |
CHECK_EQUALS_L( netSelSetting.iMethod, RMobilePhone::ENetworkSelectionAutomatic,
|
|
203 |
_L("RMobilePhone::GetNetworkSelectionSetting - TMobilePhoneNetworkSelectionV1::iMethod was not ENetworkSelectionAutomatic") );
|
|
204 |
|
|
205 |
//
|
|
206 |
// SET UP END
|
|
207 |
//
|
|
208 |
|
|
209 |
StartTest();
|
|
210 |
|
|
211 |
//
|
|
212 |
// TEST START
|
|
213 |
//
|
|
214 |
|
|
215 |
// === Get the ID and country code of the home network and store it for use later ===
|
|
216 |
RMobilePhone::TMobilePhoneNetworkInfoV1 homeNetworkInfo;
|
|
217 |
TPckg<RMobilePhone::TMobilePhoneNetworkInfoV1> homeInfoPkg(homeNetworkInfo);
|
|
218 |
TExtEtelRequestStatus getHomeNetworkStatus(phone, EMobilePhoneGetHomeNetwork);
|
|
219 |
CleanupStack::PushL(getHomeNetworkStatus);
|
|
220 |
phone.GetHomeNetwork( getHomeNetworkStatus, homeInfoPkg );
|
|
221 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getHomeNetworkStatus, ETimeLong), KErrNone,
|
|
222 |
_L("RMobilePhone::GetHomeNetwork timed out") );
|
|
223 |
ASSERT_EQUALS( getHomeNetworkStatus.Int(), KErrNone, _L("TNetworkTsyTestHelper::GetHomeNetworkL returned an error") );
|
|
224 |
|
|
225 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV1 returns aNetworkInfo.iNetworkId with length > 0
|
|
226 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV1 returns aNetworkInfo.iCountryCode with length > 0
|
|
227 |
|
|
228 |
ASSERT_TRUE( homeNetworkInfo.iNetworkId.Length() > 0,
|
|
229 |
_L("RMobilePhone::GetHomeNetwork returned aNetworkInfo.iNetworkId <= 0"));
|
|
230 |
ASSERT_TRUE( homeNetworkInfo.iCountryCode.Length() > 0,
|
|
231 |
_L("RMobilePhone::GetHomeNetwork returned aNetworkInfo.iCountryCode <= 0"));
|
|
232 |
|
|
233 |
// === Put the phone into manual network selection mode. ===
|
|
234 |
|
|
235 |
// Set up the RMobilePhone::NotifyNetworkSelectionSettingChange notification for later test
|
|
236 |
TExtEtelRequestStatus notifyNetSelSettingChange( phone, EMobilePhoneNotifyNetworkSelectionSettingChange);
|
|
237 |
CleanupStack::PushL(notifyNetSelSettingChange);
|
|
238 |
|
|
239 |
RMobilePhone::TMobilePhoneNetworkSelectionV1 netSelNotify;
|
|
240 |
RMobilePhone::TMobilePhoneNetworkSelectionV1Pckg netSelNotifyPkg( netSelNotify );
|
|
241 |
phone.NotifyNetworkSelectionSettingChange(notifyNetSelSettingChange, netSelNotifyPkg);
|
|
242 |
|
|
243 |
// Set network selection setting to manual with RMobilePhone::SetNetworkSelectionSetting with
|
|
244 |
// aSetting.iMethod = ENetworkSelectionManual
|
|
245 |
TExtEtelRequestStatus setNetSelSettingStatus(phone, EMobilePhoneSetNetworkSelectionSetting);
|
|
246 |
CleanupStack::PushL(setNetSelSettingStatus);
|
|
247 |
netSelSetting.iMethod = RMobilePhone::ENetworkSelectionManual;
|
|
248 |
phone.SetNetworkSelectionSetting( setNetSelSettingStatus, netSelSettingPkg );
|
|
249 |
|
|
250 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(setNetSelSettingStatus, ETimeLong), KErrNone,
|
|
251 |
_L("RMobilePhone::SetNetworkSelectionSetting timed out") );
|
|
252 |
ASSERT_EQUALS( setNetSelSettingStatus.Int(), KErrNone,
|
|
253 |
_L("RMobilePhone::SetNetworkSelectionSetting returned error") );
|
|
254 |
|
|
255 |
// === Verify manual selection mode has been set and notification received ===
|
|
256 |
|
|
257 |
// Check RMobilePhone::NotifyNetworkSelectionSettingChange completes with
|
|
258 |
// aSetting.iMethod = ENetworkSelectionManual
|
|
259 |
iNetworkTestHelper.WaitForMobilePhoneNotifyNetworkSelectionSettingChange(phone,
|
|
260 |
notifyNetSelSettingChange,netSelNotify,
|
|
261 |
RMobilePhone::ENetworkSelectionManual, KErrNone);
|
|
262 |
|
|
263 |
// Check RMobilePhone::GetNetworkSelectionSetting returns aSetting.iMethod = ENetworkSelectionManual
|
|
264 |
ASSERT_EQUALS( phone.GetNetworkSelectionSetting( netSelSettingPkg ), KErrNone,
|
|
265 |
_L("RMobilePhone::GetNetworkSelectionSetting returned an error") );
|
|
266 |
ASSERT_EQUALS( netSelSetting.iMethod, RMobilePhone::ENetworkSelectionManual,
|
|
267 |
_L("RMobilePhone::GetNetworkSelectionSetting returned method is not ENetworkSelectionManual") );
|
|
268 |
|
|
269 |
// === Get and store (locally) the list of preferred networks for use later ===
|
|
270 |
|
|
271 |
// Use helper class for CRetrieveMobilePhonePreferredNetworks to retrieve a list of preferred networks
|
|
272 |
// Store list for use later.
|
|
273 |
|
|
274 |
CRetrieveMobilePhonePreferredNetworksExec *netListHelper = CRetrieveMobilePhonePreferredNetworksHelper::NewL(phone);
|
|
275 |
CleanupStack::PushL( netListHelper );
|
|
276 |
TInt err;
|
|
277 |
CMobilePhoneStoredNetworkList* prefNetList = netListHelper->DoGetList(err);
|
|
278 |
ASSERT_EQUALS(err, KErrNotSupported, _L("CRetrieveMobilePhonePreferredNetworks::Start failed to get the list"));
|
|
279 |
|
|
280 |
// === Get List of detected networks and ensure that this list contain at least 2 networks ===
|
|
281 |
// (the home network and an other one).
|
|
282 |
// Use helper class for CRetrieveMobilePhoneDetectedNetworks to retrieve a list of detected networks
|
|
283 |
CRetrieveMobilePhoneDetectedNetworksExec *detectedNetListHelper =
|
|
284 |
CRetrieveMobilePhoneDetectedNetworksHelper::NewL(phone,ERetrieveListV1);
|
|
285 |
|
|
286 |
CMobilePhoneNetworkList *detectedNetList = detectedNetListHelper->DoGetList(err);
|
|
287 |
|
|
288 |
ASSERT_EQUALS(err, KErrNotSupported, _L("CRetrieveMobilePhoneDetectedNetworks::Start failed to get the list"));
|
|
289 |
|
|
290 |
// $CTSYProblem CTSY does not support EMobilePhoneGetPreferredNetworksPhase1 and
|
|
291 |
// EMobilePhoneGetDetectedNetworksPhase1 IPCs.
|
|
292 |
// If supported for these are added, the rest of this test can be uncommented
|
|
293 |
// and the CleanupStack items sorted out.
|
|
294 |
|
|
295 |
/*
|
|
296 |
TInt detectedNetCount = detectedNetList->Enumerate();
|
|
297 |
DEBUG_PRINTF2(_L("CRetrieveMobilePhoneDetectedNetworks returned list of %d entries"), detectedNetCount );
|
|
298 |
ASSERT_TRUE(detectedNetCount >= 2, _L("CRetrieveMobilePhoneDetectedNetworks returned list of < 2 entries"));
|
|
299 |
|
|
300 |
// Cycle through the items in CMobilePhoneNetworkList list and find a network which
|
|
301 |
// is not the home network (TMobilePhoneNetworkInfoV1::iNetworkId in the list != aNetworkInfo.iNetworkId
|
|
302 |
// from RMobilePhone::GetHomeNetwork)
|
|
303 |
const RMobilePhone::TMobilePhoneNetworkInfoV1 *notHomeNetworkInfo = NULL;
|
|
304 |
for( TInt i=0; i < detectedNetCount; i++ )
|
|
305 |
{
|
|
306 |
const RMobilePhone::TMobilePhoneNetworkInfoV1 &netInfo = detectedNetList->GetEntryL(i);
|
|
307 |
if( netInfo.iNetworkId != homeNetworkInfo.iNetworkId )
|
|
308 |
{
|
|
309 |
notHomeNetworkInfo = &netInfo;
|
|
310 |
break;
|
|
311 |
}
|
|
312 |
}
|
|
313 |
|
|
314 |
// === When a non-home network has been found, try to select it ===
|
|
315 |
ASSERT_TRUE( NULL != notHomeNetworkInfo, _L("Failed to find a non-home network") );
|
|
316 |
TEST_CHECK_POINT_L( _L("Failed to find a non-home network, leaving") );
|
|
317 |
|
|
318 |
// Select network with RMobilePhone::SelectNetwork with
|
|
319 |
// aIsManual=ETrue and
|
|
320 |
// aManualSelection.iCountry=TMobilePhoneNetworkInfoV1::iCountryCode and
|
|
321 |
// aManualSelection.iNetwork=TMobilePhoneNetworkInfoV1::iNetworkId
|
|
322 |
|
|
323 |
TExtEtelRequestStatus reqSetNetworkStatus(phone, EMobilePhoneSelectNetwork);
|
|
324 |
CleanupStack::PushL(reqSetNetworkStatus);
|
|
325 |
RMobilePhone::TMobilePhoneNetworkManualSelection manNetSel;
|
|
326 |
|
|
327 |
manNetSel.iCountry = notHomeNetworkInfo->iCountryCode;
|
|
328 |
manNetSel.iNetwork = notHomeNetworkInfo->iNetworkId;
|
|
329 |
phone.SelectNetwork(reqSetNetworkStatus, ETrue, manNetSel );
|
|
330 |
|
|
331 |
ASSERT_EQUALS( WaitForRequestWithTimeOut(reqSetNetworkStatus, ETimeLong ), KErrNone,
|
|
332 |
_L("RMobilePhone::SelectNetwork timed out") );
|
|
333 |
|
|
334 |
// Check this returns error != KErrorNone
|
|
335 |
ASSERT_TRUE( KErrNone != reqSetNetworkStatus.Int(),
|
|
336 |
_L("RMobilePhone::SelectNetwork on non home network succeeded - should fail"));
|
|
337 |
|
|
338 |
// Check RMobilePhone::GetNetworkRegistrationStatus returns aStatus=ERegistrationDenied
|
|
339 |
RMobilePhone::TMobilePhoneRegistrationStatus registrationStatus;
|
|
340 |
iNetworkTestHelper.GetNetworkRegistrationStatusL(phone, registrationStatus);
|
|
341 |
ASSERT_EQUALS(registrationStatus, RMobilePhone::ERegistrationDenied,
|
|
342 |
_L("RMobilePhone::GetNetworkRegistrationStatus did not return ERegistrationDenied"));
|
|
343 |
|
|
344 |
// === Register back on the home network ===
|
|
345 |
// Select network with RMobilePhone::SelectNetwork with
|
|
346 |
// aIsManual=ETrue and aManualSelection.iCountry=aNetworkInfo.iCountryCode
|
|
347 |
// of home network and aManualSelection.iNetwork=aNetworkInfo.iNetworkId of home network
|
|
348 |
|
|
349 |
manNetSel.iCountry = homeNetworkInfo.iCountryCode;
|
|
350 |
manNetSel.iNetwork = homeNetworkInfo.iNetworkId;
|
|
351 |
phone.SelectNetwork(reqSetNetworkStatus, ETrue, manNetSel );
|
|
352 |
|
|
353 |
ASSERT_EQUALS( WaitForRequestWithTimeOut(reqSetNetworkStatus, ETimeLong ), KErrNone,
|
|
354 |
_L("RMobilePhone::SelectNetwork timed out") );
|
|
355 |
|
|
356 |
// Check this returns error != KErrorNone
|
|
357 |
ASSERT_TRUE( KErrNone != reqSetNetworkStatus.Int(),
|
|
358 |
_L("RMobilePhone::SelectNetwork on home network succeeded - should fail"));
|
|
359 |
|
|
360 |
// === Get list of preferred networks and check it has not changed ===
|
|
361 |
// Use helper class for CRetrieveMobilePhonePreferredNetworks to retrieve a list of preferred networks
|
|
362 |
|
|
363 |
CRetrieveMobilePhonePreferredNetworksExec *checkNetListHelper = CRetrieveMobilePhonePreferredNetworksHelper::NewL(phone);
|
|
364 |
CleanupStack::PushL( checkNetListHelper );
|
|
365 |
|
|
366 |
CMobilePhoneStoredNetworkList* checkPrefNetList = checkNetListHelper->DoGetList(err);
|
|
367 |
ASSERT_EQUALS(err, KErrNone, _L("CRetrieveMobilePhonePreferredNetworks::DoGetList failed to get the check list"));
|
|
368 |
|
|
369 |
// Check contents of each entry in the CMobilePhoneStoredNetworkList list retrieved is the same as the
|
|
370 |
// first preferred network list.
|
|
371 |
|
|
372 |
TInt prefListCount = prefNetList->Enumerate();
|
|
373 |
TInt checkListCount = checkPrefNetList->Enumerate();
|
|
374 |
|
|
375 |
ASSERT_EQUALS( prefListCount, checkListCount, _L("Lists of preferred networks differ in size"));
|
|
376 |
|
|
377 |
if( prefListCount == checkListCount )
|
|
378 |
{
|
|
379 |
// Lists are the same size. We assume the order is the same too
|
|
380 |
for( TInt j=0; j < prefListCount; j++ )
|
|
381 |
{
|
|
382 |
const RMobilePhone::TMobilePreferredNetworkEntryV3 &prefInfo = prefNetList->GetEntryL(j);
|
|
383 |
const RMobilePhone::TMobilePreferredNetworkEntryV3 &checkInfo = checkPrefNetList->GetEntryL(j);
|
|
384 |
|
|
385 |
ASSERT_EQUALS( prefInfo.iCountryCode, checkInfo.iCountryCode, _L("Phone entry country codes do not match"));
|
|
386 |
ASSERT_EQUALS( prefInfo.iNetworkId, checkInfo.iNetworkId, _L("Phone network ids do not match"));
|
|
387 |
|
|
388 |
}
|
|
389 |
}
|
|
390 |
*/
|
|
391 |
// Repost the notification request
|
|
392 |
phone.NotifyNetworkSelectionSettingChange(notifyNetSelSettingChange, netSelNotifyPkg);
|
|
393 |
|
|
394 |
// === Put the phone into automatic network selection mode. ===
|
|
395 |
// Set network selection setting to manual with RMobilePhone::SetNetworkSelectionSetting
|
|
396 |
// with aSetting.iMethod = ENetworkSelectionAutomatic
|
|
397 |
netSelSetting.iMethod = RMobilePhone::ENetworkSelectionAutomatic;
|
|
398 |
phone.SetNetworkSelectionSetting( setNetSelSettingStatus, netSelSettingPkg );
|
|
399 |
|
|
400 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(setNetSelSettingStatus, ETimeLong), KErrNone,
|
|
401 |
_L("RMobilePhone::SetNetworkSelectionSetting timed out") );
|
|
402 |
|
|
403 |
ASSERT_EQUALS( setNetSelSettingStatus.Int(), KErrNone,
|
|
404 |
_L("RMobilePhone::SetNetworkSelectionSetting returned error") );
|
|
405 |
|
|
406 |
// === Verify automatic selection mode has been set and notification received ===
|
|
407 |
|
|
408 |
// Check RMobilePhone::NotifyNetworkSelectionSettingChange completes with aSetting.iMethod = ENetworkSelectionAutomatic
|
|
409 |
iNetworkTestHelper.WaitForMobilePhoneNotifyNetworkSelectionSettingChange(phone,
|
|
410 |
notifyNetSelSettingChange, netSelNotify,
|
|
411 |
RMobilePhone::ENetworkSelectionAutomatic,
|
|
412 |
KErrNone);
|
|
413 |
|
|
414 |
// Check RMobilePhone::GetNetworkSelectionSetting returns aSetting.iMethod = ENetworkSelectionAutomatic
|
|
415 |
ASSERT_EQUALS( phone.GetNetworkSelectionSetting( netSelSettingPkg ), KErrNone,
|
|
416 |
_L("RMobilePhone::GetNetworkSelectionSetting returned an error") );
|
|
417 |
ASSERT_EQUALS( netSelSetting.iMethod, RMobilePhone::ENetworkSelectionAutomatic,
|
|
418 |
_L("RMobilePhone::GetNetworkSelectionSetting did not return ENetworkSelectionAutomatic") );
|
|
419 |
|
|
420 |
//
|
|
421 |
// TEST END
|
|
422 |
//
|
|
423 |
|
|
424 |
StartCleanup();
|
|
425 |
|
|
426 |
// netListHelper
|
|
427 |
// setNetSelSettingStatus
|
|
428 |
// notifyNetSelSettingChange
|
|
429 |
// getHomeNetworkStatus
|
|
430 |
CleanupStack::PopAndDestroy(4,&getHomeNetworkStatus);
|
|
431 |
|
|
432 |
return TestStepResult();
|
|
433 |
}
|
|
434 |
|
|
435 |
|
|
436 |
TPtrC CCTSYIntegrationTestNetworkControl0001::GetTestStepName()
|
|
437 |
/**
|
|
438 |
* @return The test step name.
|
|
439 |
*/
|
|
440 |
{
|
|
441 |
return _L("CCTSYIntegrationTestNetworkControl0001");
|
|
442 |
}
|
|
443 |
|
|
444 |
|
|
445 |
|
|
446 |
CCTSYIntegrationTestNetworkControl0002::CCTSYIntegrationTestNetworkControl0002(CEtelSessionMgr& aEtelSessionMgr)
|
|
447 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
448 |
/**
|
|
449 |
* Constructor.
|
|
450 |
*/
|
|
451 |
{
|
|
452 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0002::GetTestStepName());
|
|
453 |
}
|
|
454 |
|
|
455 |
CCTSYIntegrationTestNetworkControl0002::~CCTSYIntegrationTestNetworkControl0002()
|
|
456 |
/**
|
|
457 |
* Destructor.
|
|
458 |
*/
|
|
459 |
{
|
|
460 |
}
|
|
461 |
|
|
462 |
TVerdict CCTSYIntegrationTestNetworkControl0002::doTestStepL()
|
|
463 |
/**
|
|
464 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0002
|
|
465 |
* @SYMFssID BA/CTSY/NTWC-0002
|
|
466 |
* @SYMTestCaseDesc Basic cell selection
|
|
467 |
* @SYMTestPriority High
|
|
468 |
* @SYMTestActions RMobilePhone::GetCurrentNetwork, RMobilePhone::GetLastUsedAccessTechnology, RMobilePhone::GetNetworkRegistrationStatus, RMobilePhone::GetServiceProviderName, RMobilePhone::GetCurrentNetworkName
|
|
469 |
* @SYMTestExpectedResults Pass - Phone camps on a cell
|
|
470 |
* @SYMTestType CIT
|
|
471 |
* @SYMTestCaseDependencies live/automatic
|
|
472 |
*
|
|
473 |
* Reason for test: Verify phone has camped on a cell with an expected network information - name, mode, type, cellid, location area
|
|
474 |
*
|
|
475 |
* @return - TVerdict code
|
|
476 |
*/
|
|
477 |
{
|
|
478 |
//
|
|
479 |
// SET UP
|
|
480 |
//
|
|
481 |
|
|
482 |
RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
483 |
|
|
484 |
iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(mobilePhone);
|
|
485 |
|
|
486 |
// Ensure that RMobilePhone::GetNetworkCaps returns caps in set of KCapsGetRegistrationStatus | KCapsGetCurrentMode | KCapsGetCurrentNetwork | KCapsGetHomeNetwork
|
|
487 |
TUint32 networkCaps=0;
|
|
488 |
CHECK_EQUALS_L(mobilePhone.GetNetworkCaps(networkCaps), KErrNone,
|
|
489 |
_L("RMobilePhone::GetNetworkCaps returned with an error"));
|
|
490 |
TUint32 expectedCaps= RMobilePhone::KCapsGetRegistrationStatus | RMobilePhone::KCapsGetCurrentMode
|
|
491 |
| RMobilePhone::KCapsGetCurrentNetwork | RMobilePhone::KCapsGetHomeNetwork;
|
|
492 |
CHECK_BITS_SET_L(networkCaps, expectedCaps, KNoUnwantedBits,
|
|
493 |
_L("RMobilePhone::GetNetworkCaps returned with wrong caps"));
|
|
494 |
|
|
495 |
//
|
|
496 |
// SET UP END
|
|
497 |
//
|
|
498 |
|
|
499 |
StartTest();
|
|
500 |
|
|
501 |
//
|
|
502 |
// TEST START
|
|
503 |
//
|
|
504 |
|
|
505 |
// === Get mode ===
|
|
506 |
|
|
507 |
// Check RMobilePhone::GetCurrentMode returns aNetworkMode=ENetworkModeGsm or ENetworkModeWcdma
|
|
508 |
RMobilePhone::TMobilePhoneNetworkMode mode;
|
|
509 |
ASSERT_EQUALS(mobilePhone.GetCurrentMode(mode), KErrNone, _L("RMobilePhone::GetCurrentMode returned with an error"));
|
|
510 |
|
|
511 |
ASSERT_TRUE((mode == RMobilePhone::ENetworkModeGsm) || (mode == RMobilePhone::ENetworkModeWcdma),
|
|
512 |
_L("RMobilePhone::GetCurrentMode did not return ENetworkModeGsm or ENetworkModeWcdma as expected"));
|
|
513 |
|
|
514 |
// === Get current network ===
|
|
515 |
|
|
516 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
517 |
RMobilePhone::TMobilePhoneNetworkInfoV5 netInfo;
|
|
518 |
RMobilePhone::TMobilePhoneLocationAreaV1 location;
|
|
519 |
RMobilePhone::TMobilePhoneNetworkInfoV5Pckg netInfoPckg(netInfo);
|
|
520 |
TExtEtelRequestStatus getCurrentNetworkStatus(mobilePhone, EMobilePhoneGetCurrentNetwork);
|
|
521 |
CleanupStack::PushL(getCurrentNetworkStatus);
|
|
522 |
mobilePhone.GetCurrentNetwork(getCurrentNetworkStatus, netInfoPckg, location);
|
|
523 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getCurrentNetworkStatus, ETimeMedium),KErrNone,
|
|
524 |
_L("RMobilePhone::GetCurrentNetwork timed out"));
|
|
525 |
ASSERT_EQUALS(getCurrentNetworkStatus.Int(), KErrNone, _L("RMobilePhone::GetCurrentNetwork returned with an error"));
|
|
526 |
ASSERT_TRUE(netInfo.iCountryCode.Length()>0 , _L("RMobilePhone::GetCurrentNetwork returned with blank Country Code"));
|
|
527 |
|
|
528 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
529 |
ASSERT_TRUE(netInfo.iLongName.Length()>0 , _L("RMobilePhone::GetCurrentNetwork returned with blank Long Name"));
|
|
530 |
|
|
531 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm or ENetworkModeWcdma
|
|
532 |
ASSERT_TRUE((netInfo.iMode == RMobilePhone::ENetworkModeGsm) || (netInfo.iMode == RMobilePhone::ENetworkModeWcdma) , _L("RMobilePhone::GetCurrentNetwork did not return ENetworkModeGsm Mode or ENetworkModeWcdma Mode"));
|
|
533 |
|
|
534 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
535 |
ASSERT_TRUE(netInfo.iNetworkId.Length()>0 , _L("RMobilePhone::GetCurrentNetwork returned with blank Network Id"));
|
|
536 |
|
|
537 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
538 |
ASSERT_TRUE(netInfo.iShortName.Length()>0 , _L("RMobilePhone::GetCurrentNetwork returned with blank Short Name"));
|
|
539 |
|
|
540 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
541 |
ASSERT_EQUALS(netInfo.iStatus,RMobilePhone::ENetworkStatusCurrent , _L("RMobilePhone::GetCurrentNetwork did not return ENetworkStatusCurrent status as expected "));
|
|
542 |
|
|
543 |
// Check RMobilePhone::GetLastUsedAccessTechnology returns aAccessTech=ENetworkAccessUnknown or ENetworkAccessGsm or ENetworkAccessGsmCompact or ENetworkAccessUtran
|
|
544 |
RMobilePhone::TMobilePhoneNetworkAccess accessTech;
|
|
545 |
TExtEtelRequestStatus getLastUsedAccessTechnologyStatus(mobilePhone, EMobilePhoneGetLastUsedAccessTechnology);
|
|
546 |
CleanupStack::PushL(getLastUsedAccessTechnologyStatus);
|
|
547 |
mobilePhone.GetLastUsedAccessTechnology(getLastUsedAccessTechnologyStatus,accessTech);
|
|
548 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getLastUsedAccessTechnologyStatus, ETimeMedium),KErrNone, _L("RMobilePhone::GetLastUsedAccessTechnology timed out"));
|
|
549 |
ASSERT_EQUALS(getLastUsedAccessTechnologyStatus.Int(), KErrNotSupported, _L("RMobilePhone::GetLastUsedAccessTechnology returned with an error"));
|
|
550 |
|
|
551 |
// Check RMobilePhone::GetNetworkRegistrationStatus returns aStatus=ERegisteredOnHomeNetwork
|
|
552 |
RMobilePhone::TMobilePhoneRegistrationStatus status;
|
|
553 |
ASSERT_EQUALS(iNetworkTestHelper.GetNetworkRegistrationStatusL( mobilePhone, status), KErrNone, _L("RMobilePhone::GetNetworkRegistrationStatus returned with an error"));
|
|
554 |
ASSERT_EQUALS(status, RMobilePhone::ERegisteredOnHomeNetwork,
|
|
555 |
_L("RMobilePhone::GetNetworkRegistrationStatus did not return the expected ERegisteredOnHomeNetwork Status"));
|
|
556 |
|
|
557 |
// === Get service provider name ===
|
|
558 |
|
|
559 |
// Check RMobilePhone::GetServiceProviderName with a TMobilePhoneServiceProviderNameV2 parameter returns aName.iPLMNField with length > 0
|
|
560 |
RMobilePhone::TMobilePhoneServiceProviderNameV2 providerName;
|
|
561 |
RMobilePhone::TMobilePhoneServiceProviderNameV2Pckg providerNamePckg(providerName);
|
|
562 |
TExtEtelRequestStatus getServiceProviderNameStatus(mobilePhone, EMobilePhoneGetServiceProviderName);
|
|
563 |
CleanupStack::PushL(getServiceProviderNameStatus);
|
|
564 |
mobilePhone.GetServiceProviderName(getServiceProviderNameStatus, providerNamePckg);
|
|
565 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getServiceProviderNameStatus, ETimeMedium),KErrNone,
|
|
566 |
_L("RMobilePhone::GetServiceProviderName timed out"));
|
|
567 |
ASSERT_EQUALS(getServiceProviderNameStatus.Int(), KErrGsm0707NotFound,
|
|
568 |
_L("RMobilePhone::GetServiceProviderName returned with an error"));
|
|
569 |
|
|
570 |
// $CTSYProblem
|
|
571 |
// For RMobilePhone::GetServiceProviderName, LTSY is returning KErrGsm0707NotFound
|
|
572 |
// CTSY is correctly propagating the error back to the client.
|
|
573 |
// If the LTSY is altered to retrieve the provider name successfully, the following
|
|
574 |
// test code can be used and KErrNone can be expected from this API.
|
|
575 |
|
|
576 |
/* // Check RMobilePhone::GetServiceProviderName with a TMobilePhoneServiceProviderNameV2 parameter returns aName.iDisplayReq with length > 0
|
|
577 |
ASSERT_TRUE(providerName.iDisplayReq !=0, _L("RMobilePhone::GetServiceProviderName returned 0 RMobilePhone::TMobilePhoneServiceProviderNameV2.iDisplayReq"));
|
|
578 |
|
|
579 |
// Check RMobilePhone::GetServiceProviderName with a TMobilePhoneServiceProviderNameV2 parameter returns aName.iPLMNField with length > 0
|
|
580 |
ASSERT_TRUE(providerName.iPLMNField.Length()>0 , _L("RMobilePhone::GetServiceProviderName returned with blank PLMNField"));
|
|
581 |
|
|
582 |
// Check RMobilePhone::GetServiceProviderName with a TMobilePhoneServiceProviderNameV2 parameter returns aName.iSPName with length > 0
|
|
583 |
ASSERT_TRUE(providerName.iSPName.Length()>0 , _L("RMobilePhone::GetServiceProviderName returned with blank SPName"));
|
|
584 |
*/
|
|
585 |
|
|
586 |
// Check RMobilePhone::GetCurrentNetworkName with a TMobilePhoneNetworkNameV3 returns aNetworkName.iLongName with length > 0
|
|
587 |
RMobilePhone::TMobilePhoneNetworkNameV3 networkname;
|
|
588 |
RMobilePhone::TMobilePhoneNetworkNameV3Pckg networknamePckg(networkname);
|
|
589 |
RMobilePhone::TMobilePhoneOPlmnV3 locInfo;
|
|
590 |
RMobilePhone::TMobilePhoneOPlmnV3Pckg locInfoPckg(locInfo);
|
|
591 |
TExtEtelRequestStatus getCurrentNetworkNameStatus(mobilePhone, EMobilePhoneGetNetworkName);
|
|
592 |
CleanupStack::PushL(getCurrentNetworkNameStatus);
|
|
593 |
mobilePhone.GetCurrentNetworkName(getCurrentNetworkNameStatus, networknamePckg, locInfoPckg);
|
|
594 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getCurrentNetworkNameStatus, ETimeMedium),KErrNone, _L("RMobilePhone::GetCurrentNetworkName timed out"));
|
|
595 |
ASSERT_EQUALS(getCurrentNetworkNameStatus.Int(), KErrNone, _L("RMobilePhone::GetCurrentNetworkName returned with an error"));
|
|
596 |
ASSERT_TRUE(networkname.iLongName.Length()>0 , _L("RMobilePhone::GetCurrentNetworkName returned with blank Long Name"));
|
|
597 |
|
|
598 |
// Check RMobilePhone::GetCurrentNetworkName with a TMobilePhoneNetworkNameV3 returns aNetworkName.iShortName with length > 0
|
|
599 |
ASSERT_TRUE(networkname.iShortName.Length()>0 , _L("RMobilePhone::GetServiceProviderName returned with blank Short Name"));
|
|
600 |
|
|
601 |
// Check RMobilePhone::GetCurrentNetworkName with a TMobilePhoneOPlmnV3 returns aLocInfo.iCountryCode with length > 0
|
|
602 |
ASSERT_TRUE(locInfo.iCountryCode.Length()>0 , _L("RMobilePhone::GetServiceProviderName returned with blank Country Code"));
|
|
603 |
|
|
604 |
// Check RMobilePhone::GetCurrentNetworkName with a TMobilePhoneOPlmnV3 returns aLocInfo.iNetworkId with length > 0
|
|
605 |
ASSERT_TRUE(locInfo.iNetworkId.Length()>0 , _L("RMobilePhone::GetServiceProviderName returned with blank Network Id"));
|
|
606 |
|
|
607 |
//
|
|
608 |
// TEST END
|
|
609 |
//
|
|
610 |
|
|
611 |
StartCleanup();
|
|
612 |
// Pop
|
|
613 |
// getCurrentNetworkStatus
|
|
614 |
// getLastUsedAccessTechnologyStatus
|
|
615 |
// getServiceProviderNameStatus
|
|
616 |
// getCurrentNetworkNameStatus
|
|
617 |
|
|
618 |
CleanupStack::PopAndDestroy(4, &getCurrentNetworkStatus);
|
|
619 |
|
|
620 |
return TestStepResult();
|
|
621 |
}
|
|
622 |
|
|
623 |
TPtrC CCTSYIntegrationTestNetworkControl0002::GetTestStepName()
|
|
624 |
/**
|
|
625 |
* @return The test step name.
|
|
626 |
*/
|
|
627 |
{
|
|
628 |
return _L("CCTSYIntegrationTestNetworkControl0002");
|
|
629 |
}
|
|
630 |
|
|
631 |
|
|
632 |
|
|
633 |
CCTSYIntegrationTestNetworkControl0003::CCTSYIntegrationTestNetworkControl0003(CEtelSessionMgr& aEtelSessionMgr)
|
|
634 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
635 |
/**
|
|
636 |
* Constructor.
|
|
637 |
*/
|
|
638 |
{
|
|
639 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0003::GetTestStepName());
|
|
640 |
}
|
|
641 |
|
|
642 |
CCTSYIntegrationTestNetworkControl0003::~CCTSYIntegrationTestNetworkControl0003()
|
|
643 |
/**
|
|
644 |
* Destructor.
|
|
645 |
*/
|
|
646 |
{
|
|
647 |
}
|
|
648 |
|
|
649 |
TVerdict CCTSYIntegrationTestNetworkControl0003::doTestStepL()
|
|
650 |
/**
|
|
651 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0003
|
|
652 |
* @SYMFssID BA/CTSY/NTWC-0003
|
|
653 |
* @SYMTestCaseDesc Cell reselection from "no service" state
|
|
654 |
* @SYMTestPriority High
|
|
655 |
* @SYMTestActions RMobilePhone::GetCurrentNetwork, RMobilePhone::NotifyNetworkRegistrationStatusChange, RMobilePhone::GetNetworkRegistrationStatus, RMobilePhone::NotifyCurrentNetworkChange, RMobilePhone::NotifyModeChange
|
|
656 |
* @SYMTestExpectedResults Pass - Phone reselects a cell.
|
|
657 |
* @SYMTestType CIT
|
|
658 |
* @SYMTestCaseDependencies live/manual
|
|
659 |
*
|
|
660 |
* Reason for test: Verify cell is reselected and network information is correct.
|
|
661 |
*
|
|
662 |
* @return - TVerdict code
|
|
663 |
*/
|
|
664 |
{
|
|
665 |
|
|
666 |
//
|
|
667 |
// SET UP
|
|
668 |
//
|
|
669 |
|
|
670 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
671 |
CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
|
|
672 |
|
|
673 |
// Phone is in a blackspot, with no coverage.
|
|
674 |
DisplayUserInteractionPromptL(_L("Please be sure that phone is in a blackspot, with no coverage"), ETimeLong);
|
|
675 |
|
|
676 |
// Ensure that RMobilePhone::GetNetworkCaps returns caps in set of KCapsGetRegistrationStatus | KCapsGetCurrentMode | KCapsGetCurrentNetwork | KCapsNotifyRegistrationStatus | KCapsNotifyMode | KCapsNotifyCurrentNetwork
|
|
677 |
TUint32 networkCaps = 0;
|
|
678 |
TUint32 expectedCaps = RMobilePhone::KCapsGetRegistrationStatus | RMobilePhone::KCapsGetCurrentMode | RMobilePhone::KCapsGetCurrentNetwork | RMobilePhone::KCapsNotifyRegistrationStatus | RMobilePhone::KCapsNotifyMode | RMobilePhone::KCapsNotifyCurrentNetwork;
|
|
679 |
CHECK_EQUALS_L(phone.GetNetworkCaps(networkCaps), KErrNone, _L("RMobilePhone::GetNetworkCaps returned with an error"));
|
|
680 |
CHECK_BITS_SET_L(networkCaps, expectedCaps, KNoUnwantedBits, _L("RMobilePhone::GetNetworkCaps returned with wrong caps"));
|
|
681 |
|
|
682 |
|
|
683 |
//
|
|
684 |
// SET UP END
|
|
685 |
//
|
|
686 |
|
|
687 |
StartTest();
|
|
688 |
|
|
689 |
//
|
|
690 |
// TEST START
|
|
691 |
//
|
|
692 |
ERR_PRINTF2(_L("<font color=Orange>$CTSYProblem: defect id = %d</font>"), 10075);
|
|
693 |
User::Leave(KErrNone);
|
|
694 |
|
|
695 |
|
|
696 |
// Check RMobilePhone::GetNetworkRegistrationStatus returns ENotRegisteredNoService or ENotRegisteredSearching
|
|
697 |
RMobilePhone::TMobilePhoneRegistrationStatus status;
|
|
698 |
ASSERT_EQUALS(iNetworkTestHelper.GetNetworkRegistrationStatusL(phone, status), KErrNone, _L("RMobilePhone::GetNetworkRegistrationStatus returned with an error"));
|
|
699 |
ASSERT_TRUE(status != RMobilePhone::ENotRegisteredSearching || status != RMobilePhone::ENotRegisteredNoService,
|
|
700 |
_L("RMobilePhone::GetNetworkRegistrationStatus did not return the expected ENotRegisteredSearching or ENotRegisteredNoServiceStatus"));
|
|
701 |
|
|
702 |
TExtEtelRequestStatus reqNetworkRegStatusChange(phone, EMobilePhoneNotifyNetworkRegistrationStatusChange);
|
|
703 |
CleanupStack::PushL(reqNetworkRegStatusChange);
|
|
704 |
// Call notify for networkregistrationchange
|
|
705 |
RMobilePhone::TMobilePhoneRegistrationStatus networkRegStatus;
|
|
706 |
phone.NotifyNetworkRegistrationStatusChange(reqNetworkRegStatusChange, networkRegStatus);
|
|
707 |
|
|
708 |
TExtEtelRequestStatus reqNotifyCurrentNetChangeStatus(phone, EMobilePhoneNotifyCurrentNetworkChange);
|
|
709 |
CleanupStack::PushL(reqNotifyCurrentNetChangeStatus);
|
|
710 |
RMobilePhone::TMobilePhoneNetworkInfoV5 netInfo;
|
|
711 |
RMobilePhone::TMobilePhoneLocationAreaV1 locationArea;
|
|
712 |
TPckg<RMobilePhone::TMobilePhoneNetworkInfoV5> netInfoPkg(netInfo);
|
|
713 |
// Call notify for networkchange
|
|
714 |
phone.NotifyCurrentNetworkChange(reqNotifyCurrentNetChangeStatus, netInfoPkg, locationArea );
|
|
715 |
|
|
716 |
TExtEtelRequestStatus reqNotifyModeChangeStatus(phone, EMobilePhoneNotifyModeChange);
|
|
717 |
CleanupStack::PushL(reqNotifyModeChangeStatus);
|
|
718 |
RMobilePhone::TMobilePhoneNetworkMode mobNetworkMode;
|
|
719 |
// Call notify for NotifyModeChange
|
|
720 |
phone.NotifyModeChange(reqNotifyModeChangeStatus, mobNetworkMode);
|
|
721 |
|
|
722 |
// Move phone to an area with coverage
|
|
723 |
DisplayUserInteractionPromptL(_L("Move phone to an area with coverage"), ETimeLong);
|
|
724 |
|
|
725 |
// === Check cell is reselected and network information is correct ===
|
|
726 |
|
|
727 |
// Check RMobilePhone::NotifyNetworkRegistrationStatusChange completes with aStatus=ERegisteredOnHomeNetwork
|
|
728 |
RMobilePhone::TMobilePhoneRegistrationStatus expectedStatus = RMobilePhone::ERegisteredOnHomeNetwork;
|
|
729 |
const TInt wantedStatus = KErrNone;
|
|
730 |
iNetworkTestHelper.WaitForMobilePhoneNotifyNetworkRegistrationStatusChange(phone, reqNetworkRegStatusChange, networkRegStatus, expectedStatus, wantedStatus);
|
|
731 |
|
|
732 |
// Check RMobilePhone::GetNetworkRegistrationStatus returns ERegisteredOnHomeNetwork
|
|
733 |
ASSERT_EQUALS(iNetworkTestHelper.GetNetworkRegistrationStatusL(phone, status), KErrNone, _L("RMobilePhone::GetNetworkRegistrationStatus returned with an error"));
|
|
734 |
ASSERT_EQUALS(status, RMobilePhone::ERegisteredOnHomeNetwork, _L("RMobilePhone::GetNetworkRegistrationStatus did not return the expected ENotRegisteredSearching or ENotRegisteredNoServiceStatus"));
|
|
735 |
|
|
736 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
737 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(reqNotifyCurrentNetChangeStatus, ETimeMedium), KErrNone, _L("RMobilePhone::NotifyCurrentNetworkChange timed out"));
|
|
738 |
ASSERT_EQUALS(reqNotifyCurrentNetChangeStatus.Int(), KErrNone, _L("RMobilePhone::NotifyCurrentNetworkChange returned error"));
|
|
739 |
|
|
740 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
741 |
ASSERT_TRUE(netInfo.iDisplayTag.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iDisplayTag"));
|
|
742 |
|
|
743 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
744 |
ASSERT_TRUE(netInfo.iLongName.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iLongName"));
|
|
745 |
|
|
746 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm
|
|
747 |
ASSERT_EQUALS(netInfo.iMode, RMobilePhone::ENetworkModeGsm, _L("RMobilePhone::NotifyCurrentNetworkChange iMode did not return ENetworkModeGsm as expected"));
|
|
748 |
|
|
749 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
750 |
ASSERT_TRUE(netInfo.iNetworkId.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iNetworkId"));
|
|
751 |
|
|
752 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
753 |
ASSERT_TRUE(netInfo.iShortName.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iShortName"));
|
|
754 |
|
|
755 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
756 |
ASSERT_EQUALS(netInfo.iStatus, RMobilePhone::ENetworkStatusCurrent, _L("RMobilePhone::NotifyCurrentNetworkChange iStatus did not return ENetworkStatusCurrent as expected"));
|
|
757 |
|
|
758 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aArea.iCellId > 0
|
|
759 |
ASSERT_TRUE(locationArea.iCellId > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iCellId"));
|
|
760 |
|
|
761 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aArea.iLocationAreaCode > 0
|
|
762 |
ASSERT_TRUE(locationArea.iLocationAreaCode > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iLocationAreaCode"));
|
|
763 |
|
|
764 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
765 |
RMobilePhone::TMobilePhoneNetworkInfoV5 currentNetworkInfo;
|
|
766 |
RMobilePhone::TMobilePhoneLocationAreaV1 currentNetworkAreaLocation;
|
|
767 |
RMobilePhone::TMobilePhoneNetworkInfoV5Pckg currentNetworkInfoPckg(currentNetworkInfo);
|
|
768 |
TExtEtelRequestStatus getCurrentNetworkStatus(phone, EMobilePhoneGetCurrentNetwork);
|
|
769 |
CleanupStack::PushL(getCurrentNetworkStatus);
|
|
770 |
phone.GetCurrentNetwork(getCurrentNetworkStatus, currentNetworkInfoPckg, currentNetworkAreaLocation);
|
|
771 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getCurrentNetworkStatus, ETimeMedium), KErrNone, _L("RMobilePhone::GetCurrentNetwork timed out"));
|
|
772 |
ASSERT_EQUALS(getCurrentNetworkStatus.Int(), KErrNone, _L("RMobilePhone::GetCurrentNetwork returned returned error"));
|
|
773 |
|
|
774 |
|
|
775 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
776 |
ASSERT_TRUE(currentNetworkInfo.iDisplayTag.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iDisplayTag"));
|
|
777 |
|
|
778 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
779 |
ASSERT_TRUE(currentNetworkInfo.iLongName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iLongName"));
|
|
780 |
|
|
781 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm
|
|
782 |
ASSERT_EQUALS(currentNetworkInfo.iMode, RMobilePhone::ENetworkModeGsm, _L("RMobilePhone::GetCurrentNetwork iMode did not return ENetworkModeGsm as expected"));
|
|
783 |
|
|
784 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
785 |
ASSERT_TRUE(currentNetworkInfo.iNetworkId.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iNetworkId"));
|
|
786 |
|
|
787 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
788 |
ASSERT_TRUE(currentNetworkInfo.iShortName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iShortName"));
|
|
789 |
|
|
790 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
791 |
ASSERT_EQUALS(currentNetworkInfo.iStatus, RMobilePhone::ENetworkStatusCurrent, _L("RMobilePhone::GetCurrentNetwork iStatus did not return ENetworkStatusCurrent as expected"));
|
|
792 |
|
|
793 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aArea.iCellId > 0
|
|
794 |
ASSERT_TRUE(currentNetworkAreaLocation.iCellId > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iCellId"));
|
|
795 |
|
|
796 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aArea.iLocationAreaCode > 0
|
|
797 |
ASSERT_TRUE(currentNetworkAreaLocation.iLocationAreaCode > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iLocationAreaCode"));
|
|
798 |
|
|
799 |
// Check RMobilePhone::NotifyModeChange completes with aNetworkMode=ENetworkModeGsm
|
|
800 |
RMobilePhone::TMobilePhoneNetworkMode expectedMobNetMode = RMobilePhone::ENetworkModeGsm;
|
|
801 |
iNetworkTestHelper.WaitForMobilePhoneNotifyModeChange(phone, reqNotifyModeChangeStatus, mobNetworkMode, expectedMobNetMode, wantedStatus);
|
|
802 |
|
|
803 |
// Check RMobilePhone::GetCurrentMode completes with aNetworkMode=ENetworkModeGsm
|
|
804 |
RMobilePhone::TMobilePhoneNetworkMode currentMobNetMode;
|
|
805 |
phone.GetCurrentMode(currentMobNetMode);
|
|
806 |
ASSERT_EQUALS(currentMobNetMode, RMobilePhone::ENetworkModeGsm, _L("RMobilePhone::GetCurrentMode did not return ENetworkModeGsm as expected"));
|
|
807 |
|
|
808 |
//
|
|
809 |
// TEST END
|
|
810 |
//
|
|
811 |
|
|
812 |
StartCleanup();
|
|
813 |
|
|
814 |
// Pop
|
|
815 |
// reqNetworkRegStatusChange
|
|
816 |
// reqNotifyCurrentNetChangeStatus
|
|
817 |
// getCurrentNetworkStatus
|
|
818 |
// reqNotifyModeChangeStatus
|
|
819 |
CleanupStack::PopAndDestroy(4, &reqNetworkRegStatusChange);
|
|
820 |
|
|
821 |
return TestStepResult();
|
|
822 |
}
|
|
823 |
|
|
824 |
TPtrC CCTSYIntegrationTestNetworkControl0003::GetTestStepName()
|
|
825 |
/**
|
|
826 |
* @return The test step name.
|
|
827 |
*/
|
|
828 |
{
|
|
829 |
return _L("CCTSYIntegrationTestNetworkControl0003");
|
|
830 |
}
|
|
831 |
|
|
832 |
|
|
833 |
|
|
834 |
CCTSYIntegrationTestNetworkControl0004::CCTSYIntegrationTestNetworkControl0004(CEtelSessionMgr& aEtelSessionMgr)
|
|
835 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
836 |
/**
|
|
837 |
* Constructor.
|
|
838 |
*/
|
|
839 |
{
|
|
840 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0004::GetTestStepName());
|
|
841 |
}
|
|
842 |
|
|
843 |
CCTSYIntegrationTestNetworkControl0004::~CCTSYIntegrationTestNetworkControl0004()
|
|
844 |
/**
|
|
845 |
* Destructor.
|
|
846 |
*/
|
|
847 |
{
|
|
848 |
}
|
|
849 |
|
|
850 |
TVerdict CCTSYIntegrationTestNetworkControl0004::doTestStepL()
|
|
851 |
/**
|
|
852 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0004
|
|
853 |
* @SYMFssID BA/CTSY/NTWC-0004
|
|
854 |
* @SYMTestCaseDesc Emergency camping
|
|
855 |
* @SYMTestPriority High
|
|
856 |
* @SYMTestActions
|
|
857 |
* @SYMTestExpectedResults Pass - Phone registers for emergency calls only
|
|
858 |
* @SYMTestType CIT
|
|
859 |
* @SYMTestCaseDependencies live/manual
|
|
860 |
*
|
|
861 |
* Reason for test: Verify registration status is for emergency calls only.
|
|
862 |
*
|
|
863 |
* @return - TVerdict code
|
|
864 |
*/
|
|
865 |
{
|
|
866 |
|
|
867 |
//
|
|
868 |
// SET UP
|
|
869 |
//
|
|
870 |
|
|
871 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
872 |
|
|
873 |
// Log a message to indicate that this test is run without a SIM in the phone
|
|
874 |
DisplayUserInteractionPromptL(_L("Remove SIM card before running this test"), ETimeMedium);
|
|
875 |
|
|
876 |
//
|
|
877 |
// SET UP END
|
|
878 |
//
|
|
879 |
|
|
880 |
StartTest();
|
|
881 |
|
|
882 |
//
|
|
883 |
// TEST START
|
|
884 |
//
|
|
885 |
|
|
886 |
// Ensure that RMobilePhone::GetNetworkCaps returns caps in set of KCapsGetRegistrationStatus
|
|
887 |
TUint32 networkCaps = 0;
|
|
888 |
TUint32 expectedCaps = RMobilePhone::KCapsGetRegistrationStatus;
|
|
889 |
ASSERT_EQUALS(phone.GetNetworkCaps(networkCaps), KErrNone, _L("RMobilePhone::GetNetworkCaps returned with an error"));
|
|
890 |
ASSERT_BITS_SET(networkCaps, expectedCaps, KNoUnwantedBits, _L("RMobilePhone::GetNetworkCaps returned with wrong caps"));
|
|
891 |
|
|
892 |
// === Check that registration status is for emergency calls only. ===
|
|
893 |
|
|
894 |
// Check RMobilePhone::GetNetworkRegistrationStatus returns ENotRegisteredSearching
|
|
895 |
RMobilePhone::TMobilePhoneRegistrationStatus status;
|
|
896 |
ASSERT_EQUALS(iNetworkTestHelper.GetNetworkRegistrationStatusL(phone, status), KErrNone, _L("RMobilePhone::GetNetworkRegistrationStatus returned with an error"));
|
|
897 |
// $CTSYProblem LTSY does not send correct notification. This wast tested using different timeout's but
|
|
898 |
// ENotRegisteredEmergencyOnly notification did not arrive as expected.
|
|
899 |
// Test was modified to accept ENotRegisteredSearching state, because this is the
|
|
900 |
// one which returned from LTSY. From logs we could see that this was the only state which was notified to CTSY.
|
|
901 |
ASSERT_EQUALS(status, RMobilePhone::ENotRegisteredSearching, _L("RMobilePhone::GetNetworkRegistrationStatus did not return the expected ENotRegisteredSearching Status"));
|
|
902 |
|
|
903 |
//
|
|
904 |
// TEST END
|
|
905 |
//
|
|
906 |
|
|
907 |
StartCleanup();
|
|
908 |
|
|
909 |
return TestStepResult();
|
|
910 |
}
|
|
911 |
|
|
912 |
TPtrC CCTSYIntegrationTestNetworkControl0004::GetTestStepName()
|
|
913 |
/**
|
|
914 |
* @return The test step name.
|
|
915 |
*/
|
|
916 |
{
|
|
917 |
return _L("CCTSYIntegrationTestNetworkControl0004");
|
|
918 |
}
|
|
919 |
|
|
920 |
|
|
921 |
|
|
922 |
CCTSYIntegrationTestNetworkControl0005::CCTSYIntegrationTestNetworkControl0005(CEtelSessionMgr& aEtelSessionMgr)
|
|
923 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
924 |
/**
|
|
925 |
* Constructor.
|
|
926 |
*/
|
|
927 |
{
|
|
928 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0005::GetTestStepName());
|
|
929 |
}
|
|
930 |
|
|
931 |
CCTSYIntegrationTestNetworkControl0005::~CCTSYIntegrationTestNetworkControl0005()
|
|
932 |
/**
|
|
933 |
* Destructor.
|
|
934 |
*/
|
|
935 |
{
|
|
936 |
}
|
|
937 |
|
|
938 |
TVerdict CCTSYIntegrationTestNetworkControl0005::doTestStepL()
|
|
939 |
/**
|
|
940 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0005
|
|
941 |
* @SYMFssID BA/CTSY/NTWC-0005
|
|
942 |
* @SYMTestCaseDesc Automatic cell selection
|
|
943 |
* @SYMTestPriority High
|
|
944 |
* @SYMTestActions RMobilePhone::GetCurrentNetwork, RMobilePhone::GetHomeNetwork, RMobilePhone::GetNetworkSelectionSetting, RMobilePhone::GetHomeNetworkSearchPeriod
|
|
945 |
* @SYMTestExpectedResults Pass - Home, current and preferred network information are correct.
|
|
946 |
* @SYMTestType CIT
|
|
947 |
* @SYMTestCaseDependencies live/automatic
|
|
948 |
*
|
|
949 |
* Reason for test: Verify home network info., current network info. correct and home network is in the preferred network list.
|
|
950 |
*
|
|
951 |
* @return - TVerdict code
|
|
952 |
*/
|
|
953 |
{
|
|
954 |
|
|
955 |
//
|
|
956 |
// SET UP
|
|
957 |
//
|
|
958 |
|
|
959 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
960 |
CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
|
|
961 |
|
|
962 |
// Ensure that RMobilePhone::GetNetworkCaps returns caps in set of KCapsGetHomeNetwork | KCapsGetCurrentNetwork
|
|
963 |
TUint32 caps;
|
|
964 |
CHECK_EQUALS_L(phone.GetNetworkCaps(caps), KErrNone, _L("RMobilePhone::GetNetworkCaps returned an error"));
|
|
965 |
TUint32 wantedCaps = RMobilePhone::KCapsGetHomeNetwork | RMobilePhone::KCapsGetCurrentNetwork;
|
|
966 |
CHECK_BITS_SET_L(caps, wantedCaps, KNoUnwantedBits, _L("RMobilePhone::GetNetworkCaps returned wrong caps"));
|
|
967 |
|
|
968 |
//
|
|
969 |
// SET UP END
|
|
970 |
//
|
|
971 |
|
|
972 |
StartTest();
|
|
973 |
|
|
974 |
//
|
|
975 |
// TEST START
|
|
976 |
//
|
|
977 |
|
|
978 |
RMobilePhone::TMobilePhoneNetworkSelectionV1 netSelSetting;
|
|
979 |
RMobilePhone::TMobilePhoneNetworkSelectionV1Pckg netSelSettingPckg(netSelSetting);
|
|
980 |
|
|
981 |
// Check RMobilePhone::GetNetworkSelectionSetting returns aSetting.iMethod = ENetworkSelectionAutomatic
|
|
982 |
ASSERT_EQUALS( phone.GetNetworkSelectionSetting( netSelSettingPckg ), KErrNone, _L("RMobilePhone::GetNetworkSelectionSetting returned an error") );
|
|
983 |
ASSERT_EQUALS( netSelSetting.iMethod, RMobilePhone::ENetworkSelectionAutomatic, _L("RMobilePhone::GetNetworkSelectionSetting did not return ENetworkSelectionAutomatic") );
|
|
984 |
|
|
985 |
// $CTSYProblem
|
|
986 |
// CTSY does not support RMobilePhone::GetHomeNetworkSearchPeriod
|
|
987 |
// GetHomeNetworkSearchPeriod responses directly with KErrNotSupported
|
|
988 |
|
|
989 |
// Check RMobilePhone::GetHomeNetworkSearchPeriod returns aSearchIntv >= 0
|
|
990 |
TExtEtelRequestStatus searchPeriodReqStatus(phone, EMobilePhoneGetHomeNetworkSearchPeriod);
|
|
991 |
CleanupStack::PushL(searchPeriodReqStatus);
|
|
992 |
TInt searchIntv;
|
|
993 |
phone.GetHomeNetworkSearchPeriod(searchPeriodReqStatus, searchIntv);
|
|
994 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(searchPeriodReqStatus, ETimeLong), KErrNone, _L("RMobilePhone::GetHomeNetworkSearchPeriod timed out"));
|
|
995 |
ASSERT_EQUALS(searchPeriodReqStatus.Int(), KErrNotSupported, _L("RMobilePhone::GetHomeNetworkSearchPeriod returned an error"));
|
|
996 |
|
|
997 |
// === Get the home network information. ===
|
|
998 |
RMobilePhone::TMobilePhoneNetworkInfoV5 homeNWInfo;
|
|
999 |
RMobilePhone::TMobilePhoneNetworkInfoV5Pckg homeNWInfoPckg(homeNWInfo);
|
|
1000 |
TExtEtelRequestStatus getHomeNetworkStatus(phone, EMobilePhoneGetHomeNetwork);
|
|
1001 |
CleanupStack::PushL(getHomeNetworkStatus);
|
|
1002 |
phone.GetHomeNetwork(getHomeNetworkStatus, homeNWInfoPckg);
|
|
1003 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getHomeNetworkStatus, ETimeLong), KErrNone, _L("RMobilePhone::GetHomeNetwork timed out"));
|
|
1004 |
ASSERT_EQUALS(getHomeNetworkStatus.Int(), KErrNone, _L("RMobilePhone::GetHomeNetwork returned an error"));
|
|
1005 |
|
|
1006 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
1007 |
ASSERT_TRUE(homeNWInfo.iCountryCode.Length() > 0, _L("RMobilePhone::GetHomeNetwork returns invalid CountryCode Tag"));
|
|
1008 |
|
|
1009 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
1010 |
ASSERT_TRUE(homeNWInfo.iDisplayTag.Length() > 0, _L("RMobilePhone::GetHomeNetwork returns invalid iDisplayTag"));
|
|
1011 |
|
|
1012 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
1013 |
ASSERT_TRUE(homeNWInfo.iLongName.Length() > 0, _L("RMobilePhone::GetHomeNetwork returns invalid iLongName"));
|
|
1014 |
|
|
1015 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm
|
|
1016 |
ASSERT_EQUALS(homeNWInfo.iMode, RMobilePhone::ENetworkModeGsm, _L("RMobilePhone::GetHomeNetwork did not return ENetworkModeGsm as expected"));
|
|
1017 |
|
|
1018 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
1019 |
ASSERT_TRUE(homeNWInfo.iNetworkId.Length() > 0, _L("RMobilePhone::GetHomeNetwork returns invalid iNetworkId"));
|
|
1020 |
|
|
1021 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
1022 |
ASSERT_TRUE(homeNWInfo.iShortName.Length() > 0, _L("RMobilePhone::GetHomeNetwork returns invalid iShortName"));
|
|
1023 |
|
|
1024 |
// $CTSYProblem
|
|
1025 |
// GetHomeNetwork() doesn't return correct NetworkInfo.iStatus
|
|
1026 |
|
|
1027 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus= ENetworkStatusUnknown
|
|
1028 |
ASSERT_EQUALS(homeNWInfo.iStatus, RMobilePhone::ENetworkStatusUnknown , _L("RMobilePhone::GetHomeNetwork did not return ENetworkStatusUnknown status as expected "));
|
|
1029 |
|
|
1030 |
// === Get the current network information. ===
|
|
1031 |
RMobilePhone::TMobilePhoneNetworkInfoV5 currentNWInfo;
|
|
1032 |
RMobilePhone::TMobilePhoneLocationAreaV1 currentLocation;
|
|
1033 |
RMobilePhone::TMobilePhoneNetworkInfoV5Pckg currentNWInfoPckg(currentNWInfo);
|
|
1034 |
TExtEtelRequestStatus getCurrentNetworkStatus(phone, EMobilePhoneGetCurrentNetwork);
|
|
1035 |
CleanupStack::PushL(getCurrentNetworkStatus);
|
|
1036 |
phone.GetCurrentNetwork(getCurrentNetworkStatus, currentNWInfoPckg, currentLocation);
|
|
1037 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getCurrentNetworkStatus, ETimeLong), KErrNone, _L("RMobilePhone::GetCurrentNetwork timed out"));
|
|
1038 |
ASSERT_EQUALS(getCurrentNetworkStatus.Int(), KErrNone, _L("RMobilePhone::GetCurrentNetwork returned an error"));
|
|
1039 |
|
|
1040 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
1041 |
ASSERT_TRUE(currentNWInfo.iCountryCode.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iCountryCode"));
|
|
1042 |
|
|
1043 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
1044 |
ASSERT_TRUE(currentNWInfo.iDisplayTag.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid Display Tag"));
|
|
1045 |
|
|
1046 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
1047 |
ASSERT_TRUE(currentNWInfo.iLongName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iLongName"));
|
|
1048 |
|
|
1049 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm or ENetworkModeWcdma
|
|
1050 |
ASSERT_TRUE(currentNWInfo.iMode == RMobilePhone::ENetworkModeGsm || currentNWInfo.iMode == RMobilePhone::ENetworkModeWcdma, _L("RMobilePhone::GetCurrentNetwork did not return ENetworkModeGsm as expected"));
|
|
1051 |
|
|
1052 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
1053 |
ASSERT_TRUE(currentNWInfo.iNetworkId.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iNetworkId"));
|
|
1054 |
|
|
1055 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
1056 |
ASSERT_TRUE(currentNWInfo.iShortName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iShortName"));
|
|
1057 |
|
|
1058 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
1059 |
ASSERT_EQUALS(currentNWInfo.iStatus, RMobilePhone::ENetworkStatusCurrent , _L("RMobilePhone::GetCurrentNetwork did not return ENetworkStatusCurrent status as expected "));
|
|
1060 |
|
|
1061 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneLocationAreaV1 returns aArea.iCellId > 0
|
|
1062 |
ASSERT_TRUE(currentLocation.iCellId > 0, _L("RMobilePhone::GetCurrentNetwork returned invalid iCellId"));
|
|
1063 |
|
|
1064 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneLocationAreaV1 returns aArea.iLocationAreaCode > 0
|
|
1065 |
ASSERT_TRUE(currentLocation.iLocationAreaCode > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iLocationAreaCode"));
|
|
1066 |
|
|
1067 |
// Use helper class for CRetrieveMobilePhonePreferredNetworks to retrieve a list of preferred networks
|
|
1068 |
CRetrieveMobilePhonePreferredNetworksExec *netListHelper = CRetrieveMobilePhonePreferredNetworksHelper::NewL(phone);
|
|
1069 |
CleanupStack::PushL(netListHelper);
|
|
1070 |
TInt err;
|
|
1071 |
CMobilePhoneStoredNetworkList* prefNetList = netListHelper->DoGetList(err);
|
|
1072 |
ASSERT_EQUALS(err, KErrNotSupported, _L("CRetrieveMobilePhonePreferredNetworks::Start failed to get the list"));
|
|
1073 |
|
|
1074 |
// $CTSYProblem CTSY does not support EMobilePhoneGetPreferredNetworksPhase1 and
|
|
1075 |
// EMobilePhoneGetDetectedNetworksPhase1 IPCs.
|
|
1076 |
// If supported, "if (prefNetList != NULL)"-line can be commented/deleted
|
|
1077 |
|
|
1078 |
if (prefNetList != NULL)
|
|
1079 |
{
|
|
1080 |
// Check CMobilePhoneStoredNetworkList::Enumerate returns >= 1
|
|
1081 |
ASSERT_TRUE(prefNetList->Enumerate() >= 1, _L("CMobilePhoneStoredNetworkList::Enumerate did not return valid number of entries"));
|
|
1082 |
|
|
1083 |
// === Check first entry in preferred network list is the home network ===
|
|
1084 |
|
|
1085 |
// Check first item in the CMobilePhoneStoredNetworkList list contains a RMobilePhone::TMobilePreferredNetworkEntryV3 with
|
|
1086 |
const RMobilePhone::TMobilePreferredNetworkEntryV3 &prefInfo = prefNetList->GetEntryL(0);
|
|
1087 |
|
|
1088 |
// iAccess with caps in set of KNetworkAccessGsm
|
|
1089 |
ASSERT_BITS_SET(prefInfo.iAccess, RMobilePhone::KNetworkAccessGsm, KNoUnwantedBits, _L("CMobilePhoneStoredNetworkList.GetEntry() returned first list item with invalid prefInfo.iAccess"));
|
|
1090 |
|
|
1091 |
// iCountryCode = aNetworkInfo.iCountryCode from RMobilePhone::GetHomeNetwork
|
|
1092 |
ASSERT_EQUALS_DES16(prefInfo.iCountryCode, homeNWInfo.iCountryCode, _L("CMobilePhoneStoredNetworkList.GetEntry() returned first list item with invalid prefInfo.iCountryCode. Not equal to home network"));
|
|
1093 |
|
|
1094 |
// iNetworkId = aNetworkInfo.iNetworkId from RMobilePhone::GetHomeNetwork
|
|
1095 |
ASSERT_EQUALS_DES16(prefInfo.iNetworkId, homeNWInfo.iNetworkId, _L("CMobilePhoneStoredNetworkList.GetEntry() returned first list item with invalid prefInfo.iNetworkId. Not equal to home network"));
|
|
1096 |
}
|
|
1097 |
|
|
1098 |
//
|
|
1099 |
// TEST END
|
|
1100 |
//
|
|
1101 |
|
|
1102 |
StartCleanup();
|
|
1103 |
|
|
1104 |
//searchPeriodReqStatus
|
|
1105 |
//getHomeNetworkStatus
|
|
1106 |
//getCurrentNetworkStatus
|
|
1107 |
//netListHelper
|
|
1108 |
CleanupStack::PopAndDestroy(4, &searchPeriodReqStatus);
|
|
1109 |
|
|
1110 |
return TestStepResult();
|
|
1111 |
}
|
|
1112 |
|
|
1113 |
TPtrC CCTSYIntegrationTestNetworkControl0005::GetTestStepName()
|
|
1114 |
/**
|
|
1115 |
* @return The test step name.
|
|
1116 |
*/
|
|
1117 |
{
|
|
1118 |
return _L("CCTSYIntegrationTestNetworkControl0005");
|
|
1119 |
}
|
|
1120 |
|
|
1121 |
|
|
1122 |
|
|
1123 |
CCTSYIntegrationTestNetworkControl0006::CCTSYIntegrationTestNetworkControl0006(CEtelSessionMgr& aEtelSessionMgr)
|
|
1124 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
1125 |
/**
|
|
1126 |
* Constructor.
|
|
1127 |
*/
|
|
1128 |
{
|
|
1129 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0006::GetTestStepName());
|
|
1130 |
}
|
|
1131 |
|
|
1132 |
CCTSYIntegrationTestNetworkControl0006::~CCTSYIntegrationTestNetworkControl0006()
|
|
1133 |
/**
|
|
1134 |
* Destructor.
|
|
1135 |
*/
|
|
1136 |
{
|
|
1137 |
}
|
|
1138 |
|
|
1139 |
TVerdict CCTSYIntegrationTestNetworkControl0006::doTestStepL()
|
|
1140 |
/**
|
|
1141 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0006
|
|
1142 |
* @SYMFssID BA/CTSY/NTWC-0006
|
|
1143 |
* @SYMTestCaseDesc Roaming cell selection
|
|
1144 |
* @SYMTestPriority High
|
|
1145 |
* @SYMTestActions RMobilePhone::GetHomeNetwork, RMobilePhone::GetNetworkRegistrationStatus
|
|
1146 |
* @SYMTestExpectedResults Pass - Roaming SIM can register onto PLMN but is different to home network
|
|
1147 |
* @SYMTestType CIT
|
|
1148 |
* @SYMTestCaseDependencies live/manual
|
|
1149 |
*
|
|
1150 |
* Reason for test: Verify current network differs from home network.
|
|
1151 |
*
|
|
1152 |
* @return - TVerdict code
|
|
1153 |
*/
|
|
1154 |
{
|
|
1155 |
|
|
1156 |
//
|
|
1157 |
// SET UP
|
|
1158 |
//
|
|
1159 |
|
|
1160 |
|
|
1161 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
1162 |
iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone);
|
|
1163 |
|
|
1164 |
// Ensure that RMobilePhone::GetNetworkCaps returns caps in set of KCapsGetRegistrationStatus | KCapsGetCurrentMode | KCapsGetCurrentNetwork | KCapsGetHomeNetwork
|
|
1165 |
TUint32 caps;
|
|
1166 |
CHECK_EQUALS_L( phone.GetNetworkCaps( caps ), KErrNone, _L("RMobilePhone::GetNetworkCaps returned an error") );
|
|
1167 |
TUint32 wantedCaps = RMobilePhone::KCapsGetRegistrationStatus | RMobilePhone::KCapsGetCurrentMode | RMobilePhone::KCapsGetCurrentNetwork | RMobilePhone::KCapsGetHomeNetwork;
|
|
1168 |
CHECK_BITS_SET_L( caps, wantedCaps, KNoUnwantedBits, _L("RMobilePhone::GetNetworkCaps returned wrong caps") );
|
|
1169 |
|
|
1170 |
|
|
1171 |
//
|
|
1172 |
// SET UP END
|
|
1173 |
//
|
|
1174 |
|
|
1175 |
StartTest();
|
|
1176 |
|
|
1177 |
//
|
|
1178 |
// TEST START
|
|
1179 |
//
|
|
1180 |
|
|
1181 |
|
|
1182 |
// Insert a roaming SIM and start phone
|
|
1183 |
|
|
1184 |
// === Get home network information ===
|
|
1185 |
RMobilePhone::TMobilePhoneNetworkInfoV5 homeNetworkInfo;
|
|
1186 |
TPckg<RMobilePhone::TMobilePhoneNetworkInfoV5> homeInfoPkg(homeNetworkInfo);
|
|
1187 |
TExtEtelRequestStatus getHomeNetworkStatus(phone, EMobilePhoneGetHomeNetwork);
|
|
1188 |
CleanupStack::PushL(getHomeNetworkStatus);
|
|
1189 |
phone.GetHomeNetwork( getHomeNetworkStatus, homeInfoPkg );
|
|
1190 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getHomeNetworkStatus, ETimeLong), KErrNone,
|
|
1191 |
_L("RMobilePhone::GetHomeNetwork timed out") );
|
|
1192 |
ASSERT_EQUALS( getHomeNetworkStatus.Int(), KErrNone, _L("RMobilePhone::GetHomeNetwork returned an error") );
|
|
1193 |
|
|
1194 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
1195 |
ASSERT_TRUE(homeNetworkInfo.iDisplayTag.Length() > 0,
|
|
1196 |
_L("RMobilePhone::GetHomeNetwork returned aNetworkInfo.iDisplayTag <= 0"));
|
|
1197 |
|
|
1198 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
1199 |
ASSERT_TRUE(homeNetworkInfo.iLongName.Length() > 0,
|
|
1200 |
_L("RMobilePhone::GetHomeNetwork returned aNetworkInfo.iLongName <= 0"));
|
|
1201 |
|
|
1202 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
1203 |
ASSERT_TRUE(homeNetworkInfo.iNetworkId.Length() > 0,
|
|
1204 |
_L("RMobilePhone::GetHomeNetwork returned aNetworkInfo.iNetworkId <= 0"));
|
|
1205 |
|
|
1206 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
1207 |
ASSERT_TRUE(homeNetworkInfo.iShortName.Length() > 0,
|
|
1208 |
_L("RMobilePhone::GetHomeNetwork returned aNetworkInfo.iShortName <= 0"));
|
|
1209 |
|
|
1210 |
// === Get current network information and check it differs from the home network ===
|
|
1211 |
RMobilePhone::TMobilePhoneNetworkInfoV5 netInfo;
|
|
1212 |
RMobilePhone::TMobilePhoneLocationAreaV1 location;
|
|
1213 |
RMobilePhone::TMobilePhoneNetworkInfoV5Pckg netInfoPckg(netInfo);
|
|
1214 |
TExtEtelRequestStatus getCurrentNetworkStatus(phone, EMobilePhoneGetCurrentNetwork);
|
|
1215 |
CleanupStack::PushL(getCurrentNetworkStatus);
|
|
1216 |
phone.GetCurrentNetwork(getCurrentNetworkStatus, netInfoPckg, location);
|
|
1217 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getCurrentNetworkStatus, ETimeMedium),KErrNone,
|
|
1218 |
_L("RMobilePhone::GetCurrentNetwork timed out"));
|
|
1219 |
ASSERT_EQUALS(getCurrentNetworkStatus.Int(), KErrNone, _L("RMobilePhone::GetCurrentNetwork returned with an error"));
|
|
1220 |
|
|
1221 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag != aNetworkInfo.iDisplayTag from RMobilePhone::GetHomeNetwork
|
|
1222 |
ASSERT_TRUE(netInfo.iDisplayTag != homeNetworkInfo.iDisplayTag,
|
|
1223 |
_L("RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag == aNetworkInfo.iDisplayTag from RMobilePhone::GetHomeNetwork"));
|
|
1224 |
|
|
1225 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName != aNetworkInfo.iLongName from RMobilePhone::GetHomeNetwork
|
|
1226 |
ASSERT_TRUE(netInfo.iLongName != homeNetworkInfo.iLongName,
|
|
1227 |
_L("RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName == aNetworkInfo.iLongName from RMobilePhone::GetHomeNetwork"));
|
|
1228 |
|
|
1229 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId != aNetworkInfo.iNetworkId from RMobilePhone::GetHomeNetwork
|
|
1230 |
ASSERT_TRUE(netInfo.iNetworkId != homeNetworkInfo.iNetworkId,
|
|
1231 |
_L("RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId == aNetworkInfo.iNetworkId from RMobilePhone::GetHomeNetwork"));
|
|
1232 |
|
|
1233 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName != aNetworkInfo.iShortName from RMobilePhone::GetHomeNetwork
|
|
1234 |
ASSERT_TRUE(netInfo.iShortName != homeNetworkInfo.iShortName,
|
|
1235 |
_L("RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName == aNetworkInfo.iShortName from RMobilePhone::GetHomeNetwork"));
|
|
1236 |
|
|
1237 |
// Check RMobilePhone::GetNetworkRegistrationStatus returns aStatus=ERegisteredRoaming
|
|
1238 |
RMobilePhone::TMobilePhoneRegistrationStatus status;
|
|
1239 |
ASSERT_EQUALS(iNetworkTestHelper.GetNetworkRegistrationStatusL( phone, status), KErrNone, _L("RMobilePhone::GetNetworkRegistrationStatus returned with an error"));
|
|
1240 |
ASSERT_EQUALS(status, RMobilePhone::ERegisteredRoaming,
|
|
1241 |
_L("RMobilePhone::GetNetworkRegistrationStatus did not return the expected ERegisteredRoaming Status"));
|
|
1242 |
|
|
1243 |
//
|
|
1244 |
// TEST END
|
|
1245 |
//
|
|
1246 |
|
|
1247 |
StartCleanup();
|
|
1248 |
|
|
1249 |
//getHomeNetworkStatus
|
|
1250 |
//getCurrentNetworkStatus
|
|
1251 |
CleanupStack::PopAndDestroy(2,&getHomeNetworkStatus);
|
|
1252 |
|
|
1253 |
return TestStepResult();
|
|
1254 |
}
|
|
1255 |
|
|
1256 |
TPtrC CCTSYIntegrationTestNetworkControl0006::GetTestStepName()
|
|
1257 |
/**
|
|
1258 |
* @return The test step name.
|
|
1259 |
*/
|
|
1260 |
{
|
|
1261 |
return _L("CCTSYIntegrationTestNetworkControl0006");
|
|
1262 |
}
|
|
1263 |
|
|
1264 |
|
|
1265 |
|
|
1266 |
CCTSYIntegrationTestNetworkControl0007::CCTSYIntegrationTestNetworkControl0007(CEtelSessionMgr& aEtelSessionMgr)
|
|
1267 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
1268 |
/**
|
|
1269 |
* Constructor.
|
|
1270 |
*/
|
|
1271 |
{
|
|
1272 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0007::GetTestStepName());
|
|
1273 |
}
|
|
1274 |
|
|
1275 |
CCTSYIntegrationTestNetworkControl0007::~CCTSYIntegrationTestNetworkControl0007()
|
|
1276 |
/**
|
|
1277 |
* Destructor.
|
|
1278 |
*/
|
|
1279 |
{
|
|
1280 |
}
|
|
1281 |
|
|
1282 |
TVerdict CCTSYIntegrationTestNetworkControl0007::doTestStepL()
|
|
1283 |
/**
|
|
1284 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0007
|
|
1285 |
* @SYMFssID BA/CTSY/NTWC-0007
|
|
1286 |
* @SYMTestCaseDesc Selection mode preserved after switch off.
|
|
1287 |
* @SYMTestPriority High
|
|
1288 |
* @SYMTestActions CRetrieveMobilePhonePreferredNetworks::NewL, RMobilePhone::SelectNetwork, RMobilePhone::StorePreferredNetworksListL, RMobilePhone::SetNetworkSelectionSetting, RMobilePhone::GetNetworkSelectionSetting, RMobilePhone::NotifyNetworkSelectionSettingChange
|
|
1289 |
* @SYMTestExpectedResults Pass - Manual selection mode is preserved on re-start
|
|
1290 |
* @SYMTestType CIT
|
|
1291 |
* @SYMTestCaseDependencies live/automatic
|
|
1292 |
*
|
|
1293 |
* Reason for test: Verify phone is still in manual selection mode after TSY is unloaded and reloaded.
|
|
1294 |
*
|
|
1295 |
* @return - TVerdict code
|
|
1296 |
*/
|
|
1297 |
{
|
|
1298 |
|
|
1299 |
//
|
|
1300 |
// SET UP
|
|
1301 |
//
|
|
1302 |
|
|
1303 |
|
|
1304 |
// iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone);
|
|
1305 |
|
|
1306 |
// Ensure that the phone has the capabilities KCapsGetDetectedNetworks | KCapsManualNetworkSelection
|
|
1307 |
|
|
1308 |
|
|
1309 |
//
|
|
1310 |
// SET UP END
|
|
1311 |
//
|
|
1312 |
|
|
1313 |
StartTest();
|
|
1314 |
|
|
1315 |
//
|
|
1316 |
// TEST START
|
|
1317 |
//
|
|
1318 |
|
|
1319 |
|
|
1320 |
// === Get home network name and id (save these for later) ===
|
|
1321 |
|
|
1322 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
1323 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
1324 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
1325 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm
|
|
1326 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
1327 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
1328 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
1329 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aArea.iCellId > 0
|
|
1330 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aArea.iLocationAreaCode > 0
|
|
1331 |
|
|
1332 |
// === Put the phone into manual netowrk selection mode. ===
|
|
1333 |
|
|
1334 |
// Set network selection setting to manual with RMobilePhone::SetNetworkSelectionSetting with aSetting.iMethod = ENetworkSelectionManual
|
|
1335 |
|
|
1336 |
// === Verify manual selection mode has been set and notification received ===
|
|
1337 |
|
|
1338 |
// Check RMobilePhone::NotifyNetworkSelectionSettingChange completes with aSetting.iMethod = ENetworkSelectionManual
|
|
1339 |
|
|
1340 |
// Check RMobilePhone::GetNetworkSelectionSetting returns aSetting.iMethod = ENetworkSelectionManual
|
|
1341 |
|
|
1342 |
// === Get and store (locally) the list of prefered Network ===
|
|
1343 |
|
|
1344 |
// Create a CRetrieveMobilePhonePreferredNetworks::NewL
|
|
1345 |
|
|
1346 |
// Start retrieval of preferred network list with CRetrieveMobilePhonePreferredNetworks::Start
|
|
1347 |
|
|
1348 |
// Retrieve pointer to the CMobilePhoneStoredNetworkList list with CRetrieveMobilePhonePreferredNetworks::RetrieveListL
|
|
1349 |
|
|
1350 |
// Check CMobilePhoneStoredNetworkList::Enumerate returns >= 1
|
|
1351 |
|
|
1352 |
// === Close down TSY and restart to force network re-selection ===
|
|
1353 |
|
|
1354 |
// Close phone subsession with RPhone::Close
|
|
1355 |
|
|
1356 |
// Unload TSY with RTelServer::UnloadPhoneModule
|
|
1357 |
|
|
1358 |
// Reload it with RTelServer::LoadPhoneModule
|
|
1359 |
|
|
1360 |
// Open phone subsession with RPhone::Open
|
|
1361 |
|
|
1362 |
// === Verify phone is still in manual selection mode ===
|
|
1363 |
|
|
1364 |
// Check RMobilePhone::GetNetworkSelectionSetting returns aSetting.iMethod = ENetworkSelectionManual
|
|
1365 |
|
|
1366 |
// === Get List of detected networks ===
|
|
1367 |
|
|
1368 |
// Create a CRetrieveMobilePhoneDetectedNetworks with CRetrieveMobilePhoneDetectedNetworks::NewL
|
|
1369 |
|
|
1370 |
// Start retrieval of list of detected network with CRetrieveMobilePhoneDetectedNetworks::StartV5
|
|
1371 |
|
|
1372 |
// Retrieve the CMobilePhoneNetworkListV5 with CRetrieveMobilePhoneDetectedNetworks::RetrieveListV5L
|
|
1373 |
|
|
1374 |
// === Ensure that this list contains at least 2 networks (the Home network and another one). ===
|
|
1375 |
|
|
1376 |
// Check CMobilePhoneNetworkListV5::Enumerate returns number of items in list > 1
|
|
1377 |
|
|
1378 |
// === Select the home network ===
|
|
1379 |
|
|
1380 |
// Select home network with RMobilePhone::SelectNetwork with aIsManual=ETrue and aManualSelection.iCountry=aNetworkInfo.iCountryCode from RMobilePhone::GetHomeNetwork and aManualSelection.iNetwork=aNetworkInfo.iNetworkId from RMobilePhone::GetHomeNetwork
|
|
1381 |
|
|
1382 |
// === Verify that the preferred Network list is not changed. ===
|
|
1383 |
|
|
1384 |
// Start retrieval of preferred network list with CRetrieveMobilePhonePreferredNetworks::Start
|
|
1385 |
|
|
1386 |
// Retrieve pointer to the CMobilePhoneStoredNetworkList list with CRetrieveMobilePhonePreferredNetworks::RetrieveListL
|
|
1387 |
|
|
1388 |
// Check CMobilePhoneStoredNetworkList::Enumerate returns same number of entries as before the TSY was closed down.
|
|
1389 |
|
|
1390 |
// Check the current CMobilePhoneStoredNetworkList contains the same entries as previous list (check iAccess, iCountryCode, iNetworkId in TMobilePreferredNetworkEntryV3 is the same)
|
|
1391 |
|
|
1392 |
|
|
1393 |
//
|
|
1394 |
// TEST END
|
|
1395 |
//
|
|
1396 |
|
|
1397 |
StartCleanup();
|
|
1398 |
|
|
1399 |
// Put any required test clean up here, then remove this comment
|
|
1400 |
|
|
1401 |
return TestStepResult();
|
|
1402 |
}
|
|
1403 |
|
|
1404 |
TPtrC CCTSYIntegrationTestNetworkControl0007::GetTestStepName()
|
|
1405 |
/**
|
|
1406 |
* @return The test step name.
|
|
1407 |
*/
|
|
1408 |
{
|
|
1409 |
return _L("CCTSYIntegrationTestNetworkControl0007");
|
|
1410 |
}
|
|
1411 |
|
|
1412 |
|
|
1413 |
|
|
1414 |
CCTSYIntegrationTestNetworkControl0008::CCTSYIntegrationTestNetworkControl0008(CEtelSessionMgr& aEtelSessionMgr)
|
|
1415 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
1416 |
/**
|
|
1417 |
* Constructor.
|
|
1418 |
*/
|
|
1419 |
{
|
|
1420 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0008::GetTestStepName());
|
|
1421 |
}
|
|
1422 |
|
|
1423 |
CCTSYIntegrationTestNetworkControl0008::~CCTSYIntegrationTestNetworkControl0008()
|
|
1424 |
/**
|
|
1425 |
* Destructor.
|
|
1426 |
*/
|
|
1427 |
{
|
|
1428 |
}
|
|
1429 |
|
|
1430 |
TVerdict CCTSYIntegrationTestNetworkControl0008::doTestStepL()
|
|
1431 |
/**
|
|
1432 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0008
|
|
1433 |
* @SYMFssID BA/CTSY/NTWC-0008
|
|
1434 |
* @SYMTestCaseDesc Register on a denied network.
|
|
1435 |
* @SYMTestPriority High
|
|
1436 |
* @SYMTestActions CRetrieveMobilePhoneDetectedNetworks::RetrieveListL, RMobilePhone::NotifyNetworkRegistrationStatusChange, CRetrieveMobilePhoneDetectedNetworks::NewL, RMobilePhone::SelectNetwork, CMobilePhoneNetworkListV5::Enumerate, RMobilePhone::SetNetworkSelectionSetting, RMobilePhone::GetNetworkRegistrationStatus, RMobilePhone::GetHomeNetwork, CRetrieveMobilePhoneDetectedNetworks::StartV5
|
|
1437 |
* @SYMTestExpectedResults Pass - Cannot register onto a denied network
|
|
1438 |
* @SYMTestType CIT
|
|
1439 |
* @SYMTestCaseDependencies live/automatic
|
|
1440 |
*
|
|
1441 |
* Reason for test: Verify registration status is denied when attempting to register on another network.
|
|
1442 |
*
|
|
1443 |
* @return - TVerdict code
|
|
1444 |
*/
|
|
1445 |
{
|
|
1446 |
|
|
1447 |
//
|
|
1448 |
// SET UP
|
|
1449 |
//
|
|
1450 |
|
|
1451 |
// iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone);
|
|
1452 |
// Ensure that RMobilePhone::GetNetworkCaps returns caps in set of KCapsGetDetectedNetworks | KCapsManualNetworkSelection
|
|
1453 |
|
|
1454 |
// Be registered onto home network
|
|
1455 |
|
|
1456 |
|
|
1457 |
//
|
|
1458 |
// SET UP END
|
|
1459 |
//
|
|
1460 |
|
|
1461 |
StartTest();
|
|
1462 |
|
|
1463 |
//
|
|
1464 |
// TEST START
|
|
1465 |
//
|
|
1466 |
|
|
1467 |
|
|
1468 |
// === Get the network ID of the home network (store this for use later) ===
|
|
1469 |
|
|
1470 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
1471 |
|
|
1472 |
// === Get list of all the detected networks ===
|
|
1473 |
|
|
1474 |
// Use the helper class for CRetrieveMobilePhoneDetectedNetworks to get a list of detected networks
|
|
1475 |
|
|
1476 |
// Start retrieval of preferred network list with CRetrieveMobilePhoneDetectedNetworks::StartV5
|
|
1477 |
|
|
1478 |
// Check CMobilePhoneNetworkListV5::Enumerate on the list returned returns number of networks >= 1
|
|
1479 |
|
|
1480 |
// === Switch to manual network selection ===
|
|
1481 |
|
|
1482 |
// Set network selection setting to automatic with RMobilePhone::SetNetworkSelectionSetting with aSetting.iMethod=ENetworkSelectionManual
|
|
1483 |
|
|
1484 |
// === Attempt to select each of the other networks ===
|
|
1485 |
|
|
1486 |
// Cycle through the list of detected networks CMobilePhoneNetworkListV5
|
|
1487 |
|
|
1488 |
// If the TMobilePhoneNetworkInfoV5::iNetworkId != aNetworkInfo.iNetworkId returned from RMobilePhone::GetHomeNetwork
|
|
1489 |
|
|
1490 |
// Check RMobilePhone::SelectNetwork with aIsManual=ETrue and aManualSelection.iCountry=TMobilePhoneNetworkInfoV5::iCountryCode and aManualSelection.iNetwork=TMobilePhoneNetworkInfoV5::iNetworkId
|
|
1491 |
|
|
1492 |
// Check RMobilePhone::GetNetworkRegistrationStatus returns aStatus=ERegistrationDenied
|
|
1493 |
|
|
1494 |
// === Ensure registration returns to previous network ===
|
|
1495 |
|
|
1496 |
// Set network selection setting to automatic with RMobilePhone::SetNetworkSelectionSetting with aSetting.iMethod=ENetworkSelectionAutomatic
|
|
1497 |
|
|
1498 |
// Check RMobilePhone::NotifyNetworkRegistrationStatusChange completes with aStatus=ERegisteredOnHomeNetwork
|
|
1499 |
|
|
1500 |
// Check RMobilePhone::GetNetworkRegistrationStatus returns with ERegisteredOnHomeNetwork
|
|
1501 |
|
|
1502 |
|
|
1503 |
//
|
|
1504 |
// TEST END
|
|
1505 |
//
|
|
1506 |
|
|
1507 |
StartCleanup();
|
|
1508 |
|
|
1509 |
// Put any required test clean up here, then remove this comment
|
|
1510 |
|
|
1511 |
return TestStepResult();
|
|
1512 |
}
|
|
1513 |
|
|
1514 |
TPtrC CCTSYIntegrationTestNetworkControl0008::GetTestStepName()
|
|
1515 |
/**
|
|
1516 |
* @return The test step name.
|
|
1517 |
*/
|
|
1518 |
{
|
|
1519 |
return _L("CCTSYIntegrationTestNetworkControl0008");
|
|
1520 |
}
|
|
1521 |
|
|
1522 |
|
|
1523 |
|
|
1524 |
CCTSYIntegrationTestNetworkControl0009::CCTSYIntegrationTestNetworkControl0009(CEtelSessionMgr& aEtelSessionMgr)
|
|
1525 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
1526 |
/**
|
|
1527 |
* Constructor.
|
|
1528 |
*/
|
|
1529 |
{
|
|
1530 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0009::GetTestStepName());
|
|
1531 |
}
|
|
1532 |
|
|
1533 |
CCTSYIntegrationTestNetworkControl0009::~CCTSYIntegrationTestNetworkControl0009()
|
|
1534 |
/**
|
|
1535 |
* Destructor.
|
|
1536 |
*/
|
|
1537 |
{
|
|
1538 |
}
|
|
1539 |
|
|
1540 |
TVerdict CCTSYIntegrationTestNetworkControl0009::doTestStepL()
|
|
1541 |
/**
|
|
1542 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0009
|
|
1543 |
* @SYMFssID BA/CTSY/NTWC-0009
|
|
1544 |
* @SYMTestCaseDesc Automatic network selection at start
|
|
1545 |
* @SYMTestPriority High
|
|
1546 |
* @SYMTestActions RMobilePhone::GetNetworkRegistrationStatus, RMobilePhone::NotifyCurrentNetworkChange, RMobilePhone::GetCurrentNetwork
|
|
1547 |
* @SYMTestExpectedResults Pass - Registration status notificatins are received
|
|
1548 |
* @SYMTestType CIT
|
|
1549 |
* @SYMTestCaseDependencies live/automatic
|
|
1550 |
*
|
|
1551 |
* Reason for test: Verify current network change and network registration status notifications complete.
|
|
1552 |
*
|
|
1553 |
* @return - TVerdict code
|
|
1554 |
*/
|
|
1555 |
{
|
|
1556 |
|
|
1557 |
//
|
|
1558 |
// SET UP
|
|
1559 |
//
|
|
1560 |
|
|
1561 |
// $CTSYProblem
|
|
1562 |
// Put this back into the script when a decision has been made as to what
|
|
1563 |
// this test case should do since the board has already booted by the time
|
|
1564 |
// the test starts, not possible to catch the notifications.
|
|
1565 |
|
|
1566 |
/*
|
|
1567 |
|
|
1568 |
START_TESTCASE BA-CTSY-INT-NTWC-0009
|
|
1569 |
//!@SYMTestCaseID BA-CTSY-INT-NTWC-0009
|
|
1570 |
//!@SYMFssID BA/CTSY/NTWC-0009
|
|
1571 |
//!@SYMTestCaseDesc Automatic network selection at start
|
|
1572 |
//!@SYMTestPriority High
|
|
1573 |
//!@SYMTestActions RMobilePhone::GetNetworkRegistrationStatus, RMobilePhone::NotifyCurrentNetworkChange, RMobilePhone::GetCurrentNetwork
|
|
1574 |
//!@SYMTestExpectedResults Pass - Registration status notificatins are received
|
|
1575 |
//!@SYMTestType CIT
|
|
1576 |
//!@SYMTestCaseDependencies live/automatic
|
|
1577 |
RUN_TEST_STEP 180 TE_CTSYIntegrationTestSuite CCTSYIntegrationTestNetworkControl0009 c:\ctsy\ctsyintegration_data.ini
|
|
1578 |
END_TESTCASE BA-CTSY-INT-NTWC-0009
|
|
1579 |
|
|
1580 |
*/
|
|
1581 |
|
|
1582 |
RMobilePhone& tempPhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
1583 |
|
|
1584 |
// Ensure that RMobilePhone::GetNetworkCaps returns caps in set of KCapsGetRegistrationStatus
|
|
1585 |
TUint32 caps;
|
|
1586 |
CHECK_EQUALS_L( tempPhone.GetNetworkCaps( caps ), KErrNone, _L("RMobilePhone::GetNetworkCaps returned an error") );
|
|
1587 |
TUint32 wantedCaps = RMobilePhone::KCapsGetRegistrationStatus;
|
|
1588 |
CHECK_BITS_SET_L( caps, wantedCaps, KNoUnwantedBits, _L("RMobilePhone::GetNetworkCaps returned wrong network caps") );
|
|
1589 |
|
|
1590 |
// Close down TSY, so registration will re-start when TSY re-opens
|
|
1591 |
iEtelSessionMgr.RestartL();
|
|
1592 |
// phone object is now invalid, reopen
|
|
1593 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
1594 |
|
|
1595 |
//
|
|
1596 |
// SET UP END
|
|
1597 |
//
|
|
1598 |
|
|
1599 |
StartTest();
|
|
1600 |
|
|
1601 |
//
|
|
1602 |
// TEST START
|
|
1603 |
//
|
|
1604 |
|
|
1605 |
// === Ensure network registration status goes from unknown->searching->registered home network ===
|
|
1606 |
|
|
1607 |
// Check RMobilePhone::NotifyNetworkRegistrationStatusChange completes with
|
|
1608 |
// ERegistrationUnknown->ENotRegisteredSearching->ERegisteredOnHomeNetwork
|
|
1609 |
|
|
1610 |
// Seems a bit unlikely that we will catch the whole sequence if the TSY has been restarted
|
|
1611 |
// in the absence of notifications during the restart, so check the last one we get is reasonable
|
|
1612 |
|
|
1613 |
TExtEtelRequestStatus reqRegStatusChange( phone, EMobilePhoneNotifyNetworkRegistrationStatusChange );
|
|
1614 |
CleanupStack::PushL(reqRegStatusChange);
|
|
1615 |
|
|
1616 |
RMobilePhone::TMobilePhoneRegistrationStatus phoneRegStatus = RMobilePhone::ERegistrationUnknown;
|
|
1617 |
TBool receivedRegNotify = EFalse;
|
|
1618 |
TInt err;
|
|
1619 |
|
|
1620 |
do
|
|
1621 |
{
|
|
1622 |
DEBUG_PRINTF1(_L("calling notify"));
|
|
1623 |
phone.NotifyNetworkRegistrationStatusChange( reqRegStatusChange, phoneRegStatus );
|
|
1624 |
err = WaitForRequestWithTimeOut( reqRegStatusChange, ETimeMedium );
|
|
1625 |
|
|
1626 |
if( KErrNone == err )
|
|
1627 |
{
|
|
1628 |
receivedRegNotify = ETrue;
|
|
1629 |
}
|
|
1630 |
}
|
|
1631 |
while(KErrNone == err);
|
|
1632 |
|
|
1633 |
ASSERT_TRUE( receivedRegNotify, _L("RMobilePhone::NotifyNetworkRegistrationStatusChange timed out") );
|
|
1634 |
DEBUG_PRINTF2( _L("RMobilePhone::NotifyNetworkRegistrationStatusChange Last registration status=%d"), phoneRegStatus );
|
|
1635 |
|
|
1636 |
ASSERT_TRUE( (RMobilePhone::ERegistrationUnknown == phoneRegStatus) ||
|
|
1637 |
(RMobilePhone::ENotRegisteredSearching == phoneRegStatus) ||
|
|
1638 |
(RMobilePhone::ERegisteredOnHomeNetwork == phoneRegStatus),
|
|
1639 |
_L("RMobilePhone::NotifyNetworkRegistrationStatusChange returned invalid registration status") );
|
|
1640 |
|
|
1641 |
// Check RMobilePhone::GetNetworkRegistrationStatus returns ERegisteredOnHomeNetwork
|
|
1642 |
TExtEtelRequestStatus getNetRegStatus(phone,EMobilePhoneGetNetworkRegistrationStatus);
|
|
1643 |
CleanupStack::PushL(getNetRegStatus);
|
|
1644 |
|
|
1645 |
phone.GetNetworkRegistrationStatus(getNetRegStatus, phoneRegStatus);
|
|
1646 |
err = WaitForRequestWithTimeOut( getNetRegStatus, ETimeShort );
|
|
1647 |
|
|
1648 |
ASSERT_EQUALS( err, KErrNone, _L("RMobilePhone::GetNetworkRegistrationStatus timed out") )
|
|
1649 |
ASSERT_EQUALS(phoneRegStatus, RMobilePhone::ERegisteredOnHomeNetwork,
|
|
1650 |
_L("RMobilePhone::GetNetworkRegistrationStatus returned invalid state"))
|
|
1651 |
|
|
1652 |
// === Check receive notifciations for current network change ===
|
|
1653 |
RMobilePhone::TMobilePhoneNetworkInfoV5 netInfo;
|
|
1654 |
TPckg<RMobilePhone::TMobilePhoneNetworkInfoV5> netInfoPkg(netInfo);
|
|
1655 |
RMobilePhone::TMobilePhoneLocationAreaV1 area;
|
|
1656 |
|
|
1657 |
TExtEtelRequestStatus reqNetChangeStatus(phone, EMobilePhoneNotifyCurrentNetworkChange);
|
|
1658 |
CleanupStack::PushL(reqNetChangeStatus);
|
|
1659 |
|
|
1660 |
phone.NotifyCurrentNetworkChange( reqNetChangeStatus, netInfoPkg, area );
|
|
1661 |
|
|
1662 |
ASSERT_EQUALS( WaitForRequestWithTimeOut(reqNetChangeStatus, ETimeMedium), KErrNone,
|
|
1663 |
_L("RMobilePhone::NotifyCurrentNetworkChange timed out"));
|
|
1664 |
|
|
1665 |
ASSERT_EQUALS( reqNetChangeStatus.Int(), KErrNone,
|
|
1666 |
_L("RMobilePhone::NotifyCurrentNetworkChange returned returned error"));
|
|
1667 |
|
|
1668 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 completes with aNetworkInfo.iCountryCode with length > 0
|
|
1669 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 completes with aNetworkInfo.iDisplayTag with length > 0
|
|
1670 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 completes with aNetworkInfo.iLongName with length > 0
|
|
1671 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 completes with aNetworkInfo.iMode=ENetworkModeGsm
|
|
1672 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 completes with aNetworkInfo.iNetworkId with length > 0
|
|
1673 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 completes with aNetworkInfo.iShortName with length > 0
|
|
1674 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 completes with aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
1675 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 completes with aArea.iCellId > 0
|
|
1676 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 completes with aArea.iLocationAreaCode > 0
|
|
1677 |
ASSERT_TRUE( netInfo.iCountryCode.Length() > 0,
|
|
1678 |
_L("RMobilePhone::NotifyCurrentNetworkChange returns iCountryCode length 0") )
|
|
1679 |
ASSERT_TRUE( netInfo.iDisplayTag.Length() > 0,
|
|
1680 |
_L("RMobilePhone::NotifyCurrentNetworkChange returns iDisplayTag length 0") )
|
|
1681 |
ASSERT_TRUE( netInfo.iLongName.Length() > 0,
|
|
1682 |
_L("RMobilePhone::NotifyCurrentNetworkChange returns iLongNamelength 0") )
|
|
1683 |
ASSERT_EQUALS( netInfo.iMode, RMobilePhone::ENetworkModeGsm,
|
|
1684 |
_L("RMobilePhone::NotifyCurrentNetworkChange returns Network mode not GSM") )
|
|
1685 |
ASSERT_TRUE( netInfo.iNetworkId.Length() > 0,
|
|
1686 |
_L("RMobilePhone::NotifyCurrentNetworkChange returns iNetworkId length 0") )
|
|
1687 |
ASSERT_TRUE( netInfo.iShortName.Length() > 0,
|
|
1688 |
_L("RMobilePhone::NotifyCurrentNetworkChange returns iShortNamelength 0") )
|
|
1689 |
ASSERT_EQUALS( netInfo.iStatus, RMobilePhone::ENetworkStatusCurrent,
|
|
1690 |
_L("RMobilePhone::NotifyCurrentNetworkChange returns network status not ENetworkStatusCurrent") )
|
|
1691 |
|
|
1692 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aArea.iCellId > 0
|
|
1693 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aArea.iLocationAreaCode > 0
|
|
1694 |
ASSERT_TRUE( area.iCellId > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns Location cell ID 0") )
|
|
1695 |
ASSERT_TRUE( area.iLocationAreaCode > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns Location AreaCode ID 0") )
|
|
1696 |
|
|
1697 |
// Get the network information and test again
|
|
1698 |
TExtEtelRequestStatus getCurrentNetworkStatus(phone, EMobilePhoneGetCurrentNetwork);
|
|
1699 |
CleanupStack::PushL(getCurrentNetworkStatus);
|
|
1700 |
phone.GetCurrentNetwork( getCurrentNetworkStatus, netInfoPkg, area );
|
|
1701 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getCurrentNetworkStatus, ETimeLong), KErrNone,
|
|
1702 |
_L("RMobilePhone::GetCurrentNetwork timed out") );
|
|
1703 |
ASSERT_EQUALS( getCurrentNetworkStatus.Int(), KErrNone, _L("RMobilePhone::GetCurrentNetwork returned an error") );
|
|
1704 |
|
|
1705 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
1706 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
1707 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
1708 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm
|
|
1709 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
1710 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
1711 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
1712 |
ASSERT_TRUE( netInfo.iCountryCode.Length() > 0,
|
|
1713 |
_L("RMobilePhone::GetCurrentNetwork returns iCountryCode length 0") )
|
|
1714 |
ASSERT_TRUE( netInfo.iDisplayTag.Length() > 0,
|
|
1715 |
_L("RMobilePhone::GetCurrentNetwork returns iDisplayTag length 0") )
|
|
1716 |
ASSERT_TRUE( netInfo.iLongName.Length() > 0,
|
|
1717 |
_L("RMobilePhone::GetCurrentNetwork returns iLongNamelength 0") )
|
|
1718 |
ASSERT_TRUE( netInfo.iMode == RMobilePhone::ENetworkModeGsm || netInfo.iMode == RMobilePhone::ENetworkModeWcdma,
|
|
1719 |
_L("RMobilePhone::GetCurrentNetwork returns Network mode not GSM") )
|
|
1720 |
ASSERT_TRUE( netInfo.iNetworkId.Length() > 0,
|
|
1721 |
_L("RMobilePhone::GetCurrentNetwork returns iNetworkId length 0") )
|
|
1722 |
ASSERT_TRUE( netInfo.iShortName.Length() > 0,
|
|
1723 |
_L("RMobilePhone::GetCurrentNetwork returns iShortNamelength 0") )
|
|
1724 |
ASSERT_EQUALS( netInfo.iStatus, RMobilePhone::ENetworkStatusCurrent,
|
|
1725 |
_L("RMobilePhone::GetCurrentNetwork returns network status not ENetworkStatusCurrent") )
|
|
1726 |
|
|
1727 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aArea.iCellId > 0
|
|
1728 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aArea.iLocationAreaCode > 0
|
|
1729 |
ASSERT_TRUE( area.iCellId > 0, _L("RMobilePhone::GetCurrentNetwork returns Location cell ID 0") )
|
|
1730 |
ASSERT_TRUE( area.iLocationAreaCode > 0, _L("RMobilePhone::GetCurrentNetwork returns Location AreaCode ID 0") )
|
|
1731 |
|
|
1732 |
//
|
|
1733 |
// TEST END
|
|
1734 |
//
|
|
1735 |
|
|
1736 |
StartCleanup();
|
|
1737 |
|
|
1738 |
// getCurrentNetworkStatus
|
|
1739 |
// getNetRegStatus
|
|
1740 |
// reqNetChangeStatus
|
|
1741 |
// reqRegStatusChange
|
|
1742 |
CleanupStack::Pop(4,&reqRegStatusChange);
|
|
1743 |
|
|
1744 |
return TestStepResult();
|
|
1745 |
}
|
|
1746 |
|
|
1747 |
TPtrC CCTSYIntegrationTestNetworkControl0009::GetTestStepName()
|
|
1748 |
/**
|
|
1749 |
* @return The test step name.
|
|
1750 |
*/
|
|
1751 |
{
|
|
1752 |
return _L("CCTSYIntegrationTestNetworkControl0009");
|
|
1753 |
}
|
|
1754 |
|
|
1755 |
|
|
1756 |
|
|
1757 |
CCTSYIntegrationTestNetworkControl0010::CCTSYIntegrationTestNetworkControl0010(CEtelSessionMgr& aEtelSessionMgr)
|
|
1758 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
1759 |
/**
|
|
1760 |
* Constructor.
|
|
1761 |
*/
|
|
1762 |
{
|
|
1763 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0010::GetTestStepName());
|
|
1764 |
}
|
|
1765 |
|
|
1766 |
CCTSYIntegrationTestNetworkControl0010::~CCTSYIntegrationTestNetworkControl0010()
|
|
1767 |
/**
|
|
1768 |
* Destructor.
|
|
1769 |
*/
|
|
1770 |
{
|
|
1771 |
}
|
|
1772 |
|
|
1773 |
TVerdict CCTSYIntegrationTestNetworkControl0010::doTestStepL()
|
|
1774 |
/**
|
|
1775 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0010
|
|
1776 |
* @SYMFssID BA/CTSY/NTWC-0010
|
|
1777 |
* @SYMTestCaseDesc Select a network manually using a roaming SIM
|
|
1778 |
* @SYMTestPriority High
|
|
1779 |
* @SYMTestActions
|
|
1780 |
* @SYMTestExpectedResults Pass - Fails to register onto another VPLMN
|
|
1781 |
* @SYMTestType CIT
|
|
1782 |
* @SYMTestCaseDependencies live/manual
|
|
1783 |
*
|
|
1784 |
* Reason for test: Verify roaming SIM cannot register onto another network.
|
|
1785 |
*
|
|
1786 |
* @return - TVerdict code
|
|
1787 |
*/
|
|
1788 |
{
|
|
1789 |
|
|
1790 |
//
|
|
1791 |
// SET UP
|
|
1792 |
//
|
|
1793 |
|
|
1794 |
|
|
1795 |
// Ensure that RMobilePhone::GetNetworkCaps returns caps in set of KCapsGetCurrentNetwork | KCapsManualNetworkSelection
|
|
1796 |
|
|
1797 |
// === Romaing Sim is registered on a VPLMN ===
|
|
1798 |
|
|
1799 |
// Ensure RMobilePhone::GetNetworkRegistrationStatus returns ERegisteredRoaming
|
|
1800 |
|
|
1801 |
|
|
1802 |
//
|
|
1803 |
// SET UP END
|
|
1804 |
//
|
|
1805 |
|
|
1806 |
StartTest();
|
|
1807 |
|
|
1808 |
//
|
|
1809 |
// TEST START
|
|
1810 |
//
|
|
1811 |
|
|
1812 |
|
|
1813 |
// === Get ID of the current network (store this for use later) ===
|
|
1814 |
|
|
1815 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
1816 |
|
|
1817 |
// === Get list of detected networks ===
|
|
1818 |
|
|
1819 |
// Use helper class to start retrieval of V5 preferred network list with CRetrieveMobilePhoneDetectedNetworks
|
|
1820 |
|
|
1821 |
// Check CMobilePhoneNetworkListV5::Enumerate on list returned returns number of networks > 0
|
|
1822 |
|
|
1823 |
// === Try and manually select another one to register onto ===
|
|
1824 |
|
|
1825 |
// Set network selection setting to manual with RMobilePhone::SetNetworkSelectionSetting with aSetting.iMethod=ENetworkSelectionManual
|
|
1826 |
|
|
1827 |
// Check RMobilePhone::NotifyNetworkSelectionSettingChange completes with aSetting.iMethod = ENetworkSelectionManual
|
|
1828 |
|
|
1829 |
// Check RMobilePhone::GetNetworkSelectionSetting returns aSetting.iMethod = ENetworkSelectionManual
|
|
1830 |
|
|
1831 |
// Cycle through the list of networks in CMobilePhoneNetworkListV5
|
|
1832 |
|
|
1833 |
// If the TMobilePhoneNetworkInfoV5::iNetworkId != iNetworkId from RMobilePhone::GetCurrentNetwork
|
|
1834 |
|
|
1835 |
// then
|
|
1836 |
|
|
1837 |
// select network in list with RMobilePhone::SelectNetwork with aIsManual=ETrue and aManualSelection.iCountry=TMobilePhoneNetworkInfoV5::iCountryCode from item in CMobilePhoneNetworkListV5 and aManualSelection.iNetwork=TMobilePhoneNetworkInfoV5::iNetworkId from item in CMobilePhoneNetworkListV5
|
|
1838 |
|
|
1839 |
// === Check network does not allow registration ===
|
|
1840 |
|
|
1841 |
// Check RMobilePhone::NotifyNetworkRegistrationStatusChange completes with aStatus=ERegisteredRoaming or ERegistrationDenied
|
|
1842 |
|
|
1843 |
|
|
1844 |
//
|
|
1845 |
// TEST END
|
|
1846 |
//
|
|
1847 |
|
|
1848 |
StartCleanup();
|
|
1849 |
|
|
1850 |
// Put any required test clean up here, then remove this comment
|
|
1851 |
|
|
1852 |
return TestStepResult();
|
|
1853 |
}
|
|
1854 |
|
|
1855 |
TPtrC CCTSYIntegrationTestNetworkControl0010::GetTestStepName()
|
|
1856 |
/**
|
|
1857 |
* @return The test step name.
|
|
1858 |
*/
|
|
1859 |
{
|
|
1860 |
return _L("CCTSYIntegrationTestNetworkControl0010");
|
|
1861 |
}
|
|
1862 |
|
|
1863 |
|
|
1864 |
|
|
1865 |
CCTSYIntegrationTestNetworkControl0011::CCTSYIntegrationTestNetworkControl0011(CEtelSessionMgr& aEtelSessionMgr)
|
|
1866 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
1867 |
/**
|
|
1868 |
* Constructor.
|
|
1869 |
*/
|
|
1870 |
{
|
|
1871 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0011::GetTestStepName());
|
|
1872 |
}
|
|
1873 |
|
|
1874 |
CCTSYIntegrationTestNetworkControl0011::~CCTSYIntegrationTestNetworkControl0011()
|
|
1875 |
/**
|
|
1876 |
* Destructor.
|
|
1877 |
*/
|
|
1878 |
{
|
|
1879 |
}
|
|
1880 |
|
|
1881 |
TVerdict CCTSYIntegrationTestNetworkControl0011::doTestStepL()
|
|
1882 |
/**
|
|
1883 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0011
|
|
1884 |
* @SYMFssID BA/CTSY/NTWC-0011
|
|
1885 |
* @SYMTestCaseDesc Attempt network detect when no signal strength
|
|
1886 |
* @SYMTestPriority High
|
|
1887 |
* @SYMTestActions CRetrieveMobilePhoneDetectedNetworks::Start
|
|
1888 |
* @SYMTestExpectedResults Pass - Cannot detect networks when signal strength is zero.
|
|
1889 |
* @SYMTestType CIT
|
|
1890 |
* @SYMTestCaseDependencies live/manual
|
|
1891 |
*
|
|
1892 |
* Reason for test: Verify detected networks list is empty.
|
|
1893 |
*
|
|
1894 |
* @return - TVerdict code
|
|
1895 |
*/
|
|
1896 |
{
|
|
1897 |
|
|
1898 |
//
|
|
1899 |
// SET UP
|
|
1900 |
//
|
|
1901 |
|
|
1902 |
|
|
1903 |
// Ensure that RMobilePhone::GetNetworkCaps returns caps in set of KCapsGetDetectedNetworks
|
|
1904 |
|
|
1905 |
// Check RMobilePhone::GetSignalCaps returns caps in set of KCapsGetSignalStrength
|
|
1906 |
|
|
1907 |
// Remove antenna
|
|
1908 |
|
|
1909 |
|
|
1910 |
//
|
|
1911 |
// SET UP END
|
|
1912 |
//
|
|
1913 |
|
|
1914 |
StartTest();
|
|
1915 |
|
|
1916 |
//
|
|
1917 |
// TEST START
|
|
1918 |
//
|
|
1919 |
|
|
1920 |
|
|
1921 |
// Check RMobilePhone::GetSignalStrength returns aSignalStrength=0
|
|
1922 |
// Check RMobilePhone::GetSignalStrength returns aBar=0
|
|
1923 |
|
|
1924 |
// === Get list of all the detected networks ===
|
|
1925 |
|
|
1926 |
// Use helper class for CRetrieveMobilePhoneDetectedNetworks to retrieve a V5 list of preferred networks
|
|
1927 |
|
|
1928 |
// Check CMobilePhoneNetworkListV5::Enumerate returns number of networks=0
|
|
1929 |
|
|
1930 |
|
|
1931 |
//
|
|
1932 |
// TEST END
|
|
1933 |
//
|
|
1934 |
|
|
1935 |
StartCleanup();
|
|
1936 |
|
|
1937 |
// Put any required test clean up here, then remove this comment
|
|
1938 |
|
|
1939 |
return TestStepResult();
|
|
1940 |
}
|
|
1941 |
|
|
1942 |
TPtrC CCTSYIntegrationTestNetworkControl0011::GetTestStepName()
|
|
1943 |
/**
|
|
1944 |
* @return The test step name.
|
|
1945 |
*/
|
|
1946 |
{
|
|
1947 |
return _L("CCTSYIntegrationTestNetworkControl0011");
|
|
1948 |
}
|
|
1949 |
|
|
1950 |
|
|
1951 |
|
|
1952 |
CCTSYIntegrationTestNetworkControl0012::CCTSYIntegrationTestNetworkControl0012(CEtelSessionMgr& aEtelSessionMgr)
|
|
1953 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
1954 |
/**
|
|
1955 |
* Constructor.
|
|
1956 |
*/
|
|
1957 |
{
|
|
1958 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0012::GetTestStepName());
|
|
1959 |
}
|
|
1960 |
|
|
1961 |
CCTSYIntegrationTestNetworkControl0012::~CCTSYIntegrationTestNetworkControl0012()
|
|
1962 |
/**
|
|
1963 |
* Destructor.
|
|
1964 |
*/
|
|
1965 |
{
|
|
1966 |
}
|
|
1967 |
|
|
1968 |
TVerdict CCTSYIntegrationTestNetworkControl0012::doTestStepL()
|
|
1969 |
/**
|
|
1970 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0012
|
|
1971 |
* @SYMFssID BA/CTSY/NTWC-0012
|
|
1972 |
* @SYMTestCaseDesc Get NITZ information.
|
|
1973 |
* @SYMTestPriority High
|
|
1974 |
* @SYMTestActions RMobilePhone::NotifyNITZInfoChange
|
|
1975 |
* @SYMTestExpectedResults Pass - NITZ infomation is received from network
|
|
1976 |
* @SYMTestType CIT
|
|
1977 |
* @SYMTestCaseDependencies live/automatic
|
|
1978 |
*
|
|
1979 |
* Reason for test: Verify valid NITZ information returned and NITZ notification received.
|
|
1980 |
*
|
|
1981 |
* @return - TVerdict code
|
|
1982 |
*/
|
|
1983 |
{
|
|
1984 |
|
|
1985 |
//
|
|
1986 |
// SET UP
|
|
1987 |
//
|
|
1988 |
|
|
1989 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
1990 |
iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone);
|
|
1991 |
|
|
1992 |
// Ensure that RMobilePhone::GetNetworkCaps returns caps in set of KCapsGetNITZInfo | KCapsNotifyNITZInfo
|
|
1993 |
|
|
1994 |
TUint32 caps;
|
|
1995 |
CHECK_EQUALS_L( phone.GetNetworkCaps( caps ), KErrNone, _L("RMobilePhone::GetNetworkCaps returned error") )
|
|
1996 |
TUint32 wantedCaps = RMobilePhone::KCapsGetNITZInfo | RMobilePhone::KCapsNotifyNITZInfo;
|
|
1997 |
CHECK_BITS_SET_L( caps, wantedCaps, KNoUnwantedBits, _L("RMobilePhone::GetNetworkCaps returned wrong network caps") );
|
|
1998 |
|
|
1999 |
//
|
|
2000 |
// SET UP END
|
|
2001 |
//
|
|
2002 |
|
|
2003 |
StartTest();
|
|
2004 |
|
|
2005 |
//
|
|
2006 |
// TEST START
|
|
2007 |
//
|
|
2008 |
|
|
2009 |
// Wait 2 mins for the network to send NITZ info
|
|
2010 |
User::After(KOneSecond*120);
|
|
2011 |
|
|
2012 |
// === Get the current Network Information and Time Zone (NITZ) from the network. ===
|
|
2013 |
|
|
2014 |
RMobilePhone::TMobilePhoneNITZ nitzInfo;
|
|
2015 |
TInt err = phone.GetNITZInfo( nitzInfo );
|
|
2016 |
|
|
2017 |
// Check KErrNone or KErrNotFound was returned
|
|
2018 |
ASSERT_TRUE((err==KErrNone) || (err==KErrNotFound), _L("RMobilePhone::GetNITZInfo returned error"));
|
|
2019 |
|
|
2020 |
// If the network supplied NITZ info:
|
|
2021 |
// Check RMobilePhone::GetNITZInfo returns aNITZInfo.iDST=1 or aNITZInfo.iDST=2
|
|
2022 |
// Check RMobilePhone::GetNITZInfo returns aNITZInfo.iLongNetworkId with length > 0
|
|
2023 |
// Check RMobilePhone::GetNITZInfo returns aNITZInfo.iShortNetworkId with length > 0
|
|
2024 |
// Check RMobilePhone::GetNITZInfo returns aNITZInfo.iTimeZone >= 0
|
|
2025 |
// Check RMobilePhone::GetNITZInfo returns aNITZInfo.iNitzFieldsUsed contains relevant flags set
|
|
2026 |
// Check RMobilePhone::GetNITZInfo returns aNITZInfo.Year() >= 2007
|
|
2027 |
if (err == KErrNone)
|
|
2028 |
{
|
|
2029 |
ASSERT_TRUE( nitzInfo.iLongNetworkId.Length() > 0,
|
|
2030 |
_L("RMobilePhone::GetNITZInfo returns nitzInfo.iLongNetworkId zero length"))
|
|
2031 |
ASSERT_TRUE( nitzInfo.iShortNetworkId.Length() > 0,
|
|
2032 |
_L("RMobilePhone::GetNITZInfo returns nitzInfo.iShortNetworkId zero length"))
|
|
2033 |
ASSERT_TRUE( nitzInfo.iTimeZone > 0, _L("RMobilePhone::GetNITZInfo returns nitzInfo.iTimeZone zero"))
|
|
2034 |
|
|
2035 |
ASSERT_BITS_SET( nitzInfo.iNitzFieldsUsed,
|
|
2036 |
RMobilePhone::KCapsTimeAvailable |
|
|
2037 |
RMobilePhone::KCapsTimezoneAvailable |
|
|
2038 |
RMobilePhone::KCapsShortNameAvailable |
|
|
2039 |
RMobilePhone::KCapsLongNameAvailable,
|
|
2040 |
KNoUnwantedBits,
|
|
2041 |
_L("RMobilePhone::GetNITZInfo returns nitzInfo.iNitzFieldsUsed invalid"))
|
|
2042 |
|
|
2043 |
DEBUG_PRINTF2(_L("RMobilePhone::GetNITZInfo returns nitzInfo.year=%d"), nitzInfo.Year() );
|
|
2044 |
ASSERT_TRUE( nitzInfo.Year() >= 2007, _L("RMobilePhone::GetNITZInfo returns nitzInfo year pre 2007"));
|
|
2045 |
}
|
|
2046 |
|
|
2047 |
// === Wait for up to 1 minute for next NITZ update ===
|
|
2048 |
TExtEtelRequestStatus reqNotifyNitzInfoChange(phone, EMobilePhoneNotifyNITZInfoChange);
|
|
2049 |
CleanupStack::PushL(reqNotifyNitzInfoChange);
|
|
2050 |
|
|
2051 |
phone.NotifyNITZInfoChange(reqNotifyNitzInfoChange,nitzInfo);
|
|
2052 |
WaitForRequestWithTimeOut(reqNotifyNitzInfoChange, ETimeLong);
|
|
2053 |
|
|
2054 |
// Check NITZ info if network sent it
|
|
2055 |
if (reqNotifyNitzInfoChange.Int() != KErrCancel)
|
|
2056 |
{
|
|
2057 |
ASSERT_EQUALS( reqNotifyNitzInfoChange.Int(), KErrNone, _L("RMobilePhone::NotifyNITZInfoChange returned error"))
|
|
2058 |
|
|
2059 |
// Check RMobilePhone::GetNITZInfo returns aNITZInfo.iDST=1 or aNITZInfo.iDST=2
|
|
2060 |
// Check RMobilePhone::GetNITZInfo returns aNITZInfo.iLongNetworkId with length > 0
|
|
2061 |
// Check RMobilePhone::GetNITZInfo returns aNITZInfo.iShortNetworkId with length > 0
|
|
2062 |
// Check RMobilePhone::GetNITZInfo returns aNITZInfo.iTimeZone >= 0
|
|
2063 |
// Check RMobilePhone::GetNITZInfo returns aNITZInfo.iNitzFieldsUsed contains relevant flags set
|
|
2064 |
// Check RMobilePhone::GetNITZInfo returns aNITZInfo.Year() >= 2007
|
|
2065 |
ASSERT_TRUE( nitzInfo.iLongNetworkId.Length() > 0,
|
|
2066 |
_L("RMobilePhone::GetNITZInfo returns nitzInfo.iLongNetworkId is zero length"))
|
|
2067 |
ASSERT_TRUE( nitzInfo.iShortNetworkId.Length() > 0,
|
|
2068 |
_L("RMobilePhone::GetNITZInfo returns nitzInfo.iShortNetworkId is zero length"))
|
|
2069 |
ASSERT_TRUE( nitzInfo.iTimeZone > 0, _L("NITZ Info iTimeZone is zero"))
|
|
2070 |
|
|
2071 |
ASSERT_BITS_SET( nitzInfo.iNitzFieldsUsed,
|
|
2072 |
RMobilePhone::KCapsTimeAvailable |
|
|
2073 |
RMobilePhone::KCapsTimezoneAvailable |
|
|
2074 |
RMobilePhone::KCapsShortNameAvailable |
|
|
2075 |
RMobilePhone::KCapsLongNameAvailable,
|
|
2076 |
KNoUnwantedBits,
|
|
2077 |
_L("RMobilePhone::GetNITZInfo returns nitzInfo.iNitzFieldsUsed invalid"))
|
|
2078 |
ASSERT_TRUE( nitzInfo.Year() >= 2007, _L("RMobilePhone::GetNITZInfo returns nitzInfo year pre 2007"));
|
|
2079 |
}
|
|
2080 |
|
|
2081 |
//
|
|
2082 |
// TEST END
|
|
2083 |
//
|
|
2084 |
|
|
2085 |
StartCleanup();
|
|
2086 |
|
|
2087 |
//reqNotifyNitzInfoChange
|
|
2088 |
CleanupStack::PopAndDestroy(1,&reqNotifyNitzInfoChange);
|
|
2089 |
|
|
2090 |
return TestStepResult();
|
|
2091 |
}
|
|
2092 |
|
|
2093 |
TPtrC CCTSYIntegrationTestNetworkControl0012::GetTestStepName()
|
|
2094 |
/**
|
|
2095 |
* @return The test step name.
|
|
2096 |
*/
|
|
2097 |
{
|
|
2098 |
return _L("CCTSYIntegrationTestNetworkControl0012");
|
|
2099 |
}
|
|
2100 |
|
|
2101 |
|
|
2102 |
|
|
2103 |
CCTSYIntegrationTestNetworkControl0013::CCTSYIntegrationTestNetworkControl0013(CEtelSessionMgr& aEtelSessionMgr)
|
|
2104 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
2105 |
/**
|
|
2106 |
* Constructor.
|
|
2107 |
*/
|
|
2108 |
{
|
|
2109 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0013::GetTestStepName());
|
|
2110 |
}
|
|
2111 |
|
|
2112 |
CCTSYIntegrationTestNetworkControl0013::~CCTSYIntegrationTestNetworkControl0013()
|
|
2113 |
/**
|
|
2114 |
* Destructor.
|
|
2115 |
*/
|
|
2116 |
{
|
|
2117 |
}
|
|
2118 |
|
|
2119 |
TVerdict CCTSYIntegrationTestNetworkControl0013::doTestStepL()
|
|
2120 |
/**
|
|
2121 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0013
|
|
2122 |
* @SYMFssID BA/CTSY/NTWC-0013
|
|
2123 |
* @SYMTestCaseDesc Move from one cell into another.
|
|
2124 |
* @SYMTestPriority High
|
|
2125 |
* @SYMTestActions RMobilePhone::NotifyCurrentNetworkChange, RMobilePhone::GetCurrentNetwork
|
|
2126 |
* @SYMTestExpectedResults Pass - New network information is received.
|
|
2127 |
* @SYMTestType CIT
|
|
2128 |
* @SYMTestCaseDependencies simulated/manual
|
|
2129 |
*
|
|
2130 |
* Reason for test: Verify current network notification completes and cell ID changes.
|
|
2131 |
*
|
|
2132 |
* @return - TVerdict code
|
|
2133 |
*/
|
|
2134 |
{
|
|
2135 |
|
|
2136 |
//
|
|
2137 |
// SET UP
|
|
2138 |
//
|
|
2139 |
|
|
2140 |
|
|
2141 |
// Ensure phone is camped on a suitable cell.
|
|
2142 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer,KMainPhone);
|
|
2143 |
CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
|
|
2144 |
|
|
2145 |
// Ensure phone has KCapsGetCurrentNetwork and KCapsNotifyCurrentNetwork capabilities.
|
|
2146 |
TUint32 networkCaps=0;
|
|
2147 |
CHECK_EQUALS_L(phone.GetNetworkCaps(networkCaps), KErrNone, _L("RMobilePhone::GetNetworkCaps returned with an error"));
|
|
2148 |
TUint32 expectedCaps= RMobilePhone::KCapsGetCurrentNetwork | RMobilePhone::KCapsNotifyCurrentNetwork;
|
|
2149 |
CHECK_BITS_SET_L(networkCaps, expectedCaps, KNoUnwantedBits, _L("RMobilePhone::GetNetworkCaps returned with wrong caps"));
|
|
2150 |
|
|
2151 |
|
|
2152 |
//
|
|
2153 |
// SET UP END
|
|
2154 |
//
|
|
2155 |
|
|
2156 |
StartTest();
|
|
2157 |
|
|
2158 |
//
|
|
2159 |
// TEST START
|
|
2160 |
//
|
|
2161 |
|
|
2162 |
|
|
2163 |
// === Ensure phone is registered to the network. ===
|
|
2164 |
|
|
2165 |
// Check RMobilePhone::GetNetworkRegistrationStatus returns aStatus=ERegisteredOnHomeNetwork
|
|
2166 |
RMobilePhone::TMobilePhoneRegistrationStatus status;
|
|
2167 |
ASSERT_EQUALS(iNetworkTestHelper.GetNetworkRegistrationStatusL( phone, status), KErrNone, _L("RMobilePhone::GetNetworkRegistrationStatus returned with an error"));
|
|
2168 |
ASSERT_EQUALS(status, RMobilePhone::ERegisteredOnHomeNetwork, _L("RMobilePhone::GetNetworkRegistrationStatus did not return the expected ERegisteredOnHomeNetwork Status"));
|
|
2169 |
|
|
2170 |
// === Get the current network information. ===
|
|
2171 |
|
|
2172 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
2173 |
RMobilePhone::TMobilePhoneNetworkInfoV5 netInfo;
|
|
2174 |
RMobilePhone::TMobilePhoneLocationAreaV1 location;
|
|
2175 |
RMobilePhone::TMobilePhoneLocationAreaV1 previousLocation;
|
|
2176 |
RMobilePhone::TMobilePhoneNetworkInfoV5Pckg netInfoPckg(netInfo);
|
|
2177 |
TExtEtelRequestStatus getCurrentNetworkStatus(phone, EMobilePhoneGetCurrentNetwork);
|
|
2178 |
CleanupStack::PushL(getCurrentNetworkStatus);
|
|
2179 |
phone.GetCurrentNetwork(getCurrentNetworkStatus, netInfoPckg, location);
|
|
2180 |
|
|
2181 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getCurrentNetworkStatus, ETimeMedium),KErrNone, _L("RMobilePhone::GetCurrentNetwork timed out"));
|
|
2182 |
ASSERT_EQUALS(getCurrentNetworkStatus.Int(), KErrNone, _L("RMobilePhone::GetCurrentNetwork returned with an error"));
|
|
2183 |
previousLocation = location;
|
|
2184 |
ASSERT_TRUE(netInfo.iCountryCode.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iCountryCode"));
|
|
2185 |
|
|
2186 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
2187 |
ASSERT_TRUE(netInfo.iDisplayTag.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iDisplayTag"));
|
|
2188 |
|
|
2189 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
2190 |
ASSERT_TRUE(netInfo.iLongName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iLongName "));
|
|
2191 |
|
|
2192 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm or aNetworkInfo.iMode=ENetworkModeWcdma
|
|
2193 |
ASSERT_TRUE ( netInfo.iMode == RMobilePhone::ENetworkModeGsm || netInfo.iMode == RMobilePhone::ENetworkModeWcdma, _L("RMobilePhone::GetCurrentNetwork returns invalid iMode") );
|
|
2194 |
|
|
2195 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
2196 |
ASSERT_TRUE(netInfo.iNetworkId.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iNetworkId"));
|
|
2197 |
|
|
2198 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
2199 |
ASSERT_TRUE(netInfo.iShortName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iShortName"));
|
|
2200 |
|
|
2201 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
2202 |
ASSERT_EQUALS(netInfo.iStatus,RMobilePhone::ENetworkStatusCurrent , _L("RMobilePhone::GetCurrentNetwork returns invalid iStatus"));
|
|
2203 |
|
|
2204 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneLocationAreaV1 returns aArea.iCellId > 0
|
|
2205 |
ASSERT_TRUE((TInt)location.iCellId > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iCellId"));
|
|
2206 |
|
|
2207 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneLocationAreaV1 returns aArea.iLocationAreaCode > 0
|
|
2208 |
ASSERT_TRUE((TInt)location.iLocationAreaCode > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iLocationAreaCode"));
|
|
2209 |
|
|
2210 |
// Post notification for network change
|
|
2211 |
TExtEtelRequestStatus reqNetChangeStatus(phone, EMobilePhoneNotifyCurrentNetworkChange);
|
|
2212 |
CleanupStack::PushL(reqNetChangeStatus);
|
|
2213 |
phone.NotifyCurrentNetworkChange(reqNetChangeStatus, netInfoPckg, location);
|
|
2214 |
|
|
2215 |
// Simulator simulates movement into another cell.
|
|
2216 |
DisplayUserInteractionPromptL(_L("Please simulate movement to another cell"), ETimeLong);
|
|
2217 |
|
|
2218 |
// === Ensure current network change notification complates and cell ID has changed. ===
|
|
2219 |
ASSERT_EQUALS( WaitForRequestWithTimeOut(reqNetChangeStatus, ETimeMedium), KErrNone, _L("RMobilePhone::NotifyCurrentNetworkChange timed out"));
|
|
2220 |
ASSERT_EQUALS( reqNetChangeStatus.Int(), KErrNone, _L("RMobilePhone::NotifyCurrentNetworkChange returned with an error"));
|
|
2221 |
|
|
2222 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
2223 |
ASSERT_TRUE(netInfo.iCountryCode.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iCountryCode"));
|
|
2224 |
|
|
2225 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
2226 |
ASSERT_TRUE(netInfo.iDisplayTag.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iDisplayTag"));
|
|
2227 |
|
|
2228 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
2229 |
ASSERT_TRUE(netInfo.iLongName.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iLongNamelength"));
|
|
2230 |
|
|
2231 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm or aNetworkInfo.iMode=ENetworkModeWcdma
|
|
2232 |
ASSERT_TRUE ( netInfo.iMode == RMobilePhone::ENetworkModeGsm || netInfo.iMode == RMobilePhone::ENetworkModeWcdma, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iMode") );
|
|
2233 |
|
|
2234 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
2235 |
ASSERT_TRUE(netInfo.iNetworkId.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iNetworkId"));
|
|
2236 |
|
|
2237 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
2238 |
ASSERT_TRUE(netInfo.iShortName.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iShortNamelength"));
|
|
2239 |
|
|
2240 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
2241 |
ASSERT_EQUALS(netInfo.iStatus, RMobilePhone::ENetworkStatusCurrent, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iStatus"));
|
|
2242 |
|
|
2243 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneLocationAreaV1 returns aArea.iCellId > 0 and aArea.iCellId != previous aArea.iCellId from RMobilePhone::GetCurrentNetwork
|
|
2244 |
ASSERT_TRUE(location.iCellId > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iCellId"));
|
|
2245 |
ASSERT_TRUE(location.iCellId != previousLocation.iCellId, _L("RMobilePhone::NotifyCurrentNetworkChange returns same iCellId as before movement to another cell"));
|
|
2246 |
|
|
2247 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneLocationAreaV1 returns aArea.iLocationAreaCode > 0
|
|
2248 |
ASSERT_TRUE(location.iLocationAreaCode > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iLocationAreaCode"));
|
|
2249 |
|
|
2250 |
// === Get the current network information. ===
|
|
2251 |
phone.GetCurrentNetwork(getCurrentNetworkStatus, netInfoPckg, location);
|
|
2252 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getCurrentNetworkStatus, ETimeLong), KErrNone, _L("RMobilePhone::GetCurrentNetwork timed out"));
|
|
2253 |
ASSERT_EQUALS(getCurrentNetworkStatus.Int(), KErrNone, _L("RMobilePhone::GetCurrentNetwork returned an error"));
|
|
2254 |
|
|
2255 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
2256 |
ASSERT_TRUE(netInfo.iCountryCode.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iCountryCode"));
|
|
2257 |
|
|
2258 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
2259 |
ASSERT_TRUE(netInfo.iDisplayTag.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iDisplayTag"));
|
|
2260 |
|
|
2261 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
2262 |
ASSERT_TRUE(netInfo.iLongName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iLongNamelength"));
|
|
2263 |
|
|
2264 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm or aNetworkInfo.iMode=ENetworkModeWcdma
|
|
2265 |
ASSERT_TRUE ( netInfo.iMode == RMobilePhone::ENetworkModeGsm || netInfo.iMode == RMobilePhone::ENetworkModeWcdma, _L("RMobilePhone::GetCurrentNetwork returns invalid iMode") );
|
|
2266 |
|
|
2267 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
2268 |
ASSERT_TRUE(netInfo.iNetworkId.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iNetworkId"));
|
|
2269 |
|
|
2270 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
2271 |
ASSERT_TRUE(netInfo.iShortName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iShortNamelength"));
|
|
2272 |
|
|
2273 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
2274 |
ASSERT_EQUALS(netInfo.iStatus, RMobilePhone::ENetworkStatusCurrent, _L("RMobilePhone::GetCurrentNetwork returns invalid iStatus"));
|
|
2275 |
|
|
2276 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneLocationAreaV1 returns aArea.iCellId > 0 and aArea.iCellId != previous aArea.iCellId from RMobilePhone::GetCurrentNetwork
|
|
2277 |
ASSERT_TRUE((TInt)location.iCellId > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iCellId"));
|
|
2278 |
ASSERT_TRUE(location.iCellId != previousLocation.iCellId, _L("RMobilePhone::GetCurrentNetwork returns same iCellId as before movement to another cell"));
|
|
2279 |
|
|
2280 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneLocationAreaV1 returns aArea.iLocationAreaCode > 0
|
|
2281 |
ASSERT_TRUE((TInt)location.iLocationAreaCode > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iLocationAreaCode"));
|
|
2282 |
|
|
2283 |
|
|
2284 |
//
|
|
2285 |
// TEST END
|
|
2286 |
//
|
|
2287 |
|
|
2288 |
StartCleanup();
|
|
2289 |
|
|
2290 |
// Pop
|
|
2291 |
// getCurrentNetworkStatus
|
|
2292 |
// reqNetChangeStatus
|
|
2293 |
CleanupStack::PopAndDestroy(2, &getCurrentNetworkStatus);
|
|
2294 |
|
|
2295 |
return TestStepResult();
|
|
2296 |
}
|
|
2297 |
|
|
2298 |
TPtrC CCTSYIntegrationTestNetworkControl0013::GetTestStepName()
|
|
2299 |
/**
|
|
2300 |
* @return The test step name.
|
|
2301 |
*/
|
|
2302 |
{
|
|
2303 |
return _L("CCTSYIntegrationTestNetworkControl0013");
|
|
2304 |
}
|
|
2305 |
|
|
2306 |
|
|
2307 |
|
|
2308 |
CCTSYIntegrationTestNetworkControl0014::CCTSYIntegrationTestNetworkControl0014(CEtelSessionMgr& aEtelSessionMgr)
|
|
2309 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
2310 |
/**
|
|
2311 |
* Constructor.
|
|
2312 |
*/
|
|
2313 |
{
|
|
2314 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0014::GetTestStepName());
|
|
2315 |
}
|
|
2316 |
|
|
2317 |
CCTSYIntegrationTestNetworkControl0014::~CCTSYIntegrationTestNetworkControl0014()
|
|
2318 |
/**
|
|
2319 |
* Destructor.
|
|
2320 |
*/
|
|
2321 |
{
|
|
2322 |
}
|
|
2323 |
|
|
2324 |
TVerdict CCTSYIntegrationTestNetworkControl0014::doTestStepL()
|
|
2325 |
/**
|
|
2326 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0014
|
|
2327 |
* @SYMFssID BA/CTSY/NTWC-0014
|
|
2328 |
* @SYMTestCaseDesc Move from an area with no service into a cell with service.
|
|
2329 |
* @SYMTestPriority High
|
|
2330 |
* @SYMTestActions RMobilePhone::NotifyNetworkRegistrationStatusChange, RMobilePhone::NotifyCurrentNetworkChange, RMobilePhone::GetCurrentNetwork
|
|
2331 |
* @SYMTestExpectedResults Pass - Device is registered on network. Network information is retrieved.
|
|
2332 |
* @SYMTestType CIT
|
|
2333 |
* @SYMTestCaseDependencies simulated/manual
|
|
2334 |
*
|
|
2335 |
* Reason for test: Verify current network information and registration status is correct.
|
|
2336 |
*
|
|
2337 |
* @return - TVerdict code
|
|
2338 |
*/
|
|
2339 |
{
|
|
2340 |
|
|
2341 |
//
|
|
2342 |
// SET UP
|
|
2343 |
//
|
|
2344 |
|
|
2345 |
ERR_PRINTF2(_L("<font color=Orange>$CTSYProblem: defect id = %d</font>"), 10077);
|
|
2346 |
User::Leave(KErrNone);
|
|
2347 |
|
|
2348 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
2349 |
|
|
2350 |
// === Ensure the phone is not registered to a network. ===
|
|
2351 |
|
|
2352 |
// Check RMobilePhone::GetNetworkRegistrationStatus returns ENotRegisteredNoService
|
|
2353 |
RMobilePhone::TMobilePhoneRegistrationStatus regStatus;
|
|
2354 |
CHECK_EQUALS_L(iNetworkTestHelper.GetNetworkRegistrationStatusL(phone, regStatus), KErrNone, _L("RMobilePhone::GetNetworkRegistrationStatus returned with an error"));
|
|
2355 |
CHECK_EQUALS_L(regStatus, RMobilePhone::ENotRegisteredNoService, _L("RMobilePhone::GetNetworkRegistrationStatus did not return the expected ENotRegisteredNoService Status"));
|
|
2356 |
|
|
2357 |
// Ensure that RMobilePhone::GetNetworkCaps returns caps in set of KCapsGetRegistrationstatus | KCapsGetCurrentNetwork | KCapsNotifyRegistrationStatus capabilities.
|
|
2358 |
TUint32 caps;
|
|
2359 |
CHECK_EQUALS_L(phone.GetNetworkCaps( caps ), KErrNone, _L("RMobilePhone::GetNetworkCaps returned error") )
|
|
2360 |
TUint32 wantedCaps = RMobilePhone::KCapsNotifyRegistrationStatus | RMobilePhone::KCapsGetCurrentNetwork | RMobilePhone::KCapsNotifyRegistrationStatus;
|
|
2361 |
CHECK_BITS_SET_L(caps, wantedCaps, KNoUnwantedBits, _L("RMobilePhone::GetNetworkCaps returned wrong network caps") );
|
|
2362 |
|
|
2363 |
//
|
|
2364 |
// SET UP END
|
|
2365 |
//
|
|
2366 |
|
|
2367 |
StartTest();
|
|
2368 |
|
|
2369 |
//
|
|
2370 |
// TEST START
|
|
2371 |
//
|
|
2372 |
|
|
2373 |
// === Get network registration status and verify it is as expected. ===
|
|
2374 |
|
|
2375 |
// Check RMobilePhone::GetNetworkRegistrationStatus returns aStatus=ENotRegisteredNoService
|
|
2376 |
ASSERT_EQUALS(iNetworkTestHelper.GetNetworkRegistrationStatusL(phone, regStatus), KErrNone, _L("RMobilePhone::GetNetworkRegistrationStatus returned with an error"));
|
|
2377 |
ASSERT_EQUALS(regStatus, RMobilePhone::ENotRegisteredNoService, _L("RMobilePhone::GetNetworkRegistrationStatus did not return the expected ENotRegisteredNoService Status"));
|
|
2378 |
|
|
2379 |
//Push notify for NotifyCurrentNetworkChange
|
|
2380 |
TExtEtelRequestStatus regNetChangeStatus(phone, EMobilePhoneNotifyCurrentNetworkChange);
|
|
2381 |
CleanupStack::PushL(regNetChangeStatus);
|
|
2382 |
RMobilePhone::TMobilePhoneNetworkInfoV5 netInfo;
|
|
2383 |
TPckg<RMobilePhone::TMobilePhoneNetworkInfoV5> netInfoPkg(netInfo);
|
|
2384 |
RMobilePhone::TMobilePhoneLocationAreaV1 area;
|
|
2385 |
phone.NotifyCurrentNetworkChange(regNetChangeStatus, netInfoPkg, area);
|
|
2386 |
|
|
2387 |
//Push notify for NotifyNetworkRegistrationStatusChange
|
|
2388 |
RMobilePhone::TMobilePhoneRegistrationStatus status;
|
|
2389 |
TExtEtelRequestStatus networkRegStChange(phone, EMobilePhoneNotifyNetworkRegistrationStatusChange);
|
|
2390 |
CleanupStack::PushL(networkRegStChange);
|
|
2391 |
phone.NotifyNetworkRegistrationStatusChange(networkRegStChange, status);
|
|
2392 |
|
|
2393 |
// Simulator simulates movement a cell with coverage.
|
|
2394 |
DisplayUserInteractionPromptL(_L("Please move to a cell with coverage"), ETimeLong);
|
|
2395 |
|
|
2396 |
// === Ensure network registration changes ===
|
|
2397 |
|
|
2398 |
// Check RMobilePhone::NotifyNetworkRegistrationStatusChange completes with ERegisteredOnHomeNetwork
|
|
2399 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(networkRegStChange, ETimeLong), KErrNone, _L("RMobilePhone::NotifyNetworkRegistrationStatusChange timed out"));
|
|
2400 |
ASSERT_EQUALS(networkRegStChange.Int(), KErrNone, _L("RMobilePhone::NotifyNetworkRegistrationStatusChange returned with an error"));
|
|
2401 |
ASSERT_EQUALS(status, RMobilePhone::ERegisteredOnHomeNetwork, _L("RMobilePhone::NotifyNetworkRegistrationStatusChange did not complete with status = ERegisteredOnHomeNetwork"));
|
|
2402 |
|
|
2403 |
// Check RMobilePhone::GetNetworkRegistrationStatus returns aStatus=ERegisteredOnHomeNetwork
|
|
2404 |
ASSERT_EQUALS(iNetworkTestHelper.GetNetworkRegistrationStatusL(phone,regStatus),KErrNone, _L("RMobilePhone::GetNetworkRegistrationStatus returned with an error"));
|
|
2405 |
ASSERT_EQUALS(regStatus, RMobilePhone::ERegisteredOnHomeNetwork, _L("RMobilePhone::GetRegistrationStatus did not return expected status"));
|
|
2406 |
|
|
2407 |
// === Ensure network information notification received ===
|
|
2408 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(regNetChangeStatus, ETimeMedium), KErrNone, _L("RMobilePhone::NotifyCurrentNetworkChange timed out"));
|
|
2409 |
ASSERT_EQUALS(regNetChangeStatus.Int(), KErrNone, _L("RMobilePhone::NotifyCurrentNetworkChange returned an error"));
|
|
2410 |
|
|
2411 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
2412 |
ASSERT_TRUE(netInfo.iCountryCode.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns iCountryCode length 0") );
|
|
2413 |
|
|
2414 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
2415 |
ASSERT_TRUE(netInfo.iDisplayTag.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns iDisplayTag length 0"));
|
|
2416 |
|
|
2417 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
2418 |
ASSERT_TRUE(netInfo.iLongName.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns iLongName length 0"));
|
|
2419 |
|
|
2420 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm
|
|
2421 |
ASSERT_EQUALS(netInfo.iMode, RMobilePhone::ENetworkModeGsm, _L("RMobilePhone::NotifyCurrentNetworkChange did not return aNetworkInfo.iMode=ENetworkModeGsm"));
|
|
2422 |
|
|
2423 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
2424 |
ASSERT_TRUE(netInfo.iNetworkId.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns iNetworkId length 0"));
|
|
2425 |
|
|
2426 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
2427 |
ASSERT_TRUE(netInfo.iShortName.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns iShortName 0 "));
|
|
2428 |
|
|
2429 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
2430 |
ASSERT_EQUALS(netInfo.iStatus, RMobilePhone::ENetworkStatusCurrent, _L("RMobilePhone::NotifyCurrentNetworkChange did not return aNetworkInfo.iStatus=ENetworkStatusCurrent"));
|
|
2431 |
|
|
2432 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aArea.iCellId > 0
|
|
2433 |
ASSERT_TRUE(area.iCellId > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns Location cell ID 0"));
|
|
2434 |
|
|
2435 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aArea.iLocationAreaCode > 0
|
|
2436 |
ASSERT_TRUE(area.iLocationAreaCode > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns Location AreaCode ID 0"));
|
|
2437 |
|
|
2438 |
// === Get current network ===
|
|
2439 |
TExtEtelRequestStatus getCurrentNetworkStatus(phone, EMobilePhoneGetCurrentNetwork);
|
|
2440 |
CleanupStack::PushL(getCurrentNetworkStatus);
|
|
2441 |
phone.GetCurrentNetwork(getCurrentNetworkStatus, netInfoPkg, area);
|
|
2442 |
|
|
2443 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getCurrentNetworkStatus, ETimeLong), KErrNone, _L("RMobilePhone::GetCurrentNetwork timed out"));
|
|
2444 |
ASSERT_EQUALS(getCurrentNetworkStatus.Int(), KErrNone, _L("RMobilePhone::GetCurrentNetwork returned an error"));
|
|
2445 |
|
|
2446 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
2447 |
ASSERT_TRUE(netInfo.iCountryCode.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iCountryCode"));
|
|
2448 |
|
|
2449 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
2450 |
ASSERT_TRUE(netInfo.iDisplayTag.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid Display Tag"));
|
|
2451 |
|
|
2452 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
2453 |
ASSERT_TRUE(netInfo.iLongName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iLongName"));
|
|
2454 |
|
|
2455 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm
|
|
2456 |
ASSERT_EQUALS(netInfo.iMode, RMobilePhone::ENetworkModeGsm, _L("RMobilePhone::GetCurrentNetwork did not return ENetworkModeGsm as expected"));
|
|
2457 |
|
|
2458 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
2459 |
ASSERT_TRUE(netInfo.iNetworkId.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iNetworkId"));
|
|
2460 |
|
|
2461 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
2462 |
ASSERT_TRUE(netInfo.iShortName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iShortName"));
|
|
2463 |
|
|
2464 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
2465 |
ASSERT_EQUALS(netInfo.iStatus, RMobilePhone::ENetworkStatusCurrent , _L("RMobilePhone::GetCurrentNetwork did not return ENetworkStatusCurrent status as expected "));
|
|
2466 |
|
|
2467 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aArea.iCellId > 0
|
|
2468 |
ASSERT_TRUE(area.iCellId > 0, _L("RMobilePhone::GetCurrentNetwork returned invalid iCellId"));
|
|
2469 |
|
|
2470 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aArea.iLocationAreaCode > 0
|
|
2471 |
ASSERT_TRUE(area.iLocationAreaCode > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iLocationAreaCode"));
|
|
2472 |
|
|
2473 |
//
|
|
2474 |
// TEST END
|
|
2475 |
//
|
|
2476 |
|
|
2477 |
StartCleanup();
|
|
2478 |
|
|
2479 |
//regNetChangeStatus
|
|
2480 |
//networkRegStChange
|
|
2481 |
//getCurrentNetworkStatus
|
|
2482 |
CleanupStack::PopAndDestroy(3, ®NetChangeStatus);
|
|
2483 |
|
|
2484 |
return TestStepResult();
|
|
2485 |
}
|
|
2486 |
|
|
2487 |
TPtrC CCTSYIntegrationTestNetworkControl0014::GetTestStepName()
|
|
2488 |
/**
|
|
2489 |
* @return The test step name.
|
|
2490 |
*/
|
|
2491 |
{
|
|
2492 |
return _L("CCTSYIntegrationTestNetworkControl0014");
|
|
2493 |
}
|
|
2494 |
|
|
2495 |
|
|
2496 |
|
|
2497 |
CCTSYIntegrationTestNetworkControl0015::CCTSYIntegrationTestNetworkControl0015(CEtelSessionMgr& aEtelSessionMgr)
|
|
2498 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
2499 |
/**
|
|
2500 |
* Constructor.
|
|
2501 |
*/
|
|
2502 |
{
|
|
2503 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0015::GetTestStepName());
|
|
2504 |
}
|
|
2505 |
|
|
2506 |
CCTSYIntegrationTestNetworkControl0015::~CCTSYIntegrationTestNetworkControl0015()
|
|
2507 |
/**
|
|
2508 |
* Destructor.
|
|
2509 |
*/
|
|
2510 |
{
|
|
2511 |
}
|
|
2512 |
|
|
2513 |
TVerdict CCTSYIntegrationTestNetworkControl0015::doTestStepL()
|
|
2514 |
/**
|
|
2515 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0015
|
|
2516 |
* @SYMFssID BA/CTSY/NTWC-0015
|
|
2517 |
* @SYMTestCaseDesc Cell selection after emergency camping.
|
|
2518 |
* @SYMTestPriority High
|
|
2519 |
* @SYMTestActions RMobilePhone::GetCurrentNetwork, RMobilePhone::NotifyNetworkRegistrationStatusChange, RMobilePhone::NotifyCurrentNetworkChange
|
|
2520 |
* @SYMTestExpectedResults Pass - Phone re-registers successfully to the new cell when moving out of a cell with emergency coverage to one with full coverage.
|
|
2521 |
* @SYMTestType CIT
|
|
2522 |
* @SYMTestCaseDependencies simulated/manual
|
|
2523 |
*
|
|
2524 |
* Reason for test: Verify network registration status and current network information are correct.
|
|
2525 |
*
|
|
2526 |
* @return - TVerdict code
|
|
2527 |
*/
|
|
2528 |
{
|
|
2529 |
|
|
2530 |
//
|
|
2531 |
// SET UP
|
|
2532 |
//
|
|
2533 |
|
|
2534 |
ERR_PRINTF2(_L("<font color=Orange>$CTSYProblem: defect id = %d</font>"), 10078);
|
|
2535 |
User::Leave(KErrNone);
|
|
2536 |
|
|
2537 |
|
|
2538 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
2539 |
|
|
2540 |
// Ensure that RMobilePhone::GetNetworkCaps returns caps in set of KCapsGetRegistrationStatus | KCapsGetCurrentNetwork | KCapsNotifyRegistrationStatus capabilities.
|
|
2541 |
TUint32 caps;
|
|
2542 |
CHECK_EQUALS_L(phone.GetNetworkCaps( caps ), KErrNone, _L("RMobilePhone::GetNetworkCaps returned an error"));
|
|
2543 |
TUint32 wantedCaps = RMobilePhone::KCapsGetRegistrationStatus | RMobilePhone::KCapsGetCurrentNetwork | RMobilePhone::KCapsNotifyRegistrationStatus;
|
|
2544 |
CHECK_BITS_SET_L(caps, wantedCaps, KNoUnwantedBits, _L("RMobilePhone::GetNetworkCaps returned wrong caps"));
|
|
2545 |
|
|
2546 |
// SImulator is simulating cell with emergency coverage only.
|
|
2547 |
DisplayUserInteractionPromptL(_L("Please ensure cell is set for emergency calls only"), ETimeLong);
|
|
2548 |
|
|
2549 |
//
|
|
2550 |
// SET UP END
|
|
2551 |
//
|
|
2552 |
|
|
2553 |
StartTest();
|
|
2554 |
|
|
2555 |
//
|
|
2556 |
// TEST START
|
|
2557 |
//
|
|
2558 |
|
|
2559 |
|
|
2560 |
// === Get registration status ===
|
|
2561 |
|
|
2562 |
// Check RMobilePhone::GetNetworkRegistrationStatus returns aStatus=ENotRegisteredEmergencyOnly
|
|
2563 |
|
|
2564 |
|
|
2565 |
RMobilePhone::TMobilePhoneRegistrationStatus regStatus;
|
|
2566 |
ASSERT_EQUALS(iNetworkTestHelper.GetNetworkRegistrationStatusL(phone,regStatus),KErrNone,
|
|
2567 |
_L("RMobilePhone::GetNetworkRegistrationStatus returned with an error"));
|
|
2568 |
ASSERT_EQUALS(regStatus, RMobilePhone::ENotRegisteredEmergencyOnly,
|
|
2569 |
_L("RMobilePhone::GetNetworkRegistrationStatus did not return expected status"));
|
|
2570 |
|
|
2571 |
//Push notify for NotifyNetworkRegistrationStatusChange
|
|
2572 |
RMobilePhone::TMobilePhoneRegistrationStatus status;
|
|
2573 |
TExtEtelRequestStatus networkRegStChange(phone, EMobilePhoneNotifyNetworkRegistrationStatusChange);
|
|
2574 |
CleanupStack::PushL(networkRegStChange);
|
|
2575 |
phone.NotifyNetworkRegistrationStatusChange(networkRegStChange, status);
|
|
2576 |
|
|
2577 |
RMobilePhone::TMobilePhoneNetworkInfoV5 netInfo;
|
|
2578 |
TPckg<RMobilePhone::TMobilePhoneNetworkInfoV5> netInfoPkg(netInfo);
|
|
2579 |
RMobilePhone::TMobilePhoneLocationAreaV1 area;
|
|
2580 |
|
|
2581 |
//Push notify for NotifyCurrentNetworkChange
|
|
2582 |
TExtEtelRequestStatus regNetChangeStatus(phone, EMobilePhoneNotifyCurrentNetworkChange);
|
|
2583 |
CleanupStack::PushL(regNetChangeStatus);
|
|
2584 |
phone.NotifyCurrentNetworkChange( regNetChangeStatus, netInfoPkg, area );
|
|
2585 |
|
|
2586 |
// Simulate moving into a new cell with full coverage.
|
|
2587 |
DisplayUserInteractionPromptL(_L("Simulate moving into a cell with full coverage"), ETimeLong);
|
|
2588 |
|
|
2589 |
// === Check registration status notification completes ===
|
|
2590 |
|
|
2591 |
// Check RMobilePhone::NotifyNetworkRegistrationStatusChange completes with aStatus=ERegisteredOnHomeNetwork
|
|
2592 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(networkRegStChange, ETimeMedium), KErrNone, _L("RMobilePhone::NotifyNetworkRegistrationStatusChange timed out"));
|
|
2593 |
ASSERT_EQUALS(networkRegStChange.Int(), KErrNone, _L("RMobilePhone::NotifyNetworkRegistrationStatusChange returned with an error"));
|
|
2594 |
ASSERT_EQUALS(status, RMobilePhone::ERegisteredOnHomeNetwork, _L("RMobilePhone::NotifyNetworkRegistrationStatusChange did not complete with status = ERegisteredOnHomeNetwork"));
|
|
2595 |
|
|
2596 |
// Check RMobilePhone::GetNetworkRegistrationStatus returns with ERegisteredOnHomeNetwork
|
|
2597 |
ASSERT_EQUALS(iNetworkTestHelper.GetNetworkRegistrationStatusL(phone,regStatus),KErrNone,
|
|
2598 |
_L("RMobilePhone::GetNetworkRegistrationStatus returned with an error"));
|
|
2599 |
ASSERT_EQUALS(regStatus, RMobilePhone::ERegisteredOnHomeNetwork,
|
|
2600 |
_L("RMobilePhone::GetRegistrationStatus did not return expected status"));
|
|
2601 |
|
|
2602 |
// === Get current network ===
|
|
2603 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(regNetChangeStatus, ETimeMedium), KErrNone,
|
|
2604 |
_L("RMobilePhone::NotifyCurrentNetworkChange timed out"));
|
|
2605 |
ASSERT_EQUALS(regNetChangeStatus.Int(), KErrNone,
|
|
2606 |
_L("RMobilePhone::NotifyCurrentNetworkChange returned an error"));
|
|
2607 |
|
|
2608 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
2609 |
ASSERT_TRUE(netInfo.iCountryCode.Length() > 0,
|
|
2610 |
_L("RMobilePhone::NotifyCurrentNetworkChange returns iCountryCode length 0") );
|
|
2611 |
|
|
2612 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
2613 |
ASSERT_TRUE(netInfo.iDisplayTag.Length() > 0,
|
|
2614 |
_L("RMobilePhone::NotifyCurrentNetworkChange returns iDisplayTag length 0"));
|
|
2615 |
|
|
2616 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
2617 |
ASSERT_TRUE(netInfo.iLongName.Length() > 0,
|
|
2618 |
_L("RMobilePhone::NotifyCurrentNetworkChange returns iLongName length 0"));
|
|
2619 |
|
|
2620 |
//Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm or aNetworkInfo.iMode=ENetworkModeWcdma
|
|
2621 |
ASSERT_TRUE ( netInfo.iMode == RMobilePhone::ENetworkModeGsm || netInfo.iMode == RMobilePhone::ENetworkModeWcdma, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iMode") );
|
|
2622 |
|
|
2623 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
2624 |
ASSERT_TRUE(netInfo.iNetworkId.Length() > 0,
|
|
2625 |
_L("RMobilePhone::NotifyCurrentNetworkChange returns iNetworkId length 0"));
|
|
2626 |
|
|
2627 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
2628 |
ASSERT_TRUE(netInfo.iShortName.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns iShortName 0 "));
|
|
2629 |
|
|
2630 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
2631 |
ASSERT_EQUALS(netInfo.iStatus, RMobilePhone::ENetworkStatusCurrent, _L("RMobilePhone::NotifyCurrentNetworkChange did not return aNetworkInfo.iStatus=ENetworkStatusCurrent"));
|
|
2632 |
|
|
2633 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aArea.iCellId > 0
|
|
2634 |
ASSERT_TRUE(area.iCellId > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns Location cell ID 0"));
|
|
2635 |
|
|
2636 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aArea.iLocationAreaCode > 0
|
|
2637 |
ASSERT_TRUE(area.iLocationAreaCode > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns Location AreaCode ID 0"));
|
|
2638 |
|
|
2639 |
|
|
2640 |
TExtEtelRequestStatus getCurrentNetworkStatus(phone, EMobilePhoneGetCurrentNetwork);
|
|
2641 |
CleanupStack::PushL(getCurrentNetworkStatus);
|
|
2642 |
phone.GetCurrentNetwork( getCurrentNetworkStatus, netInfoPkg, area );
|
|
2643 |
|
|
2644 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getCurrentNetworkStatus, ETimeLong), KErrNone,
|
|
2645 |
_L("RMobilePhone::GetCurrentNetwork timed out") );
|
|
2646 |
ASSERT_EQUALS(getCurrentNetworkStatus.Int(), KErrNone, _L("RMobilePhone::GetCurrentNetwork returned an error"));
|
|
2647 |
|
|
2648 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
2649 |
ASSERT_TRUE(netInfo.iCountryCode.Length()>0, _L("RMobilePhone::GetCurrentNetwork returns iCountryCode length 0"));
|
|
2650 |
|
|
2651 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
2652 |
ASSERT_TRUE(netInfo.iDisplayTag.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns iDisplayTag length 0"));
|
|
2653 |
|
|
2654 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
2655 |
ASSERT_TRUE(netInfo.iLongName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns iLongName length 0"));
|
|
2656 |
|
|
2657 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm or aNetworkInfo.iMode=ENetworkModeWcdma
|
|
2658 |
ASSERT_TRUE ( netInfo.iMode == RMobilePhone::ENetworkModeGsm || netInfo.iMode == RMobilePhone::ENetworkModeWcdma, _L("RMobilePhone::GetCurrentNetwork returns invalid iMode") );
|
|
2659 |
|
|
2660 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
2661 |
ASSERT_TRUE(netInfo.iNetworkId.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns iNetworkId length 0"));
|
|
2662 |
|
|
2663 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
2664 |
ASSERT_TRUE(netInfo.iShortName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns iShortName length 0"));
|
|
2665 |
|
|
2666 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
2667 |
ASSERT_EQUALS(netInfo.iStatus, RMobilePhone::ENetworkStatusCurrent, _L("RMobilePhone::GetCurrentNetwork did not return aNetworkInfo.iStatus=ENetworkStatusCurrent"));
|
|
2668 |
|
|
2669 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aArea.iCellId > 0
|
|
2670 |
ASSERT_TRUE(area.iCellId > 0, _L("RMobilePhone::GetCurrentNetwork returns Location cell ID 0"));
|
|
2671 |
|
|
2672 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aArea.iLocationAreaCode > 0
|
|
2673 |
ASSERT_TRUE(area.iLocationAreaCode > 0, _L("RMobilePhone::GetCurrentNetwork returns Location AreaCode ID 0"));
|
|
2674 |
|
|
2675 |
|
|
2676 |
//
|
|
2677 |
// TEST END
|
|
2678 |
//
|
|
2679 |
|
|
2680 |
StartCleanup();
|
|
2681 |
|
|
2682 |
//Pop
|
|
2683 |
//networkRegStChange
|
|
2684 |
//regNetChangeStatus
|
|
2685 |
//getCurrentNetworkStatus
|
|
2686 |
CleanupStack::PopAndDestroy(3,&networkRegStChange);
|
|
2687 |
|
|
2688 |
return TestStepResult();
|
|
2689 |
}
|
|
2690 |
|
|
2691 |
TPtrC CCTSYIntegrationTestNetworkControl0015::GetTestStepName()
|
|
2692 |
/**
|
|
2693 |
* @return The test step name.
|
|
2694 |
*/
|
|
2695 |
{
|
|
2696 |
return _L("CCTSYIntegrationTestNetworkControl0015");
|
|
2697 |
}
|
|
2698 |
|
|
2699 |
|
|
2700 |
|
|
2701 |
CCTSYIntegrationTestNetworkControl0016::CCTSYIntegrationTestNetworkControl0016(CEtelSessionMgr& aEtelSessionMgr)
|
|
2702 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
2703 |
/**
|
|
2704 |
* Constructor.
|
|
2705 |
*/
|
|
2706 |
{
|
|
2707 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0016::GetTestStepName());
|
|
2708 |
}
|
|
2709 |
|
|
2710 |
CCTSYIntegrationTestNetworkControl0016::~CCTSYIntegrationTestNetworkControl0016()
|
|
2711 |
/**
|
|
2712 |
* Destructor.
|
|
2713 |
*/
|
|
2714 |
{
|
|
2715 |
}
|
|
2716 |
|
|
2717 |
TVerdict CCTSYIntegrationTestNetworkControl0016::doTestStepL()
|
|
2718 |
/**
|
|
2719 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0016
|
|
2720 |
* @SYMFssID BA/CTSY/NTWC-0016
|
|
2721 |
* @SYMTestCaseDesc Get network capabilities.
|
|
2722 |
* @SYMTestPriority High
|
|
2723 |
* @SYMTestActions
|
|
2724 |
* @SYMTestExpectedResults Pass - Network caps returned.
|
|
2725 |
* @SYMTestType CIT
|
|
2726 |
* @SYMTestCaseDependencies live/automatic
|
|
2727 |
*
|
|
2728 |
* Reason for test: Verify network capabilities returned are correct.
|
|
2729 |
*
|
|
2730 |
* @return - TVerdict code
|
|
2731 |
*/
|
|
2732 |
{
|
|
2733 |
|
|
2734 |
//
|
|
2735 |
// SET UP
|
|
2736 |
//
|
|
2737 |
|
|
2738 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
2739 |
|
|
2740 |
//
|
|
2741 |
// SET UP END
|
|
2742 |
//
|
|
2743 |
|
|
2744 |
StartTest();
|
|
2745 |
|
|
2746 |
//
|
|
2747 |
// TEST START
|
|
2748 |
//
|
|
2749 |
|
|
2750 |
// Check RMobilePhone::GetNetworkCaps returns caps of RMobilePhone::KCapsGetRegistrationStatus
|
|
2751 |
// | RMobilePhone::KCapsNotifyRegistrationStatus
|
|
2752 |
// | RMobilePhone::KCapsGetCurrentMode
|
|
2753 |
// | RMobilePhone::KCapsNotifyMode
|
|
2754 |
// | RMobilePhone::KCapsGetCurrentNetwork
|
|
2755 |
// | RMobilePhone::KCapsNotifyCurrentNetwork
|
|
2756 |
// | RMobilePhone::KCapsGetHomeNetwork
|
|
2757 |
// | RMobilePhone::KCapsGetDetectedNetworks
|
|
2758 |
// | RMobilePhone::KCapsManualNetworkSelection
|
|
2759 |
// | RMobilePhone::KCapsNotifyNITZInfo
|
|
2760 |
// | RMobilePhone::KCapsGetNITZInfo
|
|
2761 |
|
|
2762 |
TUint32 caps;
|
|
2763 |
ASSERT_EQUALS( phone.GetNetworkCaps( caps ), KErrNone, _L("RMobilePhone::GetNetworkCaps returned error") )
|
|
2764 |
TUint32 wantedCaps = RMobilePhone::KCapsGetRegistrationStatus
|
|
2765 |
| RMobilePhone::KCapsNotifyRegistrationStatus
|
|
2766 |
| RMobilePhone::KCapsGetCurrentMode
|
|
2767 |
| RMobilePhone::KCapsNotifyMode
|
|
2768 |
| RMobilePhone::KCapsGetCurrentNetwork
|
|
2769 |
| RMobilePhone::KCapsNotifyCurrentNetwork
|
|
2770 |
| RMobilePhone::KCapsGetHomeNetwork
|
|
2771 |
| RMobilePhone::KCapsGetDetectedNetworks
|
|
2772 |
| RMobilePhone::KCapsManualNetworkSelection
|
|
2773 |
| RMobilePhone::KCapsNotifyNITZInfo
|
|
2774 |
| RMobilePhone::KCapsGetNITZInfo;
|
|
2775 |
|
|
2776 |
ASSERT_BITS_SET( caps, wantedCaps, KNoUnwantedBits, _L("RMobilePhone::GetNetworkCaps returns wrong network caps") );
|
|
2777 |
|
|
2778 |
|
|
2779 |
//
|
|
2780 |
// TEST END
|
|
2781 |
//
|
|
2782 |
|
|
2783 |
StartCleanup();
|
|
2784 |
|
|
2785 |
return TestStepResult();
|
|
2786 |
}
|
|
2787 |
|
|
2788 |
TPtrC CCTSYIntegrationTestNetworkControl0016::GetTestStepName()
|
|
2789 |
/**
|
|
2790 |
* @return The test step name.
|
|
2791 |
*/
|
|
2792 |
{
|
|
2793 |
return _L("CCTSYIntegrationTestNetworkControl0016");
|
|
2794 |
}
|
|
2795 |
|
|
2796 |
|
|
2797 |
|
|
2798 |
CCTSYIntegrationTestNetworkControl0017::CCTSYIntegrationTestNetworkControl0017(CEtelSessionMgr& aEtelSessionMgr)
|
|
2799 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
2800 |
/**
|
|
2801 |
* Constructor.
|
|
2802 |
*/
|
|
2803 |
{
|
|
2804 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0017::GetTestStepName());
|
|
2805 |
}
|
|
2806 |
|
|
2807 |
CCTSYIntegrationTestNetworkControl0017::~CCTSYIntegrationTestNetworkControl0017()
|
|
2808 |
/**
|
|
2809 |
* Destructor.
|
|
2810 |
*/
|
|
2811 |
{
|
|
2812 |
}
|
|
2813 |
|
|
2814 |
TVerdict CCTSYIntegrationTestNetworkControl0017::doTestStepL()
|
|
2815 |
/**
|
|
2816 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0017
|
|
2817 |
* @SYMFssID BA/CTSY/NTWC-0017
|
|
2818 |
* @SYMTestCaseDesc Receive period network information update.
|
|
2819 |
* @SYMTestPriority High
|
|
2820 |
* @SYMTestActions RMobilePhone::GetCurrentNetwork
|
|
2821 |
* @SYMTestExpectedResults Pass - Location information updated.
|
|
2822 |
* @SYMTestType CIT
|
|
2823 |
* @SYMTestCaseDependencies simulated/manual
|
|
2824 |
*
|
|
2825 |
* Reason for test: Verify current network information notification received.
|
|
2826 |
*
|
|
2827 |
* @return - TVerdict code
|
|
2828 |
*/
|
|
2829 |
{
|
|
2830 |
|
|
2831 |
//
|
|
2832 |
// SET UP
|
|
2833 |
//
|
|
2834 |
|
|
2835 |
|
|
2836 |
ERR_PRINTF2(_L("<font color=Orange>$CTSYProblem: defect id = %d</font>"), 10079);
|
|
2837 |
User::Leave(KErrNone);
|
|
2838 |
|
|
2839 |
// Phone camped on valid cell.
|
|
2840 |
RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
2841 |
CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(mobilePhone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
|
|
2842 |
|
|
2843 |
|
|
2844 |
// Ensure that RMobilePhone::GetNetworkCaps returns caps in set of KCapsNotifyCurrentNetwork capability.
|
|
2845 |
TUint32 caps;
|
|
2846 |
CHECK_EQUALS_L( mobilePhone.GetNetworkCaps( caps ), KErrNone, _L("RMobilePhone::GetNetworkCaps returned an error") );
|
|
2847 |
TUint32 wantedCaps = RMobilePhone::KCapsNotifyCurrentNetwork;
|
|
2848 |
CHECK_BITS_SET_L( caps, wantedCaps, KNoUnwantedBits, _L("RMobilePhone::GetNetworkCaps returned wrong caps") );
|
|
2849 |
|
|
2850 |
|
|
2851 |
//
|
|
2852 |
// SET UP END
|
|
2853 |
//
|
|
2854 |
|
|
2855 |
StartTest();
|
|
2856 |
|
|
2857 |
//
|
|
2858 |
// TEST START
|
|
2859 |
//
|
|
2860 |
|
|
2861 |
// $CTSYProblem Timer T3302 needs to be set in the attach accept message from the Simulator
|
|
2862 |
ASSERT(TRUE);
|
|
2863 |
|
|
2864 |
// === Get current network information ===
|
|
2865 |
RMobilePhone::TMobilePhoneNetworkInfoV5 netInfo;
|
|
2866 |
TPckg<RMobilePhone::TMobilePhoneNetworkInfoV1> netInfoPkg(netInfo);
|
|
2867 |
RMobilePhone::TMobilePhoneLocationAreaV1 area;
|
|
2868 |
TExtEtelRequestStatus currentNetworkStatus(mobilePhone, EMobilePhoneGetCurrentNetwork);
|
|
2869 |
CleanupStack::PushL(currentNetworkStatus);
|
|
2870 |
mobilePhone.GetCurrentNetwork( currentNetworkStatus, netInfoPkg, area );
|
|
2871 |
|
|
2872 |
ASSERT_EQUALS( WaitForRequestWithTimeOut(currentNetworkStatus, ETimeMedium), KErrNone, _L("RMobilePhone::GetCurrentNetwork timed out"));
|
|
2873 |
ASSERT_EQUALS( currentNetworkStatus.Int(), KErrNone, _L("RMobilePhone::GetCurrentNetwork returned error"));
|
|
2874 |
|
|
2875 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
2876 |
ASSERT_TRUE( netInfo.iCountryCode.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iCountryCode") );
|
|
2877 |
|
|
2878 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
2879 |
ASSERT_TRUE( netInfo.iDisplayTag.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iDisplayTag") );
|
|
2880 |
|
|
2881 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
2882 |
ASSERT_TRUE( netInfo.iLongName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iLongName") );
|
|
2883 |
|
|
2884 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm
|
|
2885 |
ASSERT_TRUE ( netInfo.iMode == RMobilePhone::ENetworkModeGsm || netInfo.iMode == RMobilePhone::ENetworkModeWcdma, _L("RMobilePhone::GetCurrentNetwork returns invalid iMode") );
|
|
2886 |
|
|
2887 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
2888 |
ASSERT_TRUE( netInfo.iNetworkId.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iNetworkId") );
|
|
2889 |
|
|
2890 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
2891 |
ASSERT_TRUE( netInfo.iShortName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iShortname"));
|
|
2892 |
|
|
2893 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
2894 |
ASSERT_EQUALS( netInfo.iStatus, RMobilePhone::ENetworkStatusCurrent, _L("RMobilePhone::GetCurrentNetwork did not return ENetworkStatusCurrent status as expected"));
|
|
2895 |
|
|
2896 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneLocationAreaV1 returns aArea.iCellId > 0
|
|
2897 |
ASSERT_TRUE((TInt)area.iCellId > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iCellId"));
|
|
2898 |
|
|
2899 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneLocationAreaV1 returns aArea.iLocationAreaCode > 0
|
|
2900 |
ASSERT_TRUE((TInt)area.iLocationAreaCode > 0 ,_L("RMobilePhone::GetCurrentNetwork returns invalid iLocationAreaCode"));
|
|
2901 |
|
|
2902 |
// === Register for notification of change in the current network. ===
|
|
2903 |
|
|
2904 |
// Register for notification of RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5
|
|
2905 |
|
|
2906 |
// Post notification for network change
|
|
2907 |
TExtEtelRequestStatus reqNetChangeStatus(mobilePhone, EMobilePhoneNotifyCurrentNetworkChange);
|
|
2908 |
CleanupStack::PushL(reqNetChangeStatus);
|
|
2909 |
mobilePhone.NotifyCurrentNetworkChange( reqNetChangeStatus, netInfoPkg, area );
|
|
2910 |
|
|
2911 |
// Simulated network sends new location network information (e.g. new display tag or new location area code)
|
|
2912 |
DisplayUserInteractionPromptL(_L("Simulate network sending new location information (e.g. new display tag or new location area code."), ETimeLong);
|
|
2913 |
|
|
2914 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
2915 |
ASSERT_EQUALS( WaitForRequestWithTimeOut(reqNetChangeStatus, ETimeMedium), KErrNone, _L("RMobilePhone::NotifyCurrentNetworkChange timed out"));
|
|
2916 |
ASSERT_EQUALS( reqNetChangeStatus.Int(), KErrNone, _L("RMobilePhone::NotifyCurrentNetworkChange returned returned error"));
|
|
2917 |
ASSERT_TRUE( netInfo.iCountryCode.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iCountryCode") );
|
|
2918 |
|
|
2919 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
2920 |
ASSERT_TRUE( netInfo.iDisplayTag.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iDisplayTag") );
|
|
2921 |
|
|
2922 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
2923 |
ASSERT_TRUE( netInfo.iLongName.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iLongName") );
|
|
2924 |
|
|
2925 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm
|
|
2926 |
ASSERT_TRUE ( netInfo.iMode == RMobilePhone::ENetworkModeGsm || netInfo.iMode == RMobilePhone::ENetworkModeWcdma, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iMode") );
|
|
2927 |
|
|
2928 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
2929 |
ASSERT_TRUE( netInfo.iNetworkId.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iNetworkId") );
|
|
2930 |
|
|
2931 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
2932 |
ASSERT_TRUE( netInfo.iShortName.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iShortname") );
|
|
2933 |
|
|
2934 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
2935 |
ASSERT_EQUALS( netInfo.iStatus, RMobilePhone::ENetworkStatusCurrent, _L("RMobilePhone::NotifyCurrentNetworkChange did not return ENetworkStatusCurrent status as expected"));
|
|
2936 |
|
|
2937 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneLocationAreaV1 returns aArea.iCellId > 0
|
|
2938 |
//$CTSYProblem: RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneLocationAreaV1 returns aArea.iCellId is not > 0 as expected.
|
|
2939 |
ASSERT_EQUALS((TInt)area.iCellId, 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iCellId"));
|
|
2940 |
|
|
2941 |
|
|
2942 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneLocationAreaV1 returns aArea.iLocationAreaCode > 0
|
|
2943 |
//$CTSYProblem: RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneLocationAreaV1 returns aArea.iLocationAreaCode is not > 0 as expected.
|
|
2944 |
ASSERT_EQUALS((TInt)area.iLocationAreaCode, 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iLocationAreaCode"));
|
|
2945 |
|
|
2946 |
// === Get current network information ===
|
|
2947 |
|
|
2948 |
mobilePhone.GetCurrentNetwork( currentNetworkStatus, netInfoPkg, area );
|
|
2949 |
ASSERT_EQUALS( WaitForRequestWithTimeOut(currentNetworkStatus, ETimeMedium), KErrNone, _L("RMobilePhone::GetCurrentNetwork timed out"));
|
|
2950 |
ASSERT_EQUALS( currentNetworkStatus.Int(), KErrNone, _L("RMobilePhone::GetCurrentNetwork returned returned error"));
|
|
2951 |
|
|
2952 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
2953 |
ASSERT_TRUE( netInfo.iCountryCode.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iCountryCode") );
|
|
2954 |
|
|
2955 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
2956 |
ASSERT_TRUE( netInfo.iDisplayTag.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iDisplayTag") );
|
|
2957 |
|
|
2958 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
2959 |
ASSERT_TRUE( netInfo.iLongName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iLongName") );
|
|
2960 |
|
|
2961 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm or aNetworkInfo.iMode=ENetworkModeWcdma
|
|
2962 |
ASSERT_TRUE ( netInfo.iMode == RMobilePhone::ENetworkModeGsm || netInfo.iMode == RMobilePhone::ENetworkModeWcdma, _L("RMobilePhone::GetCurrentNetwork returns invalid iMode") );
|
|
2963 |
|
|
2964 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
2965 |
ASSERT_TRUE( netInfo.iNetworkId.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iNetworkId") );
|
|
2966 |
|
|
2967 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
2968 |
ASSERT_TRUE( netInfo.iShortName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iShortname") );
|
|
2969 |
|
|
2970 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
2971 |
ASSERT_EQUALS( netInfo.iStatus, RMobilePhone::ENetworkStatusCurrent, _L("RMobilePhone::GetCurrentNetwork did not return ENetworkStatusCurrent status as expected"))
|
|
2972 |
|
|
2973 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneLocationAreaV1 returns aArea.iCellId > 0
|
|
2974 |
ASSERT_TRUE((TInt)area.iCellId > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iCellId") );
|
|
2975 |
|
|
2976 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneLocationAreaV1 returns aArea.iLocationAreaCode > 0
|
|
2977 |
ASSERT_TRUE((TInt)area.iLocationAreaCode > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iLocationAreaCode") );
|
|
2978 |
|
|
2979 |
//
|
|
2980 |
// TEST END
|
|
2981 |
//
|
|
2982 |
|
|
2983 |
StartCleanup();
|
|
2984 |
|
|
2985 |
// Pop
|
|
2986 |
// currentNetworkStatus
|
|
2987 |
// reqNetChangeStatus
|
|
2988 |
|
|
2989 |
CleanupStack::PopAndDestroy(2, ¤tNetworkStatus);
|
|
2990 |
|
|
2991 |
return TestStepResult();
|
|
2992 |
}
|
|
2993 |
|
|
2994 |
TPtrC CCTSYIntegrationTestNetworkControl0017::GetTestStepName()
|
|
2995 |
/**
|
|
2996 |
* @return The test step name.
|
|
2997 |
*/
|
|
2998 |
{
|
|
2999 |
return _L("CCTSYIntegrationTestNetworkControl0017");
|
|
3000 |
}
|
|
3001 |
|
|
3002 |
|
|
3003 |
|
|
3004 |
CCTSYIntegrationTestNetworkControl0018::CCTSYIntegrationTestNetworkControl0018(CEtelSessionMgr& aEtelSessionMgr)
|
|
3005 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
3006 |
/**
|
|
3007 |
* Constructor.
|
|
3008 |
*/
|
|
3009 |
{
|
|
3010 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0018::GetTestStepName());
|
|
3011 |
}
|
|
3012 |
|
|
3013 |
CCTSYIntegrationTestNetworkControl0018::~CCTSYIntegrationTestNetworkControl0018()
|
|
3014 |
/**
|
|
3015 |
* Destructor.
|
|
3016 |
*/
|
|
3017 |
{
|
|
3018 |
}
|
|
3019 |
|
|
3020 |
TVerdict CCTSYIntegrationTestNetworkControl0018::doTestStepL()
|
|
3021 |
/**
|
|
3022 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0018
|
|
3023 |
* @SYMFssID BA/CTSY/NTWC-0018
|
|
3024 |
* @SYMTestCaseDesc Receive notification of a higher priority network that does not offer CS voice.
|
|
3025 |
* @SYMTestPriority High
|
|
3026 |
* @SYMTestActions CRetrieveMobilePhoneDetectedNetworks::RetrieveListL, CRetrieveMobilePhoneDetectedNetworks::NewL, RMobilePhone::GetNetworkInvScanSetting, RMobilePhone::SelectNetwork, CMobilePhoneNetworkListV5::Enumerate, RMobilePhone::SetNetworkSelectionSetting, RMobilePhone::GetNetworkRegistrationStatus, RMobilePhone::GetHomeNetwork, RMobilePhone::NotifyNetworkInvScanEvent, CRetrieveMobilePhoneDetectedNetworks::StartV5
|
|
3027 |
* @SYMTestExpectedResults Pass - Network investigation scan event completes and new network can be selected.
|
|
3028 |
* @SYMTestType CIT
|
|
3029 |
* @SYMTestCaseDependencies simulated/manual
|
|
3030 |
*
|
|
3031 |
* Reason for test: Verify network investigation event completes and new network can be selected.
|
|
3032 |
*
|
|
3033 |
* @return - TVerdict code
|
|
3034 |
*/
|
|
3035 |
{
|
|
3036 |
|
|
3037 |
//
|
|
3038 |
// SET UP
|
|
3039 |
//
|
|
3040 |
|
|
3041 |
|
|
3042 |
|
|
3043 |
//
|
|
3044 |
// SET UP END
|
|
3045 |
//
|
|
3046 |
|
|
3047 |
StartTest();
|
|
3048 |
|
|
3049 |
//
|
|
3050 |
// TEST START
|
|
3051 |
//
|
|
3052 |
|
|
3053 |
|
|
3054 |
// === Check network investigation scan setting is on ===
|
|
3055 |
|
|
3056 |
// Check RMobilePhone::GetNetworkInvScanSetting returns aSetting!=0
|
|
3057 |
|
|
3058 |
// === Get the network ID of the home network (store this for use later) ===
|
|
3059 |
|
|
3060 |
// Check RMobilePhone::GetHomeNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
3061 |
|
|
3062 |
// === Detect another higher priority network ===
|
|
3063 |
|
|
3064 |
// Simulator simulates an additional higher priority network which does not provide CS voice.
|
|
3065 |
|
|
3066 |
// Check RMobilePhone::NotifyNetworkInvScanEvent completes with aEvent=ENetworkInvestigationHighPriorityPlmn
|
|
3067 |
|
|
3068 |
// === Get list if detected networks ===
|
|
3069 |
|
|
3070 |
// Use helper class for CRetrieveMobilePhoneDetectedNetworks to retrieve a V5 list of preferred networks
|
|
3071 |
|
|
3072 |
// Check CMobilePhoneNetworkListV5::Enumerate on the list returned returns number of networks > 1
|
|
3073 |
|
|
3074 |
// === Switch to manual network selection ===
|
|
3075 |
|
|
3076 |
// Set network selection setting to automatic with RMobilePhone::SetNetworkSelectionSetting with aSetting.iMethod=ENetworkSelectionManual
|
|
3077 |
|
|
3078 |
// === Go through the list of detected networks and manually select new network ===
|
|
3079 |
|
|
3080 |
// Cycle through the list of detected networks CMobilePhoneNetworkListV5
|
|
3081 |
|
|
3082 |
// If the TMobilePhoneNetworkInfoV5::iNetworkId != aNetworkInfo.iNetworkId returned from RMobilePhone::GetHomeNetwork
|
|
3083 |
|
|
3084 |
// then select network with RMobilePhone::SelectNetwork with aIsManual=ETrue and aManualSelection.iCountry=TMobilePhoneNetworkInfoV5::iCountryCode and aManualSelection.iNetwork=TMobilePhoneNetworkInfoV5::iNetworkId
|
|
3085 |
|
|
3086 |
// Check RMobilePhone::GetNetworkRegistrationStatus returns aStatus=ERegisteredOnHomeNetwork or =ERegisteredRoaming
|
|
3087 |
|
|
3088 |
|
|
3089 |
//
|
|
3090 |
// TEST END
|
|
3091 |
//
|
|
3092 |
|
|
3093 |
StartCleanup();
|
|
3094 |
|
|
3095 |
// Put any required test clean up here, then remove this comment
|
|
3096 |
|
|
3097 |
return TestStepResult();
|
|
3098 |
}
|
|
3099 |
|
|
3100 |
TPtrC CCTSYIntegrationTestNetworkControl0018::GetTestStepName()
|
|
3101 |
/**
|
|
3102 |
* @return The test step name.
|
|
3103 |
*/
|
|
3104 |
{
|
|
3105 |
return _L("CCTSYIntegrationTestNetworkControl0018");
|
|
3106 |
}
|
|
3107 |
|
|
3108 |
|
|
3109 |
|
|
3110 |
CCTSYIntegrationTestNetworkControl0019::CCTSYIntegrationTestNetworkControl0019(CEtelSessionMgr& aEtelSessionMgr)
|
|
3111 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
3112 |
/**
|
|
3113 |
* Constructor.
|
|
3114 |
*/
|
|
3115 |
{
|
|
3116 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0019::GetTestStepName());
|
|
3117 |
}
|
|
3118 |
|
|
3119 |
CCTSYIntegrationTestNetworkControl0019::~CCTSYIntegrationTestNetworkControl0019()
|
|
3120 |
/**
|
|
3121 |
* Destructor.
|
|
3122 |
*/
|
|
3123 |
{
|
|
3124 |
}
|
|
3125 |
|
|
3126 |
TVerdict CCTSYIntegrationTestNetworkControl0019::doTestStepL()
|
|
3127 |
/**
|
|
3128 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0019
|
|
3129 |
* @SYMFssID BA/CTSY/NTWC-0019
|
|
3130 |
* @SYMTestCaseDesc Move into new cell with an active call.
|
|
3131 |
* @SYMTestPriority High
|
|
3132 |
* @SYMTestActions RCall::GetStatus, RCall:Dial, RCall::NotifyStatusChange, RMobilePhone::NotifyCurrentNetworkChange
|
|
3133 |
* @SYMTestExpectedResults Pass - Network information can be retrieved.
|
|
3134 |
* @SYMTestType CIT
|
|
3135 |
* @SYMTestCaseDependencies simulated/manual
|
|
3136 |
*
|
|
3137 |
* Reason for test: Verify call stays connected and network information notification received.
|
|
3138 |
*
|
|
3139 |
* @return - TVerdict code
|
|
3140 |
*/
|
|
3141 |
{
|
|
3142 |
|
|
3143 |
//
|
|
3144 |
// SET UP
|
|
3145 |
//
|
|
3146 |
|
|
3147 |
ERR_PRINTF2(_L("<font color=Orange>$CTSYProblem: defect id = %d</font>"), 10080);
|
|
3148 |
User::Leave(KErrNone);
|
|
3149 |
|
|
3150 |
|
|
3151 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
3152 |
|
|
3153 |
// Ensure that RMobilePhone::GetNetworkCaps returns caps in set of KCapsGetCurrentNetwork, KCapsNotifyCurrentNetwork.
|
|
3154 |
TUint32 caps;
|
|
3155 |
CHECK_EQUALS_L( phone.GetNetworkCaps(caps), KErrNone, _L("RMobilePhone::GetNetworkCaps returned an error"));
|
|
3156 |
TUint32 wantedCaps = RMobilePhone::KCapsGetCurrentNetwork | RMobilePhone::KCapsNotifyCurrentNetwork;
|
|
3157 |
CHECK_BITS_SET_L(caps, wantedCaps, KNoUnwantedBits, _L("RMobilePhone::GetNetworkCaps returned wrong caps"));
|
|
3158 |
|
|
3159 |
// Ensure RMobilePhone::GetNetworkRegistrationStatus returns ERegisteredOnHomeNetwork
|
|
3160 |
CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
|
|
3161 |
|
|
3162 |
// Get voice line 1.
|
|
3163 |
RMobileLine& mobileLine = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine);
|
|
3164 |
|
|
3165 |
// Get call 1.
|
|
3166 |
RMobileCall& mobileCall= iEtelSessionMgr.GetCallL(KMainServer,KMainPhone, KVoiceLine, KCall1);
|
|
3167 |
|
|
3168 |
//
|
|
3169 |
// SET UP END
|
|
3170 |
//
|
|
3171 |
|
|
3172 |
StartTest();
|
|
3173 |
|
|
3174 |
//
|
|
3175 |
// TEST START
|
|
3176 |
//
|
|
3177 |
|
|
3178 |
|
|
3179 |
// === Get current network information ===
|
|
3180 |
|
|
3181 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
3182 |
RMobilePhone::TMobilePhoneNetworkInfoV5 netInfo;
|
|
3183 |
RMobilePhone::TMobilePhoneLocationAreaV1 location;
|
|
3184 |
RMobilePhone::TMobilePhoneNetworkInfoV5Pckg netInfoPckg(netInfo);
|
|
3185 |
TExtEtelRequestStatus getCurrentNetworkStatus(phone, EMobilePhoneGetCurrentNetwork);
|
|
3186 |
CleanupStack::PushL(getCurrentNetworkStatus);
|
|
3187 |
phone.GetCurrentNetwork(getCurrentNetworkStatus, netInfoPckg, location);
|
|
3188 |
|
|
3189 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getCurrentNetworkStatus, ETimeMedium),KErrNone, _L("RMobilePhone::GetCurrentNetwork timed out"));
|
|
3190 |
ASSERT_EQUALS(getCurrentNetworkStatus.Int(), KErrNone, _L("RMobilePhone::GetCurrentNetwork returned with an error"));
|
|
3191 |
ASSERT_TRUE(netInfo.iCountryCode.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iCountryCode"));
|
|
3192 |
|
|
3193 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
3194 |
ASSERT_TRUE(netInfo.iDisplayTag.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iDisplayTag"));
|
|
3195 |
|
|
3196 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
3197 |
ASSERT_TRUE(netInfo.iLongName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iLongName "));
|
|
3198 |
|
|
3199 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm or aNetworkInfo.iMode=ENetworkModeWcdma
|
|
3200 |
ASSERT_TRUE (netInfo.iMode == RMobilePhone::ENetworkModeGsm || netInfo.iMode == RMobilePhone::ENetworkModeWcdma, _L("RMobilePhone::GetCurrentNetwork returns invalid iMode"));
|
|
3201 |
|
|
3202 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
3203 |
ASSERT_TRUE(netInfo.iNetworkId.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iNetworkId"));
|
|
3204 |
|
|
3205 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
3206 |
ASSERT_TRUE(netInfo.iShortName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iShortName"));
|
|
3207 |
|
|
3208 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
3209 |
ASSERT_EQUALS(netInfo.iStatus,RMobilePhone::ENetworkStatusCurrent , _L("RMobilePhone::GetCurrentNetwork returns invalid iStatus"));
|
|
3210 |
|
|
3211 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneLocationAreaV1 returns aArea.iCellId == 0
|
|
3212 |
ASSERT_TRUE((TInt)location.iCellId > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iCellId"));
|
|
3213 |
|
|
3214 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneLocationAreaV1 returns aArea.iLocationAreaCode == 0
|
|
3215 |
ASSERT_TRUE((TInt)location.iLocationAreaCode > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iLocationAreaCode"));
|
|
3216 |
|
|
3217 |
// Post Notifier for RCall::NotifyStatusChange
|
|
3218 |
TCoreEtelRequestStatus<RCall> notifyStatusChangeStatus(mobileCall, &RCall::NotifyStatusChangeCancel);
|
|
3219 |
CleanupStack::PushL(notifyStatusChangeStatus);
|
|
3220 |
RCall::TStatus callStatus;
|
|
3221 |
mobileCall.NotifyStatusChange(notifyStatusChangeStatus, callStatus);
|
|
3222 |
|
|
3223 |
// Dial a number that answers.
|
|
3224 |
TPtrC number;
|
|
3225 |
ASSERT_TRUE(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, number) != EFalse, _L("GetStringFromConfig did not complete as expected"));
|
|
3226 |
DEBUG_PRINTF1(_L("Board Now Dialling: "));
|
|
3227 |
TCoreEtelRequestStatus<RCall> dialStatus(mobileCall, &RCall::DialCancel);
|
|
3228 |
CleanupStack::PushL(dialStatus);
|
|
3229 |
mobileCall.Dial(dialStatus, number);
|
|
3230 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RCall::Dial timed-out"));
|
|
3231 |
ASSERT_EQUALS(dialStatus.Int(), KErrNone, _L("RCall::Dial returned with an error"));
|
|
3232 |
|
|
3233 |
// Check RCall::NotifyStatusChange completes with EStatusConnected.
|
|
3234 |
RCall::TStatus expectedCallStatus = RCall::EStatusConnected;
|
|
3235 |
iCallControlTestHelper.WaitForCallNotifyStatusChange(mobileCall,
|
|
3236 |
notifyStatusChangeStatus,
|
|
3237 |
callStatus,
|
|
3238 |
expectedCallStatus,
|
|
3239 |
KErrNone);
|
|
3240 |
|
|
3241 |
// Post notification for network change
|
|
3242 |
TExtEtelRequestStatus reqNetChangeStatus(phone, EMobilePhoneNotifyCurrentNetworkChange);
|
|
3243 |
CleanupStack::PushL(reqNetChangeStatus);
|
|
3244 |
phone.NotifyCurrentNetworkChange(reqNetChangeStatus, netInfoPckg, location);
|
|
3245 |
|
|
3246 |
// Simulate moving into a new cell.
|
|
3247 |
DisplayUserInteractionPromptL(_L("Simulate moving into a new cell"), ETimeLong);
|
|
3248 |
|
|
3249 |
// === Check change of current network notification completes ===
|
|
3250 |
|
|
3251 |
ASSERT_EQUALS( WaitForRequestWithTimeOut(reqNetChangeStatus, ETimeMedium), KErrNone, _L("RMobilePhone::NotifyCurrentNetworkChange timed out"));
|
|
3252 |
ASSERT_EQUALS( reqNetChangeStatus.Int(), KErrNone, _L("RMobilePhone::NotifyCurrentNetworkChange returned with an error"));
|
|
3253 |
|
|
3254 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
3255 |
ASSERT_TRUE(netInfo.iCountryCode.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iCountryCode"));
|
|
3256 |
|
|
3257 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
3258 |
ASSERT_TRUE(netInfo.iDisplayTag.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iDisplayTag"));
|
|
3259 |
|
|
3260 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
3261 |
ASSERT_TRUE(netInfo.iLongName.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iLongNamelength"));
|
|
3262 |
|
|
3263 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm or aNetworkInfo.iMode=ENetworkModeWcdma
|
|
3264 |
ASSERT_TRUE (netInfo.iMode == RMobilePhone::ENetworkModeGsm || netInfo.iMode == RMobilePhone::ENetworkModeWcdma, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iMode"));
|
|
3265 |
|
|
3266 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
3267 |
ASSERT_TRUE(netInfo.iNetworkId.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iNetworkId"));
|
|
3268 |
|
|
3269 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
3270 |
ASSERT_TRUE(netInfo.iShortName.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iShortNamelength"));
|
|
3271 |
|
|
3272 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
3273 |
ASSERT_EQUALS(netInfo.iStatus, RMobilePhone::ENetworkStatusCurrent, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iStatus"));
|
|
3274 |
|
|
3275 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneLocationAreaV1 returns aArea.iCellId > 0
|
|
3276 |
ASSERT_TRUE(location.iCellId > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iCellId"));
|
|
3277 |
|
|
3278 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneLocationAreaV1 returns aArea.iLocationAreaCode > 0
|
|
3279 |
ASSERT_TRUE(location.iLocationAreaCode > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iLocationAreaCode"));
|
|
3280 |
|
|
3281 |
// === Get current network information ===
|
|
3282 |
|
|
3283 |
phone.GetCurrentNetwork(getCurrentNetworkStatus, netInfoPckg, location);
|
|
3284 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getCurrentNetworkStatus, ETimeLong), KErrNone, _L("RMobilePhone::GetCurrentNetwork timed out"));
|
|
3285 |
ASSERT_EQUALS(getCurrentNetworkStatus.Int(), KErrNone, _L("RMobilePhone::GetCurrentNetwork returned an error"));
|
|
3286 |
|
|
3287 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
3288 |
ASSERT_TRUE(netInfo.iCountryCode.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iCountryCode"));
|
|
3289 |
|
|
3290 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
3291 |
ASSERT_TRUE(netInfo.iDisplayTag.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iDisplayTag"));
|
|
3292 |
|
|
3293 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
3294 |
ASSERT_TRUE(netInfo.iLongName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iLongNamelength"));
|
|
3295 |
|
|
3296 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm or aNetworkInfo.iMode=ENetworkModeWcdma
|
|
3297 |
ASSERT_TRUE ( netInfo.iMode == RMobilePhone::ENetworkModeGsm || netInfo.iMode == RMobilePhone::ENetworkModeWcdma, _L("RMobilePhone::GetCurrentNetwork returns invalid iMode"));
|
|
3298 |
|
|
3299 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
3300 |
ASSERT_TRUE(netInfo.iNetworkId.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iNetworkId"));
|
|
3301 |
|
|
3302 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
3303 |
ASSERT_TRUE(netInfo.iShortName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iShortNamelength"));
|
|
3304 |
|
|
3305 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
3306 |
ASSERT_EQUALS(netInfo.iStatus, RMobilePhone::ENetworkStatusCurrent, _L("RMobilePhone::GetCurrentNetwork returns invalid iStatus"));
|
|
3307 |
|
|
3308 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneLocationAreaV1 returns aArea.iCellId == 0
|
|
3309 |
ASSERT_TRUE((TInt)location.iCellId > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iCellId"));
|
|
3310 |
|
|
3311 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneLocationAreaV1 returns aArea.iLocationAreaCode == 0
|
|
3312 |
ASSERT_TRUE((TInt)location.iLocationAreaCode > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iLocationAreaCode"));
|
|
3313 |
|
|
3314 |
// === Check call is still connected ===
|
|
3315 |
|
|
3316 |
// Check RCall::GetStatus returns EStatusConnected.
|
|
3317 |
ASSERT_EQUALS(mobileCall.GetStatus(callStatus), KErrNone, _L("RCall::GetStatus returned an Error"));
|
|
3318 |
ASSERT_EQUALS(callStatus, RCall::EStatusConnected, _L("RCall::GetStatus did not return EStatusConnected"));
|
|
3319 |
|
|
3320 |
|
|
3321 |
//
|
|
3322 |
// TEST END
|
|
3323 |
//
|
|
3324 |
|
|
3325 |
StartCleanup();
|
|
3326 |
|
|
3327 |
// Hang up the active call.
|
|
3328 |
mobileCall.HangUp();
|
|
3329 |
|
|
3330 |
// Pop
|
|
3331 |
// getCurrentNetworkStatus
|
|
3332 |
// notifyStatusChangeStatus
|
|
3333 |
// dialStatus
|
|
3334 |
// reqNetChangeStatus
|
|
3335 |
CleanupStack::PopAndDestroy(4, &getCurrentNetworkStatus);
|
|
3336 |
|
|
3337 |
return TestStepResult();
|
|
3338 |
}
|
|
3339 |
|
|
3340 |
TPtrC CCTSYIntegrationTestNetworkControl0019::GetTestStepName()
|
|
3341 |
/**
|
|
3342 |
* @return The test step name.
|
|
3343 |
*/
|
|
3344 |
{
|
|
3345 |
return _L("CCTSYIntegrationTestNetworkControl0019");
|
|
3346 |
}
|
|
3347 |
|
|
3348 |
|
|
3349 |
|
|
3350 |
CCTSYIntegrationTestNetworkControl0020::CCTSYIntegrationTestNetworkControl0020(CEtelSessionMgr& aEtelSessionMgr)
|
|
3351 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
3352 |
/**
|
|
3353 |
* Constructor.
|
|
3354 |
*/
|
|
3355 |
{
|
|
3356 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0020::GetTestStepName());
|
|
3357 |
}
|
|
3358 |
|
|
3359 |
CCTSYIntegrationTestNetworkControl0020::~CCTSYIntegrationTestNetworkControl0020()
|
|
3360 |
/**
|
|
3361 |
* Destructor.
|
|
3362 |
*/
|
|
3363 |
{
|
|
3364 |
}
|
|
3365 |
|
|
3366 |
TVerdict CCTSYIntegrationTestNetworkControl0020::doTestStepL()
|
|
3367 |
/**
|
|
3368 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0020
|
|
3369 |
* @SYMFssID BA/CTSY/NTWC-0020
|
|
3370 |
* @SYMTestCaseDesc Move into a new cell with packet service active.
|
|
3371 |
* @SYMTestPriority High
|
|
3372 |
* @SYMTestActions RMobilePhone::GetCurrentNetwork, RMobilePhone::NotifyCurrentNetworkChange, RPacketService::GetStatus
|
|
3373 |
* @SYMTestExpectedResults Pass - Network information is retrieved. Packet service remains active.
|
|
3374 |
* @SYMTestType CIT
|
|
3375 |
* @SYMTestCaseDependencies simulated/manual
|
|
3376 |
*
|
|
3377 |
* Reason for test: Verify packet service stays active.
|
|
3378 |
*
|
|
3379 |
* @return - TVerdict code
|
|
3380 |
*/
|
|
3381 |
{
|
|
3382 |
|
|
3383 |
//
|
|
3384 |
// SET UP
|
|
3385 |
//
|
|
3386 |
|
|
3387 |
|
|
3388 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
3389 |
|
|
3390 |
// Ensure that RMobilePhone::GetNetworkCaps returns caps in set of KCapsGetCurrentNetwork and KCapsNotifyCurrentNetwork.
|
|
3391 |
TUint32 caps;
|
|
3392 |
CHECK_EQUALS_L(phone.GetNetworkCaps(caps), KErrNone, _L("RMobilePhone::GetNetworkCaps returned an error"));
|
|
3393 |
TUint32 wantedCaps = RMobilePhone::KCapsGetHomeNetwork | RMobilePhone::KCapsNotifyCurrentNetwork;
|
|
3394 |
CHECK_BITS_SET_L(caps, wantedCaps, KNoUnwantedBits, _L("RMobilePhone::GetNetworkCaps returned wrong caps"));
|
|
3395 |
|
|
3396 |
// Ensure RMobilePhone::GetNetworkRegistrationStatus returns ERegisteredOnHomeNetwork
|
|
3397 |
CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
|
|
3398 |
|
|
3399 |
// Ensure phone is attached to packet service.
|
|
3400 |
// Get packet service
|
|
3401 |
RPacketService& packetService = iEtelSessionMgr.GetPacketServiceL(KMainServer, KMainPhone, KMainPacketService);
|
|
3402 |
// Get the attach mode so that it can be restored at the end of the test
|
|
3403 |
RPacketService::TAttachMode attachMode;
|
|
3404 |
CHECK_EQUALS_L(packetService.GetAttachMode(attachMode), KErrNone, _L("RPacketService::GetAttachMode returned with an error."));
|
|
3405 |
|
|
3406 |
SetAttachModeToWhenPossibleAndWaitForAttachL(packetService);
|
|
3407 |
|
|
3408 |
|
|
3409 |
|
|
3410 |
//
|
|
3411 |
// SET UP END
|
|
3412 |
//
|
|
3413 |
|
|
3414 |
StartTest();
|
|
3415 |
|
|
3416 |
//
|
|
3417 |
// TEST START
|
|
3418 |
//
|
|
3419 |
|
|
3420 |
|
|
3421 |
// === Get current network information ===
|
|
3422 |
RMobilePhone::TMobilePhoneNetworkInfoV5 netInfo;
|
|
3423 |
TPckg<RMobilePhone::TMobilePhoneNetworkInfoV1> netInfoPkg(netInfo);
|
|
3424 |
RMobilePhone::TMobilePhoneLocationAreaV1 area;
|
|
3425 |
TExtEtelRequestStatus currentNetworkStatus(phone, EMobilePhoneGetCurrentNetwork);
|
|
3426 |
CleanupStack::PushL(currentNetworkStatus);
|
|
3427 |
phone.GetCurrentNetwork( currentNetworkStatus, netInfoPkg, area );
|
|
3428 |
|
|
3429 |
ASSERT_EQUALS( WaitForRequestWithTimeOut(currentNetworkStatus, ETimeMedium), KErrNone, _L("RMobilePhone::GetCurrentNetwork timed out"));
|
|
3430 |
ASSERT_EQUALS(currentNetworkStatus.Int(), KErrNone, _L("RMobilePhone::GetCurrentNetwork returned error"));
|
|
3431 |
|
|
3432 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
3433 |
ASSERT_TRUE(netInfo.iCountryCode.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iCountryCode"));
|
|
3434 |
|
|
3435 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
3436 |
ASSERT_TRUE(netInfo.iDisplayTag.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iDisplayTag"));
|
|
3437 |
|
|
3438 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
3439 |
ASSERT_TRUE(netInfo.iLongName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iLongName"));
|
|
3440 |
|
|
3441 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm or aNetworkInfo.iMode=ENetworkModeWcdma
|
|
3442 |
ASSERT_TRUE ( netInfo.iMode == RMobilePhone::ENetworkModeGsm || netInfo.iMode == RMobilePhone::ENetworkModeWcdma, _L("RMobilePhone::GetCurrentNetwork returns invalid iMode") );
|
|
3443 |
|
|
3444 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
3445 |
ASSERT_TRUE(netInfo.iNetworkId.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iNetworkId"));
|
|
3446 |
|
|
3447 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
3448 |
ASSERT_TRUE(netInfo.iShortName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iShortname"));
|
|
3449 |
|
|
3450 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
3451 |
ASSERT_EQUALS(netInfo.iStatus, RMobilePhone::ENetworkStatusCurrent, _L("RMobilePhone::GetCurrentNetwork returns invalid iStatus"));
|
|
3452 |
|
|
3453 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneLocationAreaV1 returns aArea.iCellId == 0
|
|
3454 |
ASSERT_TRUE((TInt)area.iCellId > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iCellId"));
|
|
3455 |
|
|
3456 |
// Post notification for network change
|
|
3457 |
TExtEtelRequestStatus reqNetChangeStatus(phone, EMobilePhoneNotifyCurrentNetworkChange);
|
|
3458 |
CleanupStack::PushL(reqNetChangeStatus);
|
|
3459 |
phone.NotifyCurrentNetworkChange( reqNetChangeStatus, netInfoPkg, area );
|
|
3460 |
|
|
3461 |
// Simulate moving into a new cell.
|
|
3462 |
DisplayUserInteractionPromptL(_L("Simulate moving into a new cell"), ETimeLong);
|
|
3463 |
|
|
3464 |
// === Check change of current network notification completes ===
|
|
3465 |
ASSERT_EQUALS( WaitForRequestWithTimeOut(reqNetChangeStatus, ETimeMedium), KErrNone, _L("RMobilePhone::NotifyCurrentNetworkChange timed out"));
|
|
3466 |
ASSERT_EQUALS( reqNetChangeStatus.Int(), KErrNone, _L("RMobilePhone::NotifyCurrentNetworkChange returned returned error"));
|
|
3467 |
|
|
3468 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
3469 |
ASSERT_TRUE(netInfo.iCountryCode.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iCountryCode"));
|
|
3470 |
|
|
3471 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
3472 |
ASSERT_TRUE(netInfo.iDisplayTag.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iDisplayTag"));
|
|
3473 |
|
|
3474 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
3475 |
ASSERT_TRUE(netInfo.iLongName.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iLongName"));
|
|
3476 |
|
|
3477 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm or aNetworkInfo.iMode=ENetworkModeWcdma
|
|
3478 |
ASSERT_TRUE ( netInfo.iMode == RMobilePhone::ENetworkModeGsm || netInfo.iMode == RMobilePhone::ENetworkModeWcdma, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iMode") );
|
|
3479 |
|
|
3480 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
3481 |
ASSERT_TRUE(netInfo.iNetworkId.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iNetworkId"));
|
|
3482 |
|
|
3483 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
3484 |
ASSERT_TRUE(netInfo.iShortName.Length() > 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iShortname"));
|
|
3485 |
|
|
3486 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
3487 |
ASSERT_EQUALS(netInfo.iStatus, RMobilePhone::ENetworkStatusCurrent, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iStatus"));
|
|
3488 |
|
|
3489 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneLocationAreaV1 returns aArea.iCellId == 0
|
|
3490 |
//$CTSYProblem: RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneLocationAreaV1 returns aArea.iCellId is not > 0 as expected.
|
|
3491 |
ASSERT_EQUALS((TInt)area.iCellId, 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iCellId"));
|
|
3492 |
|
|
3493 |
// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneLocationAreaV1 returns aArea.iLocationAreaCode == 0
|
|
3494 |
//$CTSYProblem: RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneLocationAreaV1 returns aArea.iLocationAreaCode is not > 0 as expected.
|
|
3495 |
ASSERT_EQUALS((TInt)area.iLocationAreaCode, 0, _L("RMobilePhone::NotifyCurrentNetworkChange returns invalid iLocationAreaCode"));
|
|
3496 |
|
|
3497 |
|
|
3498 |
// === Get current network information ===
|
|
3499 |
phone.GetCurrentNetwork( currentNetworkStatus, netInfoPkg, area );
|
|
3500 |
ASSERT_EQUALS( WaitForRequestWithTimeOut(currentNetworkStatus, ETimeMedium), KErrNone, _L("RMobilePhone::GetCurrentNetwork timed out"));
|
|
3501 |
ASSERT_EQUALS( currentNetworkStatus.Int(), KErrNone, _L("RMobilePhone::GetCurrentNetwork returned returned error"));
|
|
3502 |
|
|
3503 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
|
|
3504 |
ASSERT_TRUE( netInfo.iCountryCode.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iCountryCode"));
|
|
3505 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
|
|
3506 |
ASSERT_TRUE( netInfo.iDisplayTag.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iDisplayTag"));
|
|
3507 |
|
|
3508 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
|
|
3509 |
ASSERT_TRUE(netInfo.iLongName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iLongName"));
|
|
3510 |
|
|
3511 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm or aNetworkInfo.iMode=ENetworkModeWcdma
|
|
3512 |
ASSERT_TRUE ( netInfo.iMode == RMobilePhone::ENetworkModeGsm || netInfo.iMode == RMobilePhone::ENetworkModeWcdma, _L("RMobilePhone::GetCurrentNetwork returns invalid iMode") );
|
|
3513 |
|
|
3514 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
|
|
3515 |
ASSERT_TRUE(netInfo.iNetworkId.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iNetworkId"));
|
|
3516 |
|
|
3517 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
|
|
3518 |
ASSERT_TRUE(netInfo.iShortName.Length() > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iShortname"));
|
|
3519 |
|
|
3520 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneLocationAreaV1 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
|
|
3521 |
ASSERT_EQUALS(netInfo.iStatus, RMobilePhone::ENetworkStatusCurrent, _L("RMobilePhone::GetCurrentNetwork returns invalid iStatus"));
|
|
3522 |
|
|
3523 |
// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneLocationAreaV1 returns aArea.iCellId == 0
|
|
3524 |
ASSERT_TRUE((TInt)area.iCellId > 0, _L("RMobilePhone::GetCurrentNetwork returns invalid iCellId"));
|
|
3525 |
|
|
3526 |
// === Check packet service is still attached ===
|
|
3527 |
|
|
3528 |
// Check RPacketService::GetStatus returns EStatusAttached
|
|
3529 |
RPacketService::TStatus pckSrvcStatus;
|
|
3530 |
ASSERT_EQUALS(packetService.GetStatus(pckSrvcStatus), KErrNone, _L("RPacketService::GetStatus returned with an error."));
|
|
3531 |
ASSERT_EQUALS(pckSrvcStatus, RPacketService::EStatusAttached, _L("RPacketService::GetStatus returns incorrect status."));
|
|
3532 |
|
|
3533 |
// === Check packet network status ===
|
|
3534 |
|
|
3535 |
// Check RPacketService::GetNtwkRegStatus returns ERegisteredOnHomeNetwork
|
|
3536 |
TExtEtelRequestStatus regStatus(packetService, EPacketGetNtwkRegStatus);
|
|
3537 |
CleanupStack::PushL(regStatus);
|
|
3538 |
RPacketService::TRegistrationStatus registrationStatus;
|
|
3539 |
packetService.GetNtwkRegStatus(regStatus, registrationStatus);
|
|
3540 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(regStatus, ETimeLong), KErrNone, _L("RPacketService::GetNtwkRegStatus timed-out."));
|
|
3541 |
ASSERT_EQUALS(regStatus.Int(), KErrNone, _L("RPacketService::GetNtwkRegStatus returned with an error"));
|
|
3542 |
ASSERT_EQUALS(registrationStatus, RPacketService::ERegisteredOnHomeNetwork, _L("RPacketService::GetNtwkRegStatus did not return RPacketService::ERegisteredOnHomeNetwork"));
|
|
3543 |
|
|
3544 |
//
|
|
3545 |
// TEST END
|
|
3546 |
//
|
|
3547 |
|
|
3548 |
|
|
3549 |
StartCleanup();
|
|
3550 |
|
|
3551 |
// Return packet service's attach mode to original setting
|
|
3552 |
ASSERT_EQUALS(packetService.SetAttachMode(attachMode), KErrNone, _L("RPacketService::SetAttachMode returned with an error."));
|
|
3553 |
|
|
3554 |
// Pop
|
|
3555 |
// currentNetworkStatus
|
|
3556 |
// reqNetChangeStatus
|
|
3557 |
// regStatus
|
|
3558 |
CleanupStack::PopAndDestroy(3, ¤tNetworkStatus);
|
|
3559 |
|
|
3560 |
return TestStepResult();
|
|
3561 |
}
|
|
3562 |
|
|
3563 |
TPtrC CCTSYIntegrationTestNetworkControl0020::GetTestStepName()
|
|
3564 |
/**
|
|
3565 |
* @return The test step name.
|
|
3566 |
*/
|
|
3567 |
{
|
|
3568 |
return _L("CCTSYIntegrationTestNetworkControl0020");
|
|
3569 |
}
|
|
3570 |
|
|
3571 |
|
|
3572 |
|
|
3573 |
CCTSYIntegrationTestNetworkControl0021::CCTSYIntegrationTestNetworkControl0021(CEtelSessionMgr& aEtelSessionMgr)
|
|
3574 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
3575 |
/**
|
|
3576 |
* Constructor.
|
|
3577 |
*/
|
|
3578 |
{
|
|
3579 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0021::GetTestStepName());
|
|
3580 |
}
|
|
3581 |
|
|
3582 |
CCTSYIntegrationTestNetworkControl0021::~CCTSYIntegrationTestNetworkControl0021()
|
|
3583 |
/**
|
|
3584 |
* Destructor.
|
|
3585 |
*/
|
|
3586 |
{
|
|
3587 |
}
|
|
3588 |
|
|
3589 |
TVerdict CCTSYIntegrationTestNetworkControl0021::doTestStepL()
|
|
3590 |
/**
|
|
3591 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0021
|
|
3592 |
* @SYMFssID BA/CTSY/NTWC-0021
|
|
3593 |
* @SYMTestCaseDesc Store and retrieve a list of preferred networks.
|
|
3594 |
* @SYMTestPriority High
|
|
3595 |
* @SYMTestActions RMobilePhone::NotifyPreferredNetworksListChange, CRetrieveMobilePhonePreferredNetworks
|
|
3596 |
::Start
|
|
3597 |
* @SYMTestExpectedResults Pass - Preferred network list stored and retrieved.
|
|
3598 |
* @SYMTestType CIT
|
|
3599 |
* @SYMTestCaseDependencies live/automatic
|
|
3600 |
*
|
|
3601 |
* Reason for test: Verify list retrieved is the same as that stored and notification of list change is received.
|
|
3602 |
*
|
|
3603 |
* @return - TVerdict code
|
|
3604 |
*/
|
|
3605 |
{
|
|
3606 |
//
|
|
3607 |
// SET UP
|
|
3608 |
//
|
|
3609 |
|
|
3610 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
3611 |
iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone);
|
|
3612 |
|
|
3613 |
//
|
|
3614 |
// SET UP END
|
|
3615 |
//
|
|
3616 |
|
|
3617 |
StartTest();
|
|
3618 |
|
|
3619 |
//
|
|
3620 |
// TEST START
|
|
3621 |
//
|
|
3622 |
|
|
3623 |
TInt err;
|
|
3624 |
|
|
3625 |
// === Create a list of preferred networks ===
|
|
3626 |
// Create three TMobilePreferredNetworkEntryV3 objects with valid values in
|
|
3627 |
// TMobilePreferredNetworkEntryV3::iAccess,
|
|
3628 |
// TMobilePreferredNetworkEntryV3::iCountryCode and
|
|
3629 |
// TMobilePreferredNetworkEntryV3::iNetworkId
|
|
3630 |
|
|
3631 |
RMobilePhone::TMobilePreferredNetworkEntryV3 prefNetworks[3];
|
|
3632 |
|
|
3633 |
// Three German networks
|
|
3634 |
|
|
3635 |
prefNetworks[0].iAccess = RMobilePhone::KNetworkAccessGsm;
|
|
3636 |
prefNetworks[0].iCountryCode = _L("262");
|
|
3637 |
prefNetworks[0].iNetworkId = _L("01");
|
|
3638 |
|
|
3639 |
prefNetworks[1].iAccess = RMobilePhone::KNetworkAccessGsm;
|
|
3640 |
prefNetworks[1].iCountryCode = _L("262");
|
|
3641 |
prefNetworks[1].iNetworkId = _L("02");
|
|
3642 |
|
|
3643 |
prefNetworks[2].iAccess = RMobilePhone::KNetworkAccessGsm;
|
|
3644 |
prefNetworks[2].iCountryCode = _L("262");
|
|
3645 |
prefNetworks[2].iNetworkId = _L("03");
|
|
3646 |
|
|
3647 |
CMobilePhoneStoredNetworkList *newNetList = CMobilePhoneStoredNetworkList::NewL();
|
|
3648 |
CleanupStack::PushL( newNetList );
|
|
3649 |
|
|
3650 |
// Add them to a CMobilePhoneStoredNetworkList with CMobilePhoneStoredNetworkList::InsertEntryL
|
|
3651 |
for( TInt i=0; i < 3; i++ )
|
|
3652 |
{
|
|
3653 |
newNetList->AddEntryL(prefNetworks[i]);
|
|
3654 |
}
|
|
3655 |
|
|
3656 |
TExtEtelRequestStatus reqStoreStatus( phone, EMobilePhoneStorePreferredNetworksList );
|
|
3657 |
CleanupStack::PushL(reqStoreStatus);
|
|
3658 |
|
|
3659 |
|
|
3660 |
// Request change notification
|
|
3661 |
TExtEtelRequestStatus reqPrefListChange( phone, EMobilePhoneNotifyStorePreferredNetworksListChange );
|
|
3662 |
CleanupStack::PushL(reqPrefListChange);
|
|
3663 |
|
|
3664 |
phone.NotifyPreferredNetworksListChange( reqPrefListChange );
|
|
3665 |
|
|
3666 |
// === Store list ===
|
|
3667 |
// Store the list with RMobilePhone::StorePreferredNetworksListL completes with KErrNone
|
|
3668 |
|
|
3669 |
// The session manager cannot be used for this API because it
|
|
3670 |
// allocates memory.
|
|
3671 |
// Therefore open a new subsession just for this API
|
|
3672 |
RMobilePhone phone2;
|
|
3673 |
RTelServer telServer;
|
|
3674 |
User::LeaveIfError(telServer.Connect());
|
|
3675 |
User::LeaveIfError(phone2.Open(telServer, iEtelSessionMgr.PhoneName()));
|
|
3676 |
phone2.StorePreferredNetworksListL(reqStoreStatus, newNetList);
|
|
3677 |
err = WaitForRequestWithTimeOut( reqStoreStatus, ETimeLong );
|
|
3678 |
ASSERT_EQUALS( err, KErrNone, _L("RMobilePhone::StorePreferredNetworksList timed out"))
|
|
3679 |
ASSERT_EQUALS( reqStoreStatus.Int(), KErrNotSupported, _L("RMobilePhone::StorePreferredNetworksList returned error"))
|
|
3680 |
phone2.Close();
|
|
3681 |
telServer.Close();
|
|
3682 |
|
|
3683 |
// $CTSYProblem CTSY does not support RMobilePhone::StorePreferredNetworksListL
|
|
3684 |
// so the test has been coded to return KErrNotSupported (the correct result in
|
|
3685 |
// this situation. When CTSY support has been added, the test case can be
|
|
3686 |
// extended to have the following code below.
|
|
3687 |
|
|
3688 |
|
|
3689 |
/*
|
|
3690 |
// === Check list change notification completes ===
|
|
3691 |
|
|
3692 |
// Check RMobilePhone::NotifyPreferredNetworksListChange completes with KErrNone
|
|
3693 |
iNetworkTestHelper.WaitForMobilePhoneNotifyPreferredNetworksListChange( reqPrefListChange, KErrNone );
|
|
3694 |
ASSERT_EQUALS( reqPrefListChange.Int(), KErrNone,
|
|
3695 |
_L("RMobilePhone::NotifyPreferredNetworksListChange returned with an error") );
|
|
3696 |
|
|
3697 |
// === Get list of preferred networks and verify it is the same as the list stored ===
|
|
3698 |
// Use helper class for CRetrieveMobilePhonePreferredNetworks to retrieve a list of
|
|
3699 |
// preferred networks
|
|
3700 |
|
|
3701 |
CRetrieveMobilePhonePreferredNetworksExec *checkNetListHelper =
|
|
3702 |
CRetrieveMobilePhonePreferredNetworksHelper::NewL(phone);
|
|
3703 |
CleanupStack::PushL( checkNetListHelper );
|
|
3704 |
|
|
3705 |
CMobilePhoneStoredNetworkList* checkNetList = checkNetListHelper->DoGetList(err);
|
|
3706 |
|
|
3707 |
// Check CMobilePhoneStoredNetworkList::Enumerate on the list retrieved returns number of networks = 3
|
|
3708 |
TInt checkCount = checkNetList->Enumerate();
|
|
3709 |
|
|
3710 |
ASSERT_EQUALS( checkCount, 3, _L("Incorrect number of entries in CMobilePhoneStoredNetworkList"));
|
|
3711 |
|
|
3712 |
ASSERT_TRUE( IsPreferredNetworkInListL( *checkNetList, prefNetworks[0]), _L("Entry 0 not found in list") );
|
|
3713 |
ASSERT_TRUE( IsPreferredNetworkInListL( *checkNetList, prefNetworks[1]), _L("Entry 1 not found in list") );
|
|
3714 |
ASSERT_TRUE( IsPreferredNetworkInListL( *checkNetList, prefNetworks[2]), _L("Entry 2 not found in list") );
|
|
3715 |
*/
|
|
3716 |
|
|
3717 |
//
|
|
3718 |
// TEST END
|
|
3719 |
//
|
|
3720 |
|
|
3721 |
StartCleanup();
|
|
3722 |
|
|
3723 |
// reqPrefListChange
|
|
3724 |
// reqStoreStatus
|
|
3725 |
// newNetList
|
|
3726 |
CleanupStack::PopAndDestroy(3, newNetList);
|
|
3727 |
return TestStepResult();
|
|
3728 |
}
|
|
3729 |
|
|
3730 |
TPtrC CCTSYIntegrationTestNetworkControl0021::GetTestStepName()
|
|
3731 |
/**
|
|
3732 |
* @return The test step name.
|
|
3733 |
*/
|
|
3734 |
{
|
|
3735 |
return _L("CCTSYIntegrationTestNetworkControl0021");
|
|
3736 |
}
|
|
3737 |
|
|
3738 |
|
|
3739 |
|
|
3740 |
CCTSYIntegrationTestNetworkControl0022::CCTSYIntegrationTestNetworkControl0022(CEtelSessionMgr& aEtelSessionMgr)
|
|
3741 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
3742 |
/**
|
|
3743 |
* Constructor.
|
|
3744 |
*/
|
|
3745 |
{
|
|
3746 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0022::GetTestStepName());
|
|
3747 |
}
|
|
3748 |
|
|
3749 |
CCTSYIntegrationTestNetworkControl0022::~CCTSYIntegrationTestNetworkControl0022()
|
|
3750 |
/**
|
|
3751 |
* Destructor.
|
|
3752 |
*/
|
|
3753 |
{
|
|
3754 |
}
|
|
3755 |
|
|
3756 |
TVerdict CCTSYIntegrationTestNetworkControl0022::doTestStepL()
|
|
3757 |
/**
|
|
3758 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0022
|
|
3759 |
* @SYMFssID BA/CTSY/NTWC-0022
|
|
3760 |
* @SYMTestCaseDesc Get service provider name.
|
|
3761 |
* @SYMTestPriority High
|
|
3762 |
* @SYMTestActions
|
|
3763 |
* @SYMTestExpectedResults Pass - Service provider name returned.
|
|
3764 |
* @SYMTestType CIT
|
|
3765 |
* @SYMTestCaseDependencies live/automatic
|
|
3766 |
*
|
|
3767 |
* Reason for test: Verify service provider name is retrieved.
|
|
3768 |
*
|
|
3769 |
* @return - TVerdict code
|
|
3770 |
*/
|
|
3771 |
{
|
|
3772 |
|
|
3773 |
//
|
|
3774 |
// SET UP
|
|
3775 |
//
|
|
3776 |
|
|
3777 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
3778 |
iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone);
|
|
3779 |
|
|
3780 |
// Ensure RMobilePhone::GetNetworkRegistrationStatus returns ERegisteredOnHomeNetwork
|
|
3781 |
|
|
3782 |
RMobilePhone::TMobilePhoneRegistrationStatus registrationStatus;
|
|
3783 |
TInt err = iNetworkTestHelper.GetNetworkRegistrationStatusL( phone,registrationStatus);
|
|
3784 |
|
|
3785 |
CHECK_TRUE_L(err == KErrNone, _L("RMobilePhone::GetNetworkRegistrationStatus returned error"))
|
|
3786 |
|
|
3787 |
CHECK_TRUE_L(registrationStatus == RMobilePhone::ERegisteredOnHomeNetwork,
|
|
3788 |
_L("RMobilePhone::GetNetworkRegistrationStatus did not return ERegisteredOnHomeNetwork"))
|
|
3789 |
|
|
3790 |
//
|
|
3791 |
// SET UP END
|
|
3792 |
//
|
|
3793 |
|
|
3794 |
StartTest();
|
|
3795 |
|
|
3796 |
//
|
|
3797 |
// TEST START
|
|
3798 |
//
|
|
3799 |
|
|
3800 |
|
|
3801 |
// === Get service provider name ===
|
|
3802 |
RMobilePhone::TMobilePhoneServiceProviderNameV2 spName;
|
|
3803 |
TPckg<RMobilePhone::TMobilePhoneServiceProviderNameV2> spNamePkg(spName);
|
|
3804 |
TExtEtelRequestStatus reqGetSPNameStatus(phone, EMobilePhoneGetServiceProviderName );
|
|
3805 |
CleanupStack::PushL(reqGetSPNameStatus);
|
|
3806 |
|
|
3807 |
phone.GetServiceProviderName(reqGetSPNameStatus, spNamePkg );
|
|
3808 |
ASSERT_EQUALS( WaitForRequestWithTimeOut(reqGetSPNameStatus, ETimeLong ), KErrNone,
|
|
3809 |
_L("RMobilePhone::GetServiceProviderName timed out") );
|
|
3810 |
ASSERT_EQUALS( reqGetSPNameStatus.Int(), KErrGsm0707NotFound ,_L("RMobilePhone::GetServiceProviderName returned error") );
|
|
3811 |
|
|
3812 |
// $CTSYProblem The LTSY always returns KErrGsm0707NotFound when this API is called.
|
|
3813 |
// CTSY correctly propagates the error back to the client.
|
|
3814 |
// If the LTSY does not return an error the following code can be used to test
|
|
3815 |
// this API.
|
|
3816 |
|
|
3817 |
/*
|
|
3818 |
// Check RMobilePhone::GetServiceProviderName with a TMobilePhoneServiceProviderNameV2 parameter returns aName.iPLMNField with length > 0
|
|
3819 |
// Check RMobilePhone::GetServiceProviderName with a TMobilePhoneServiceProviderNameV2 parameter returns aName.iSPName with length > 0
|
|
3820 |
ASSERT_TRUE( spName.iPLMNField.Length() > 0,
|
|
3821 |
_L("RMobilePhone::GetServiceProviderName returns TMobilePhoneServiceProviderNameV2 iPLMNField has zero length"))
|
|
3822 |
ASSERT_TRUE( spName.iSPName.Length() > 0,
|
|
3823 |
_L("RMobilePhone::GetServiceProviderName returns TMobilePhoneServiceProviderNameV2 iSPName has zero length"))
|
|
3824 |
*/
|
|
3825 |
|
|
3826 |
//
|
|
3827 |
// TEST END
|
|
3828 |
//
|
|
3829 |
|
|
3830 |
StartCleanup();
|
|
3831 |
|
|
3832 |
CleanupStack::PopAndDestroy(1,&reqGetSPNameStatus);
|
|
3833 |
|
|
3834 |
return TestStepResult();
|
|
3835 |
}
|
|
3836 |
|
|
3837 |
TPtrC CCTSYIntegrationTestNetworkControl0022::GetTestStepName()
|
|
3838 |
/**
|
|
3839 |
* @return The test step name.
|
|
3840 |
*/
|
|
3841 |
{
|
|
3842 |
return _L("CCTSYIntegrationTestNetworkControl0022");
|
|
3843 |
}
|
|
3844 |
|
|
3845 |
|
|
3846 |
|
|
3847 |
CCTSYIntegrationTestNetworkControl0023::CCTSYIntegrationTestNetworkControl0023(CEtelSessionMgr& aEtelSessionMgr)
|
|
3848 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
3849 |
/**
|
|
3850 |
* Constructor.
|
|
3851 |
*/
|
|
3852 |
{
|
|
3853 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0023::GetTestStepName());
|
|
3854 |
}
|
|
3855 |
|
|
3856 |
CCTSYIntegrationTestNetworkControl0023::~CCTSYIntegrationTestNetworkControl0023()
|
|
3857 |
/**
|
|
3858 |
* Destructor.
|
|
3859 |
*/
|
|
3860 |
{
|
|
3861 |
}
|
|
3862 |
|
|
3863 |
TVerdict CCTSYIntegrationTestNetworkControl0023::doTestStepL()
|
|
3864 |
/**
|
|
3865 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0023
|
|
3866 |
* @SYMFssID BA/CTSY/NTWC-0023
|
|
3867 |
* @SYMTestCaseDesc Cancel retrieval of preferred networks.
|
|
3868 |
* @SYMTestPriority High
|
|
3869 |
* @SYMTestActions
|
|
3870 |
* @SYMTestExpectedResults Pass - Retrieval of preferred networks is cancelled.
|
|
3871 |
* @SYMTestType CIT
|
|
3872 |
* @SYMTestCaseDependencies live/automatic
|
|
3873 |
*
|
|
3874 |
* Reason for test: Verify request is cancelled.
|
|
3875 |
*
|
|
3876 |
* @return - TVerdict code
|
|
3877 |
*/
|
|
3878 |
{
|
|
3879 |
|
|
3880 |
//
|
|
3881 |
// SET UP
|
|
3882 |
//
|
|
3883 |
|
|
3884 |
//iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone);
|
|
3885 |
|
|
3886 |
// Ensure RMobilePhone::GetNetworkRegistrationStatus returns ERegisteredOnHomeNetwork
|
|
3887 |
|
|
3888 |
|
|
3889 |
//
|
|
3890 |
// SET UP END
|
|
3891 |
//
|
|
3892 |
|
|
3893 |
StartTest();
|
|
3894 |
|
|
3895 |
//
|
|
3896 |
// TEST START
|
|
3897 |
//
|
|
3898 |
|
|
3899 |
|
|
3900 |
// === Get list of all the preferred networks and cancel request ===
|
|
3901 |
|
|
3902 |
// Use helper class for CRetrieveMobilePhonePreferredNetworks to retrieve a list of preferred networks
|
|
3903 |
|
|
3904 |
// Cancel the request
|
|
3905 |
|
|
3906 |
// Check request completes with KErrCancel
|
|
3907 |
|
|
3908 |
|
|
3909 |
//
|
|
3910 |
// TEST END
|
|
3911 |
//
|
|
3912 |
|
|
3913 |
StartCleanup();
|
|
3914 |
|
|
3915 |
// Put any required test clean up here, then remove this comment
|
|
3916 |
|
|
3917 |
return TestStepResult();
|
|
3918 |
}
|
|
3919 |
|
|
3920 |
TPtrC CCTSYIntegrationTestNetworkControl0023::GetTestStepName()
|
|
3921 |
/**
|
|
3922 |
* @return The test step name.
|
|
3923 |
*/
|
|
3924 |
{
|
|
3925 |
return _L("CCTSYIntegrationTestNetworkControl0023");
|
|
3926 |
}
|
|
3927 |
|
|
3928 |
|
|
3929 |
|
|
3930 |
CCTSYIntegrationTestNetworkControl0024::CCTSYIntegrationTestNetworkControl0024(CEtelSessionMgr& aEtelSessionMgr)
|
|
3931 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
3932 |
/**
|
|
3933 |
* Constructor.
|
|
3934 |
*/
|
|
3935 |
{
|
|
3936 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0024::GetTestStepName());
|
|
3937 |
}
|
|
3938 |
|
|
3939 |
CCTSYIntegrationTestNetworkControl0024::~CCTSYIntegrationTestNetworkControl0024()
|
|
3940 |
/**
|
|
3941 |
* Destructor.
|
|
3942 |
*/
|
|
3943 |
{
|
|
3944 |
}
|
|
3945 |
|
|
3946 |
TVerdict CCTSYIntegrationTestNetworkControl0024::doTestStepL()
|
|
3947 |
/**
|
|
3948 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0024
|
|
3949 |
* @SYMFssID BA/CTSY/NTWC-0024
|
|
3950 |
* @SYMTestCaseDesc Cancel retrieval of detected networks.
|
|
3951 |
* @SYMTestPriority High
|
|
3952 |
* @SYMTestActions CRetrieveMobilePhoneDetectedNetworks::StartV2, CRetrieveMobilePhoneDetectedNetworks::StartV5, CRetrieveMobilePhoneDetectedNetworks::StartV8
|
|
3953 |
* @SYMTestExpectedResults Pass - Retrieval of detected networks is cancelled.
|
|
3954 |
* @SYMTestType CIT
|
|
3955 |
* @SYMTestCaseDependencies live/automatic
|
|
3956 |
*
|
|
3957 |
* Reason for test: Verify request is cancelled.
|
|
3958 |
*
|
|
3959 |
* @return - TVerdict code
|
|
3960 |
*/
|
|
3961 |
{
|
|
3962 |
|
|
3963 |
//
|
|
3964 |
// SET UP
|
|
3965 |
//
|
|
3966 |
|
|
3967 |
//iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone);
|
|
3968 |
|
|
3969 |
// Ensure RMobilePhone::GetNetworkRegistrationStatus returns ERegisteredOnHomeNetwork
|
|
3970 |
|
|
3971 |
|
|
3972 |
//
|
|
3973 |
// SET UP END
|
|
3974 |
//
|
|
3975 |
|
|
3976 |
StartTest();
|
|
3977 |
|
|
3978 |
//
|
|
3979 |
// TEST START
|
|
3980 |
//
|
|
3981 |
|
|
3982 |
|
|
3983 |
// === Get list of all the detected networks with V1 version of the API and cancel request ===
|
|
3984 |
|
|
3985 |
// Use helper class for CRetrieveMobilePhoneDetectedNetworks to retrieve a V1 list of detected networks
|
|
3986 |
|
|
3987 |
// Cancel the request immediately
|
|
3988 |
|
|
3989 |
// Check request completes with KErrCancel
|
|
3990 |
|
|
3991 |
// === Get list of all the detected networks with V2 version of the API ===
|
|
3992 |
|
|
3993 |
// Use helper class for CRetrieveMobilePhoneDetectedNetworks to retrieve a V2 list of detected networks
|
|
3994 |
|
|
3995 |
// Cancel the request immediately
|
|
3996 |
|
|
3997 |
// Check request completes with KErrCancel
|
|
3998 |
|
|
3999 |
// === Get list of all the detected networks with V5 version of the API ===
|
|
4000 |
|
|
4001 |
// Use helper class for CRetrieveMobilePhoneDetectedNetworks to retrieve a V5 list of detected networks
|
|
4002 |
|
|
4003 |
// Cancel the request immediately
|
|
4004 |
|
|
4005 |
// Check request completes with KErrCancel
|
|
4006 |
|
|
4007 |
// === Get list of all the detected networks with V8 version of the API ===
|
|
4008 |
|
|
4009 |
// Use helper class for CRetrieveMobilePhoneDetectedNetworks to retrieve a V8 list of detected networks
|
|
4010 |
|
|
4011 |
// Cancel the request with immediately
|
|
4012 |
|
|
4013 |
// Check request completes with KErrCancel
|
|
4014 |
|
|
4015 |
|
|
4016 |
//
|
|
4017 |
// TEST END
|
|
4018 |
//
|
|
4019 |
|
|
4020 |
StartCleanup();
|
|
4021 |
|
|
4022 |
// Put any required test clean up here, then remove this comment
|
|
4023 |
|
|
4024 |
return TestStepResult();
|
|
4025 |
}
|
|
4026 |
|
|
4027 |
TPtrC CCTSYIntegrationTestNetworkControl0024::GetTestStepName()
|
|
4028 |
/**
|
|
4029 |
* @return The test step name.
|
|
4030 |
*/
|
|
4031 |
{
|
|
4032 |
return _L("CCTSYIntegrationTestNetworkControl0024");
|
|
4033 |
}
|
|
4034 |
|
|
4035 |
|
|
4036 |
|
|
4037 |
CCTSYIntegrationTestNetworkControl0025::CCTSYIntegrationTestNetworkControl0025(CEtelSessionMgr& aEtelSessionMgr)
|
|
4038 |
: CCTSYIntegrationTestNetworkControlBase(aEtelSessionMgr)
|
|
4039 |
/**
|
|
4040 |
* Constructor.
|
|
4041 |
*/
|
|
4042 |
{
|
|
4043 |
SetTestStepName(CCTSYIntegrationTestNetworkControl0025::GetTestStepName());
|
|
4044 |
}
|
|
4045 |
|
|
4046 |
CCTSYIntegrationTestNetworkControl0025::~CCTSYIntegrationTestNetworkControl0025()
|
|
4047 |
/**
|
|
4048 |
* Destructor.
|
|
4049 |
*/
|
|
4050 |
{
|
|
4051 |
}
|
|
4052 |
|
|
4053 |
TVerdict CCTSYIntegrationTestNetworkControl0025::doTestStepL()
|
|
4054 |
/**
|
|
4055 |
* @SYMTestCaseID BA-CTSY-INT-NTWC-0025
|
|
4056 |
* @SYMFssID BA/CTSY/NTWC-0025
|
|
4057 |
* @SYMTestCaseDesc Set network selection setting to an unsupported setting.
|
|
4058 |
* @SYMTestPriority High
|
|
4059 |
* @SYMTestActions RMobilePhone::NotifyNetworkSelectionSettingChange, RMobilePhone::SetNetworkSelectionSetting
|
|
4060 |
* @SYMTestExpectedResults Pass - KErrNotSupported returned when unsupported setting is set and old setting is preserved.
|
|
4061 |
* @SYMTestType CIT
|
|
4062 |
* @SYMTestCaseDependencies live/automatic
|
|
4063 |
*
|
|
4064 |
* Reason for test: Verify KErrNotSupported is returned and network selection setting is unchanged.
|
|
4065 |
*
|
|
4066 |
* @return - TVerdict code
|
|
4067 |
*/
|
|
4068 |
{
|
|
4069 |
|
|
4070 |
//
|
|
4071 |
// SET UP
|
|
4072 |
//
|
|
4073 |
|
|
4074 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
4075 |
iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone);
|
|
4076 |
|
|
4077 |
//
|
|
4078 |
// SET UP END
|
|
4079 |
//
|
|
4080 |
|
|
4081 |
StartTest();
|
|
4082 |
|
|
4083 |
//
|
|
4084 |
// TEST START
|
|
4085 |
//
|
|
4086 |
|
|
4087 |
// Set up the notification for RMobilePhone::NotifyNetworkSelectionSettingChange for later test
|
|
4088 |
TExtEtelRequestStatus reqNotifyNetSelSettingChange(phone, EMobilePhoneNotifyNetworkSelectionSettingChange);
|
|
4089 |
CleanupStack::PushL(reqNotifyNetSelSettingChange);
|
|
4090 |
|
|
4091 |
RMobilePhone::TMobilePhoneNetworkSelectionV1 netSelNotify;
|
|
4092 |
RMobilePhone::TMobilePhoneNetworkSelectionV1Pckg netSelNotifyPkg( netSelNotify );
|
|
4093 |
|
|
4094 |
phone.NotifyNetworkSelectionSettingChange(reqNotifyNetSelSettingChange, netSelNotifyPkg);
|
|
4095 |
|
|
4096 |
// === Set network selection setting to an unsupported setting ===
|
|
4097 |
// Set network selection setting to manual wtth RMobilePhone::SetNetworkSelectionSetting with
|
|
4098 |
// aSetting.iMethod=ENetworkSelectionUnknown
|
|
4099 |
TExtEtelRequestStatus setNetSelSettingStatus(phone, EMobilePhoneSetNetworkSelectionSetting);
|
|
4100 |
CleanupStack::PushL(setNetSelSettingStatus);
|
|
4101 |
RMobilePhone::TMobilePhoneNetworkSelectionV1 netSel;
|
|
4102 |
RMobilePhone::TMobilePhoneNetworkSelectionV1Pckg netSelPkg(netSel);
|
|
4103 |
netSel.iMethod = RMobilePhone::ENetworkSelectionUnknown;
|
|
4104 |
phone.SetNetworkSelectionSetting( setNetSelSettingStatus, netSelPkg );
|
|
4105 |
|
|
4106 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(setNetSelSettingStatus, ETimeLong), KErrNone,
|
|
4107 |
_L("RMobilePhone::SetNetworkSelectionSetting timed out") );
|
|
4108 |
|
|
4109 |
// Check KErrNotSupported is returned
|
|
4110 |
ASSERT_EQUALS( setNetSelSettingStatus.Int(), KErrNotSupported,
|
|
4111 |
_L("RMobilePhone::SetNetworkSelectionSetting did not return KErrNotSupported"));
|
|
4112 |
|
|
4113 |
// Check RMobilePhone::NotifyNetworkSelectionSettingChange is still pending
|
|
4114 |
ASSERT_EQUALS( reqNotifyNetSelSettingChange.Int(), KRequestPending,
|
|
4115 |
_L("RMobilePhone::NotifyNetworkSelectionSettingChange did not return KRequestPending"));
|
|
4116 |
|
|
4117 |
//
|
|
4118 |
// TEST END
|
|
4119 |
//
|
|
4120 |
|
|
4121 |
StartCleanup();
|
|
4122 |
|
|
4123 |
// Set the network selection back to automatic
|
|
4124 |
|
|
4125 |
netSel.iMethod = RMobilePhone::ENetworkSelectionAutomatic;
|
|
4126 |
phone.SetNetworkSelectionSetting( setNetSelSettingStatus, netSelPkg );
|
|
4127 |
|
|
4128 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(setNetSelSettingStatus, ETimeLong), KErrNone,
|
|
4129 |
_L("RMobilePhone::SetNetworkSelectionSetting timed out") );
|
|
4130 |
|
|
4131 |
ASSERT_EQUALS( setNetSelSettingStatus.Int(), KErrNone,
|
|
4132 |
_L("RMobilePhone::SetNetworkSelectionSetting returned error"))
|
|
4133 |
|
|
4134 |
//setNetSelSettingStatus
|
|
4135 |
//reqNotifyNetSelSettingChange
|
|
4136 |
CleanupStack::PopAndDestroy(2,&reqNotifyNetSelSettingChange);
|
|
4137 |
|
|
4138 |
return TestStepResult();
|
|
4139 |
}
|
|
4140 |
|
|
4141 |
TPtrC CCTSYIntegrationTestNetworkControl0025::GetTestStepName()
|
|
4142 |
/**
|
|
4143 |
* @return The test step name.
|
|
4144 |
*/
|
|
4145 |
{
|
|
4146 |
return _L("CCTSYIntegrationTestNetworkControl0025");
|
|
4147 |
}
|
|
4148 |
|
|
4149 |
|
|
4150 |
|