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 MessageWaiting functional unit.
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
/**
|
|
19 |
@internalTechnology
|
|
20 |
*/
|
|
21 |
|
|
22 |
#include "cctsyintegrationtestmessagewaiting.h"
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
CCTSYIntegrationTestMessageWaitingBase::CCTSYIntegrationTestMessageWaitingBase(CEtelSessionMgr& aEtelSessionMgr)
|
|
28 |
: CCTSYIntegrationTestSuiteStepBase(aEtelSessionMgr), iNetworkTestHelper(*this)
|
|
29 |
/**
|
|
30 |
* Constructor
|
|
31 |
*/
|
|
32 |
{
|
|
33 |
}
|
|
34 |
|
|
35 |
CCTSYIntegrationTestMessageWaitingBase::~CCTSYIntegrationTestMessageWaitingBase()
|
|
36 |
/*
|
|
37 |
* Destructor
|
|
38 |
*/
|
|
39 |
{
|
|
40 |
}
|
|
41 |
|
|
42 |
|
|
43 |
CCTSYIntegrationTestMessageWaiting0001::CCTSYIntegrationTestMessageWaiting0001(CEtelSessionMgr& aEtelSessionMgr)
|
|
44 |
: CCTSYIntegrationTestMessageWaitingBase(aEtelSessionMgr)
|
|
45 |
/**
|
|
46 |
* Constructor.
|
|
47 |
*/
|
|
48 |
{
|
|
49 |
SetTestStepName(CCTSYIntegrationTestMessageWaiting0001::GetTestStepName());
|
|
50 |
}
|
|
51 |
|
|
52 |
CCTSYIntegrationTestMessageWaiting0001::~CCTSYIntegrationTestMessageWaiting0001()
|
|
53 |
/**
|
|
54 |
* Destructor.
|
|
55 |
*/
|
|
56 |
{
|
|
57 |
}
|
|
58 |
|
|
59 |
TVerdict CCTSYIntegrationTestMessageWaiting0001::doTestStepL()
|
|
60 |
/**
|
|
61 |
* @SYMTestCaseID BA-CTSY-INT-MSGW-0001
|
|
62 |
* @SYMFssID BA/CTSY/MSGW-0001
|
|
63 |
* @SYMTestCaseDesc Activate and deactivate the message waiting indicators.
|
|
64 |
* @SYMTestPriority High
|
|
65 |
* @SYMTestActions RMobilePhone::GetIccMessageWaitingIndicators, RMobilePhone::NotifyIccMessageWaitingIndicatorsChange
|
|
66 |
* @SYMTestExpectedResults Pass - Message waiting indicator is set.
|
|
67 |
* @SYMTestType CIT
|
|
68 |
* @SYMTestCaseDependencies live/manual
|
|
69 |
*
|
|
70 |
* Reason for test: Verify message waiting indicator notification completes and status is correct.
|
|
71 |
*
|
|
72 |
* @return - TVerdict code
|
|
73 |
*/
|
|
74 |
{
|
|
75 |
|
|
76 |
//
|
|
77 |
// SET UP
|
|
78 |
//
|
|
79 |
|
|
80 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer,KMainPhone);
|
|
81 |
|
|
82 |
// Ensure that RMobilePhone::GetIccAccessCaps returns caps in set of RMobilePhone::KCapsUSimAccessSupported
|
|
83 |
|
|
84 |
// This step is needed before we access the sim, and was taken from cctsyintegrationtestsubscriberinfo.cpp ....
|
|
85 |
// In the CTSY, the security event triggers a call to get the ICC type from the SIM
|
|
86 |
TExtEtelRequestStatus notifySecurityEventStatus(phone, EMobilePhoneNotifySecurityEvent);
|
|
87 |
CleanupStack::PushL(notifySecurityEventStatus);
|
|
88 |
RMobilePhone::TMobilePhoneSecurityEvent event;
|
|
89 |
phone.NotifySecurityEvent(notifySecurityEventStatus, event);
|
|
90 |
User::After(KOneSecond*5);
|
|
91 |
|
|
92 |
// Now can call RMobilePhone::GetIccAccessCaps
|
|
93 |
TUint32 iccCaps;
|
|
94 |
ASSERT_EQUALS(phone.GetIccAccessCaps(iccCaps), KErrNone,
|
|
95 |
_L("RMobilePhone::GetIccAccessCaps returned an error"));
|
|
96 |
ASSERT_BITS_SET(iccCaps, RMobilePhone::KCapsUSimAccessSupported, KNoUnwantedBits,
|
|
97 |
_L("RMobilePhone::GetIccAccessCaps returned wrong caps"));
|
|
98 |
|
|
99 |
// Turn off all message waiting indicators using RMobilePhone::SetIccMessageWaitingIndicators with TMobilePhoneMessageWaitingV1::iDisplayStatus=0
|
|
100 |
TExtEtelRequestStatus setIccMsgWaitIndStatus(phone, EMobilePhoneSetIccMessageWaitingIndicators);
|
|
101 |
CleanupStack::PushL(setIccMsgWaitIndStatus);
|
|
102 |
RMobilePhone::TMobilePhoneMessageWaitingV1 msgWaiting;
|
|
103 |
msgWaiting.iDisplayStatus = 0;
|
|
104 |
RMobilePhone::TMobilePhoneMessageWaitingV1Pckg msgWaitingPckg(msgWaiting);
|
|
105 |
phone.SetIccMessageWaitingIndicators(setIccMsgWaitIndStatus, msgWaitingPckg);
|
|
106 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(setIccMsgWaitIndStatus, ETimeMedium), KErrNone,
|
|
107 |
_L("RMobilePhone::SetIccMessageWaitingIndicators timed-out."));
|
|
108 |
ASSERT_EQUALS(setIccMsgWaitIndStatus.Int(), KErrNone,
|
|
109 |
_L("RMobilePhone::SetIccMessageWaitingIndicators returned error status."));
|
|
110 |
|
|
111 |
// Ensure RMobilePhone::GetIccMessageWaitingIndicators returns TMobilePhoneMessageWaitingV1::iDisplayStatus=0
|
|
112 |
TExtEtelRequestStatus getIccMsgWaitIndStatus(phone, EMobilePhoneGetIccMessageWaitingIndicators);
|
|
113 |
CleanupStack::PushL(getIccMsgWaitIndStatus);
|
|
114 |
msgWaiting.iDisplayStatus = 111;
|
|
115 |
phone.GetIccMessageWaitingIndicators(getIccMsgWaitIndStatus, msgWaitingPckg);
|
|
116 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getIccMsgWaitIndStatus, ETimeMedium), KErrNone,
|
|
117 |
_L("RMobilePhone::GetIccMessageWaitingIndicators timed-out."));
|
|
118 |
ASSERT_EQUALS(getIccMsgWaitIndStatus.Int(), KErrNone,
|
|
119 |
_L("RMobilePhone::GetIccMessageWaitingIndicators returned error status."));
|
|
120 |
ASSERT_BITS_SET(msgWaiting.iDisplayStatus, 0, KNoUnwantedBits,
|
|
121 |
_L("RMobilePhone::GetIccMessageWaitingIndicators returned incorrect value for iDisplayStatus."));
|
|
122 |
|
|
123 |
//
|
|
124 |
// SET UP END
|
|
125 |
//
|
|
126 |
|
|
127 |
StartTest();
|
|
128 |
|
|
129 |
//
|
|
130 |
// TEST START
|
|
131 |
//
|
|
132 |
|
|
133 |
/*
|
|
134 |
* Note:
|
|
135 |
* KDisplayVoicemailActive, KDisplayFaxActive, KDisplayAuxVoicemailActivev, KDisplayDataActive WORK.
|
|
136 |
* KDisplayEmailActive, KDisplayOtherActive DO NOT WORK
|
|
137 |
*/
|
|
138 |
const TInt KMaxDisplayFlags = 4;
|
|
139 |
const TUint KIndDisplayArray[KMaxDisplayFlags] =
|
|
140 |
{ RMobilePhone::KDisplayVoicemailActive,
|
|
141 |
RMobilePhone::KDisplayFaxActive,
|
|
142 |
//RMobilePhone::KDisplayEmailActive,
|
|
143 |
//RMobilePhone::KDisplayOtherActive,
|
|
144 |
RMobilePhone::KDisplayAuxVoicemailActive,
|
|
145 |
RMobilePhone::KDisplayDataActive };
|
|
146 |
|
|
147 |
|
|
148 |
// === Set message waiting indicator for voice and check notification and get message waiting indicator ===
|
|
149 |
|
|
150 |
// Set up for notification RMobilePhone::NotifyIccMessageWaitingIndicatorsChange
|
|
151 |
TExtEtelRequestStatus notifyIccMsgWaitIndStatus(phone, EMobilePhoneNotifyIccMessageWaitingIndicatorsChange);
|
|
152 |
CleanupStack::PushL(notifyIccMsgWaitIndStatus);
|
|
153 |
RMobilePhone::TMobilePhoneMessageWaitingV1 mgWaitingNotif;
|
|
154 |
RMobilePhone::TMobilePhoneMessageWaitingV1Pckg mgWaitingNotifPckg(mgWaitingNotif);
|
|
155 |
|
|
156 |
TInt i = 0;
|
|
157 |
do{
|
|
158 |
RMobilePhone::TMobilePhoneIndicatorDisplay displayStatusSetting = (RMobilePhone::TMobilePhoneIndicatorDisplay)KIndDisplayArray[i];
|
|
159 |
|
|
160 |
// Post notification RMobilePhone::NotifyIccMessageWaitingIndicatorsChange
|
|
161 |
phone.NotifyIccMessageWaitingIndicatorsChange(notifyIccMsgWaitIndStatus, mgWaitingNotifPckg);
|
|
162 |
|
|
163 |
// Set the message waiting indicators with RMobilePhone::SetIccMessageWaitingIndicators with TMobilePhoneMessageWaitingV1::iDisplayStatus=KDisplayVoicemailActive
|
|
164 |
msgWaiting.iDisplayStatus = displayStatusSetting;
|
|
165 |
phone.SetIccMessageWaitingIndicators(setIccMsgWaitIndStatus, msgWaitingPckg);
|
|
166 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(setIccMsgWaitIndStatus, ETimeMedium), KErrNone,
|
|
167 |
_L("RMobilePhone::SetIccMessageWaitingIndicators timed-out."));
|
|
168 |
ASSERT_EQUALS(setIccMsgWaitIndStatus.Int(), KErrNone,
|
|
169 |
_L("RMobilePhone::SetIccMessageWaitingIndicators returned error status."));
|
|
170 |
|
|
171 |
// Check RMobilePhone::NotifyIccMessageWaitingIndicatorsChange completes with TMobilePhoneMessageWaitingV1::iDisplayStatus in set of KDisplayVoicemailActive
|
|
172 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(notifyIccMsgWaitIndStatus, ETimeMedium), KErrNone,
|
|
173 |
_L("RMobilePhone::NotifyIccMessageWaitingIndicatorsChange timed-out."));
|
|
174 |
ASSERT_EQUALS(notifyIccMsgWaitIndStatus.Int(), KErrNone,
|
|
175 |
_L("RMobilePhone::NotifyIccMessageWaitingIndicatorsChange returned with an error status."));
|
|
176 |
ASSERT_BITS_SET(mgWaitingNotif.iDisplayStatus, displayStatusSetting, KNoUnwantedBits,
|
|
177 |
_L("RMobilePhone::NotifyIccMessageWaitingIndicatorsChange did not return expected value for iDisplayStatus."));
|
|
178 |
|
|
179 |
// Check RMobilePhone::GetIccMessageWaitingIndicators returns TMobilePhoneMessageWaitingV1::iDisplayStatus in set of KDisplayVoicemailActive
|
|
180 |
phone.GetIccMessageWaitingIndicators(getIccMsgWaitIndStatus, msgWaitingPckg);
|
|
181 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getIccMsgWaitIndStatus, ETimeMedium), KErrNone,
|
|
182 |
_L("RMobilePhone::GetIccMessageWaitingIndicators timed-out."));
|
|
183 |
ASSERT_EQUALS(getIccMsgWaitIndStatus.Int(), KErrNone,
|
|
184 |
_L("RMobilePhone::GetIccMessageWaitingIndicators returned error status."));
|
|
185 |
ASSERT_BITS_SET(msgWaiting.iDisplayStatus, displayStatusSetting, KNoUnwantedBits,
|
|
186 |
_L("RMobilePhone::GetIccMessageWaitingIndicators returned incorrect value for iDisplayStatus."));
|
|
187 |
|
|
188 |
// === Unset message waiting indicator for voice and check notification and get message waiting indicator ===
|
|
189 |
|
|
190 |
// Post notification RMobilePhone::NotifyIccMessageWaitingIndicatorsChange
|
|
191 |
phone.NotifyIccMessageWaitingIndicatorsChange(notifyIccMsgWaitIndStatus, mgWaitingNotifPckg);
|
|
192 |
|
|
193 |
// Set the message waiting indicators with RMobilePhone::SetIccMessageWaitingIndicators with TMobilePhoneMessageWaitingV1::iDisplayStatus=0
|
|
194 |
TUint8 invMask = TUint8(displayStatusSetting);
|
|
195 |
invMask = ~invMask;
|
|
196 |
TUint8 invDisplayStatusSetting = displayStatusSetting & invMask;
|
|
197 |
msgWaiting.iDisplayStatus = invDisplayStatusSetting;
|
|
198 |
phone.SetIccMessageWaitingIndicators(setIccMsgWaitIndStatus, msgWaitingPckg);
|
|
199 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(setIccMsgWaitIndStatus, ETimeMedium), KErrNone,
|
|
200 |
_L("RMobilePhone::SetIccMessageWaitingIndicators timed-out."));
|
|
201 |
ASSERT_EQUALS(setIccMsgWaitIndStatus.Int(), KErrNone,
|
|
202 |
_L("RMobilePhone::SetIccMessageWaitingIndicators returned error status."));
|
|
203 |
|
|
204 |
// Check RMobilePhone::NotifyIccMessageWaitingIndicatorsChange completes with TMobilePhoneMessageWaitingV1::iDisplayStatus not in set of KDisplayVoicemailActive
|
|
205 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(notifyIccMsgWaitIndStatus, ETimeMedium), KErrNone,
|
|
206 |
_L("RMobilePhone::NotifyIccMessageWaitingIndicatorsChange timed-out."));
|
|
207 |
ASSERT_EQUALS(notifyIccMsgWaitIndStatus.Int(), KErrNone,
|
|
208 |
_L("RMobilePhone::NotifyIccMessageWaitingIndicatorsChange returned with an error status."));
|
|
209 |
ASSERT_BITS_SET(mgWaitingNotif.iDisplayStatus, invDisplayStatusSetting, KNoUnwantedBits,
|
|
210 |
_L("RMobilePhone::NotifyIccMessageWaitingIndicatorsChange did not return expected value for iDisplayStatus."));
|
|
211 |
|
|
212 |
// Check RMobilePhone::GetIccMessageWaitingIndicators returns TMobilePhoneMessageWaitingV1::iDisplayStatus not in set of KDisplayVoicemailActive
|
|
213 |
phone.GetIccMessageWaitingIndicators(getIccMsgWaitIndStatus, msgWaitingPckg);
|
|
214 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getIccMsgWaitIndStatus, ETimeMedium), KErrNone,
|
|
215 |
_L("RMobilePhone::GetIccMessageWaitingIndicators timed-out."));
|
|
216 |
ASSERT_EQUALS(getIccMsgWaitIndStatus.Int(), KErrNone,
|
|
217 |
_L("RMobilePhone::GetIccMessageWaitingIndicators returned error status."));
|
|
218 |
ASSERT_BITS_SET(msgWaiting.iDisplayStatus, invDisplayStatusSetting, KNoUnwantedBits,
|
|
219 |
_L("RMobilePhone::GetIccMessageWaitingIndicators returned incorrect value for iDisplayStatus."));
|
|
220 |
|
|
221 |
++i;
|
|
222 |
} while(i < KMaxDisplayFlags);
|
|
223 |
|
|
224 |
|
|
225 |
//
|
|
226 |
// TEST END
|
|
227 |
//
|
|
228 |
|
|
229 |
StartCleanup();
|
|
230 |
|
|
231 |
CleanupStack::PopAndDestroy(4, ¬ifySecurityEventStatus);
|
|
232 |
|
|
233 |
return TestStepResult();
|
|
234 |
}
|
|
235 |
|
|
236 |
TPtrC CCTSYIntegrationTestMessageWaiting0001::GetTestStepName()
|
|
237 |
/**
|
|
238 |
* @return The test step name.
|
|
239 |
*/
|
|
240 |
{
|
|
241 |
return _L("CCTSYIntegrationTestMessageWaiting0001");
|
|
242 |
}
|
|
243 |
|
|
244 |
|
|
245 |
|
|
246 |
CCTSYIntegrationTestMessageWaiting0002::CCTSYIntegrationTestMessageWaiting0002(CEtelSessionMgr& aEtelSessionMgr)
|
|
247 |
: CCTSYIntegrationTestMessageWaitingBase(aEtelSessionMgr)
|
|
248 |
/**
|
|
249 |
* Constructor.
|
|
250 |
*/
|
|
251 |
{
|
|
252 |
SetTestStepName(CCTSYIntegrationTestMessageWaiting0002::GetTestStepName());
|
|
253 |
}
|
|
254 |
|
|
255 |
CCTSYIntegrationTestMessageWaiting0002::~CCTSYIntegrationTestMessageWaiting0002()
|
|
256 |
/**
|
|
257 |
* Destructor.
|
|
258 |
*/
|
|
259 |
{
|
|
260 |
}
|
|
261 |
|
|
262 |
TVerdict CCTSYIntegrationTestMessageWaiting0002::doTestStepL()
|
|
263 |
/**
|
|
264 |
* @SYMTestCaseID BA-CTSY-INT-MSGW-0002
|
|
265 |
* @SYMFssID BA/CTSY/MSGW-0002
|
|
266 |
* @SYMTestCaseDesc Receive message waiting indicator from network
|
|
267 |
* @SYMTestPriority High
|
|
268 |
* @SYMTestActions
|
|
269 |
* @SYMTestExpectedResults Pass - Message waiting indicator received.
|
|
270 |
* @SYMTestType CIT
|
|
271 |
* @SYMTestCaseDependencies simulated/manual
|
|
272 |
*
|
|
273 |
* Reason for test: Verify message waiting indicator notification completes and status is correct.
|
|
274 |
*
|
|
275 |
* @return - TVerdict code
|
|
276 |
*/
|
|
277 |
{
|
|
278 |
//
|
|
279 |
// SET UP
|
|
280 |
//
|
|
281 |
|
|
282 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer,KMainPhone);
|
|
283 |
|
|
284 |
// Call TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL
|
|
285 |
CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
|
|
286 |
|
|
287 |
// This step is needed before we access the sim, and was taken from cctsyintegrationtestsubscriberinfo.cpp ....
|
|
288 |
// In the CTSY, the security event triggers a call to get the ICC type from the SIM
|
|
289 |
TExtEtelRequestStatus notifySecurityEventStatus(phone, EMobilePhoneNotifySecurityEvent);
|
|
290 |
CleanupStack::PushL(notifySecurityEventStatus);
|
|
291 |
RMobilePhone::TMobilePhoneSecurityEvent event;
|
|
292 |
phone.NotifySecurityEvent(notifySecurityEventStatus, event);
|
|
293 |
User::After(KOneSecond*5);
|
|
294 |
|
|
295 |
// Ensure that RMobilePhone::GetIccAccessCaps returns caps in set of RMobilePhone::KCapsUSimAccessSupported
|
|
296 |
TUint32 iccAccessCaps;
|
|
297 |
ASSERT_EQUALS(phone.GetIccAccessCaps(iccAccessCaps), KErrNone,
|
|
298 |
_L("RMobilePhone::GetIccAccessCaps returned error."));
|
|
299 |
ASSERT_BITS_SET(iccAccessCaps, RMobilePhone::KCapsUSimAccessSupported, KNoUnwantedBits,
|
|
300 |
_L("RMobilePhone::GetIccAccessCaps returned incorrect caps."));
|
|
301 |
|
|
302 |
// Turn off all message waiting indicators using RMobilePhone::SetIccMessageWaitingIndicators with TMobilePhoneMessageWaitingV1::iDisplayStatus=KDisplayVoicemailActive
|
|
303 |
TExtEtelRequestStatus setIccMsgWaitIndStatus(phone, EMobilePhoneSetIccMessageWaitingIndicators);
|
|
304 |
CleanupStack::PushL(setIccMsgWaitIndStatus);
|
|
305 |
RMobilePhone::TMobilePhoneMessageWaitingV1 msgWaiting;
|
|
306 |
msgWaiting.iDisplayStatus = RMobilePhone::KDisplayVoicemailActive;
|
|
307 |
RMobilePhone::TMobilePhoneMessageWaitingV1Pckg msgWaitingPckg(msgWaiting);
|
|
308 |
phone.SetIccMessageWaitingIndicators(setIccMsgWaitIndStatus, msgWaitingPckg);
|
|
309 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(setIccMsgWaitIndStatus, ETimeMedium), KErrNone,
|
|
310 |
_L("RMobilePhone::SetIccMessageWaitingIndicators timed-out."));
|
|
311 |
ASSERT_EQUALS(setIccMsgWaitIndStatus.Int(), KErrNone,
|
|
312 |
_L("RMobilePhone::SetIccMessageWaitingIndicators returned error status."));
|
|
313 |
|
|
314 |
// Ensure RMobilePhone::GetIccMessageWaitingIndicators returns TMobilePhoneMessageWaitingV1::iDisplayStatus in set of KDisplayVoicemailActive
|
|
315 |
TExtEtelRequestStatus getIccMsgWaitIndStatus(phone, EMobilePhoneGetIccMessageWaitingIndicators);
|
|
316 |
CleanupStack::PushL(getIccMsgWaitIndStatus);
|
|
317 |
phone.GetIccMessageWaitingIndicators(getIccMsgWaitIndStatus, msgWaitingPckg);
|
|
318 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getIccMsgWaitIndStatus, ETimeMedium), KErrNone,
|
|
319 |
_L("RMobilePhone::GetIccMessageWaitingIndicators timed-out."));
|
|
320 |
ASSERT_EQUALS(getIccMsgWaitIndStatus.Int(), KErrNone,
|
|
321 |
_L("RMobilePhone::GetIccMessageWaitingIndicators returned error status."));
|
|
322 |
ASSERT_BITS_SET(msgWaiting.iDisplayStatus, RMobilePhone::KDisplayVoicemailActive, KNoUnwantedBits,
|
|
323 |
_L("RMobilePhone::GetIccMessageWaitingIndicators returned incorrect value for iDisplayStatus."));
|
|
324 |
|
|
325 |
//
|
|
326 |
// SET UP END
|
|
327 |
//
|
|
328 |
|
|
329 |
StartTest();
|
|
330 |
|
|
331 |
//
|
|
332 |
// TEST START
|
|
333 |
//
|
|
334 |
|
|
335 |
// Post RMobilePhone::NotifyMessageWaiting
|
|
336 |
// Set up for notification RMobilePhone::NotifyIccMessageWaitingIndicatorsChange
|
|
337 |
TExtEtelRequestStatus notifyIccMsgWaitIndStatus(phone, EMobilePhoneNotifyIccMessageWaitingIndicatorsChange);
|
|
338 |
CleanupStack::PushL(notifyIccMsgWaitIndStatus);
|
|
339 |
RMobilePhone::TMobilePhoneMessageWaitingV1 mgWaitingNotif;
|
|
340 |
RMobilePhone::TMobilePhoneMessageWaitingV1Pckg mgWaitingNotifPckg(mgWaitingNotif);
|
|
341 |
phone.NotifyIccMessageWaitingIndicatorsChange(notifyIccMsgWaitIndStatus, mgWaitingNotifPckg);
|
|
342 |
|
|
343 |
// Simulated network sends a message waiting indication to the phone.
|
|
344 |
|
|
345 |
/*
|
|
346 |
* Here it seems you may have several choices on how to get a voicemail on to the device.
|
|
347 |
* 1. Use a sim network as suggested in the comment above - don't know too much about this
|
|
348 |
* 2. Use code to divert an incoming call to the voicemail number
|
|
349 |
* 3. Use a real device to set the sim to divert all incoming calls to voicemail, then wait for a call
|
|
350 |
*
|
|
351 |
* Option 3 was used at this point.
|
|
352 |
*/
|
|
353 |
|
|
354 |
DisplayUserInteractionPromptL(_L("Dial this SIM now."), ETimeLong);
|
|
355 |
|
|
356 |
User::After(10000000);
|
|
357 |
DisplayUserInteractionPromptL(_L("Hangup call now."), ETimeLong);
|
|
358 |
User::After(10000000); // Wait for MWIS to change
|
|
359 |
|
|
360 |
// Check RMobilePhone::NotifyIccMessageWaitingIndicatorsChange completes with TMobilePhoneMessageWaitingV1::iDisplayStatus in set of KDisplayVoicemailActive
|
|
361 |
ERR_PRINTF2(_L("<font color=Orange>@CTSYKnownFailure: defect id = %d</font>"), 10057);
|
|
362 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(notifyIccMsgWaitIndStatus, ETimeLong), KErrNone,
|
|
363 |
_L("RMobilePhone::NotifyIccMessageWaitingIndicatorsChange timed-out."));
|
|
364 |
ASSERT_EQUALS(notifyIccMsgWaitIndStatus.Int(), KErrNone,
|
|
365 |
_L("RMobilePhone::NotifyIccMessageWaitingIndicatorsChange returned with an error status."));
|
|
366 |
ASSERT_TRUE(mgWaitingNotif.iVoiceMsgs > 0,
|
|
367 |
_L("RMobilePhone::NotifyIccMessageWaitingIndicatorsChange did not return expected value fot voicemail messages waiting."));
|
|
368 |
|
|
369 |
// Check RMobilePhone::GetIccMessageWaitingIndicators returns TMobilePhoneMessageWaitingV1::iDisplayStatus in set of KDisplayVoicemailActive
|
|
370 |
phone.GetIccMessageWaitingIndicators(getIccMsgWaitIndStatus, msgWaitingPckg);
|
|
371 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getIccMsgWaitIndStatus, ETimeMedium), KErrNone,
|
|
372 |
_L("RMobilePhone::GetIccMessageWaitingIndicators timed-out."));
|
|
373 |
ASSERT_EQUALS(getIccMsgWaitIndStatus.Int(), KErrNone,
|
|
374 |
_L("RMobilePhone::GetIccMessageWaitingIndicators returned error status."));
|
|
375 |
ASSERT_BITS_SET(msgWaiting.iDisplayStatus, RMobilePhone::KDisplayVoicemailActive, KNoUnwantedBits,
|
|
376 |
_L("RMobilePhone::GetIccMessageWaitingIndicators returned incorrect value for iDisplayStatus."));
|
|
377 |
|
|
378 |
// Check RMobilePhone::GetIccMessageWaitingIndicators returnsTMobilePhoneMessageWaitingV1::iVoiceMsgs > 0
|
|
379 |
ERR_PRINTF2(_L("<font color=Orange>@CTSYKnownFailure: defect id = %d</font>"), 10056);
|
|
380 |
ASSERT_TRUE(msgWaiting.iVoiceMsgs > 0,
|
|
381 |
_L("RMobilePhone::GetIccMessageWaitingIndicators did not return expected value fot voicemail messages waiting."));
|
|
382 |
|
|
383 |
//
|
|
384 |
// TEST END
|
|
385 |
//
|
|
386 |
|
|
387 |
StartCleanup();
|
|
388 |
|
|
389 |
CleanupStack::PopAndDestroy(4, ¬ifySecurityEventStatus);
|
|
390 |
|
|
391 |
return TestStepResult();
|
|
392 |
}
|
|
393 |
|
|
394 |
TPtrC CCTSYIntegrationTestMessageWaiting0002::GetTestStepName()
|
|
395 |
/**
|
|
396 |
* @return The test step name.
|
|
397 |
*/
|
|
398 |
{
|
|
399 |
return _L("CCTSYIntegrationTestMessageWaiting0002");
|
|
400 |
}
|
|
401 |
|
|
402 |
|
|
403 |
|