|
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 DTMF functional unit. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @internalTechnology |
|
20 */ |
|
21 |
|
22 #include "cctsyintegrationtestdtmf.h" |
|
23 |
|
24 #include "cctsyinidata.h" |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 CCTSYIntegrationTestDTMFBase::CCTSYIntegrationTestDTMFBase(CEtelSessionMgr& aEtelSessionMgr) |
|
30 : CCTSYIntegrationTestSuiteStepBase(aEtelSessionMgr), iCallControlTestHelper(*this), iNetworkTestHelper(*this) |
|
31 /** |
|
32 * Constructor |
|
33 */ |
|
34 { |
|
35 } |
|
36 |
|
37 CCTSYIntegrationTestDTMFBase::~CCTSYIntegrationTestDTMFBase() |
|
38 /* |
|
39 * Destructor |
|
40 */ |
|
41 { |
|
42 } |
|
43 |
|
44 CCTSYIntegrationTestDTMF0001::CCTSYIntegrationTestDTMF0001(CEtelSessionMgr& aEtelSessionMgr) |
|
45 : CCTSYIntegrationTestDTMFBase(aEtelSessionMgr) |
|
46 /** |
|
47 * Constructor. |
|
48 */ |
|
49 { |
|
50 SetTestStepName(CCTSYIntegrationTestDTMF0001::GetTestStepName()); |
|
51 } |
|
52 |
|
53 CCTSYIntegrationTestDTMF0001::~CCTSYIntegrationTestDTMF0001() |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 { |
|
58 } |
|
59 |
|
60 TVerdict CCTSYIntegrationTestDTMF0001::doTestStepL() |
|
61 /** |
|
62 * @SYMTestCaseID BA-CTSY-INT-DTMF-0001 |
|
63 * @SYMFssID BA/CTSY/DTMF-0001 |
|
64 * @SYMTestCaseDesc Get DTMF caps. |
|
65 * @SYMTestPriority High |
|
66 * @SYMTestActions RCall::Dial, RCall::HangUp, RMobilePhone::NotifyDTMFCapsChange, RMobilePhone::SetAlternatingCallMode |
|
67 * @SYMTestExpectedResults Pass - DTMF caps set when call is active. DTMF caps are 0 when call is not active. |
|
68 * @SYMTestType CIT |
|
69 * @SYMTestCaseDependencies live/automatic |
|
70 * |
|
71 * Reason for test: Verify dynamic DTMF caps set correctly. |
|
72 * |
|
73 * @return - TVerdict code |
|
74 */ |
|
75 { |
|
76 |
|
77 // |
|
78 // SET UP |
|
79 // |
|
80 |
|
81 RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
82 |
|
83 // Get voice line 1. |
|
84 RMobileLine& mobileLine= iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
85 |
|
86 // Get call 1. |
|
87 RMobileCall& mobileCall= iEtelSessionMgr.GetCallL(KMainServer,KMainPhone, KVoiceLine, KCall1); |
|
88 |
|
89 // Call TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL |
|
90 CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(mobilePhone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error")); |
|
91 |
|
92 // |
|
93 // SET UP END |
|
94 // |
|
95 |
|
96 StartTest(); |
|
97 |
|
98 // |
|
99 // TEST START |
|
100 // |
|
101 |
|
102 // Post notification RMobilePhone::NotifyDTMFCapsChange |
|
103 TUint32 caps = 0; |
|
104 TExtEtelRequestStatus notifyDTMFCapsChangeStatus(mobilePhone, EMobilePhoneNotifyDTMFCapsChange); |
|
105 CleanupStack::PushL(notifyDTMFCapsChangeStatus); |
|
106 mobilePhone.NotifyDTMFCapsChange(notifyDTMFCapsChangeStatus,caps); |
|
107 |
|
108 // Dial a Phone Number |
|
109 TPtrC number; |
|
110 ASSERT_TRUE(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, number) != EFalse, _L("GetStringFromConfig did not complete as expected")); |
|
111 DEBUG_PRINTF1(_L("Board Now Dialling: ")); |
|
112 TCoreEtelRequestStatus<RCall> dialStatus(mobileCall, &RCall::DialCancel); |
|
113 CleanupStack::PushL(dialStatus); |
|
114 mobileCall.Dial(dialStatus, number); |
|
115 ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RCall::Dial timed-out")); |
|
116 ASSERT_EQUALS(dialStatus.Int(), KErrNone, _L("RCall::Dial returned with an error")); |
|
117 |
|
118 // Check RMobilePhone::NotifyDTMFCapsChange completes with caps of KCapsSendDTMFString | KCapsSendDTMFSingleTone |
|
119 TUint32 wantedCaps = RMobilePhone::KCapsSendDTMFString | RMobilePhone::KCapsSendDTMFSingleTone; |
|
120 iCallControlTestHelper.WaitForMobilePhoneNotifyDTMFCapsChange(mobilePhone, |
|
121 notifyDTMFCapsChangeStatus, |
|
122 caps, |
|
123 wantedCaps, |
|
124 KNoUnwantedBits, |
|
125 KErrNone); |
|
126 |
|
127 |
|
128 // Check RMobilePhone::GetDTMFCaps returns caps of KCapsSendDTMFString | KCapsSendDTMFSingleTone |
|
129 ASSERT_EQUALS(mobilePhone.GetDTMFCaps(caps), KErrNone,_L("RMobilePhone::GetDTMFCaps returned with an error")) |
|
130 ASSERT_BITS_SET(caps, wantedCaps, KNoUnwantedBits, _L("RMobilePhone::GetDTMFCaps returned wrong dynamic caps")) |
|
131 |
|
132 // Post notifer |
|
133 mobilePhone.NotifyDTMFCapsChange(notifyDTMFCapsChangeStatus,caps); |
|
134 |
|
135 // Hang up call. |
|
136 ASSERT_EQUALS(mobileCall.HangUp(), KErrNone,_L("RMobileCall::HangUp returned with an error")) |
|
137 |
|
138 // Check RMobilePhone::NotifyDTMFCapsChange completes with caps of 0 |
|
139 wantedCaps=0; |
|
140 iCallControlTestHelper.WaitForMobilePhoneNotifyDTMFCapsChange(mobilePhone, |
|
141 notifyDTMFCapsChangeStatus, |
|
142 caps, |
|
143 wantedCaps, |
|
144 KNoUnwantedBits, |
|
145 KErrNone); |
|
146 |
|
147 // Check RMobilePhone::GetDTMFCaps returns caps of 0 |
|
148 wantedCaps = 0; |
|
149 ASSERT_EQUALS(mobilePhone.GetDTMFCaps(caps), KErrNone,_L("RMobilePhone::GetDTMFCaps returned with an error")) |
|
150 ASSERT_BITS_SET(caps, wantedCaps, KNoUnwantedBits, _L("RMobilePhone::GetDTMFCaps returned wrong dynamic caps")) |
|
151 |
|
152 // |
|
153 // TEST END |
|
154 // |
|
155 |
|
156 StartCleanup(); |
|
157 |
|
158 // Pop |
|
159 // notifyDTMFCapsChangeStatus |
|
160 // dialStatus |
|
161 CleanupStack::PopAndDestroy(2,¬ifyDTMFCapsChangeStatus); |
|
162 |
|
163 return TestStepResult(); |
|
164 } |
|
165 |
|
166 TPtrC CCTSYIntegrationTestDTMF0001::GetTestStepName() |
|
167 /** |
|
168 * @return The test step name. |
|
169 */ |
|
170 { |
|
171 return _L("CCTSYIntegrationTestDTMF0001"); |
|
172 } |
|
173 |
|
174 |
|
175 |
|
176 CCTSYIntegrationTestDTMF0002::CCTSYIntegrationTestDTMF0002(CEtelSessionMgr& aEtelSessionMgr) |
|
177 : CCTSYIntegrationTestDTMFBase(aEtelSessionMgr) |
|
178 /** |
|
179 * Constructor. |
|
180 */ |
|
181 { |
|
182 SetTestStepName(CCTSYIntegrationTestDTMF0002::GetTestStepName()); |
|
183 } |
|
184 |
|
185 CCTSYIntegrationTestDTMF0002::~CCTSYIntegrationTestDTMF0002() |
|
186 /** |
|
187 * Destructor. |
|
188 */ |
|
189 { |
|
190 } |
|
191 |
|
192 TVerdict CCTSYIntegrationTestDTMF0002::doTestStepL() |
|
193 /** |
|
194 * @SYMTestCaseID BA-CTSY-INT-DTMF-0002 |
|
195 * @SYMFssID BA/CTSY/DTMF-0002 |
|
196 * @SYMTestCaseDesc Send valid DTMF digits and strings. |
|
197 * @SYMTestPriority High |
|
198 * @SYMTestActions RMobilePhone::StopDTMFTone, RMobilePhone::SendDTMFTones, RMobilePhone::ContinueDTMFStringSending |
|
199 * @SYMTestExpectedResults Pass - DTMF tones can be sent individually and as a string. |
|
200 * @SYMTestType CIT |
|
201 * @SYMTestCaseDependencies live/automatic |
|
202 * |
|
203 * Reason for test: Verify single tones and strings can be sent. |
|
204 * |
|
205 * @return - TVerdict code |
|
206 */ |
|
207 { |
|
208 |
|
209 // |
|
210 // SET UP |
|
211 // |
|
212 |
|
213 RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
214 |
|
215 // Get Voice Line 1. |
|
216 RMobileLine& mobileLine= iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
217 |
|
218 // Get Call 1. |
|
219 RMobileCall& mobileCall= iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1); |
|
220 |
|
221 // Call TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL |
|
222 CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(mobilePhone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error")); |
|
223 |
|
224 // Dial a number that answers. |
|
225 TPtrC number; |
|
226 CHECK_TRUE_L(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, number) != EFalse, _L("GetStringFromConfig did not complete as expected")); |
|
227 DEBUG_PRINTF2(_L("Board Now Dialling: %S"), &number); |
|
228 TCoreEtelRequestStatus<RCall> dialStatus(mobileCall, &RCall::DialCancel); |
|
229 CleanupStack::PushL(dialStatus); |
|
230 mobileCall.Dial(dialStatus, number); |
|
231 CHECK_EQUALS_L(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RCall::Dial timed-out")); |
|
232 CHECK_EQUALS_L(dialStatus.Int(), KErrNone, _L("RCall::Dial problem dialling")); |
|
233 |
|
234 // Check RMobilePhone::GetDTMFCaps returns caps of KCapsSendDTMFString | KCapsSendDTMFSingleTone |
|
235 TUint32 dtmfCaps=0; |
|
236 CHECK_TRUE_L(mobilePhone.GetDTMFCaps(dtmfCaps)==KErrNone, _L("RMobilePhone::GetDTMFCaps return value not KErrNone")); |
|
237 TUint32 expectedCaps = RMobilePhone::KCapsSendDTMFString | RMobilePhone::KCapsSendDTMFSingleTone; |
|
238 CHECK_BITS_SET_L(dtmfCaps, expectedCaps, KNoUnwantedBits, _L("RMobilePhone::GetDTMFCaps returned wrong dynamic caps")); |
|
239 |
|
240 // |
|
241 // SET UP END |
|
242 // |
|
243 |
|
244 StartTest(); |
|
245 |
|
246 // |
|
247 // TEST START |
|
248 // |
|
249 |
|
250 // === Send DTMF tones individually. Do the following with aTone = 0-9, A,B,C,D, #,*, p, w in turn. === |
|
251 TChar tone[18] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9','A' ,'B' ,'C' ,'D' ,'#' ,'*', 'p', 'w'}; |
|
252 |
|
253 for(TInt i = 0 ; i<16; i++) |
|
254 { |
|
255 DEBUG_PRINTF2(_L("Send DTMF tones: %c"), (char)tone[i]); |
|
256 |
|
257 // Use RMobilePhone::StartDTMFTone to start sending a DTMF tone. |
|
258 ASSERT_EQUALS(mobilePhone.StartDTMFTone(tone[i]), KErrNone, _L("RMobilePhone::StartDTMFTone completed with incorrect error")); |
|
259 |
|
260 // Wait for one second |
|
261 User::After(KOneSecond); |
|
262 |
|
263 // Use RMobilePhone::StopDTMFTone to stop sending. |
|
264 ASSERT_EQUALS(mobilePhone.StopDTMFTone(), KErrNone, _L("RMobilePhone::StopDTMFTone completed with incorrect error")); |
|
265 |
|
266 // Repeat the above with other valid digits. |
|
267 } |
|
268 |
|
269 // Wait for 5 seconds |
|
270 User::After(5*KOneSecond); |
|
271 |
|
272 // === Send DTMF string with no 'w' character === |
|
273 |
|
274 // Send DTMF tones |
|
275 TExtEtelRequestStatus sendDtmfTonesStatus(mobilePhone, EMobilePhoneSendDTMFTones); |
|
276 CleanupStack::PushL(sendDtmfTonesStatus); |
|
277 |
|
278 TBufC<50> toneSet1 = _L("0123456p789ABCD"); |
|
279 |
|
280 DEBUG_PRINTF2(_L("Send DTMF tones: %S"), &toneSet1); |
|
281 mobilePhone.SendDTMFTones(sendDtmfTonesStatus, toneSet1); |
|
282 ASSERT_EQUALS(WaitForRequestWithTimeOut(sendDtmfTonesStatus, ETimeMedium), KErrNone, _L("RMobilePhone::SendDTMFTones timed-out")); |
|
283 |
|
284 //Check request completes with KErrNone each time. |
|
285 ASSERT_EQUALS(sendDtmfTonesStatus.Int(), KErrNone, _L("RMobilePhone::SendDTMFTones completed with incorrect error")); |
|
286 |
|
287 // === Send DTMF string with 'w' character and continue sending (then repeat and not continue sending after the stop) === |
|
288 |
|
289 // Post notification for RMobilePhone::NotifyStopInDTMFString |
|
290 TExtEtelRequestStatus notifyStopStatus(mobilePhone, EMobilePhoneNotifyStopInDTMFString); |
|
291 CleanupStack::PushL(notifyStopStatus); |
|
292 mobilePhone.NotifyStopInDTMFString(notifyStopStatus); |
|
293 |
|
294 // Send a DTMF string "1234w567" |
|
295 TBufC<50> toneSet2 = _L("1234w567"); |
|
296 DEBUG_PRINTF2(_L("Send DTMF tones: %S"), &toneSet2); |
|
297 mobilePhone.SendDTMFTones(sendDtmfTonesStatus, toneSet2); |
|
298 |
|
299 // Check RMobilePhone::NotifyStopInDTMFString completes |
|
300 iCallControlTestHelper.WaitForMobilePhoneNotifyStopInDTMFString(notifyStopStatus, KErrNone); |
|
301 |
|
302 // Continue sending the string with RMobilePhone::ContinueDTMFStringSending with aContinue = ETrue |
|
303 ASSERT_EQUALS(mobilePhone.ContinueDTMFStringSending(ETrue), KErrNone, _L("RMobilePhone::ContinueDTMFStringSending has not returned KErrNone")); |
|
304 ASSERT_EQUALS(WaitForRequestWithTimeOut(sendDtmfTonesStatus, ETimeMedium), KErrNone, _L("RMobilePhone::SendDTMFTones sendDtmfTonesStatus is not KErrNone.")); |
|
305 |
|
306 // Check request completes with KErrNone |
|
307 ASSERT_EQUALS(sendDtmfTonesStatus.Int(), KErrNone, _L("RMobilePhone::SendDTMFTones sendDtmfTonesStatus completed with incorrect error")); |
|
308 |
|
309 |
|
310 // Hang up the call |
|
311 DEBUG_PRINTF1(_L("Hangup call")); |
|
312 ASSERT_EQUALS(mobileCall.HangUp(), KErrNone, _L("RCall::HangUp return value not KErrNone")); |
|
313 |
|
314 // |
|
315 // TEST END |
|
316 // |
|
317 |
|
318 StartCleanup(); |
|
319 |
|
320 CleanupStack::PopAndDestroy(¬ifyStopStatus); |
|
321 CleanupStack::PopAndDestroy(&sendDtmfTonesStatus); |
|
322 CleanupStack::PopAndDestroy(&dialStatus); |
|
323 |
|
324 return TestStepResult(); |
|
325 } |
|
326 |
|
327 TPtrC CCTSYIntegrationTestDTMF0002::GetTestStepName() |
|
328 /** |
|
329 * @return The test step name. |
|
330 */ |
|
331 { |
|
332 return _L("CCTSYIntegrationTestDTMF0002"); |
|
333 } |
|
334 |
|
335 CCTSYIntegrationTestDTMF0003::CCTSYIntegrationTestDTMF0003(CEtelSessionMgr& aEtelSessionMgr) |
|
336 : CCTSYIntegrationTestDTMFBase(aEtelSessionMgr) |
|
337 /** |
|
338 * Constructor. |
|
339 */ |
|
340 { |
|
341 SetTestStepName(CCTSYIntegrationTestDTMF0003::GetTestStepName()); |
|
342 } |
|
343 |
|
344 CCTSYIntegrationTestDTMF0003::~CCTSYIntegrationTestDTMF0003() |
|
345 /** |
|
346 * Destructor. |
|
347 */ |
|
348 { |
|
349 } |
|
350 |
|
351 TVerdict CCTSYIntegrationTestDTMF0003::doTestStepL() |
|
352 /** |
|
353 * @SYMTestCaseID BA-CTSY-INT-DTMF-0003 |
|
354 * @SYMFssID BA/CTSY/DTMF-0003 |
|
355 * @SYMTestCaseDesc Send DTMF strings containing 'p' and 'w' |
|
356 * @SYMTestPriority High |
|
357 * @SYMTestActions RMobilePhone::ContinueDTMFStringSending, RMobilePhone::NotifyStopInDTMFString |
|
358 * @SYMTestExpectedResults Pass - Notification of a pause in DTMF received. |
|
359 * @SYMTestType CIT |
|
360 * @SYMTestCaseDependencies live/automatic |
|
361 * |
|
362 * Reason for test: Verify DTMF stop notifications are received. |
|
363 * |
|
364 * @return - TVerdict code |
|
365 */ |
|
366 { |
|
367 // |
|
368 // SET UP |
|
369 // |
|
370 |
|
371 RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
372 |
|
373 // Get Voice Line 1. |
|
374 RMobileLine& mobileLine= iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
375 |
|
376 // Get Call 1. |
|
377 RMobileCall& mobileCall= iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1); |
|
378 |
|
379 // Dial a number that answers. |
|
380 TPtrC number; |
|
381 CHECK_TRUE_L(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, number) != EFalse, |
|
382 _L("GetStringFromConfig did not complete as expected")); |
|
383 DEBUG_PRINTF2(_L("Board Now Dialling: %S"), &number); |
|
384 TCoreEtelRequestStatus<RMobileCall> dialStatus(mobileCall, &RCall::DialCancel); |
|
385 CleanupStack::PushL(dialStatus); |
|
386 mobileCall.Dial(dialStatus, number); |
|
387 CHECK_EQUALS_L(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RCall::Dial timed-out")); |
|
388 CHECK_EQUALS_L(dialStatus.Int(), KErrNone, _L("RCall::Dial problem dialling")); |
|
389 |
|
390 // Check RMobilePhone::GetDTMFCaps returns caps of KCapsSendDTMFString | KCapsSendDTMFSingleTone |
|
391 TUint32 dtmfCaps=0; |
|
392 CHECK_EQUALS_L(mobilePhone.GetDTMFCaps(dtmfCaps), KErrNone, |
|
393 _L("RMobilePhone::GetDTMFCaps return value not KErrNone")); |
|
394 TUint32 expectedCaps = RMobilePhone::KCapsSendDTMFString | RMobilePhone::KCapsSendDTMFSingleTone; |
|
395 TUint32 unwantedCaps = KNoWantedBits; |
|
396 CHECK_BITS_SET_L(dtmfCaps, expectedCaps, unwantedCaps, |
|
397 _L("RMobilePhone::GetDTMFCaps returned wrong dynamic caps")); |
|
398 |
|
399 // |
|
400 // SET UP END |
|
401 // |
|
402 |
|
403 StartTest(); |
|
404 |
|
405 // |
|
406 // TEST START |
|
407 // |
|
408 |
|
409 // Request for notification of RMobilePhone::NotifyStopInDTMFString |
|
410 TExtEtelRequestStatus notifyStopInDTMFStringStatus(mobilePhone, EMobilePhoneNotifyStopInDTMFString); |
|
411 CleanupStack::PushL(notifyStopInDTMFStringStatus); |
|
412 mobilePhone.NotifyStopInDTMFString(notifyStopInDTMFStringStatus); |
|
413 |
|
414 // === Send DTMF string that contains digits only and check that === |
|
415 |
|
416 // Send DTMF tones with RMobilePhone::SendDTMFTones with aTones = "1234567890" |
|
417 TBufC<50> toneDigitSet = _L("1234567890"); |
|
418 DEBUG_PRINTF2(_L("Send DTMF tones: %S"), &toneDigitSet); |
|
419 TExtEtelRequestStatus sendDTMFTonesStatus(mobilePhone, EMobilePhoneSendDTMFTones); |
|
420 CleanupStack::PushL(sendDTMFTonesStatus); |
|
421 mobilePhone.SendDTMFTones(sendDTMFTonesStatus, toneDigitSet); |
|
422 ASSERT_EQUALS(WaitForRequestWithTimeOut(sendDTMFTonesStatus, ETimeMedium), KErrNone, |
|
423 _L("RMobilePhone::SendDTMFTones timed-out")); |
|
424 ASSERT_EQUALS(sendDTMFTonesStatus.Int(), KErrNone, _L("RMobilePhone::SendDTMFTones status is not KErrNone")); |
|
425 |
|
426 // === RMobilePhone::NotifyStopInDTMFString is still pending === |
|
427 ASSERT_EQUALS(notifyStopInDTMFStringStatus.Int(), KRequestPending, |
|
428 _L("RMobilePhone::NotifyStopInDTMFString status is not KRequestPending")); |
|
429 |
|
430 // *** Note: expecting NotifyStopInDTMFString to still be active from previous post |
|
431 |
|
432 // === Send DTMF string with a pause and check that === |
|
433 |
|
434 // Send DTMF tones with RMobilePhone::SendDTMFTones with aTones = "12345p67890" |
|
435 TBufC<50> toneDigitSet2 = _L("12345p67890"); |
|
436 DEBUG_PRINTF2(_L("Send DTMF tones: %S"), &toneDigitSet2); |
|
437 mobilePhone.SendDTMFTones(sendDTMFTonesStatus, toneDigitSet2); |
|
438 ASSERT_EQUALS(WaitForRequestWithTimeOut(sendDTMFTonesStatus, ETimeMedium), KErrNone, |
|
439 _L("RMobilePhone::SendDTMFTones timed-out")); |
|
440 ASSERT_EQUALS(sendDTMFTonesStatus.Int(), KErrNone, _L("RMobilePhone::SendDTMFTones status is not KErrNone")); |
|
441 |
|
442 // Check RMobilePhone::NotifyStopInDTMFString is still KRequestPending |
|
443 ASSERT_EQUALS(notifyStopInDTMFStringStatus.Int(), KRequestPending, |
|
444 _L("RMobilePhone::NotifyStopInDTMFString status is not KRequestPending")); |
|
445 |
|
446 // Send DTMF tones with RMobilePhone::SendDTMFTones with aTones = "12345w67890" |
|
447 |
|
448 // === Send DTMF string with a stop and check that === |
|
449 TBufC<50> toneDigitSet3 = _L("12345w67890"); |
|
450 DEBUG_PRINTF2(_L("Send DTMF tones: %S"), &toneDigitSet3); |
|
451 mobilePhone.SendDTMFTones(sendDTMFTonesStatus, toneDigitSet3); |
|
452 |
|
453 |
|
454 // Check RMobilePhone::NotifyStopInDTMFString completes |
|
455 iCallControlTestHelper.WaitForMobilePhoneNotifyStopInDTMFString(notifyStopInDTMFStringStatus, KErrNone); |
|
456 |
|
457 // Complete the send |
|
458 ASSERT_EQUALS(mobilePhone.ContinueDTMFStringSending(ETrue), KErrNone, |
|
459 _L("RMobilePhone::ContinueDTMFStringSending has not returned KErrNone")); |
|
460 ASSERT_EQUALS(WaitForRequestWithTimeOut(sendDTMFTonesStatus, ETimeMedium), KErrNone, |
|
461 _L("RMobilePhone::SendDTMFTones timed-out")); |
|
462 ASSERT_EQUALS(sendDTMFTonesStatus.Int(), KErrNone, _L("RMobilePhone::SendDTMFTones status is not KErrNone")); |
|
463 |
|
464 // Hang-up call |
|
465 DEBUG_PRINTF1(_L("Hangup call")); |
|
466 ASSERT_EQUALS(mobileCall.HangUp(), KErrNone, _L("RMobileCall::HangUp return value not KErrNone")); |
|
467 |
|
468 // |
|
469 // TEST END |
|
470 // |
|
471 |
|
472 StartCleanup(); |
|
473 |
|
474 CleanupStack::PopAndDestroy(3, &dialStatus); |
|
475 // sendDTMFTonesStatus |
|
476 // notifyStopInDTMFStringStatus |
|
477 // dialStatus |
|
478 |
|
479 return TestStepResult(); |
|
480 } |
|
481 |
|
482 TPtrC CCTSYIntegrationTestDTMF0003::GetTestStepName() |
|
483 /** |
|
484 * @return The test step name. |
|
485 */ |
|
486 { |
|
487 return _L("CCTSYIntegrationTestDTMF0003"); |
|
488 } |
|
489 |
|
490 |
|
491 |
|
492 CCTSYIntegrationTestDTMF0004::CCTSYIntegrationTestDTMF0004(CEtelSessionMgr& aEtelSessionMgr) |
|
493 : CCTSYIntegrationTestDTMFBase(aEtelSessionMgr) |
|
494 /** |
|
495 * Constructor. |
|
496 */ |
|
497 { |
|
498 SetTestStepName(CCTSYIntegrationTestDTMF0004::GetTestStepName()); |
|
499 } |
|
500 |
|
501 CCTSYIntegrationTestDTMF0004::~CCTSYIntegrationTestDTMF0004() |
|
502 /** |
|
503 * Destructor. |
|
504 */ |
|
505 { |
|
506 } |
|
507 |
|
508 TVerdict CCTSYIntegrationTestDTMF0004::doTestStepL() |
|
509 /** |
|
510 * @SYMTestCaseID BA-CTSY-INT-DTMF-0004 |
|
511 * @SYMFssID BA/CTSY/DTMF-0004 |
|
512 * @SYMTestCaseDesc Send an invalid DTMF tone. |
|
513 * @SYMTestPriority High |
|
514 * @SYMTestActions RMobilePhone::StartDTMFTone |
|
515 * @SYMTestExpectedResults Pass - Error from baseband / dispatch layer when sending an invalid tone. |
|
516 * @SYMTestType CIT |
|
517 * @SYMTestCaseDependencies live/automatic |
|
518 * |
|
519 * Reason for test: Verify error is returned on attempt to send invalid tone. |
|
520 * |
|
521 * @return - TVerdict code |
|
522 * |
|
523 * $CTSYProblem - The invalid tone is sent to CTSY. CTSY simply passes it down to the LTSY. |
|
524 * The LTSY is returning KErrNone, and CTSY is propogating the error back up to Etel. |
|
525 */ |
|
526 { |
|
527 // |
|
528 // SET UP |
|
529 // |
|
530 |
|
531 RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
532 |
|
533 // Get Voice Line 1. |
|
534 RMobileLine& mobileLine= iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
535 |
|
536 // Get Call 1. |
|
537 RMobileCall& mobileCall= iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1); |
|
538 |
|
539 // Dial a number that answers. |
|
540 TPtrC number; |
|
541 CHECK_TRUE_L(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, number) != EFalse, |
|
542 _L("GetStringFromConfig did not complete as expected")); |
|
543 DEBUG_PRINTF2(_L("Board Now Dialling: %S"), &number); |
|
544 TCoreEtelRequestStatus<RMobileCall> dialStatus(mobileCall, &RCall::DialCancel); |
|
545 CleanupStack::PushL(dialStatus); |
|
546 mobileCall.Dial(dialStatus, number); |
|
547 CHECK_EQUALS_L(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RCall::Dial timed-out")); |
|
548 CHECK_EQUALS_L(dialStatus.Int(), KErrNone, _L("RCall::Dial problem dialling")); |
|
549 |
|
550 // Check RMobilePhone::GetDTMFCaps returns caps of KCapsSendDTMFString | KCapsSendDTMFSingleTone |
|
551 TUint32 dtmfCaps=0; |
|
552 CHECK_EQUALS_L(mobilePhone.GetDTMFCaps(dtmfCaps), KErrNone, |
|
553 _L("RMobilePhone::GetDTMFCaps return value not KErrNone")); |
|
554 TUint32 expectedCaps = RMobilePhone::KCapsSendDTMFString | RMobilePhone::KCapsSendDTMFSingleTone; |
|
555 TUint32 unwantedCaps = KNoWantedBits; |
|
556 ASSERT_BITS_SET(dtmfCaps, expectedCaps, unwantedCaps, |
|
557 _L("RMobilePhone::GetDTMFCaps returned wrong dynamic caps")); |
|
558 |
|
559 // |
|
560 // SET UP END |
|
561 // |
|
562 |
|
563 StartTest(); |
|
564 |
|
565 // |
|
566 // TEST START |
|
567 // |
|
568 |
|
569 // === Attempt to send a single but invalid tone === |
|
570 |
|
571 // Use RMobilePhone::StartDTMFTone to send an invalid tone character. |
|
572 |
|
573 TChar invalidchar = 'Z'; |
|
574 |
|
575 DEBUG_PRINTF2(_L("Send invalid DTMF tones: %c"), (char)invalidchar); |
|
576 |
|
577 ASSERT_EQUALS(mobilePhone.StartDTMFTone(invalidchar), KErrNone, |
|
578 _L("RMobilePhone::StartDTMFTone returned with errror - not KErrNone")); |
|
579 |
|
580 DEBUG_PRINTF1(_L("Hangup call")); |
|
581 ASSERT_EQUALS(mobileCall.HangUp(), KErrNone, _L("RMobileCall::HangUp return value not KErrNone")); |
|
582 |
|
583 // |
|
584 // TEST END |
|
585 // |
|
586 |
|
587 StartCleanup(); |
|
588 |
|
589 CleanupStack::PopAndDestroy(&dialStatus); |
|
590 |
|
591 return TestStepResult(); |
|
592 } |
|
593 |
|
594 TPtrC CCTSYIntegrationTestDTMF0004::GetTestStepName() |
|
595 /** |
|
596 * @return The test step name. |
|
597 */ |
|
598 { |
|
599 return _L("CCTSYIntegrationTestDTMF0004"); |
|
600 } |
|
601 |
|
602 |
|
603 |
|
604 CCTSYIntegrationTestDTMF0005::CCTSYIntegrationTestDTMF0005(CEtelSessionMgr& aEtelSessionMgr) |
|
605 : CCTSYIntegrationTestDTMFBase(aEtelSessionMgr) |
|
606 /** |
|
607 * Constructor. |
|
608 */ |
|
609 { |
|
610 SetTestStepName(CCTSYIntegrationTestDTMF0005::GetTestStepName()); |
|
611 } |
|
612 |
|
613 CCTSYIntegrationTestDTMF0005::~CCTSYIntegrationTestDTMF0005() |
|
614 /** |
|
615 * Destructor. |
|
616 */ |
|
617 { |
|
618 } |
|
619 |
|
620 TVerdict CCTSYIntegrationTestDTMF0005::doTestStepL() |
|
621 /** |
|
622 * @SYMTestCaseID BA-CTSY-INT-DTMF-0005 |
|
623 * @SYMFssID BA/CTSY/DTMF-0005 |
|
624 * @SYMTestCaseDesc Send a string of DTMF tones contains an invalid tone. |
|
625 * @SYMTestPriority High |
|
626 * @SYMTestActions RMobilePhone::SendDTMFTones |
|
627 * @SYMTestExpectedResults Pass - Error from baseband / dispatch layer. |
|
628 * @SYMTestType CIT |
|
629 * @SYMTestCaseDependencies live/automatic |
|
630 * |
|
631 * Reason for test: Verify error is returned on attempt to send DTMF string containing an invalid tone. |
|
632 * |
|
633 * @return - TVerdict code |
|
634 * |
|
635 * $CTSYProblem - LTSY is returning error code KErrGsmCCSemanticallyIncorrectMessage, and not KErrArgument |
|
636 */ |
|
637 { |
|
638 |
|
639 // |
|
640 // SET UP |
|
641 // |
|
642 |
|
643 RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
644 |
|
645 // Get Voice Line 1. |
|
646 RMobileLine& mobileLine= iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
647 |
|
648 // Get Call 1. |
|
649 RMobileCall& mobileCall= iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1); |
|
650 |
|
651 // Dial a number that answers. |
|
652 TPtrC number; |
|
653 CHECK_TRUE_L(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, number) != EFalse, |
|
654 _L("GetStringFromConfig did not complete as expected")); |
|
655 DEBUG_PRINTF2(_L("Board Now Dialling: %S"), &number); |
|
656 TCoreEtelRequestStatus<RMobileCall> dialStatus(mobileCall, &RCall::DialCancel); |
|
657 CleanupStack::PushL(dialStatus); |
|
658 mobileCall.Dial(dialStatus, number); |
|
659 CHECK_EQUALS_L(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RCall::Dial timed-out")); |
|
660 CHECK_EQUALS_L(dialStatus.Int(), KErrNone, _L("RCall::Dial problem dialling")); |
|
661 |
|
662 // Check RMobilePhone::GetDTMFCaps returns caps of KCapsSendDTMFString | KCapsSendDTMFSingleTone |
|
663 TUint32 dtmfCaps=0; |
|
664 CHECK_EQUALS_L(mobilePhone.GetDTMFCaps(dtmfCaps), KErrNone, |
|
665 _L("RMobilePhone::GetDTMFCaps return value not KErrNone")); |
|
666 TUint32 expectedCaps = RMobilePhone::KCapsSendDTMFString | RMobilePhone::KCapsSendDTMFSingleTone; |
|
667 TUint32 unwantedCaps = KNoWantedBits; |
|
668 ASSERT_BITS_SET(dtmfCaps, expectedCaps, unwantedCaps, |
|
669 _L("RMobilePhone::GetDTMFCaps returned wrong dynamic caps")); |
|
670 |
|
671 // |
|
672 // SET UP END |
|
673 // |
|
674 |
|
675 StartTest(); |
|
676 |
|
677 // |
|
678 // TEST START |
|
679 // |
|
680 |
|
681 // === Send some tones but containing an invalid tone character === |
|
682 |
|
683 // Use RMobilePhone::SendDTMFTones to send a string containing valid tones and an invalid tone |
|
684 |
|
685 TBufC<50> toneInvalidSet = _L("0123456Q789ABCD"); |
|
686 DEBUG_PRINTF2(_L("Send invalid DTMF tones: %S"), &toneInvalidSet); |
|
687 |
|
688 TExtEtelRequestStatus sendDTMFTonesStatus(mobilePhone, EMobilePhoneSendDTMFTones); |
|
689 CleanupStack::PushL(sendDTMFTonesStatus); |
|
690 mobilePhone.SendDTMFTones(sendDTMFTonesStatus, toneInvalidSet); |
|
691 ASSERT_EQUALS(WaitForRequestWithTimeOut(sendDTMFTonesStatus, ETimeMedium), KErrNone, |
|
692 _L("RMobilePhone::SendDTMFTones timed-out")); |
|
693 // Check KErrGsmCCSemanticallyIncorrectMessage is returned. |
|
694 ASSERT_EQUALS(sendDTMFTonesStatus.Int(), KErrGsmCCSemanticallyIncorrectMessage, |
|
695 _L("RMobilePhone::SendDTMFTones status is not KErrGsmCCSemanticallyIncorrectMessage")); |
|
696 |
|
697 DEBUG_PRINTF1(_L("Hangup call")); |
|
698 ASSERT_EQUALS(mobileCall.HangUp(), KErrNone, _L("RMobileCall::HangUp return value not KErrNone")); |
|
699 |
|
700 // |
|
701 // TEST END |
|
702 // |
|
703 |
|
704 StartCleanup(); |
|
705 |
|
706 CleanupStack::PopAndDestroy(2, &dialStatus); |
|
707 // sendDTMFTonesStatus |
|
708 // dialStatus |
|
709 |
|
710 return TestStepResult(); |
|
711 } |
|
712 |
|
713 TPtrC CCTSYIntegrationTestDTMF0005::GetTestStepName() |
|
714 /** |
|
715 * @return The test step name. |
|
716 */ |
|
717 { |
|
718 return _L("CCTSYIntegrationTestDTMF0005"); |
|
719 } |
|
720 |
|
721 |
|
722 |
|
723 CCTSYIntegrationTestDTMF0006::CCTSYIntegrationTestDTMF0006(CEtelSessionMgr& aEtelSessionMgr) |
|
724 : CCTSYIntegrationTestDTMFBase(aEtelSessionMgr) |
|
725 /** |
|
726 * Constructor. |
|
727 */ |
|
728 { |
|
729 SetTestStepName(CCTSYIntegrationTestDTMF0006::GetTestStepName()); |
|
730 } |
|
731 |
|
732 CCTSYIntegrationTestDTMF0006::~CCTSYIntegrationTestDTMF0006() |
|
733 /** |
|
734 * Destructor. |
|
735 */ |
|
736 { |
|
737 } |
|
738 |
|
739 TVerdict CCTSYIntegrationTestDTMF0006::doTestStepL() |
|
740 /** |
|
741 * @SYMTestCaseID BA-CTSY-INT-DTMF-0006 |
|
742 * @SYMFssID BA/CTSY/DTMF-0006 |
|
743 * @SYMTestCaseDesc Test sending DTMF digits during a video call. |
|
744 * @SYMTestPriority High |
|
745 * @SYMTestActions RMobilePhone::StartDTMFTone, RMobilePhone::StopDTMFTone, RMobilePhone::SendDTMFTones, RMobilePhone::NotifyStopInDTMFString, RMobilePhone::ContinueDTMFStringSending, RCall::HangUp, RMobilePhone::GetDTMFCaps |
|
746 * @SYMTestExpectedResults Pass - DTMF digits and strings sent. |
|
747 * @SYMTestType CIT |
|
748 * @SYMTestCaseDependencies live/automatic |
|
749 * |
|
750 * Reason for test: Verify DTMF digits can be sent during a video call. |
|
751 * |
|
752 * @return - TVerdict code |
|
753 */ |
|
754 { /*** NOTE: CODED BUT NOT TESTED ***/ |
|
755 |
|
756 // |
|
757 // SET UP |
|
758 // |
|
759 |
|
760 RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
761 |
|
762 // Ensure phone supports KCapsData caps. |
|
763 |
|
764 RMobilePhone::TCaps mobilephonecaps; |
|
765 |
|
766 CHECK_EQUALS_L(mobilePhone.GetCaps(mobilephonecaps), KErrNone, _L("RMobilePhone::GetCaps")); |
|
767 TUint32 expectedmobilephoneCaps = RMobilePhone::KCapsData | RMobilePhone::KCapsVoice; |
|
768 TUint32 unwantedmobilephoneCaps = KNoUnwantedBits; |
|
769 ASSERT_BITS_SET(mobilephonecaps.iFlags, expectedmobilephoneCaps, unwantedmobilephoneCaps, |
|
770 _L("RMobilePhone::GetCaps returned wrong dynamic caps")); |
|
771 |
|
772 // Get data line 1. |
|
773 RMobileLine& mobileLine= iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KDataLine); //KDataLine); |
|
774 |
|
775 // Get Call 1. |
|
776 RMobileCall& mobileCall= iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KDataLine, KCall1); //KDataLine, KCall1); |
|
777 |
|
778 TPtrC number; |
|
779 ASSERT_TRUE(GetStringFromConfig(KIniDataNumSection, KIniDataNumber1, number) != EFalse, |
|
780 _L("GetStringFromConfig did not complete as expected")); |
|
781 DEBUG_PRINTF2(_L("Board Now Dialling: %S"), &number); |
|
782 TCoreEtelRequestStatus<RMobileCall> dialStatus(mobileCall, &RCall::DialCancel); |
|
783 CleanupStack::PushL(dialStatus); |
|
784 |
|
785 RMobileCall::TMobileDataCallParamsV1 dataParams, retrieveDataParams; |
|
786 RMobileCall::TMobileDataCallParamsV1Pckg dataParamsPckg(dataParams); |
|
787 RMobileCall::TMobileDataCallParamsV1Pckg retrieveDataParamsPckg(retrieveDataParams); |
|
788 |
|
789 dataParams.iService = RMobileCall::EServiceDataCircuitAsyncRdi; |
|
790 dataParams.iSpeed = RMobileCall::ESpeed9600; |
|
791 dataParams.iProtocol = RMobileCall::EProtocolV110; |
|
792 dataParams.iQoS = RMobileCall::EQoSNonTransparent; |
|
793 dataParams.iRLPVersion = RMobileCall::ERLPSingleLinkVersion1; |
|
794 dataParams.iV42bisReq = RMobileCall::EV42bisBothDirections; |
|
795 dataParams.iUseEdge = ETrue; |
|
796 |
|
797 // Post RMobilePhone::NotifyDTMFCapsChange (most likely to change when the phone starts and ends voice calls, |
|
798 // so does this also apply to a data call ?) |
|
799 |
|
800 TUint32 completiondtmfcaps; |
|
801 TExtEtelRequestStatus notifyDTMFCapsChangeStatus(mobilePhone, EMobilePhoneNotifyDTMFCapsChange); |
|
802 CleanupStack::PushL(notifyDTMFCapsChangeStatus); |
|
803 mobilePhone.NotifyDTMFCapsChange(notifyDTMFCapsChangeStatus, completiondtmfcaps); |
|
804 |
|
805 //IMPORT_C void Dial(TRequestStatus &aStatus, const TDesC8 &aCallParams, const TTelNumberC &aTelNumber); |
|
806 mobileCall.Dial(dialStatus, dataParamsPckg, number); |
|
807 CHECK_EQUALS_L(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RCall::Dial timed-out")); |
|
808 CHECK_EQUALS_L(dialStatus.Int(), KErrNone, _L("RCall::Dial problem dialling")); |
|
809 |
|
810 // Check RMobilePhone::NotifyDTMFCapsChange completes with caps of KCapsSendDTMFString | KCapsSendDTMFSingleTone |
|
811 TUint32 expectedCaps = RMobilePhone::KCapsSendDTMFString | RMobilePhone::KCapsSendDTMFSingleTone; |
|
812 TUint32 unwantedCaps = KNoUnwantedBits; |
|
813 TInt wantedStatus = KErrNone; |
|
814 iCallControlTestHelper.WaitForMobilePhoneNotifyDTMFCapsChange( |
|
815 mobilePhone, |
|
816 notifyDTMFCapsChangeStatus, |
|
817 completiondtmfcaps, |
|
818 expectedCaps, |
|
819 unwantedCaps, |
|
820 wantedStatus); |
|
821 |
|
822 // Check RMobilePhone::GetDTMFCaps returns caps of KCapsSendDTMFString | KCapsSendDTMFSingleTone |
|
823 TUint32 dtmfCaps=0; |
|
824 ASSERT_EQUALS(mobilePhone.GetDTMFCaps(dtmfCaps), KErrNone,_L("RMobilePhone::GetDTMFCaps return value not KErrNone")); |
|
825 ASSERT_BITS_SET(dtmfCaps, expectedCaps, unwantedCaps, _L("RMobilePhone::GetDTMFCaps returned wrong dynamic caps")); |
|
826 |
|
827 // |
|
828 // SET UP END |
|
829 // |
|
830 |
|
831 StartTest(); |
|
832 |
|
833 // |
|
834 // TEST START |
|
835 // |
|
836 |
|
837 // Send a valid individual DTMF digits. |
|
838 |
|
839 TChar tone = 'A'; |
|
840 DEBUG_PRINTF2(_L("Send DTMF tones: %c"), (char)tone); |
|
841 ASSERT_EQUALS(mobilePhone.StartDTMFTone(tone), KErrNone, |
|
842 _L("RMobilePhone::StartDTMFTone return value is not KErrNone")); |
|
843 User::After(KOneSecond); |
|
844 ASSERT_EQUALS(mobilePhone.StopDTMFTone(), KErrNone, |
|
845 _L("RMobilePhone::StopDTMFTone return value is not KErrNone")); |
|
846 |
|
847 // Send a valid DTMF string without a stop or pause character. |
|
848 |
|
849 TBufC<50> toneSet1 = _L("0123456789ABCD"); |
|
850 DEBUG_PRINTF2(_L("Send DTMF tones: %S"), &toneSet1); |
|
851 TExtEtelRequestStatus sendDtmfTonesStatus(mobilePhone, EMobilePhoneSendDTMFTones); |
|
852 CleanupStack::PushL(sendDtmfTonesStatus); |
|
853 mobilePhone.SendDTMFTones(sendDtmfTonesStatus, toneSet1); |
|
854 ASSERT_EQUALS(WaitForRequestWithTimeOut(sendDtmfTonesStatus, ETimeMedium), KErrNone, |
|
855 _L("RMobilePhone::SendDTMFTones timed-out")); |
|
856 // Check request completes with KErrNone each time. |
|
857 ASSERT_EQUALS(sendDtmfTonesStatus.Int(), KErrNone, |
|
858 _L("RMobilePhone::SendDTMFTones completed with incorrect error")); |
|
859 if(sendDtmfTonesStatus.Int() != KErrNone) |
|
860 { |
|
861 sendDtmfTonesStatus.Cancel(); |
|
862 } |
|
863 |
|
864 // Send a valid DTMF string "12345p67890" |
|
865 |
|
866 TBufC<50> toneSet2 = _L("12345p67890"); |
|
867 DEBUG_PRINTF2(_L("Send DTMF tones: %S"), &toneSet2); |
|
868 mobilePhone.SendDTMFTones(sendDtmfTonesStatus, toneSet2); |
|
869 ASSERT_EQUALS(WaitForRequestWithTimeOut(sendDtmfTonesStatus, ETimeMedium), KErrNone, |
|
870 _L("RMobilePhone::SendDTMFTones timed-out")); |
|
871 // Check request completes with KErrNone each time. |
|
872 ASSERT_EQUALS(sendDtmfTonesStatus.Int(), KErrNone, |
|
873 _L("RMobilePhone::SendDTMFTones completed with incorrect error")); |
|
874 if(sendDtmfTonesStatus.Int() != KErrNone) |
|
875 { |
|
876 sendDtmfTonesStatus.Cancel(); |
|
877 } |
|
878 |
|
879 // Send a valid DTMF string "12345w67890" |
|
880 |
|
881 TBufC<50> toneSet3 = _L("12345w67890"); |
|
882 DEBUG_PRINTF2(_L("Send DTMF tones: %S"), &toneSet3); |
|
883 |
|
884 // Post notification for RMobilePhone::NotifyStopInDTMFString |
|
885 TExtEtelRequestStatus notifyStopStatus(mobilePhone, EMobilePhoneNotifyStopInDTMFString); |
|
886 CleanupStack::PushL(notifyStopStatus); |
|
887 mobilePhone.NotifyStopInDTMFString(notifyStopStatus); |
|
888 |
|
889 mobilePhone.SendDTMFTones(sendDtmfTonesStatus, toneSet3); |
|
890 |
|
891 // Check RMobilePhone::NotifyStopInDTMFString completes |
|
892 iCallControlTestHelper.WaitForMobilePhoneNotifyStopInDTMFString(notifyStopStatus, KErrNone); |
|
893 |
|
894 // Continue sending the string with RMobilePhone::ContinueDTMFStringSending with aContinue = ETrue |
|
895 ASSERT_EQUALS(mobilePhone.ContinueDTMFStringSending(ETrue), KErrNone, |
|
896 _L("RMobilePhone::ContinueDTMFStringSending has not returned KErrNone")); |
|
897 // Check request completes with KErrNone each time. |
|
898 ASSERT_EQUALS(WaitForRequestWithTimeOut(sendDtmfTonesStatus, ETimeMedium), KErrNone, |
|
899 _L("RMobilePhone::SendDTMFTones timed-out")); |
|
900 ASSERT_EQUALS(sendDtmfTonesStatus.Int(), KErrNone, _L("RMobilePhone::SendDTMFTones status is not KErrNone")); |
|
901 if(sendDtmfTonesStatus.Int() != KErrNone) |
|
902 { |
|
903 sendDtmfTonesStatus.Cancel(); |
|
904 } |
|
905 |
|
906 // Send a valid DTMF string "12345w67890" again |
|
907 DEBUG_PRINTF2(_L("Send DTMF tones (again): %S"), &toneSet3); |
|
908 |
|
909 // Post notification for RMobilePhone::NotifyStopInDTMFString |
|
910 mobilePhone.NotifyStopInDTMFString(notifyStopStatus); |
|
911 |
|
912 mobilePhone.SendDTMFTones(sendDtmfTonesStatus, toneSet3); |
|
913 |
|
914 // Check RMobilePhone::NotifyStopInDTMFString completes |
|
915 iCallControlTestHelper.WaitForMobilePhoneNotifyStopInDTMFString(notifyStopStatus, KErrNone); |
|
916 |
|
917 // Continue sending the string with RMobilePhone::ContinueDTMFStringSending with aContinue = EFalse |
|
918 ASSERT_EQUALS(mobilePhone.ContinueDTMFStringSending(EFalse), KErrNone, |
|
919 _L("RMobilePhone::ContinueDTMFStringSending has not returned KErrNone")); |
|
920 |
|
921 // Check request completes with KErrNone each time. |
|
922 // *** Does the send complete even if we requested EFalse on the ContinueDTMFStringSending ? |
|
923 ASSERT_EQUALS(WaitForRequestWithTimeOut(sendDtmfTonesStatus, ETimeMedium), KErrNone, |
|
924 _L("RMobilePhone::SendDTMFTones timed-out")); |
|
925 ASSERT_EQUALS(sendDtmfTonesStatus.Int(), KErrNone, _L("RMobilePhone::SendDTMFTones status is not KErrNone")); |
|
926 if(sendDtmfTonesStatus.Int() != KErrNone) |
|
927 { |
|
928 sendDtmfTonesStatus.Cancel(); |
|
929 } |
|
930 |
|
931 // Post NotifyDTMFCapsChange |
|
932 mobilePhone.NotifyDTMFCapsChange(notifyDTMFCapsChangeStatus, completiondtmfcaps); |
|
933 |
|
934 // Hang up. |
|
935 DEBUG_PRINTF1(_L("Hangup call")); |
|
936 ASSERT_EQUALS(mobileCall.HangUp(), KErrNone, _L("RMobileCall::HangUp did not return with KErrNone")); |
|
937 |
|
938 // Check RMobilePhone::NotifyDTMFCapsChange completes with caps of 0 |
|
939 expectedCaps = KNoWantedBits; |
|
940 unwantedCaps = KNoUnwantedBits; |
|
941 wantedStatus = KErrNone; |
|
942 iCallControlTestHelper.WaitForMobilePhoneNotifyDTMFCapsChange( |
|
943 mobilePhone, |
|
944 notifyDTMFCapsChangeStatus, |
|
945 completiondtmfcaps, |
|
946 expectedCaps, |
|
947 unwantedCaps, |
|
948 wantedStatus); |
|
949 |
|
950 // Check RMobilePhone::GetDTMFCaps returns caps of 0 |
|
951 ASSERT_EQUALS(mobilePhone.GetDTMFCaps(dtmfCaps), KErrNone,_L("RMobilePhone::GetDTMFCaps return value not KErrNone")); |
|
952 ASSERT_BITS_SET(dtmfCaps, expectedCaps, unwantedCaps, _L("RMobilePhone::GetDTMFCaps returned wrong dynamic caps")); |
|
953 |
|
954 // |
|
955 // TEST END |
|
956 // |
|
957 |
|
958 StartCleanup(); |
|
959 |
|
960 CleanupStack::PopAndDestroy(4, &dialStatus); |
|
961 // notifyStopStatus |
|
962 // sendDtmfTonesStatus |
|
963 // notifyDTMFCapsChangeStatus |
|
964 // dialStatus |
|
965 |
|
966 return TestStepResult(); |
|
967 } |
|
968 |
|
969 TPtrC CCTSYIntegrationTestDTMF0006::GetTestStepName() |
|
970 /** |
|
971 * @return The test step name. |
|
972 */ |
|
973 { |
|
974 return _L("CCTSYIntegrationTestDTMF0006"); |
|
975 } |
|
976 |
|
977 |
|
978 |
|
979 CCTSYIntegrationTestDTMF0007::CCTSYIntegrationTestDTMF0007(CEtelSessionMgr& aEtelSessionMgr) |
|
980 : CCTSYIntegrationTestDTMFBase(aEtelSessionMgr) |
|
981 /** |
|
982 * Constructor. |
|
983 */ |
|
984 { |
|
985 SetTestStepName(CCTSYIntegrationTestDTMF0007::GetTestStepName()); |
|
986 } |
|
987 |
|
988 CCTSYIntegrationTestDTMF0007::~CCTSYIntegrationTestDTMF0007() |
|
989 /** |
|
990 * Destructor. |
|
991 */ |
|
992 { |
|
993 } |
|
994 |
|
995 TVerdict CCTSYIntegrationTestDTMF0007::doTestStepL() |
|
996 /** |
|
997 * @SYMTestCaseID BA-CTSY-INT-DTMF-0007 |
|
998 * @SYMFssID BA/CTSY/DTMF-0007 |
|
999 * @SYMTestCaseDesc Cancel the sending of DTMF Tones |
|
1000 * @SYMTestPriority High |
|
1001 * @SYMTestActions RMobilePhone::SendDTMFTones |
|
1002 * @SYMTestExpectedResults Pass - KErrCancel returned on cancellation. |
|
1003 * @SYMTestType CIT |
|
1004 * @SYMTestCaseDependencies live/automatic |
|
1005 * |
|
1006 * Reason for test: Verify request to send DTMF tones can be cancelled. |
|
1007 * |
|
1008 * @return - TVerdict code |
|
1009 */ |
|
1010 { |
|
1011 |
|
1012 // |
|
1013 // SET UP |
|
1014 // |
|
1015 |
|
1016 RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
1017 |
|
1018 // Get Voice Line 1. |
|
1019 RMobileLine& mobileLine= iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
1020 |
|
1021 // Get Call 1. |
|
1022 RMobileCall& mobileCall= iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1); |
|
1023 |
|
1024 // Call TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL |
|
1025 CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(mobilePhone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error")); |
|
1026 |
|
1027 // Dial a number that answers. |
|
1028 TPtrC number; |
|
1029 CHECK_TRUE_L(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, number) != EFalse, _L("GetStringFromConfig did not complete as expected")); |
|
1030 DEBUG_PRINTF2(_L("Board Now Dialling: %S"), &number); |
|
1031 TCoreEtelRequestStatus<RMobileCall> dialStatus(mobileCall, &RCall::DialCancel); |
|
1032 CleanupStack::PushL(dialStatus); |
|
1033 mobileCall.Dial(dialStatus, number); |
|
1034 CHECK_TRUE_L(WaitForRequestWithTimeOut(dialStatus, ETimeMedium)==KErrNone, _L("RCall::Dial timed-out")); |
|
1035 CHECK_TRUE_L(dialStatus.Int()==KErrNone, _L("RCall::Dial problem dialling")); |
|
1036 |
|
1037 // Check RMobilePhone::GetDTMFCaps returns caps of KCapsSendDTMFString | KCapsSendDTMFSingleTone |
|
1038 TUint32 dtmfCaps=0; |
|
1039 CHECK_TRUE_L(mobilePhone.GetDTMFCaps(dtmfCaps)==KErrNone, _L("RMobilePhone::GetDTMFCaps return value not KErrNone")); |
|
1040 TUint32 expectedCaps = RMobilePhone::KCapsSendDTMFString | RMobilePhone::KCapsSendDTMFSingleTone; |
|
1041 CHECK_BITS_SET_L(dtmfCaps, expectedCaps, KNoWantedBits, _L("RMobilePhone::GetDTMFCaps returned wrong dynamic caps")); |
|
1042 |
|
1043 // |
|
1044 // SET UP END |
|
1045 // |
|
1046 |
|
1047 StartTest(); |
|
1048 |
|
1049 // |
|
1050 // TEST START |
|
1051 // |
|
1052 |
|
1053 // Use RMobilePhone::SendDTMFTones to send a valid, long DTMF string (e.g. 20 characters) |
|
1054 TBufC<50> toneSet1 = _L("0123456789ABCD0123456789"); |
|
1055 DEBUG_PRINTF2(_L("Send DTMF tones: %S"), &toneSet1); |
|
1056 |
|
1057 TExtEtelRequestStatus sendDtmfTonesStatus(mobilePhone, EMobilePhoneSendDTMFTones); |
|
1058 CleanupStack::PushL(sendDtmfTonesStatus); |
|
1059 mobilePhone.SendDTMFTones(sendDtmfTonesStatus, toneSet1); |
|
1060 User::After(KOneSecond); // wait for 1 second |
|
1061 |
|
1062 // Cancel sending DTMF tones here |
|
1063 mobilePhone.CancelAsyncRequest(EMobilePhoneSendDTMFTones); |
|
1064 |
|
1065 // Check request completes with KErrCancel |
|
1066 ASSERT_EQUALS(WaitForRequestWithTimeOut(sendDtmfTonesStatus, ETimeMedium), KErrNone, _L("RMobilePhone::SendDTMFTones timed-out")); |
|
1067 ASSERT_EQUALS(sendDtmfTonesStatus.Int(), KErrCancel, _L("RMobilePhone::SendDTMFTones sendDtmfTonesStatus completed with incorrect error")); |
|
1068 |
|
1069 DEBUG_PRINTF1(_L("Hangup call")); |
|
1070 ASSERT_EQUALS(mobileCall.HangUp(), KErrNone, _L("RCall::HangUp return value not KErrNone")); |
|
1071 |
|
1072 // |
|
1073 // TEST END |
|
1074 // |
|
1075 |
|
1076 StartCleanup(); |
|
1077 |
|
1078 CleanupStack::PopAndDestroy(&sendDtmfTonesStatus); |
|
1079 CleanupStack::PopAndDestroy(&dialStatus); |
|
1080 |
|
1081 return TestStepResult(); |
|
1082 } |
|
1083 |
|
1084 TPtrC CCTSYIntegrationTestDTMF0007::GetTestStepName() |
|
1085 /** |
|
1086 * @return The test step name. |
|
1087 */ |
|
1088 { |
|
1089 return _L("CCTSYIntegrationTestDTMF0007"); |
|
1090 } |
|
1091 |
|
1092 |
|
1093 |
|
1094 CCTSYIntegrationTestDTMF0008::CCTSYIntegrationTestDTMF0008(CEtelSessionMgr& aEtelSessionMgr) |
|
1095 : CCTSYIntegrationTestDTMFBase(aEtelSessionMgr) |
|
1096 /** |
|
1097 * Constructor. |
|
1098 */ |
|
1099 { |
|
1100 SetTestStepName(CCTSYIntegrationTestDTMF0008::GetTestStepName()); |
|
1101 } |
|
1102 |
|
1103 CCTSYIntegrationTestDTMF0008::~CCTSYIntegrationTestDTMF0008() |
|
1104 /** |
|
1105 * Destructor. |
|
1106 */ |
|
1107 { |
|
1108 } |
|
1109 |
|
1110 TVerdict CCTSYIntegrationTestDTMF0008::doTestStepL() |
|
1111 /** |
|
1112 * @SYMTestCaseID BA-CTSY-INT-DTMF-0008 |
|
1113 * @SYMFssID BA/CTSY/DTMF-0008 |
|
1114 * @SYMTestCaseDesc Remote party terminates call during DTMF sequence |
|
1115 * @SYMTestPriority High |
|
1116 * @SYMTestActions RMobilePhone::SendDTMFTones, RCall::NotifyStatusChange, RMobileCall::NotifyCallEvent |
|
1117 * @SYMTestExpectedResults Pass - Call terminates. |
|
1118 * @SYMTestType CIT |
|
1119 * @SYMTestCaseDependencies live/manual |
|
1120 * |
|
1121 * Reason for test: Verify client is notified of call termination. |
|
1122 * |
|
1123 * @return - TVerdict code |
|
1124 */ |
|
1125 { |
|
1126 |
|
1127 // |
|
1128 // SET UP |
|
1129 // |
|
1130 |
|
1131 RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
1132 |
|
1133 // Call TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL |
|
1134 CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(mobilePhone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error")); |
|
1135 |
|
1136 // Get Voice Line 1. |
|
1137 RMobileLine& mobileLine= iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
1138 |
|
1139 // Get Call 1. |
|
1140 RMobileCall& mobileCall= iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1); |
|
1141 |
|
1142 // Dial a number that answers. |
|
1143 TPtrC number; |
|
1144 CHECK_TRUE_L(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, number) != EFalse, _L("GetStringFromConfig did not complete as expected")); |
|
1145 |
|
1146 DisplayUserInteractionPromptL(_L("To run this test correctly, you should have set your own phone number to voice number 1 in the ini file."), ETimeLong); |
|
1147 |
|
1148 DEBUG_PRINTF2(_L("Board Now Dialling: %S"), &number); |
|
1149 TCoreEtelRequestStatus<RMobileCall> dialStatus(mobileCall, &RCall::DialCancel); |
|
1150 CleanupStack::PushL(dialStatus); |
|
1151 mobileCall.Dial(dialStatus, number); |
|
1152 CHECK_EQUALS_L(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RCall::Dial timed-out")); |
|
1153 CHECK_EQUALS_L(dialStatus.Int(), KErrNone, _L("RCall::Dial problem dialling")); |
|
1154 |
|
1155 // Check RMobilePhone::GetDTMFCaps returns caps of KCapsSendDTMFString | KCapsSendDTMFSingleTone |
|
1156 TUint32 dtmfCaps=0; |
|
1157 CHECK_EQUALS_L(mobilePhone.GetDTMFCaps(dtmfCaps), KErrNone,_L("RMobilePhone::GetDTMFCaps return value not KErrNone")); |
|
1158 TUint32 expectedCaps = RMobilePhone::KCapsSendDTMFString | RMobilePhone::KCapsSendDTMFSingleTone; |
|
1159 CHECK_BITS_SET_L(dtmfCaps, expectedCaps, KNoWantedBits, _L("RMobilePhone::GetDTMFCaps returned wrong dynamic caps")); |
|
1160 |
|
1161 // |
|
1162 // SET UP END |
|
1163 // |
|
1164 |
|
1165 StartTest(); |
|
1166 |
|
1167 // |
|
1168 // TEST START |
|
1169 // |
|
1170 |
|
1171 // Use RMobilePhone::SendDTMFTones to send a long string of tones (20 characters). |
|
1172 // Do not wait for the request to complete before continuing. |
|
1173 TExtEtelRequestStatus callEventStatus(mobileCall, EMobileCallNotifyCallEvent); |
|
1174 CleanupStack::PushL(callEventStatus); |
|
1175 RMobileCall::TMobileCallEvent mobileCallEvent; |
|
1176 |
|
1177 mobileCall.NotifyCallEvent(callEventStatus, mobileCallEvent); |
|
1178 |
|
1179 TCoreEtelRequestStatus<RMobileCall> mobileStatus(mobileCall, &RCall::NotifyStatusChangeCancel); |
|
1180 CleanupStack::PushL(mobileStatus); |
|
1181 RMobileCall::TStatus changedStatus; |
|
1182 |
|
1183 mobileCall.NotifyStatusChange(mobileStatus, changedStatus); |
|
1184 |
|
1185 // Use RMobilePhone::SendDTMFTones to send a long string of tones (20 characters). |
|
1186 TBufC<50> toneSet1 = _L("0123456789ABCD01234567890123456789ABCD0123456789"); |
|
1187 TExtEtelRequestStatus sendDTMFTonesStatus(mobilePhone, EMobilePhoneSendDTMFTones); |
|
1188 CleanupStack::PushL(sendDTMFTonesStatus); |
|
1189 |
|
1190 DEBUG_PRINTF2(_L("Send DTMF tones: %S"), &toneSet1); |
|
1191 mobilePhone.SendDTMFTones(sendDTMFTonesStatus, toneSet1); |
|
1192 |
|
1193 User::After(KOneSecond); // wait for 1 second |
|
1194 |
|
1195 DisplayUserInteractionPromptL(_L("Hang up the call."), ETimeLong); |
|
1196 |
|
1197 RMobileCall::TMobileCallEvent expectedEvent = RMobileCall::ERemoteTerminated; |
|
1198 iCallControlTestHelper.WaitForMobileCallNotifyCallEvent(mobileCall, |
|
1199 callEventStatus, |
|
1200 mobileCallEvent, |
|
1201 expectedEvent, |
|
1202 KErrNone); |
|
1203 |
|
1204 // Check RCall::NotifyStatusChange completes with EStatusHangingUp. |
|
1205 RMobileCall::TStatus expectedCallStatus = RMobileCall::EStatusHangingUp; |
|
1206 iCallControlTestHelper.WaitForCallNotifyStatusChange(mobileCall, |
|
1207 mobileStatus, |
|
1208 changedStatus, |
|
1209 expectedCallStatus, |
|
1210 KErrNone); |
|
1211 |
|
1212 DEBUG_PRINTF1(_L("Hangup call")); |
|
1213 ASSERT_EQUALS(mobileCall.HangUp(), KErrNone, _L("RMobileCall::HangUp return value not KErrNone")); |
|
1214 |
|
1215 // |
|
1216 // TEST END |
|
1217 // |
|
1218 |
|
1219 StartCleanup(); |
|
1220 |
|
1221 // Pop: |
|
1222 // dialStatus |
|
1223 // callEventStatus |
|
1224 // mobileStatus |
|
1225 // sendDTMFTonesStatus |
|
1226 CleanupStack::PopAndDestroy(4, &dialStatus); |
|
1227 |
|
1228 return TestStepResult(); |
|
1229 } |
|
1230 |
|
1231 TPtrC CCTSYIntegrationTestDTMF0008::GetTestStepName() |
|
1232 /** |
|
1233 * @return The test step name. |
|
1234 */ |
|
1235 { |
|
1236 return _L("CCTSYIntegrationTestDTMF0008"); |
|
1237 } |
|
1238 |
|
1239 |
|
1240 |
|
1241 CCTSYIntegrationTestDTMF0009::CCTSYIntegrationTestDTMF0009(CEtelSessionMgr& aEtelSessionMgr) |
|
1242 : CCTSYIntegrationTestDTMFBase(aEtelSessionMgr) |
|
1243 /** |
|
1244 * Constructor. |
|
1245 */ |
|
1246 { |
|
1247 SetTestStepName(CCTSYIntegrationTestDTMF0009::GetTestStepName()); |
|
1248 } |
|
1249 |
|
1250 CCTSYIntegrationTestDTMF0009::~CCTSYIntegrationTestDTMF0009() |
|
1251 /** |
|
1252 * Destructor. |
|
1253 */ |
|
1254 { |
|
1255 } |
|
1256 |
|
1257 TVerdict CCTSYIntegrationTestDTMF0009::doTestStepL() |
|
1258 /** |
|
1259 * @SYMTestCaseID BA-CTSY-INT-DTMF-0009 |
|
1260 * @SYMFssID BA/CTSY/DTMF-0009 |
|
1261 * @SYMTestCaseDesc Check that outgoing DTMF tones are added to dialled party details |
|
1262 * @SYMTestPriority High |
|
1263 * @SYMTestActions RMobileCall::GetMobileCallInfo, RMobilePhone::SendDTMFTones |
|
1264 * @SYMTestExpectedResults Pass - Dialled party details contains DTMF tones, remote number does not. |
|
1265 * @SYMTestType CIT |
|
1266 * @SYMTestCaseDependencies live/automatic |
|
1267 * |
|
1268 * Reason for test: Verify remote party info contains the dialled number and the sent DTMF digits. |
|
1269 * |
|
1270 * @return - TVerdict code |
|
1271 */ |
|
1272 { |
|
1273 |
|
1274 // |
|
1275 // SET UP |
|
1276 // |
|
1277 RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
1278 |
|
1279 // Call TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL |
|
1280 CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(mobilePhone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error")); |
|
1281 |
|
1282 // Get Voice Line 1. |
|
1283 RMobileLine& mobileLine= iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
1284 |
|
1285 // Get Call 1. |
|
1286 RMobileCall& mobileCall= iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1); |
|
1287 |
|
1288 // Dial a number that answers. |
|
1289 TPtrC number; |
|
1290 CHECK_TRUE_L(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, number) != EFalse, _L("GetStringFromConfig did not complete as expected")); |
|
1291 DEBUG_PRINTF2(_L("Board Now Dialling: %S"), &number); |
|
1292 TCoreEtelRequestStatus<RMobileCall> dialStatus(mobileCall, &RCall::DialCancel); |
|
1293 CleanupStack::PushL(dialStatus); |
|
1294 mobileCall.Dial(dialStatus, number); |
|
1295 CHECK_EQUALS_L(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RCall::Dial timed-out")); |
|
1296 CHECK_EQUALS_L(dialStatus.Int(), KErrNone, _L("RCall::Dial problem dialling")); |
|
1297 |
|
1298 // Check RMobilePhone::GetDTMFCaps returns caps of KCapsSendDTMFString | KCapsSendDTMFSingleTone |
|
1299 TUint32 dtmfCaps=0; |
|
1300 CHECK_EQUALS_L(mobilePhone.GetDTMFCaps(dtmfCaps), KErrNone, _L("RMobilePhone::GetDTMFCaps return value not KErrNone")); |
|
1301 TUint32 expectedCaps = RMobilePhone::KCapsSendDTMFString | RMobilePhone::KCapsSendDTMFSingleTone; |
|
1302 CHECK_BITS_SET_L(dtmfCaps, expectedCaps, KNoWantedBits, _L("RMobilePhone::GetDTMFCaps returned wrong dynamic caps")); |
|
1303 |
|
1304 // |
|
1305 // SET UP END |
|
1306 // |
|
1307 |
|
1308 StartTest(); |
|
1309 |
|
1310 // |
|
1311 // TEST START |
|
1312 // |
|
1313 |
|
1314 // Check RMobileCall::GetMobileCallInfo returns correct number in iRemoteParty.iRemoteNumber |
|
1315 RMobileCall::TMobileCallInfoV1 syncCallInfo; |
|
1316 RMobileCall::TMobileCallInfoV1Pckg syncCallInfoPckg(syncCallInfo); |
|
1317 |
|
1318 User::After(KOneSecond*10); // Give timers enough time to increment |
|
1319 ASSERT_EQUALS(mobileCall.GetMobileCallInfo(syncCallInfoPckg), KErrNone, _L("RMobilePhone::GetMobileCallInfo has not returned KErrNone")); |
|
1320 |
|
1321 DEBUG_PRINTF2(_L("syncCallInfo.iRemoteParty.iRemoteNumber.iTelNumber: \"%S\""), &syncCallInfo.iRemoteParty.iRemoteNumber.iTelNumber); |
|
1322 DEBUG_PRINTF2(_L("number: \"%S\""), &number); |
|
1323 |
|
1324 ASSERT_EQUALS(syncCallInfo.iRemoteParty.iRemoteNumber.iTelNumber.Compare(number), 0, _L("aSyncCallInfo.iRemoteParty.iRemoteNumber.iTelNumber is not correct")); |
|
1325 |
|
1326 // Check RMobileCall::GetMobileCallInfo returns correct number in iDialledParty |
|
1327 ASSERT_EQUALS(syncCallInfo.iDialledParty.iTelNumber.Compare(number), 0, _L("syncCallInfo.iDialledParty.iTelNumber is not correct")); |
|
1328 |
|
1329 // Send some valid DTMF tones. |
|
1330 TExtEtelRequestStatus sendDTMFTonesStatus(mobilePhone, EMobilePhoneSendDTMFTones); |
|
1331 CleanupStack::PushL(sendDTMFTonesStatus); |
|
1332 |
|
1333 TBufC<50> toneSet1 = _L("0123456789ABCD"); |
|
1334 |
|
1335 DEBUG_PRINTF2(_L("Send DTMF tones: %S"), &toneSet1); |
|
1336 mobilePhone.SendDTMFTones(sendDTMFTonesStatus, toneSet1); |
|
1337 |
|
1338 // Check request completes with KErrNone each time. |
|
1339 ASSERT_EQUALS(WaitForRequestWithTimeOut(sendDTMFTonesStatus, ETimeMedium), KErrNone, _L("RMobilePhone::SendDTMFTones timed-out")); |
|
1340 ASSERT_EQUALS(sendDTMFTonesStatus.Int(), KErrNone, _L("RMobilePhone::SendDTMFTones completed with incorrect error")); |
|
1341 |
|
1342 // === Check that the DTMF has been added to the dialled number details, === |
|
1343 ASSERT_EQUALS(mobileCall.GetMobileCallInfo(syncCallInfoPckg), KErrNone, _L("RMobilePhone::GetMobileCallInfo has not returned KErrNone")); |
|
1344 |
|
1345 // === but not the remote party details. === |
|
1346 |
|
1347 DEBUG_PRINTF2(_L("syncCallInfo.iRemoteParty.iRemoteNumber.iTelNumber: %S"), &syncCallInfo.iRemoteParty.iRemoteNumber.iTelNumber); |
|
1348 DEBUG_PRINTF2(_L("number: %S"), &number); |
|
1349 |
|
1350 // Check RMobileCall::GetMobileCallInfo returns correct destination number without DTMF in iRemoteParty.iRemoteNumber |
|
1351 ASSERT_EQUALS(syncCallInfo.iRemoteParty.iRemoteNumber.iTelNumber.Compare(number), 0, _L("aSyncCallInfo.iRemoteParty.iRemoteNumber.iTelNumber is not correct")); |
|
1352 |
|
1353 // Check RMobileCall::GetMobileCallInfo returns dialled number and DTMF tones sent in iDialledParty |
|
1354 TBuf<50> expectedval; |
|
1355 |
|
1356 expectedval.Append(number); |
|
1357 expectedval.Append(toneSet1); |
|
1358 |
|
1359 DEBUG_PRINTF2(_L("syncCallInfo.iDialledParty.iTelNumber: %S"), &syncCallInfo.iDialledParty.iTelNumber); |
|
1360 DEBUG_PRINTF2(_L("expectedval: %S"), &expectedval); |
|
1361 |
|
1362 ASSERT_EQUALS(syncCallInfo.iDialledParty.iTelNumber.Compare(expectedval), 0, _L("syncCallInfo.iDialledParty.iTelNumber is not correct")); |
|
1363 DEBUG_PRINTF1(_L("Hangup call")); |
|
1364 ASSERT_EQUALS(mobileCall.HangUp(), KErrNone, _L("RMobileCall::HangUp return value not KErrNone")); |
|
1365 |
|
1366 // |
|
1367 // TEST END |
|
1368 // |
|
1369 |
|
1370 StartCleanup(); |
|
1371 |
|
1372 CleanupStack::Pop(&dialStatus); |
|
1373 CleanupStack::Pop(&sendDTMFTonesStatus); |
|
1374 |
|
1375 return TestStepResult(); |
|
1376 } |
|
1377 |
|
1378 TPtrC CCTSYIntegrationTestDTMF0009::GetTestStepName() |
|
1379 /** |
|
1380 * @return The test step name. |
|
1381 */ |
|
1382 { |
|
1383 return _L("CCTSYIntegrationTestDTMF0009"); |
|
1384 } |
|
1385 |
|
1386 CCTSYIntegrationTestDTMF0010::CCTSYIntegrationTestDTMF0010(CEtelSessionMgr& aEtelSessionMgr) |
|
1387 : CCTSYIntegrationTestDTMFBase(aEtelSessionMgr) |
|
1388 /** |
|
1389 * Constructor. |
|
1390 */ |
|
1391 { |
|
1392 SetTestStepName(CCTSYIntegrationTestDTMF0010::GetTestStepName()); |
|
1393 } |
|
1394 |
|
1395 CCTSYIntegrationTestDTMF0010::~CCTSYIntegrationTestDTMF0010() |
|
1396 /** |
|
1397 * Destructor. |
|
1398 */ |
|
1399 { |
|
1400 } |
|
1401 |
|
1402 TVerdict CCTSYIntegrationTestDTMF0010::doTestStepL() |
|
1403 /** |
|
1404 * @SYMTestCaseID BA-CTSY-INT-DTMF-0010 |
|
1405 * @SYMFssID BA/CTSY/DTMF-0010 |
|
1406 * @SYMTestCaseDesc Receive DTMF tones. |
|
1407 * @SYMTestPriority High |
|
1408 * @SYMTestActions RCall::NotifyStatusChange, RMobilePhone::ReadDTMFTones, RCall::HangUp |
|
1409 * @SYMTestExpectedResults Pass - DTMF tones read correctly. |
|
1410 * @SYMTestType CIT |
|
1411 * @SYMTestCaseDependencies live/manual |
|
1412 * |
|
1413 * Reason for test: Verify DTMF tones received correctly. |
|
1414 * |
|
1415 * @return - TVerdict code |
|
1416 */ |
|
1417 { |
|
1418 |
|
1419 // |
|
1420 // SET UP |
|
1421 // |
|
1422 |
|
1423 RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
1424 |
|
1425 // Ensure phone supports KCapsVoice. |
|
1426 RMobilePhone::TCaps mobilePhoneCaps; |
|
1427 |
|
1428 CHECK_TRUE_L(mobilePhone.GetCaps(mobilePhoneCaps) == KErrNone, _L("RMobilePhone::GetCaps")); |
|
1429 TUint32 expectedMobilePhoneCaps = RMobilePhone::KCapsVoice; |
|
1430 CHECK_BITS_SET_L(mobilePhoneCaps.iFlags, expectedMobilePhoneCaps, KNoWantedBits, _L("RMobilePhone::GetCaps returned wrong dynamic caps")); |
|
1431 |
|
1432 // Get Voice Line 1. |
|
1433 RMobileLine& mobileLine= iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
1434 |
|
1435 // Get Call 1. |
|
1436 RMobileCall& mobileCall= iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1); |
|
1437 |
|
1438 // |
|
1439 // SET UP END |
|
1440 // |
|
1441 |
|
1442 StartTest(); |
|
1443 |
|
1444 // |
|
1445 // TEST START |
|
1446 // |
|
1447 |
|
1448 // Set up an incoming call. |
|
1449 TName name; |
|
1450 TCoreEtelRequestStatus<RLine> notifyIncomingStatus(mobileLine, &RLine::NotifyIncomingCallCancel); |
|
1451 CleanupStack::PushL(notifyIncomingStatus); |
|
1452 mobileLine.NotifyIncomingCall(notifyIncomingStatus, name); |
|
1453 |
|
1454 RCall::TStatus toneSet; |
|
1455 TCoreEtelRequestStatus<RMobileLine> notifyStatusChangeStatus(mobileLine, &RMobileLine::NotifyStatusChangeCancel); |
|
1456 CleanupStack::PushL(notifyStatusChangeStatus); |
|
1457 mobileLine.NotifyStatusChange(notifyStatusChangeStatus, toneSet); |
|
1458 |
|
1459 DisplayUserInteractionPromptL(_L("Please call me "), ETimeMedium); |
|
1460 |
|
1461 // Check RLine::NotifyIncomingCall completes with valid call name. |
|
1462 ASSERT_EQUALS(WaitForRequestWithTimeOut(notifyIncomingStatus,ETimeMedium), KErrNone, |
|
1463 _L("RLine::NotifyIncomingCall did not complete without error")); |
|
1464 ASSERT_EQUALS(notifyIncomingStatus.Int(), KErrNone, |
|
1465 _L("RLine::NotifyIncomingCall set requestStatus to an error")); |
|
1466 ASSERT_TRUE(name.Length() > 0, |
|
1467 _L("RLine::NotifyIncomingCall did not set the name")); |
|
1468 |
|
1469 TCallId incomingCallId; |
|
1470 RMobileCall& incomingCall = iEtelSessionMgr.GetIncomingCallL(KMainServer, KMainPhone, KVoiceLine, name, incomingCallId); |
|
1471 TCoreEtelRequestStatus<RCall> answerIncomingStatus(incomingCall, &RCall::AnswerIncomingCallCancel); |
|
1472 CleanupStack::PushL(answerIncomingStatus); |
|
1473 |
|
1474 |
|
1475 RCall::TStatus expectedStatusChange=RCall::EStatusRinging; |
|
1476 iCallControlTestHelper.WaitForLineNotifyStatusChange(mobileLine, |
|
1477 notifyStatusChangeStatus, |
|
1478 toneSet, |
|
1479 expectedStatusChange, |
|
1480 KErrNone); |
|
1481 |
|
1482 mobileLine.NotifyStatusChange(notifyStatusChangeStatus, toneSet); |
|
1483 |
|
1484 // Answer the incoming call. |
|
1485 incomingCall.AnswerIncomingCall(answerIncomingStatus); |
|
1486 |
|
1487 // Check RCall::NotifyStatusChange completes with EStatusAnswering -> EStatusConnected. |
|
1488 expectedStatusChange=RCall::EStatusAnswering; |
|
1489 iCallControlTestHelper.WaitForLineNotifyStatusChange(mobileLine, |
|
1490 notifyStatusChangeStatus, |
|
1491 toneSet, |
|
1492 expectedStatusChange, |
|
1493 KErrNone); |
|
1494 |
|
1495 mobileLine.NotifyStatusChange(notifyStatusChangeStatus, toneSet); |
|
1496 |
|
1497 ASSERT_EQUALS(WaitForRequestWithTimeOut(answerIncomingStatus, ETimeMedium), KErrNone, _L("RCall::AnswerIncomingCall timed-out")); |
|
1498 |
|
1499 expectedStatusChange=RCall::EStatusConnected; |
|
1500 iCallControlTestHelper.WaitForLineNotifyStatusChange(mobileLine, |
|
1501 notifyStatusChangeStatus, |
|
1502 toneSet, |
|
1503 expectedStatusChange, |
|
1504 KErrNone); |
|
1505 |
|
1506 DisplayUserInteractionPromptL(_L("Please tone 1234567890"), ETimeMedium); |
|
1507 |
|
1508 // Check RMobilePhone::ReadDTMFTones completes with correct tones |
|
1509 TBuf<50> tonesrecieved; |
|
1510 tonesrecieved.Zero(); |
|
1511 |
|
1512 TExtEtelRequestStatus readDtmfStatus(mobilePhone, EMobilePhoneReadDTMFTones); |
|
1513 CleanupStack::PushL(readDtmfStatus); |
|
1514 mobilePhone.ReadDTMFTones(readDtmfStatus, tonesrecieved); |
|
1515 |
|
1516 ASSERT_EQUALS(WaitForRequestWithTimeOut(readDtmfStatus, ETimeMedium), KErrNone, _L("RMobilePhone::ReadDTMFTones timed-out")); |
|
1517 |
|
1518 ERR_PRINTF1(_L("<font color=Orange>$CTSYProblem: case EMobilePhoneReadDTMFTones: Not supported in CTSY </font>")); |
|
1519 ASSERT_EQUALS(KErrNotSupported, readDtmfStatus.Int(), _L("RMobilePhone::ReadDTMFTones returned incorrect status.")); |
|
1520 ASSERT_TRUE(tonesrecieved.Compare(_L(""))==0, _L("RMobilePhone::ReadDTMFTones wrong tone was recieved.")); |
|
1521 |
|
1522 // Hang up call. |
|
1523 DEBUG_PRINTF1(_L("Hangup call")); |
|
1524 ASSERT_EQUALS(mobileCall.HangUp(), KErrNone, _L("RCall::HangUp return value not KErrNone")); |
|
1525 |
|
1526 // |
|
1527 // TEST END |
|
1528 // |
|
1529 |
|
1530 StartCleanup(); |
|
1531 |
|
1532 // notifyIncomingStatus |
|
1533 // notifyStatusChangeStatus |
|
1534 // answerIncomingStatus |
|
1535 // readDtmfStatus |
|
1536 CleanupStack::PopAndDestroy(4,¬ifyIncomingStatus); |
|
1537 |
|
1538 return TestStepResult(); |
|
1539 } |
|
1540 |
|
1541 TPtrC CCTSYIntegrationTestDTMF0010::GetTestStepName() |
|
1542 /** |
|
1543 * @return The test step name. |
|
1544 */ |
|
1545 { |
|
1546 return _L("CCTSYIntegrationTestDTMF0010"); |
|
1547 } |
|
1548 |
|
1549 CCTSYIntegrationTestDTMF0011::CCTSYIntegrationTestDTMF0011(CEtelSessionMgr& aEtelSessionMgr) |
|
1550 : CCTSYIntegrationTestDTMFBase(aEtelSessionMgr) |
|
1551 /** |
|
1552 * Constructor. |
|
1553 */ |
|
1554 { |
|
1555 SetTestStepName(CCTSYIntegrationTestDTMF0011::GetTestStepName()); |
|
1556 } |
|
1557 |
|
1558 CCTSYIntegrationTestDTMF0011::~CCTSYIntegrationTestDTMF0011() |
|
1559 /** |
|
1560 * Destructor. |
|
1561 */ |
|
1562 { |
|
1563 } |
|
1564 |
|
1565 TVerdict CCTSYIntegrationTestDTMF0011::doTestStepL() |
|
1566 /** |
|
1567 * @SYMTestCaseID BA-CTSY-INT-DTMF-0011 |
|
1568 * @SYMFssID BA/CTSY/DTMF-0011 |
|
1569 * @SYMTestCaseDesc Ensure that DTMF tones can be sent to all conference call participants |
|
1570 * @SYMTestPriority High |
|
1571 * @SYMTestActions RMobileCall::Hold, RCall::HangUp, RMobileConferenceCall::CreateConference, RMobilePhone::StartDTMFTone, RMobilePhone::StopDTMFTone, RMobilePhone::SendDTMFTones, RMobilePhone::NotifyStopInDTMFString, RMobilePhone::ContinueDTMFStringSending, RMobilePhone::GetDTMFCaps, RMobilePhone::NotifyDTMFCapsChange |
|
1572 * @SYMTestExpectedResults Pass - DTMF tones sent to all conference call participants. |
|
1573 * @SYMTestType CIT |
|
1574 * @SYMTestCaseDependencies live/automatic |
|
1575 * |
|
1576 * Reason for test: Verify sending of DTMF tones and strings can be sent. |
|
1577 * |
|
1578 * @return - TVerdict code |
|
1579 */ |
|
1580 { |
|
1581 |
|
1582 // |
|
1583 // SET UP |
|
1584 // |
|
1585 |
|
1586 RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
1587 |
|
1588 // Call TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL |
|
1589 CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(mobilePhone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error")); |
|
1590 |
|
1591 // Ensure phone supports KCapsVoice. |
|
1592 RMobilePhone::TCaps mobilephonecaps; |
|
1593 |
|
1594 CHECK_EQUALS_L(mobilePhone.GetCaps(mobilephonecaps), KErrNone, _L("RMobilePhone::GetCaps")); |
|
1595 TUint32 expectedmobilephoneCaps = RMobilePhone::KCapsVoice; |
|
1596 CHECK_BITS_SET_L(mobilephonecaps.iFlags, expectedmobilephoneCaps, KNoWantedBits, _L("RMobilePhone::GetCaps returned wrong dynamic caps")); |
|
1597 |
|
1598 // Get Voice Line 1. |
|
1599 RMobileLine& mobileLine= iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
1600 |
|
1601 // Get Call 1. |
|
1602 RMobileCall& mobileCall= iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1); |
|
1603 |
|
1604 // |
|
1605 // SET UP END |
|
1606 // |
|
1607 |
|
1608 StartTest(); |
|
1609 |
|
1610 // |
|
1611 // TEST START |
|
1612 // |
|
1613 |
|
1614 // Set up a five party conference call. |
|
1615 TExtEtelRequestStatus holdStatus(mobilePhone, EMobileCallHold); |
|
1616 CleanupStack::PushL(holdStatus); |
|
1617 |
|
1618 TPtrC number; |
|
1619 ASSERT_TRUE(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, number), _L("GetStringFromConfig did not complete as expected")); |
|
1620 DEBUG_PRINTF2(_L("Board Now Dialling: %S"), &number); |
|
1621 TCoreEtelRequestStatus<RMobileCall> dialStatus(mobileCall, &RCall::DialCancel); |
|
1622 CleanupStack::PushL(dialStatus); |
|
1623 mobileCall.Dial(dialStatus, number); |
|
1624 ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RCall::Dial timed-out")); |
|
1625 ASSERT_EQUALS(dialStatus.Int(), KErrNone, _L("RCall::Dial problem dialling")); |
|
1626 |
|
1627 mobileCall.Hold(holdStatus); |
|
1628 ASSERT_EQUALS(WaitForRequestWithTimeOut(holdStatus, ETimeMedium), KErrNone, _L("RMobileCall::Hold timed-out")); |
|
1629 ASSERT_EQUALS(holdStatus.Int(), KErrNone, _L("RMobileCall::Hold status incorrect")); |
|
1630 |
|
1631 RMobileConferenceCall& cc = iEtelSessionMgr.GetConferenceCallL(KMainServer, KMainPhone, KMainConferenceCall); |
|
1632 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2); |
|
1633 |
|
1634 TPtrC number2; |
|
1635 ASSERT_TRUE(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber2, number2), _L("GetStringFromConfig did not complete as expected")); |
|
1636 DEBUG_PRINTF2(_L("Board Now Dialling: %S"), &number2); |
|
1637 TCoreEtelRequestStatus<RMobileCall> dialStatus2(mobileCall, &RCall::DialCancel); |
|
1638 CleanupStack::PushL(dialStatus2); |
|
1639 call2.Dial(dialStatus2, number2); |
|
1640 ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus2, ETimeMedium), KErrNone, _L("RCall::Dial timed-out")); |
|
1641 ASSERT_EQUALS(dialStatus2.Int(), KErrNone, _L("RCall::Dial problem dialling")); |
|
1642 |
|
1643 TExtEtelRequestStatus createConferenceStatus(cc, EMobileConferenceCallCreateConference); |
|
1644 CleanupStack::PushL(createConferenceStatus); |
|
1645 |
|
1646 cc.CreateConference(createConferenceStatus); |
|
1647 ASSERT_EQUALS(WaitForRequestWithTimeOut(createConferenceStatus, ETimeMedium), KErrNone, _L("RMobileConferenceCall::CreateConference timed-out")); |
|
1648 ASSERT_EQUALS(createConferenceStatus.Int(), KErrNone, _L("RMobileConferenceCall::CreateConference status incorrect")); |
|
1649 |
|
1650 RMobileCall& call3 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall3 ); |
|
1651 RMobileCall& call4 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall4 ); |
|
1652 RMobileCall& call5 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall5 ); |
|
1653 |
|
1654 TPtrC num3, num4, num5; |
|
1655 ASSERT_TRUE(GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber6, num3), _L("Failed to obtain 3rd number for test")); |
|
1656 ASSERT_TRUE(GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber4, num4), _L("Failed to obtain 4th number for test")); |
|
1657 ASSERT_TRUE(GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber5, num5), _L("Failed to obtain 5th number for test")); |
|
1658 |
|
1659 |
|
1660 AddCallToConferenceL(cc, call3, num3, 3); |
|
1661 TEST_CHECK_POINT_L(_L("Adding call3 failed")); |
|
1662 AddCallToConferenceL(cc, call4, num4, 4); |
|
1663 TEST_CHECK_POINT_L(_L("Adding call4 failed")); |
|
1664 AddCallToConferenceL(cc, call5, num5, 5); |
|
1665 TEST_CHECK_POINT_L(_L("Adding call5 failed")); |
|
1666 |
|
1667 |
|
1668 // Check RMobilePhone::GetDTMFCaps returns caps of KCapsSendDTMFString | KCapsSendDTMFSingleTone |
|
1669 TUint32 dtmfCaps=0; |
|
1670 ASSERT_EQUALS(mobilePhone.GetDTMFCaps(dtmfCaps), KErrNone,_L("RMobilePhone::GetDTMFCaps return value not KErrNone")); |
|
1671 TUint32 expectedCaps = RMobilePhone::KCapsSendDTMFString | RMobilePhone::KCapsSendDTMFSingleTone; |
|
1672 ASSERT_BITS_SET(dtmfCaps, expectedCaps, KNoWantedBits, _L("RMobilePhone::GetDTMFCaps returned wrong dynamic caps")); |
|
1673 |
|
1674 // Send a single DTMF tone (repeat with each individual character). |
|
1675 TChar tone[18] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9','A' ,'B' ,'C' ,'D' ,'#' ,'*', 'p', 'w'}; |
|
1676 |
|
1677 for(TInt i = 0 ; i<18; i++) |
|
1678 { |
|
1679 DEBUG_PRINTF2(_L("Send DTMF tones: %c"), (char)tone[i]); |
|
1680 ASSERT_EQUALS(mobilePhone.StartDTMFTone(tone[i]), KErrNone, _L("RMobilePhone::StartDTMFTone completed with incorrect error")); |
|
1681 User::After(KOneSecond); |
|
1682 ASSERT_EQUALS(mobilePhone.StopDTMFTone(), KErrNone, _L("RMobilePhone::StopDTMFTone completed with incorrect error")); |
|
1683 } |
|
1684 |
|
1685 // Wait for 5 seconds |
|
1686 User::After(5*KOneSecond); |
|
1687 |
|
1688 // Send a DTMF string without 'w' or 'p' |
|
1689 TExtEtelRequestStatus sendDTMFTonesStatus(mobilePhone, EMobilePhoneSendDTMFTones); |
|
1690 CleanupStack::PushL(sendDTMFTonesStatus); |
|
1691 |
|
1692 TBufC<50> toneSet1 = _L("0123456789"); |
|
1693 |
|
1694 DEBUG_PRINTF2(_L("Send DTMF tones: %S"), &toneSet1); |
|
1695 mobilePhone.SendDTMFTones(sendDTMFTonesStatus, toneSet1); |
|
1696 |
|
1697 // Check request completes with KErrNone each time. |
|
1698 ASSERT_EQUALS(WaitForRequestWithTimeOut(sendDTMFTonesStatus, ETimeMedium), KErrNone, _L("RMobilePhone::SendDTMFTones timed-out")); |
|
1699 ERR_PRINTF1(_L("<font color=Orange>$CTSYProblem: In case of conference call it gets \n KErrGsmCCSemanticallyIncorrectMessage from LTSY as an answer for SendDTMFTones() </font>")); |
|
1700 ASSERT_EQUALS(sendDTMFTonesStatus.Int(), KErrGsmCCSemanticallyIncorrectMessage, _L("RMobilePhone::SendDTMFTones completed with incorrect error")); |
|
1701 |
|
1702 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
1703 ASSERT_EQUALS(cc.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
1704 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
1705 ASSERT_EQUALS( confCallConfStatus, RMobileConferenceCall::EConferenceActive, |
|
1706 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceActive")); |
|
1707 |
|
1708 // Send a DTMF string with 'p' |
|
1709 TBufC<50> toneSet2 = _L("0123456p789ABCD"); |
|
1710 |
|
1711 DEBUG_PRINTF2(_L("Send DTMF tones: %S"), &toneSet2); |
|
1712 mobilePhone.SendDTMFTones(sendDTMFTonesStatus, toneSet2); |
|
1713 |
|
1714 // Check request completes with KErrNone each time. |
|
1715 ASSERT_EQUALS(WaitForRequestWithTimeOut(sendDTMFTonesStatus, ETimeMedium), KErrNone, _L("RMobilePhone::SendDTMFTones timed-out")); |
|
1716 ASSERT_EQUALS(sendDTMFTonesStatus.Int(), KErrGsmCCSemanticallyIncorrectMessage, _L("RMobilePhone::SendDTMFTones completed with incorrect error")); |
|
1717 |
|
1718 TExtEtelRequestStatus notifyStopStatus(mobilePhone, EMobilePhoneNotifyStopInDTMFString); |
|
1719 CleanupStack::PushL(notifyStopStatus); |
|
1720 mobilePhone.NotifyStopInDTMFString(notifyStopStatus); |
|
1721 |
|
1722 // Send a DTMF string "1234w567" |
|
1723 TBufC<50> toneSet3 = _L("1234w567"); |
|
1724 |
|
1725 DEBUG_PRINTF2(_L("Send DTMF tones: %S"), &toneSet3); |
|
1726 mobilePhone.SendDTMFTones(sendDTMFTonesStatus, toneSet3); |
|
1727 |
|
1728 // Check RMobilePhone::NotifyStopInDTMFString completes |
|
1729 iCallControlTestHelper.WaitForMobilePhoneNotifyStopInDTMFString(notifyStopStatus, KErrNone); |
|
1730 DEBUG_PRINTF1(_L("RMobilePhone::NotifyStopInDTMFString completes")); |
|
1731 |
|
1732 // Continue sending the string with RMobilePhone::ContinueDTMFStringSending with aContinue = ETrue |
|
1733 ASSERT_EQUALS(mobilePhone.ContinueDTMFStringSending(ETrue), KErrNone, _L("RMobilePhone::ContinueDTMFStringSending has not returned KErrNone")); |
|
1734 |
|
1735 // Check request completes with KErrNone each time. |
|
1736 ASSERT_EQUALS(WaitForRequestWithTimeOut(sendDTMFTonesStatus, ETimeMedium), KErrNone, _L("RMobilePhone::SendDTMFTones timed-out")); |
|
1737 ASSERT_EQUALS(sendDTMFTonesStatus.Int(), KErrGsmCCSemanticallyIncorrectMessage, _L("RMobilePhone::SendDTMFTones completed with incorrect error")); |
|
1738 |
|
1739 // Send a valid DTMF string "1234w567" again |
|
1740 mobilePhone.NotifyStopInDTMFString(notifyStopStatus); |
|
1741 |
|
1742 DEBUG_PRINTF2(_L("Send DTMF tones (again): %S"), &toneSet3); |
|
1743 mobilePhone.SendDTMFTones(sendDTMFTonesStatus, toneSet3); |
|
1744 |
|
1745 // Check RMobilePhone::NotifyStopInDTMFString completes |
|
1746 iCallControlTestHelper.WaitForMobilePhoneNotifyStopInDTMFString(notifyStopStatus, KErrNone); |
|
1747 DEBUG_PRINTF1(_L("RMobilePhone::NotifyStopInDTMFString completes")); |
|
1748 |
|
1749 // Continue sending the string with RMobilePhone::ContinueDTMFStringSending with aContinue = EFalse |
|
1750 ASSERT_EQUALS(mobilePhone.ContinueDTMFStringSending(EFalse), KErrNone, _L("RMobilePhone::ContinueDTMFStringSending has not returned KErrNone")); |
|
1751 |
|
1752 // Post NotifyDTMFCapsChange |
|
1753 TUint32 completiondtmfcaps; |
|
1754 TExtEtelRequestStatus notifyDTMFCapsChangeStatus(mobilePhone, EMobilePhoneNotifyDTMFCapsChange); |
|
1755 CleanupStack::PushL(notifyDTMFCapsChangeStatus); |
|
1756 mobilePhone.NotifyDTMFCapsChange(notifyDTMFCapsChangeStatus, completiondtmfcaps); |
|
1757 |
|
1758 // Terminate the conference call. |
|
1759 TExtEtelRequestStatus reqHangupStatus(cc, EMobileConferenceCallHangUp); |
|
1760 CleanupStack::PushL(reqHangupStatus); |
|
1761 cc.HangUp(reqHangupStatus); |
|
1762 ASSERT_EQUALS(WaitForRequestWithTimeOut(reqHangupStatus, ETimeMedium), KErrNone, _L("RMobileConferenceCall::HangUp timed-out")); |
|
1763 ASSERT_EQUALS(reqHangupStatus.Int(), KErrNone, _L("RMobileConferenceCall::HangUp completed with incorrect error")); |
|
1764 |
|
1765 ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 10053); |
|
1766 // Check RMobilePhone::NotifyDTMFCapsChange completes with caps of 0 |
|
1767 TUint32 wantedCaps=0; |
|
1768 iCallControlTestHelper.WaitForMobilePhoneNotifyDTMFCapsChange( |
|
1769 mobilePhone, |
|
1770 notifyDTMFCapsChangeStatus, |
|
1771 completiondtmfcaps, |
|
1772 wantedCaps, |
|
1773 KNoUnwantedBits, |
|
1774 KErrNone); |
|
1775 |
|
1776 // Check RMobilePhone::GetDTMFCaps returns caps of 0 |
|
1777 TUint32 getCaps; |
|
1778 ASSERT_EQUALS(mobilePhone.GetDTMFCaps(getCaps), KErrNone, _L("RMobilePhone::GetDTMFCaps returned incorrect value")); |
|
1779 |
|
1780 // |
|
1781 // TEST END |
|
1782 // |
|
1783 |
|
1784 StartCleanup(); |
|
1785 |
|
1786 //holdStatus |
|
1787 //dialStatus |
|
1788 //dialStatus2 |
|
1789 //createConferenceStatus |
|
1790 //notifyStopStatus |
|
1791 //sendDTMFTonesStatus |
|
1792 //notifyDTMFCapsChangeStatus |
|
1793 //reqHangupStatus |
|
1794 CleanupStack::PopAndDestroy(8,&holdStatus); |
|
1795 |
|
1796 return TestStepResult(); |
|
1797 } |
|
1798 |
|
1799 TPtrC CCTSYIntegrationTestDTMF0011::GetTestStepName() |
|
1800 /** |
|
1801 * @return The test step name. |
|
1802 */ |
|
1803 { |
|
1804 return _L("CCTSYIntegrationTestDTMF0011"); |
|
1805 } |
|
1806 |
|
1807 /** |
|
1808 * Add a call to a conference. Leaves on failure. |
|
1809 * @param aConfCall Conference call object |
|
1810 * @param aCall Call object to use |
|
1811 * @param aNumber Number to dial |
|
1812 * |
|
1813 */ |
|
1814 void CCTSYIntegrationTestDTMF0011::AddCallToConferenceL(RMobileConferenceCall& aConfCall, |
|
1815 RMobileCall& aCall, |
|
1816 TPtrC& aNumber, |
|
1817 TInt aIndex) |
|
1818 { |
|
1819 |
|
1820 DEBUG_PRINTF3(_L("Adding call %d to conference : %S"), aIndex, &aNumber ); |
|
1821 // Swap the conference call. |
|
1822 TExtEtelRequestStatus reqSwapConfStatus(aConfCall,EMobileConferenceCallSwap); |
|
1823 CleanupStack::PushL(reqSwapConfStatus); |
|
1824 |
|
1825 aConfCall.Swap(reqSwapConfStatus); |
|
1826 ASSERT_EQUALS( WaitForRequestWithTimeOut(reqSwapConfStatus,ETimeShort),KErrNone, |
|
1827 _L("RMobileConferenceCall::Swap timed out")); |
|
1828 ASSERT_EQUALS( reqSwapConfStatus.Int(),KErrNone, |
|
1829 _L("RMobileConferenceCall::Swap returned error")); |
|
1830 TEST_CHECK_POINT_L(_L("RMobileConferenceCall::Swap failed")); |
|
1831 |
|
1832 // Dial a number that answers |
|
1833 // Check RMobileCall::GetMobileCallStatus returns status of EStatusConnected. |
|
1834 TCoreEtelRequestStatus<RMobileCall> dialStatus(aCall, &RCall::DialCancel); |
|
1835 CleanupStack::PushL(dialStatus); |
|
1836 aCall.Dial( dialStatus, aNumber ); |
|
1837 |
|
1838 ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RMobileCall::Dial timed-out")); |
|
1839 ASSERT_EQUALS(dialStatus.Int(), KErrNone, _L("RMobileCall::Dial returned an error") ); |
|
1840 TEST_CHECK_POINT_L(_L("Failed to connect call")); |
|
1841 |
|
1842 // Set up notification |
|
1843 TExtEtelRequestStatus notifyConfEventStatus(aConfCall,EMobileConferenceCallNotifyConferenceEvent); |
|
1844 CleanupStack::PushL(notifyConfEventStatus); |
|
1845 RMobileConferenceCall::TMobileConferenceEvent confEvent; |
|
1846 TName confEventCallName; |
|
1847 aConfCall.NotifyConferenceEvent( notifyConfEventStatus, confEvent, confEventCallName ); |
|
1848 |
|
1849 // Add call to the conference |
|
1850 TExtEtelRequestStatus reqAddCallStatus(aConfCall,EMobileConferenceCallAddCall); |
|
1851 CleanupStack::PushL(reqAddCallStatus); |
|
1852 |
|
1853 // Get the call info (need the name) |
|
1854 RCall::TCallInfo callInfo; |
|
1855 TInt err = aCall.GetInfo(callInfo); |
|
1856 ASSERT_EQUALS( err, KErrNone, _L("RCall::GetInfo returned error")); |
|
1857 |
|
1858 aConfCall.AddCall(reqAddCallStatus,callInfo.iCallName); |
|
1859 |
|
1860 ASSERT_EQUALS( WaitForRequestWithTimeOut(reqAddCallStatus,ETimeShort),KErrNone, |
|
1861 _L("RMobileConferenceCall::AddCall timed out")); |
|
1862 ASSERT_EQUALS( reqAddCallStatus.Int(),KErrNone, |
|
1863 _L("RMobileConferenceCall::AddCall returned error")); |
|
1864 TEST_CHECK_POINT_L(_L("AddCallToConferenceL failed")); |
|
1865 |
|
1866 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceCallAdded |
|
1867 iCallControlTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent( aConfCall, |
|
1868 notifyConfEventStatus, |
|
1869 confEvent,RMobileConferenceCall::EConferenceCallAdded, |
|
1870 confEventCallName, |
|
1871 KErrNone); |
|
1872 |
|
1873 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
1874 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
1875 ASSERT_EQUALS(aConfCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
1876 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
1877 ASSERT_EQUALS( confCallConfStatus, RMobileConferenceCall::EConferenceActive, |
|
1878 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceActive")); |
|
1879 |
|
1880 TEST_CHECK_POINT_L(_L("AddCallToConferenceL failed")); |
|
1881 |
|
1882 // reqAddCallStatus |
|
1883 // dialStatus |
|
1884 // notifyConfEventStatus |
|
1885 // reqSwapConfStatus |
|
1886 CleanupStack::PopAndDestroy(4,&reqSwapConfStatus); |
|
1887 } |