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 |
// The TEFUnit test suite for CallOwnership in the Common TSY.
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
/**
|
|
19 |
@file
|
|
20 |
*/
|
|
21 |
|
|
22 |
#include "cctsycallownershipfu.h"
|
|
23 |
#include <etel.h>
|
|
24 |
#include <etelmm.h>
|
|
25 |
#include <et_clsvr.h>
|
|
26 |
#include <ctsy/mmtsy_names.h>
|
|
27 |
#include "tmockltsydata.h"
|
|
28 |
#include <ctsy/serviceapi/gsmerror.h>
|
|
29 |
|
|
30 |
CTestSuite* CCTsyCallOwnershipFU::CreateSuiteL(const TDesC& aName)
|
|
31 |
{
|
|
32 |
SUB_SUITE;
|
|
33 |
|
|
34 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallOwnershipFU, TestLoanDataPort0001L);
|
|
35 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallOwnershipFU, TestLoanDataPort0006L);
|
|
36 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallOwnershipFU, TestLoanDataPort0007L);
|
|
37 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallOwnershipFU, TestLoanDataPort0008L);
|
|
38 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallOwnershipFU, TestLoanDataPort00011L);
|
|
39 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallOwnershipFU, TestRecoverDataPort0001L);
|
|
40 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallOwnershipFU, TestRecoverDataPort0006L);
|
|
41 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallOwnershipFU, TestRecoverDataPort0007L);
|
|
42 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallOwnershipFU, TestRecoverDataPort00011L);
|
|
43 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallOwnershipFU, TestAcquireOwnership0001L);
|
|
44 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallOwnershipFU, TestAcquireOwnership0006L);
|
|
45 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallOwnershipFU, TestAcquireOwnership0007L);
|
|
46 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallOwnershipFU, TestAcquireOwnership0009L);
|
|
47 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallOwnershipFU, TestAcquireOwnership00011L);
|
|
48 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallOwnershipFU, TestTransferOwnership0001L);
|
|
49 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallOwnershipFU, TestTransferOwnership0006L);
|
|
50 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallOwnershipFU, TestTransferOwnership00011L);
|
|
51 |
|
|
52 |
END_SUITE;
|
|
53 |
}
|
|
54 |
|
|
55 |
|
|
56 |
/**
|
|
57 |
Test support failure in CTSY for RCall::LoanDataPort
|
|
58 |
@param aName The name of the line from which the call is to be opened to test for RCall::LoanDataPort
|
|
59 |
@param aCallId callId ltsy must allocate for the call
|
|
60 |
*/
|
|
61 |
void CCTsyCallOwnershipFU::TestLoanDataPortNotSupportedL(const TDesC &aName, const TInt aCallId)
|
|
62 |
{
|
|
63 |
|
|
64 |
RCall call;
|
|
65 |
RLine line;
|
|
66 |
|
|
67 |
TInt err = line.Open(iPhone, aName);
|
|
68 |
ASSERT_EQUALS(KErrNone, err)
|
|
69 |
CleanupClosePushL(line);
|
|
70 |
|
|
71 |
err = OpenNewCall(line, call, aName);
|
|
72 |
ASSERT_EQUALS(KErrNone, err)
|
|
73 |
CleanupClosePushL(call);
|
|
74 |
|
|
75 |
RMobilePhone::TMobileService mobileService( RMobilePhone::EServiceUnspecified );
|
|
76 |
if ( aName == KMmTsyVoice1LineName )
|
|
77 |
{
|
|
78 |
mobileService = RMobilePhone::EVoiceService;
|
|
79 |
}
|
|
80 |
else if ( aName == KMmTsyVoice2LineName )
|
|
81 |
{
|
|
82 |
mobileService = RMobilePhone::EAuxVoiceService;
|
|
83 |
}
|
|
84 |
else if ( aName == KMmTsyFaxLineName )
|
|
85 |
{
|
|
86 |
mobileService = RMobilePhone::EFaxService;
|
|
87 |
}
|
|
88 |
if ( (mobileService == RMobilePhone::EVoiceService) ||
|
|
89 |
(mobileService == RMobilePhone::EAuxVoiceService) )
|
|
90 |
{
|
|
91 |
DialL(call, aCallId, mobileService);
|
|
92 |
}
|
|
93 |
|
|
94 |
// synchronous version testing
|
|
95 |
RCall::TCommPort dataPort;
|
|
96 |
dataPort.iCsy.Copy(_L("qwerty"));
|
|
97 |
dataPort.iPort.Copy(_L("asdfgh"));
|
|
98 |
err = call.LoanDataPort(dataPort);
|
|
99 |
ASSERT_EQUALS(KErrNotSupported, err)
|
|
100 |
AssertMockLtsyStatusL();
|
|
101 |
|
|
102 |
// asynchronous version testing
|
|
103 |
TRequestStatus reqStatus;
|
|
104 |
call.LoanDataPort(reqStatus, dataPort);
|
|
105 |
User::WaitForRequest(reqStatus);
|
|
106 |
ASSERT_EQUALS(KErrNotSupported, reqStatus.Int())
|
|
107 |
|
|
108 |
CleanupStack::PopAndDestroy(2); //call, line
|
|
109 |
AssertMockLtsyStatusL();
|
|
110 |
|
|
111 |
}
|
|
112 |
|
|
113 |
|
|
114 |
/**
|
|
115 |
Test support failure in CTSY for RCall::RecoverDataPort
|
|
116 |
@param aName The name of the line from which the call is to be opened to test for RCall::RecoverDataPort
|
|
117 |
*/
|
|
118 |
void CCTsyCallOwnershipFU::TestRecoverDataPortNotSupportedL(const TDesC &aName)
|
|
119 |
{
|
|
120 |
RCall call;
|
|
121 |
RLine line;
|
|
122 |
|
|
123 |
TInt err = line.Open(iPhone, aName);
|
|
124 |
ASSERT_EQUALS(KErrNone, err)
|
|
125 |
CleanupClosePushL(line);
|
|
126 |
|
|
127 |
err = OpenNewCall(line, call, aName);
|
|
128 |
ASSERT_EQUALS(KErrNone, err)
|
|
129 |
CleanupClosePushL(call);
|
|
130 |
|
|
131 |
err = call.RecoverDataPort();
|
|
132 |
ASSERT_EQUALS(KErrNotSupported, err)
|
|
133 |
|
|
134 |
CleanupStack::PopAndDestroy(2); // call, line
|
|
135 |
AssertMockLtsyStatusL();
|
|
136 |
|
|
137 |
}
|
|
138 |
|
|
139 |
|
|
140 |
/**
|
|
141 |
Test support failure in CTSY for RCall::AcquireOwnership
|
|
142 |
@param aName The name of the line from which the call is to be opened to test for RCall::AcquireOwnership
|
|
143 |
*/
|
|
144 |
void CCTsyCallOwnershipFU::TestAcquireOwnershipNotSupportedL(const TDesC &aName)
|
|
145 |
{
|
|
146 |
RCall call;
|
|
147 |
RLine line;
|
|
148 |
|
|
149 |
TInt err = line.Open(iPhone, aName);
|
|
150 |
ASSERT_EQUALS(KErrNone, err)
|
|
151 |
CleanupClosePushL(line);
|
|
152 |
|
|
153 |
err = OpenNewCall(line, call, aName);
|
|
154 |
ASSERT_EQUALS(KErrNone, err)
|
|
155 |
CleanupClosePushL(call);
|
|
156 |
|
|
157 |
TRequestStatus reqStatus;
|
|
158 |
call.AcquireOwnership(reqStatus);
|
|
159 |
User::WaitForRequest(reqStatus);
|
|
160 |
ASSERT_EQUALS(KErrNotSupported, reqStatus.Int())
|
|
161 |
|
|
162 |
CleanupStack::PopAndDestroy(2); // call, line
|
|
163 |
AssertMockLtsyStatusL();
|
|
164 |
|
|
165 |
}
|
|
166 |
|
|
167 |
|
|
168 |
/**
|
|
169 |
Test support failure in CTSY for RCall::TransferOwnership
|
|
170 |
@param aName The name of the line from which the call is to be opened to test for RCall::TransferOwnership
|
|
171 |
*/
|
|
172 |
void CCTsyCallOwnershipFU::TestTransferOwnershipNotSupportedL(const TDesC &aName)
|
|
173 |
{
|
|
174 |
RCall call;
|
|
175 |
RLine line;
|
|
176 |
|
|
177 |
TInt err = line.Open(iPhone, aName);
|
|
178 |
ASSERT_EQUALS(KErrNone, err)
|
|
179 |
CleanupClosePushL(line);
|
|
180 |
|
|
181 |
err = OpenNewCall(line, call, aName);
|
|
182 |
ASSERT_EQUALS(KErrNone, err)
|
|
183 |
CleanupClosePushL(call);
|
|
184 |
|
|
185 |
err = call.TransferOwnership();
|
|
186 |
ASSERT_EQUALS(KErrNotSupported, err)
|
|
187 |
|
|
188 |
CleanupStack::PopAndDestroy(2); // call, line
|
|
189 |
AssertMockLtsyStatusL();
|
|
190 |
|
|
191 |
}
|
|
192 |
|
|
193 |
|
|
194 |
//
|
|
195 |
// Actual test cases
|
|
196 |
//
|
|
197 |
|
|
198 |
|
|
199 |
/**
|
|
200 |
@SYMTestCaseID BA-CTSY-COWN-CLDP-0001
|
|
201 |
@SYMComponent telephony_ctsy
|
|
202 |
@SYMTestCaseDesc Test support in CTSY for RCall::LoanDataPort for voice calls
|
|
203 |
@SYMTestPriority High
|
|
204 |
@SYMTestActions Invokes RCall::LoanDataPort for voice calls
|
|
205 |
@SYMTestExpectedResults Pass
|
|
206 |
@SYMTestType CT
|
|
207 |
*/
|
|
208 |
void CCTsyCallOwnershipFU::TestLoanDataPort0001L()
|
|
209 |
{
|
|
210 |
|
|
211 |
OpenEtelServerL(EUseExtendedError);
|
|
212 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
213 |
OpenPhoneL();
|
|
214 |
|
|
215 |
TestLoanDataPortNotSupportedL(KMmTsyVoice1LineName, 1);
|
|
216 |
|
|
217 |
TestLoanDataPortNotSupportedL(KMmTsyVoice2LineName, 2);
|
|
218 |
|
|
219 |
CleanupStack::PopAndDestroy(this);
|
|
220 |
|
|
221 |
}
|
|
222 |
|
|
223 |
|
|
224 |
/**
|
|
225 |
@SYMTestCaseID BA-CTSY-COWN-CLDP-0006
|
|
226 |
@SYMComponent telephony_ctsy
|
|
227 |
@SYMTestCaseDesc Test support in CTSY for RCall::LoanDataPort for data calls
|
|
228 |
@SYMTestPriority High
|
|
229 |
@SYMTestActions Invokes RCall::LoanDataPort for data calls
|
|
230 |
@SYMTestExpectedResults Pass
|
|
231 |
@SYMTestType CT
|
|
232 |
*/
|
|
233 |
void CCTsyCallOwnershipFU::TestLoanDataPort0006L()
|
|
234 |
{
|
|
235 |
|
|
236 |
OpenEtelServerL(EUseExtendedError);
|
|
237 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
238 |
OpenPhoneL();
|
|
239 |
|
|
240 |
RBuf8 data;
|
|
241 |
CleanupClosePushL(data);
|
|
242 |
|
|
243 |
RCall call;
|
|
244 |
RLine line;
|
|
245 |
|
|
246 |
TInt err = line.Open(iPhone, KMmTsyDataLineName);
|
|
247 |
ASSERT_EQUALS(KErrNone, err)
|
|
248 |
CleanupClosePushL(line);
|
|
249 |
|
|
250 |
TName callName;
|
|
251 |
err = OpenNewCall(line, call, KMmTsyDataLineName, callName);
|
|
252 |
ASSERT_EQUALS(KErrNone, err)
|
|
253 |
CleanupClosePushL(call);
|
|
254 |
|
|
255 |
// Prepare data
|
|
256 |
TInt callId = 0;
|
|
257 |
RMobilePhone::TMobileService mobileService = RMobilePhone::ECircuitDataService;
|
|
258 |
|
|
259 |
RCall::TCommPort expDataPort;
|
|
260 |
expDataPort.iCsy.Copy(_L("qwerty"));
|
|
261 |
expDataPort.iPort.Copy(_L("asdfgh"));
|
|
262 |
TMockLtsyCallData1<RCall::TCommPort> expData1(callId, mobileService, expDataPort);
|
|
263 |
|
|
264 |
callId = 1;
|
|
265 |
TMockLtsyCallData1<RCall::TCommPort> expData2(callId, mobileService, expDataPort);
|
|
266 |
|
|
267 |
RCall::TCommPort dataPort;
|
|
268 |
dataPort.iCsy.Copy(expDataPort.iCsy);
|
|
269 |
dataPort.iPort.Copy(expDataPort.iPort);
|
|
270 |
|
|
271 |
TRequestStatus reqStatus;
|
|
272 |
|
|
273 |
//-------------------------------------------------------------------------
|
|
274 |
// Test: failure to dispatch request to CTSY when call is not active
|
|
275 |
//-------------------------------------------------------------------------
|
|
276 |
|
|
277 |
// Basically succeeding of LoanDataPort() request depends from LTSY.
|
|
278 |
// Probably LTSY returns error to LoanDataPort() request when data call is
|
|
279 |
// not active. But in theory also KErrNone is possible.
|
|
280 |
|
|
281 |
// Synchronous version testing. LTSY returns KErrNone.
|
|
282 |
expData1.SerialiseL(data);
|
|
283 |
iMockLTSY.ExpectL(EEtelCallLoanDataPort, data, KErrNone);
|
|
284 |
err = call.LoanDataPort(dataPort);
|
|
285 |
ASSERT_EQUALS(KErrNone, err)
|
|
286 |
AssertMockLtsyStatusL();
|
|
287 |
|
|
288 |
// Asynchronous version testing. Fails because data port is already loaned.
|
|
289 |
call.LoanDataPort(reqStatus, dataPort);
|
|
290 |
User::WaitForRequest(reqStatus);
|
|
291 |
ASSERT_EQUALS(KErrEtelPortAlreadyLoaned, reqStatus.Int())
|
|
292 |
AssertMockLtsyStatusL();
|
|
293 |
|
|
294 |
// Recover data port before next test phase.
|
|
295 |
iMockLTSY.ExpectL(EEtelCallRecoverDataPort, data, KErrNone);
|
|
296 |
err = call.RecoverDataPort();
|
|
297 |
ASSERT_EQUALS(KErrNone, err)
|
|
298 |
AssertMockLtsyStatusL();
|
|
299 |
|
|
300 |
// Synchronous version testing. LTSY returns error KErrEtelCallNotActive.
|
|
301 |
iMockLTSY.ExpectL(EEtelCallLoanDataPort, data, KErrEtelCallNotActive);
|
|
302 |
err = call.LoanDataPort(dataPort);
|
|
303 |
ASSERT_EQUALS(KErrEtelCallNotActive, err)
|
|
304 |
AssertMockLtsyStatusL();
|
|
305 |
|
|
306 |
// Asynchronous version testing. LTSY returns error KErrEtelCallNotActive.
|
|
307 |
iMockLTSY.ExpectL(EEtelCallLoanDataPort, data, KErrEtelCallNotActive);
|
|
308 |
call.LoanDataPort(reqStatus, dataPort);
|
|
309 |
User::WaitForRequest(reqStatus);
|
|
310 |
ASSERT_EQUALS(KErrEtelCallNotActive, reqStatus.Int())
|
|
311 |
AssertMockLtsyStatusL();
|
|
312 |
|
|
313 |
// Close data call. After this CCallBase should call CTSY's RelinquishOwnership()
|
|
314 |
// method instead of RecoverDataPortAndRelinquishOwnership().
|
|
315 |
CleanupStack::PopAndDestroy(1); // call
|
|
316 |
|
|
317 |
// Open data call again.
|
|
318 |
err = OpenNewCall(line, call, KMmTsyDataLineName, callName);
|
|
319 |
ASSERT_EQUALS(KErrNone, err)
|
|
320 |
CleanupClosePushL(call);
|
|
321 |
|
|
322 |
//-------------------------------------------------------------------------
|
|
323 |
// TEST A: failure to dispatch request to LTSY
|
|
324 |
//-------------------------------------------------------------------------
|
|
325 |
|
|
326 |
callId = 1;
|
|
327 |
|
|
328 |
DialL(call, callId, mobileService);
|
|
329 |
|
|
330 |
data.Close();
|
|
331 |
expData2.SerialiseL(data);
|
|
332 |
|
|
333 |
// Synchronous version testing. LTSY returns error KErrNotSupported.
|
|
334 |
iMockLTSY.ExpectL(EEtelCallLoanDataPort, data, KErrNotSupported);
|
|
335 |
err = call.LoanDataPort(dataPort);
|
|
336 |
ASSERT_EQUALS(KErrNotSupported, err)
|
|
337 |
AssertMockLtsyStatusL();
|
|
338 |
|
|
339 |
// Asynchronous version testing. LTSY returns error KErrNotSupported.
|
|
340 |
iMockLTSY.ExpectL(EEtelCallLoanDataPort, data, KErrNotSupported);
|
|
341 |
call.LoanDataPort(reqStatus, dataPort);
|
|
342 |
User::WaitForRequest(reqStatus);
|
|
343 |
ASSERT_EQUALS(KErrNotSupported, reqStatus.Int())
|
|
344 |
AssertMockLtsyStatusL();
|
|
345 |
|
|
346 |
//-------------------------------------------------------------------------
|
|
347 |
// TEST C: Successful completion request of
|
|
348 |
// RCall::LoanDataPort.
|
|
349 |
//-------------------------------------------------------------------------
|
|
350 |
|
|
351 |
// Synchronous version testing. LTSY returns KErrNone.
|
|
352 |
iMockLTSY.ExpectL(EEtelCallLoanDataPort, data);
|
|
353 |
err = call.LoanDataPort(dataPort);
|
|
354 |
ASSERT_EQUALS(KErrNone, err)
|
|
355 |
AssertMockLtsyStatusL();
|
|
356 |
|
|
357 |
// Turn back environment state.
|
|
358 |
iMockLTSY.ExpectL(EEtelCallRecoverDataPort, data);
|
|
359 |
err = call.RecoverDataPort();
|
|
360 |
ASSERT_EQUALS(KErrNone, err)
|
|
361 |
AssertMockLtsyStatusL();
|
|
362 |
|
|
363 |
// Asynchronous version testing. LTSY returns KErrNone.
|
|
364 |
iMockLTSY.ExpectL(EEtelCallLoanDataPort, data);
|
|
365 |
call.LoanDataPort(reqStatus, dataPort);
|
|
366 |
User::WaitForRequest(reqStatus);
|
|
367 |
ASSERT_EQUALS(KErrNone, reqStatus.Int())
|
|
368 |
AssertMockLtsyStatusL();
|
|
369 |
|
|
370 |
// Turn back environment state.
|
|
371 |
iMockLTSY.ExpectL(EEtelCallRecoverDataPort, data);
|
|
372 |
err = call.RecoverDataPort();
|
|
373 |
ASSERT_EQUALS(KErrNone, err)
|
|
374 |
AssertMockLtsyStatusL();
|
|
375 |
|
|
376 |
//-------------------------------------------------------------------------
|
|
377 |
// TEST: failure to dispatch request to CTSY
|
|
378 |
// when call is owned by other client
|
|
379 |
//-------------------------------------------------------------------------
|
|
380 |
|
|
381 |
// Open second client.
|
|
382 |
RTelServer telServer2;
|
|
383 |
err = telServer2.Connect();
|
|
384 |
ASSERT_EQUALS(KErrNone, err);
|
|
385 |
CleanupClosePushL(telServer2);
|
|
386 |
|
|
387 |
RMobilePhone phone2;
|
|
388 |
err = phone2.Open(telServer2, KMmTsyPhoneName);
|
|
389 |
ASSERT_EQUALS(KErrNone, err);
|
|
390 |
CleanupClosePushL(phone2);
|
|
391 |
|
|
392 |
RCall call2;
|
|
393 |
RLine line2;
|
|
394 |
|
|
395 |
err = line2.Open(phone2, KMmTsyDataLineName);
|
|
396 |
ASSERT_EQUALS(KErrNone, err)
|
|
397 |
CleanupClosePushL(line2);
|
|
398 |
|
|
399 |
err = call2.OpenExistingCall(line2, callName);
|
|
400 |
ASSERT_EQUALS(KErrNone, err)
|
|
401 |
CleanupClosePushL(call2);
|
|
402 |
|
|
403 |
// Try to loan data port when call is owned by other client.
|
|
404 |
err = call2.LoanDataPort(dataPort);
|
|
405 |
ASSERT_EQUALS(KErrEtelNotCallOwner, err)
|
|
406 |
AssertMockLtsyStatusL();
|
|
407 |
|
|
408 |
//-------------------------------------------------------------------------
|
|
409 |
// TEST: failure to dispatch request to CTSY when port is already loaned.
|
|
410 |
//-------------------------------------------------------------------------
|
|
411 |
|
|
412 |
// Loan data port.
|
|
413 |
iMockLTSY.ExpectL(EEtelCallLoanDataPort, data);
|
|
414 |
err = call.LoanDataPort(dataPort);
|
|
415 |
ASSERT_EQUALS(KErrNone, err)
|
|
416 |
AssertMockLtsyStatusL();
|
|
417 |
|
|
418 |
// Try to loan data port when the port is loaned by other client.
|
|
419 |
call.LoanDataPort(reqStatus, dataPort);
|
|
420 |
User::WaitForRequest(reqStatus);
|
|
421 |
ASSERT_EQUALS(KErrEtelPortAlreadyLoaned, reqStatus.Int())
|
|
422 |
AssertMockLtsyStatusL();
|
|
423 |
|
|
424 |
iMockLTSY.ExpectL(EEtelCallRecoverDataPort, data, KErrNone);
|
|
425 |
|
|
426 |
CleanupStack::PopAndDestroy(8, this); // call2, line2, phone2, telServer2,
|
|
427 |
// call, line, data, this
|
|
428 |
}
|
|
429 |
|
|
430 |
|
|
431 |
/**
|
|
432 |
@SYMTestCaseID BA-CTSY-COWN-CLDP-0007
|
|
433 |
@SYMComponent telephony_ctsy
|
|
434 |
@SYMTestCaseDesc Test support in CTSY for cancelling of RCall::LoanDataPort for data calls
|
|
435 |
@SYMTestPriority High
|
|
436 |
@SYMTestActions Invokes cancelling of RCall::LoanDataPort for data calls
|
|
437 |
@SYMTestExpectedResults Pass
|
|
438 |
@SYMTestType CT
|
|
439 |
*/
|
|
440 |
void CCTsyCallOwnershipFU::TestLoanDataPort0007L()
|
|
441 |
{
|
|
442 |
|
|
443 |
OpenEtelServerL(EUseExtendedError);
|
|
444 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
445 |
OpenPhoneL();
|
|
446 |
|
|
447 |
RBuf8 data;
|
|
448 |
CleanupClosePushL(data);
|
|
449 |
|
|
450 |
RCall call;
|
|
451 |
RLine line;
|
|
452 |
|
|
453 |
TInt err = line.Open(iPhone, KMmTsyDataLineName);
|
|
454 |
ASSERT_EQUALS(KErrNone, err)
|
|
455 |
CleanupClosePushL(line);
|
|
456 |
|
|
457 |
err = OpenNewCall(line, call, KMmTsyDataLineName);
|
|
458 |
ASSERT_EQUALS(KErrNone, err)
|
|
459 |
CleanupClosePushL(call);
|
|
460 |
|
|
461 |
// prepare data
|
|
462 |
const TInt KCallId( 1 );
|
|
463 |
const RMobilePhone::TMobileService KMobileService( RMobilePhone::ECircuitDataService );
|
|
464 |
|
|
465 |
RCall::TCommPort expDataPort;
|
|
466 |
expDataPort.iCsy.Copy(_L("qwerty"));
|
|
467 |
expDataPort.iPort.Copy(_L("asdfgh"));
|
|
468 |
TMockLtsyCallData1<RCall::TCommPort> expData(KCallId, KMobileService, expDataPort);
|
|
469 |
expData.SerialiseL(data);
|
|
470 |
|
|
471 |
RCall::TCommPort dataPort;
|
|
472 |
dataPort.iCsy.Copy(expDataPort.iCsy);
|
|
473 |
dataPort.iPort.Copy(expDataPort.iPort);
|
|
474 |
|
|
475 |
TRequestStatus reqStatus;
|
|
476 |
|
|
477 |
DialL(call, KCallId, KMobileService);
|
|
478 |
|
|
479 |
//-------------------------------------------------------------------------
|
|
480 |
// Test cancelling of RCall::LoanDataPort
|
|
481 |
//-------------------------------------------------------------------------
|
|
482 |
|
|
483 |
iMockLTSY.ExpectL(EEtelCallLoanDataPort, data);
|
|
484 |
call.LoanDataPort(reqStatus, dataPort);
|
|
485 |
|
|
486 |
call.LoanDataPortCancel();
|
|
487 |
|
|
488 |
User::WaitForRequest(reqStatus);
|
|
489 |
// cause cancel is not used in CTSY for this request
|
|
490 |
// it completes with KErrNone
|
|
491 |
ASSERT_EQUALS(KErrNone, reqStatus.Int())
|
|
492 |
AssertMockLtsyStatusL();
|
|
493 |
|
|
494 |
iMockLTSY.ExpectL(EEtelCallRecoverDataPort, data, KErrNone);
|
|
495 |
|
|
496 |
CleanupStack::PopAndDestroy(4, this); // call, line, data, this
|
|
497 |
|
|
498 |
}
|
|
499 |
|
|
500 |
|
|
501 |
/**
|
|
502 |
@SYMTestCaseID BA-CTSY-COWN-CLDP-0008
|
|
503 |
@SYMComponent telephony_ctsy
|
|
504 |
@SYMTestCaseDesc Test support in CTSY for RCall::LoanDataPort with bad parameter data for data calls
|
|
505 |
@SYMTestPriority High
|
|
506 |
@SYMTestActions Invokes RCall::LoanDataPort with bad parameter data for data calls
|
|
507 |
@SYMTestExpectedResults Pass
|
|
508 |
@SYMTestType CT
|
|
509 |
*/
|
|
510 |
void CCTsyCallOwnershipFU::TestLoanDataPort0008L()
|
|
511 |
{
|
|
512 |
|
|
513 |
OpenEtelServerL(EUseExtendedError);
|
|
514 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
515 |
OpenPhoneL();
|
|
516 |
|
|
517 |
RCall call;
|
|
518 |
RLine line;
|
|
519 |
|
|
520 |
TInt err = line.Open(iPhone, KMmTsyDataLineName);
|
|
521 |
ASSERT_EQUALS(KErrNone, err)
|
|
522 |
CleanupClosePushL(line);
|
|
523 |
|
|
524 |
err = OpenNewCall(line, call, KMmTsyDataLineName);
|
|
525 |
ASSERT_EQUALS(KErrNone, err)
|
|
526 |
CleanupClosePushL(call);
|
|
527 |
|
|
528 |
const TInt KCallId( 1 );
|
|
529 |
const RMobilePhone::TMobileService KMobileService( RMobilePhone::ECircuitDataService );
|
|
530 |
DialL(call, KCallId, KMobileService);
|
|
531 |
|
|
532 |
//-------------------------------------------------------------------------
|
|
533 |
// Test C: Test passing out of bounds parameters to
|
|
534 |
// RCall::LoanDataPort
|
|
535 |
//-------------------------------------------------------------------------
|
|
536 |
|
|
537 |
ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 330101);
|
|
538 |
// Test passing out of bounds parameters (KnullDesC as port) doesn't cause an error in ctsy.
|
|
539 |
// Request pass to ltsy, so it returns CErrCorrupt. So request completes with KErrCorrupt instead of KErrNone.
|
|
540 |
|
|
541 |
// Asynchronous version testing.
|
|
542 |
RCall::TCommPort dataPort;
|
|
543 |
dataPort.iCsy.Copy(KNullDesC); // incorrect argument
|
|
544 |
dataPort.iPort.Copy(KNullDesC); // incorrect argument
|
|
545 |
TRequestStatus reqStatus;
|
|
546 |
call.LoanDataPort(reqStatus, dataPort);
|
|
547 |
User::WaitForRequest(reqStatus);
|
|
548 |
ASSERT_EQUALS(KErrArgument, reqStatus.Int())
|
|
549 |
AssertMockLtsyStatusL();
|
|
550 |
|
|
551 |
// Synchronous version testing.
|
|
552 |
err = call.LoanDataPort(dataPort);
|
|
553 |
ASSERT_EQUALS(KErrArgument, err)
|
|
554 |
AssertMockLtsyStatusL();
|
|
555 |
|
|
556 |
CleanupStack::PopAndDestroy(3, this); // call, line, this
|
|
557 |
|
|
558 |
}
|
|
559 |
|
|
560 |
|
|
561 |
/**
|
|
562 |
@SYMTestCaseID BA-CTSY-COWN-CLDP-00011
|
|
563 |
@SYMComponent telephony_ctsy
|
|
564 |
@SYMTestCaseDesc Test support in CTSY for RCall::LoanDataPort for fax calls
|
|
565 |
@SYMTestPriority High
|
|
566 |
@SYMTestActions Invokes RCall::LoanDataPort for fax calls
|
|
567 |
@SYMTestExpectedResults Pass
|
|
568 |
@SYMTestType CT
|
|
569 |
*/
|
|
570 |
void CCTsyCallOwnershipFU::TestLoanDataPort00011L()
|
|
571 |
{
|
|
572 |
|
|
573 |
OpenEtelServerL(EUseExtendedError);
|
|
574 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
575 |
OpenPhoneL();
|
|
576 |
|
|
577 |
ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 330104);
|
|
578 |
// RCall::LoanDataPort does not return KErrNotSupported for fax calls
|
|
579 |
// Request pass to ltsy, so it returns KErrCorrupt instead of KErrNotSupported.
|
|
580 |
|
|
581 |
TestLoanDataPortNotSupportedL(KMmTsyFaxLineName, 1);
|
|
582 |
|
|
583 |
CleanupStack::PopAndDestroy(this);
|
|
584 |
|
|
585 |
}
|
|
586 |
|
|
587 |
|
|
588 |
/**
|
|
589 |
@SYMTestCaseID BA-CTSY-COWN-CRDP-0001
|
|
590 |
@SYMComponent telephony_ctsy
|
|
591 |
@SYMTestCaseDesc Test support in CTSY for RCall::RecoverDataPort for voice calls
|
|
592 |
@SYMTestPriority High
|
|
593 |
@SYMTestActions Invokes RCall::RecoverDataPort for voice calls
|
|
594 |
@SYMTestExpectedResults Pass
|
|
595 |
@SYMTestType CT
|
|
596 |
*/
|
|
597 |
void CCTsyCallOwnershipFU::TestRecoverDataPort0001L()
|
|
598 |
{
|
|
599 |
|
|
600 |
OpenEtelServerL(EUseExtendedError);
|
|
601 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
602 |
OpenPhoneL();
|
|
603 |
|
|
604 |
TestRecoverDataPortNotSupportedL(KMmTsyVoice1LineName);
|
|
605 |
|
|
606 |
TestRecoverDataPortNotSupportedL(KMmTsyVoice2LineName);
|
|
607 |
|
|
608 |
CleanupStack::PopAndDestroy(this);
|
|
609 |
|
|
610 |
}
|
|
611 |
|
|
612 |
|
|
613 |
/**
|
|
614 |
@SYMTestCaseID BA-CTSY-COWN-CRDP-0006
|
|
615 |
@SYMComponent telephony_ctsy
|
|
616 |
@SYMTestCaseDesc Test support in CTSY for RCall::RecoverDataPort for data calls
|
|
617 |
@SYMTestPriority High
|
|
618 |
@SYMTestActions Invokes RCall::RecoverDataPort for data calls
|
|
619 |
@SYMTestExpectedResults Pass
|
|
620 |
@SYMTestType CT
|
|
621 |
*/
|
|
622 |
void CCTsyCallOwnershipFU::TestRecoverDataPort0006L()
|
|
623 |
{
|
|
624 |
|
|
625 |
OpenEtelServerL(EUseExtendedError);
|
|
626 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
627 |
OpenPhoneL();
|
|
628 |
|
|
629 |
RBuf8 data;
|
|
630 |
CleanupClosePushL(data);
|
|
631 |
|
|
632 |
RCall call;
|
|
633 |
RLine line;
|
|
634 |
|
|
635 |
TInt err = line.Open(iPhone, KMmTsyDataLineName);
|
|
636 |
ASSERT_EQUALS(KErrNone, err)
|
|
637 |
CleanupClosePushL(line);
|
|
638 |
|
|
639 |
TName callName;
|
|
640 |
err = OpenNewCall(line, call, KMmTsyDataLineName, callName);
|
|
641 |
ASSERT_EQUALS(KErrNone, err)
|
|
642 |
CleanupClosePushL(call);
|
|
643 |
|
|
644 |
const TInt KCallId( 1 );
|
|
645 |
const RMobilePhone::TMobileService KMobileService( RMobilePhone::ECircuitDataService );
|
|
646 |
DialL(call, KCallId, KMobileService);
|
|
647 |
|
|
648 |
RCall::TCommPort dataPort;
|
|
649 |
dataPort.iCsy.Copy(_L("qwerty"));
|
|
650 |
dataPort.iPort.Copy(_L("asdfgh"));
|
|
651 |
TMockLtsyCallData1<RCall::TCommPort> expData(KCallId, KMobileService, dataPort);
|
|
652 |
expData.SerialiseL(data);
|
|
653 |
iMockLTSY.ExpectL(EEtelCallLoanDataPort, data);
|
|
654 |
err = call.LoanDataPort(dataPort);
|
|
655 |
ASSERT_EQUALS(KErrNone, err)
|
|
656 |
AssertMockLtsyStatusL();
|
|
657 |
|
|
658 |
//-------------------------------------------------------------------------
|
|
659 |
// TEST A: failure to dispatch request to LTSY
|
|
660 |
//-------------------------------------------------------------------------
|
|
661 |
|
|
662 |
iMockLTSY.ExpectL(EEtelCallRecoverDataPort, data, KErrNotSupported);
|
|
663 |
err = call.RecoverDataPort();
|
|
664 |
ASSERT_EQUALS(KErrNotSupported, err)
|
|
665 |
AssertMockLtsyStatusL();
|
|
666 |
|
|
667 |
//-------------------------------------------------------------------------
|
|
668 |
// TEST C: Successful completion request of
|
|
669 |
// RCall::RecoverDataPort.
|
|
670 |
//-------------------------------------------------------------------------
|
|
671 |
|
|
672 |
iMockLTSY.ExpectL(EEtelCallRecoverDataPort, data);
|
|
673 |
err = call.RecoverDataPort();
|
|
674 |
ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 330201);
|
|
675 |
// CMmDataCallTsy::RecoverDataPort does not checks error value
|
|
676 |
// returned from ltsy and allways recovers data port
|
|
677 |
// so CTSY recovers data port in precedent test step
|
|
678 |
// and test for successful completion request gets returned
|
|
679 |
// a KErrEtelPortNotLoanedToClient error instead of KErrNone.
|
|
680 |
ASSERT_EQUALS(KErrNone, err)
|
|
681 |
AssertMockLtsyStatusL();
|
|
682 |
|
|
683 |
//-------------------------------------------------------------------------
|
|
684 |
// TEST: failure to dispatch request to CTSY when port is not loaned.
|
|
685 |
//-------------------------------------------------------------------------
|
|
686 |
|
|
687 |
err = call.RecoverDataPort();
|
|
688 |
ASSERT_EQUALS(KErrEtelPortNotLoanedToClient, err)
|
|
689 |
AssertMockLtsyStatusL();
|
|
690 |
|
|
691 |
//-------------------------------------------------------------------------
|
|
692 |
// TEST: failure to dispatch request to CTSY
|
|
693 |
// when call is owned by other client
|
|
694 |
//-------------------------------------------------------------------------
|
|
695 |
|
|
696 |
// loan data port by first client
|
|
697 |
iMockLTSY.ExpectL(EEtelCallLoanDataPort, data);
|
|
698 |
err = call.LoanDataPort(dataPort);
|
|
699 |
ASSERT_EQUALS(KErrNone, err)
|
|
700 |
AssertMockLtsyStatusL();
|
|
701 |
|
|
702 |
// Open second client
|
|
703 |
RTelServer telServer2;
|
|
704 |
err = telServer2.Connect();
|
|
705 |
ASSERT_EQUALS(KErrNone, err);
|
|
706 |
CleanupClosePushL(telServer2);
|
|
707 |
|
|
708 |
RMobilePhone phone2;
|
|
709 |
err = phone2.Open(telServer2, KMmTsyPhoneName);
|
|
710 |
ASSERT_EQUALS(KErrNone, err);
|
|
711 |
CleanupClosePushL(phone2);
|
|
712 |
|
|
713 |
RCall call2;
|
|
714 |
RLine line2;
|
|
715 |
|
|
716 |
err = line2.Open(phone2, KMmTsyDataLineName);
|
|
717 |
ASSERT_EQUALS(KErrNone, err)
|
|
718 |
CleanupClosePushL(line2);
|
|
719 |
|
|
720 |
err = call2.OpenExistingCall(line2, callName);
|
|
721 |
ASSERT_EQUALS(KErrNone, err)
|
|
722 |
CleanupClosePushL(call2);
|
|
723 |
|
|
724 |
// test
|
|
725 |
err = call2.RecoverDataPort();
|
|
726 |
ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 330203);
|
|
727 |
// Request passes to MockLTSY as though the client owns the call.
|
|
728 |
// So MockLtsy returns KErrCorrupt because there is no expected IPC.
|
|
729 |
ASSERT_EQUALS(KErrEtelNotCallOwner, err)
|
|
730 |
AssertMockLtsyStatusL();
|
|
731 |
|
|
732 |
iMockLTSY.ExpectL(EEtelCallRecoverDataPort, data);
|
|
733 |
err = call.RecoverDataPort();
|
|
734 |
ASSERT_EQUALS(KErrNone, err)
|
|
735 |
|
|
736 |
CleanupStack::PopAndDestroy(8, this); // call2, line2, phone2, telServer2, call, line, data, this
|
|
737 |
|
|
738 |
}
|
|
739 |
|
|
740 |
|
|
741 |
/**
|
|
742 |
@SYMTestCaseID BA-CTSY-COWN-CRDP-0007
|
|
743 |
@SYMComponent telephony_ctsy
|
|
744 |
@SYMTestCaseDesc Test support in CTSY for RCall::RecoverDataPort for data call when the call become idle
|
|
745 |
@SYMTestPriority High
|
|
746 |
@SYMTestActions Invokes RCall::RecoverDataPort for data calls
|
|
747 |
@SYMTestExpectedResults Pass
|
|
748 |
@SYMTestType CT
|
|
749 |
*/
|
|
750 |
void CCTsyCallOwnershipFU::TestRecoverDataPort0007L()
|
|
751 |
{
|
|
752 |
|
|
753 |
OpenEtelServerL(EUseExtendedError);
|
|
754 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
755 |
OpenPhoneL();
|
|
756 |
|
|
757 |
RBuf8 data;
|
|
758 |
CleanupClosePushL(data);
|
|
759 |
|
|
760 |
RCall call;
|
|
761 |
RLine line;
|
|
762 |
|
|
763 |
TInt err = line.Open(iPhone, KMmTsyDataLineName);
|
|
764 |
ASSERT_EQUALS(KErrNone, err)
|
|
765 |
CleanupClosePushL(line);
|
|
766 |
|
|
767 |
TName callName;
|
|
768 |
err = OpenNewCall(line, call, KMmTsyDataLineName, callName);
|
|
769 |
ASSERT_EQUALS(KErrNone, err)
|
|
770 |
CleanupClosePushL(call);
|
|
771 |
|
|
772 |
const TInt KCallId( 1 );
|
|
773 |
const RMobilePhone::TMobileService KMobileService( RMobilePhone::ECircuitDataService );
|
|
774 |
DialL(call, KCallId, KMobileService);
|
|
775 |
|
|
776 |
TRequestStatus mockLtsyStatus;
|
|
777 |
iMockLTSY.NotifyTerminated(mockLtsyStatus);
|
|
778 |
RMobilePhone::TMobileService mobileService = RMobilePhone::ECircuitDataService;
|
|
779 |
RMobileCall::TMobileCallStatus mobileCallStatus = RMobileCall::EStatusConnected;
|
|
780 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockData2(KCallId,
|
|
781 |
mobileService, mobileCallStatus);
|
|
782 |
data.Close();
|
|
783 |
mockData2.SerialiseL(data);
|
|
784 |
iMockLTSY.CompleteL(EMobileCallNotifyMobileCallStatusChange, KErrNone, data);
|
|
785 |
User::WaitForRequest(mockLtsyStatus);
|
|
786 |
|
|
787 |
RCall::TCommPort dataPort;
|
|
788 |
dataPort.iCsy.Copy(_L("qwerty"));
|
|
789 |
dataPort.iPort.Copy(_L("asdfgh"));
|
|
790 |
TMockLtsyCallData1<RCall::TCommPort> expData(KCallId, KMobileService, dataPort);
|
|
791 |
expData.SerialiseL(data);
|
|
792 |
iMockLTSY.ExpectL(EEtelCallLoanDataPort, data);
|
|
793 |
err = call.LoanDataPort(dataPort);
|
|
794 |
ASSERT_EQUALS(KErrNone, err)
|
|
795 |
AssertMockLtsyStatusL();
|
|
796 |
|
|
797 |
//-------------------------------------------------------------------------
|
|
798 |
// Make the call idle
|
|
799 |
//-------------------------------------------------------------------------
|
|
800 |
iMockLTSY.NotifyTerminated(mockLtsyStatus);
|
|
801 |
|
|
802 |
|
|
803 |
TInt hangUpCause = KErrGsmReleaseByUser;
|
|
804 |
TBool autoStChangeDisable = EFalse;
|
|
805 |
TMockLtsyCallData2<TInt, TBool> mockData1(KCallId, mobileService, hangUpCause,
|
|
806 |
autoStChangeDisable);
|
|
807 |
data.Close();
|
|
808 |
mockData1.SerialiseL(data);
|
|
809 |
iMockLTSY.ExpectL(EEtelCallHangUp, data, KErrNone);
|
|
810 |
|
|
811 |
TRequestStatus reqStatus;
|
|
812 |
call.HangUp(reqStatus);
|
|
813 |
|
|
814 |
mobileCallStatus = RMobileCall::EStatusIdle;
|
|
815 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockData3(KCallId,
|
|
816 |
mobileService, mobileCallStatus);
|
|
817 |
data.Close();
|
|
818 |
mockData3.SerialiseL(data);
|
|
819 |
iMockLTSY.CompleteL(EMobileCallNotifyMobileCallStatusChange, KErrGsmReleaseByUser, data);
|
|
820 |
|
|
821 |
data.Close();
|
|
822 |
expData.SerialiseL(data);
|
|
823 |
|
|
824 |
// Expect to RecoverDataPort from CTSY
|
|
825 |
iMockLTSY.ExpectL(EEtelCallRecoverDataPort, data);
|
|
826 |
|
|
827 |
User::WaitForRequest(reqStatus);
|
|
828 |
ASSERT_EQUALS(KErrNone, reqStatus.Int());
|
|
829 |
User::WaitForRequest(mockLtsyStatus);
|
|
830 |
ASSERT_EQUALS(KErrNone, mockLtsyStatus.Int());
|
|
831 |
|
|
832 |
AssertMockLtsyStatusL();
|
|
833 |
CleanupStack::PopAndDestroy(4, this); // call, line, data, this
|
|
834 |
|
|
835 |
}
|
|
836 |
|
|
837 |
|
|
838 |
/**
|
|
839 |
@SYMTestCaseID BA-CTSY-COWN-CRDP-00011
|
|
840 |
@SYMComponent telephony_ctsy
|
|
841 |
@SYMTestCaseDesc Test support in CTSY for RCall::RecoverDataPort for fax calls
|
|
842 |
@SYMTestPriority High
|
|
843 |
@SYMTestActions Invokes RCall::RecoverDataPort for fax calls
|
|
844 |
@SYMTestExpectedResults Pass
|
|
845 |
@SYMTestType CT
|
|
846 |
*/
|
|
847 |
void CCTsyCallOwnershipFU::TestRecoverDataPort00011L()
|
|
848 |
{
|
|
849 |
|
|
850 |
OpenEtelServerL(EUseExtendedError);
|
|
851 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
852 |
OpenPhoneL();
|
|
853 |
|
|
854 |
ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 330202);
|
|
855 |
// RCall::RecoverDataPort returns KErrEtelPortNotLoanedToClient
|
|
856 |
// instead of KErrNotSupported for fax calls
|
|
857 |
|
|
858 |
TestRecoverDataPortNotSupportedL(KMmTsyFaxLineName);
|
|
859 |
|
|
860 |
CleanupStack::PopAndDestroy(this);
|
|
861 |
|
|
862 |
}
|
|
863 |
|
|
864 |
|
|
865 |
/**
|
|
866 |
@SYMTestCaseID BA-CTSY-COWN-CAO-0001
|
|
867 |
@SYMComponent telephony_ctsy
|
|
868 |
@SYMTestCaseDesc Test support in CTSY for RCall::AcquireOwnership for voice calls
|
|
869 |
@SYMTestPriority High
|
|
870 |
@SYMTestActions Invokes RCall::AcquireOwnership for voice calls
|
|
871 |
@SYMTestExpectedResults Pass
|
|
872 |
@SYMTestType CT
|
|
873 |
*/
|
|
874 |
void CCTsyCallOwnershipFU::TestAcquireOwnership0001L()
|
|
875 |
{
|
|
876 |
|
|
877 |
OpenEtelServerL(EUseExtendedError);
|
|
878 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
879 |
OpenPhoneL();
|
|
880 |
|
|
881 |
TestAcquireOwnershipNotSupportedL(KMmTsyVoice1LineName);
|
|
882 |
|
|
883 |
TestAcquireOwnershipNotSupportedL(KMmTsyVoice2LineName);
|
|
884 |
|
|
885 |
CleanupStack::PopAndDestroy(this);
|
|
886 |
|
|
887 |
}
|
|
888 |
|
|
889 |
|
|
890 |
/**
|
|
891 |
@SYMTestCaseID BA-CTSY-COWN-CAO-0006
|
|
892 |
@SYMComponent telephony_ctsy
|
|
893 |
@SYMTestCaseDesc Test support in CTSY for RCall::AcquireOwnership for data calls
|
|
894 |
@SYMTestPriority High
|
|
895 |
@SYMTestActions Invokes RCall::AcquireOwnership for data calls
|
|
896 |
@SYMTestExpectedResults Pass
|
|
897 |
@SYMTestType CT
|
|
898 |
*/
|
|
899 |
void CCTsyCallOwnershipFU::TestAcquireOwnership0006L()
|
|
900 |
{
|
|
901 |
|
|
902 |
OpenEtelServerL(EUseExtendedError);
|
|
903 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
904 |
OpenPhoneL();
|
|
905 |
|
|
906 |
// Open second client
|
|
907 |
RTelServer telServer2;
|
|
908 |
TInt err = telServer2.Connect();
|
|
909 |
ASSERT_EQUALS(KErrNone, err);
|
|
910 |
CleanupClosePushL(telServer2);
|
|
911 |
|
|
912 |
RMobilePhone phone2;
|
|
913 |
err = phone2.Open(telServer2, KMmTsyPhoneName);
|
|
914 |
ASSERT_EQUALS(KErrNone, err);
|
|
915 |
CleanupClosePushL(phone2);
|
|
916 |
|
|
917 |
// make call having ownership
|
|
918 |
RCall call;
|
|
919 |
RLine line;
|
|
920 |
|
|
921 |
err = line.Open(iPhone, KMmTsyDataLineName);
|
|
922 |
ASSERT_EQUALS(KErrNone, err)
|
|
923 |
CleanupClosePushL(line);
|
|
924 |
|
|
925 |
TName callName;
|
|
926 |
err = OpenNewCall(line, call, KMmTsyDataLineName, callName);
|
|
927 |
ASSERT_EQUALS(KErrNone, err)
|
|
928 |
CleanupClosePushL(call);
|
|
929 |
|
|
930 |
//-------------------------------------------------------------------------
|
|
931 |
// TEST: failure to dispatch request to CTSY when call is not active.
|
|
932 |
//-------------------------------------------------------------------------
|
|
933 |
|
|
934 |
TRequestStatus reqStatus;
|
|
935 |
call.AcquireOwnership(reqStatus);
|
|
936 |
User::WaitForRequest(reqStatus);
|
|
937 |
ASSERT_EQUALS(KErrEtelCallNotActive, reqStatus.Int())
|
|
938 |
AssertMockLtsyStatusL();
|
|
939 |
|
|
940 |
//-------------------------------------------------------------------------
|
|
941 |
// TEST C: Successful completion request of
|
|
942 |
// RCall::AcquireOwnership.
|
|
943 |
//-------------------------------------------------------------------------
|
|
944 |
|
|
945 |
const TInt KCallId( 1 );
|
|
946 |
const RMobilePhone::TMobileService KMobileService( RMobilePhone::ECircuitDataService );
|
|
947 |
DialL(call, KCallId, KMobileService);
|
|
948 |
|
|
949 |
// setting and execute request
|
|
950 |
RCall call2;
|
|
951 |
RLine line2;
|
|
952 |
|
|
953 |
err = line2.Open(phone2, KMmTsyDataLineName);
|
|
954 |
ASSERT_EQUALS(KErrNone, err)
|
|
955 |
CleanupClosePushL(line2);
|
|
956 |
|
|
957 |
// open existing call to send take ownership request
|
|
958 |
err = call2.OpenExistingCall(line2, callName);
|
|
959 |
ASSERT_EQUALS(KErrNone, err)
|
|
960 |
CleanupClosePushL(call2);
|
|
961 |
|
|
962 |
call2.AcquireOwnership(reqStatus);
|
|
963 |
|
|
964 |
// close 1st call to give ownership to call2
|
|
965 |
call.Close();
|
|
966 |
|
|
967 |
User::WaitForRequest(reqStatus);
|
|
968 |
ASSERT_EQUALS(KErrNone, reqStatus.Int())
|
|
969 |
AssertMockLtsyStatusL();
|
|
970 |
|
|
971 |
CleanupStack::PopAndDestroy(4); // call2, line2, call, line
|
|
972 |
CleanupStack::PopAndDestroy(3, this); // phone2, telServer2, this
|
|
973 |
|
|
974 |
}
|
|
975 |
|
|
976 |
|
|
977 |
/**
|
|
978 |
@SYMTestCaseID BA-CTSY-COWN-CAO-0007
|
|
979 |
@SYMComponent telephony_ctsy
|
|
980 |
@SYMTestCaseDesc Test support in CTSY for cancelling of RCall::AcquireOwnership for data calls
|
|
981 |
@SYMTestPriority High
|
|
982 |
@SYMTestActions Invokes cancelling of RCall::AcquireOwnership for data calls
|
|
983 |
@SYMTestExpectedResults Pass
|
|
984 |
@SYMTestType CT
|
|
985 |
*/
|
|
986 |
void CCTsyCallOwnershipFU::TestAcquireOwnership0007L()
|
|
987 |
{
|
|
988 |
|
|
989 |
OpenEtelServerL(EUseExtendedError);
|
|
990 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
991 |
OpenPhoneL();
|
|
992 |
|
|
993 |
// Open second client
|
|
994 |
RTelServer telServer2;
|
|
995 |
TInt err = telServer2.Connect();
|
|
996 |
ASSERT_EQUALS(KErrNone, err);
|
|
997 |
CleanupClosePushL(telServer2);
|
|
998 |
|
|
999 |
RMobilePhone phone2;
|
|
1000 |
err = phone2.Open(telServer2, KMmTsyPhoneName);
|
|
1001 |
ASSERT_EQUALS(KErrNone, err);
|
|
1002 |
CleanupClosePushL(phone2);
|
|
1003 |
|
|
1004 |
// make call having ownership
|
|
1005 |
RCall call;
|
|
1006 |
RLine line;
|
|
1007 |
|
|
1008 |
err = line.Open(iPhone, KMmTsyDataLineName);
|
|
1009 |
ASSERT_EQUALS(KErrNone, err)
|
|
1010 |
CleanupClosePushL(line);
|
|
1011 |
|
|
1012 |
TName callName;
|
|
1013 |
err = OpenNewCall(line, call, KMmTsyDataLineName, callName);
|
|
1014 |
ASSERT_EQUALS(KErrNone, err)
|
|
1015 |
CleanupClosePushL(call);
|
|
1016 |
|
|
1017 |
const TInt KCallId( 1 );
|
|
1018 |
const RMobilePhone::TMobileService KMobileService( RMobilePhone::ECircuitDataService );
|
|
1019 |
DialL(call, KCallId, KMobileService);
|
|
1020 |
|
|
1021 |
//-------------------------------------------------------------------------
|
|
1022 |
// Test cancelling of RCall::AcquireOwnership
|
|
1023 |
//-------------------------------------------------------------------------
|
|
1024 |
|
|
1025 |
// setting and execute request
|
|
1026 |
RCall call2;
|
|
1027 |
RLine line2;
|
|
1028 |
|
|
1029 |
err = line2.Open(phone2, KMmTsyDataLineName);
|
|
1030 |
ASSERT_EQUALS(KErrNone, err)
|
|
1031 |
CleanupClosePushL(line2);
|
|
1032 |
|
|
1033 |
// open existing call to send take ownership request
|
|
1034 |
err = call2.OpenExistingCall(line2, callName);
|
|
1035 |
ASSERT_EQUALS(KErrNone, err)
|
|
1036 |
CleanupClosePushL(call2);
|
|
1037 |
|
|
1038 |
TRequestStatus reqStatus;
|
|
1039 |
call2.AcquireOwnership(reqStatus);
|
|
1040 |
|
|
1041 |
call2.AcquireOwnershipCancel();
|
|
1042 |
|
|
1043 |
// close 1st call to give ownership to call2
|
|
1044 |
call.Close();
|
|
1045 |
|
|
1046 |
User::WaitForRequest(reqStatus);
|
|
1047 |
ASSERT_EQUALS(KErrCancel, reqStatus.Int())
|
|
1048 |
|
|
1049 |
AssertMockLtsyStatusL();
|
|
1050 |
CleanupStack::PopAndDestroy(4); // call2, line2, call, line
|
|
1051 |
CleanupStack::PopAndDestroy(3, this); // phone2, telServer2, this
|
|
1052 |
|
|
1053 |
}
|
|
1054 |
|
|
1055 |
|
|
1056 |
/**
|
|
1057 |
@SYMTestCaseID BA-CTSY-COWN-CAO-0009
|
|
1058 |
@SYMComponent telephony_ctsy
|
|
1059 |
@SYMTestCaseDesc Test support in CTSY for multiple client requests to RCall::AcquireOwnership for data calls
|
|
1060 |
@SYMTestPriority High
|
|
1061 |
@SYMTestActions Invokes multiple client requests to RCall::AcquireOwnership for data calls
|
|
1062 |
@SYMTestExpectedResults Pass
|
|
1063 |
@SYMTestType CT
|
|
1064 |
*/
|
|
1065 |
void CCTsyCallOwnershipFU::TestAcquireOwnership0009L()
|
|
1066 |
{
|
|
1067 |
|
|
1068 |
OpenEtelServerL(EUseExtendedError);
|
|
1069 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
1070 |
OpenPhoneL();
|
|
1071 |
|
|
1072 |
// Open second client
|
|
1073 |
RTelServer telServer2;
|
|
1074 |
TInt err = telServer2.Connect();
|
|
1075 |
ASSERT_EQUALS(KErrNone, err);
|
|
1076 |
CleanupClosePushL(telServer2);
|
|
1077 |
|
|
1078 |
RMobilePhone phone2;
|
|
1079 |
err = phone2.Open(telServer2, KMmTsyPhoneName);
|
|
1080 |
ASSERT_EQUALS(KErrNone, err);
|
|
1081 |
CleanupClosePushL(phone2);
|
|
1082 |
|
|
1083 |
// Open 3rd client
|
|
1084 |
RTelServer telServer3;
|
|
1085 |
err = telServer3.Connect();
|
|
1086 |
ASSERT_EQUALS(KErrNone, err);
|
|
1087 |
CleanupClosePushL(telServer3);
|
|
1088 |
|
|
1089 |
RMobilePhone phone3;
|
|
1090 |
err = phone3.Open(telServer3, KMmTsyPhoneName);
|
|
1091 |
ASSERT_EQUALS(KErrNone, err);
|
|
1092 |
CleanupClosePushL(phone3);
|
|
1093 |
|
|
1094 |
//-------------------------------------------------------------------------
|
|
1095 |
// Test A: Test multiple clients requesting RCall::AcquireOwnership
|
|
1096 |
//-------------------------------------------------------------------------
|
|
1097 |
|
|
1098 |
// make call having ownership
|
|
1099 |
RCall call;
|
|
1100 |
RLine line;
|
|
1101 |
|
|
1102 |
err = line.Open(iPhone, KMmTsyDataLineName);
|
|
1103 |
ASSERT_EQUALS(KErrNone, err)
|
|
1104 |
CleanupClosePushL(line);
|
|
1105 |
|
|
1106 |
TName callName;
|
|
1107 |
err = OpenNewCall(line, call, KMmTsyDataLineName, callName);
|
|
1108 |
ASSERT_EQUALS(KErrNone, err)
|
|
1109 |
CleanupClosePushL(call);
|
|
1110 |
|
|
1111 |
const TInt KCallId( 1 );
|
|
1112 |
const RMobilePhone::TMobileService KMobileService( RMobilePhone::ECircuitDataService );
|
|
1113 |
DialL(call, KCallId, KMobileService);
|
|
1114 |
|
|
1115 |
// setting and execute 1st request
|
|
1116 |
RCall call2;
|
|
1117 |
RLine line2;
|
|
1118 |
|
|
1119 |
err = line2.Open(phone2, KMmTsyDataLineName);
|
|
1120 |
ASSERT_EQUALS(KErrNone, err)
|
|
1121 |
CleanupClosePushL(line2);
|
|
1122 |
|
|
1123 |
err = call2.OpenExistingCall(line2, callName);
|
|
1124 |
ASSERT_EQUALS(KErrNone, err)
|
|
1125 |
CleanupClosePushL(call2);
|
|
1126 |
|
|
1127 |
TRequestStatus reqStatus;
|
|
1128 |
call2.AcquireOwnership(reqStatus);
|
|
1129 |
|
|
1130 |
// setting and execute 2nd request
|
|
1131 |
RCall call3;
|
|
1132 |
RLine line3;
|
|
1133 |
|
|
1134 |
err = line3.Open(phone3, KMmTsyDataLineName);
|
|
1135 |
ASSERT_EQUALS(KErrNone, err)
|
|
1136 |
CleanupClosePushL(line3);
|
|
1137 |
|
|
1138 |
err = call3.OpenExistingCall(line3, callName);
|
|
1139 |
ASSERT_EQUALS(KErrNone, err)
|
|
1140 |
CleanupClosePushL(call3);
|
|
1141 |
|
|
1142 |
TRequestStatus reqStatus2;
|
|
1143 |
call3.AcquireOwnership(reqStatus2);
|
|
1144 |
|
|
1145 |
// close 1st call to give ownership to call2
|
|
1146 |
call.Close();
|
|
1147 |
|
|
1148 |
User::WaitForRequest(reqStatus);
|
|
1149 |
ASSERT_EQUALS(KErrNone, reqStatus.Int())
|
|
1150 |
|
|
1151 |
// close 2nd call to give ownership to call3
|
|
1152 |
call2.Close();
|
|
1153 |
|
|
1154 |
User::WaitForRequest(reqStatus2);
|
|
1155 |
ASSERT_EQUALS(KErrNone, reqStatus2.Int())
|
|
1156 |
|
|
1157 |
AssertMockLtsyStatusL();
|
|
1158 |
CleanupStack::PopAndDestroy(6); // call3, line3, call2, line2, call, line
|
|
1159 |
CleanupStack::PopAndDestroy(5, this); // phone3, telServer3, phone2, telServer2, this
|
|
1160 |
|
|
1161 |
}
|
|
1162 |
|
|
1163 |
|
|
1164 |
/**
|
|
1165 |
@SYMTestCaseID BA-CTSY-COWN-CAO-00011
|
|
1166 |
@SYMComponent telephony_ctsy
|
|
1167 |
@SYMTestCaseDesc Test support in CTSY for RCall::AcquireOwnership for fax calls
|
|
1168 |
@SYMTestPriority High
|
|
1169 |
@SYMTestActions Invokes RCall::AcquireOwnership for fax calls
|
|
1170 |
@SYMTestExpectedResults Pass
|
|
1171 |
@SYMTestType CT
|
|
1172 |
*/
|
|
1173 |
void CCTsyCallOwnershipFU::TestAcquireOwnership00011L()
|
|
1174 |
{
|
|
1175 |
|
|
1176 |
OpenEtelServerL(EUseExtendedError);
|
|
1177 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
1178 |
OpenPhoneL();
|
|
1179 |
|
|
1180 |
ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 330301);
|
|
1181 |
// RCall::AcquireOwnership returns KErrEtelCallNotActive
|
|
1182 |
// instead of KErrNotSupported for fax calls
|
|
1183 |
|
|
1184 |
TestAcquireOwnershipNotSupportedL(KMmTsyFaxLineName);
|
|
1185 |
|
|
1186 |
CleanupStack::PopAndDestroy(this);
|
|
1187 |
|
|
1188 |
}
|
|
1189 |
|
|
1190 |
|
|
1191 |
/**
|
|
1192 |
@SYMTestCaseID BA-CTSY-COWN-CTO-0001
|
|
1193 |
@SYMComponent telephony_ctsy
|
|
1194 |
@SYMTestCaseDesc Test support in CTSY for RCall::TransferOwnership for voice calls
|
|
1195 |
@SYMTestPriority High
|
|
1196 |
@SYMTestActions Invokes RCall::TransferOwnership for voice calls
|
|
1197 |
@SYMTestExpectedResults Pass
|
|
1198 |
@SYMTestType CT
|
|
1199 |
*/
|
|
1200 |
void CCTsyCallOwnershipFU::TestTransferOwnership0001L()
|
|
1201 |
{
|
|
1202 |
|
|
1203 |
OpenEtelServerL(EUseExtendedError);
|
|
1204 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
1205 |
OpenPhoneL();
|
|
1206 |
|
|
1207 |
TestTransferOwnershipNotSupportedL(KMmTsyVoice1LineName);
|
|
1208 |
|
|
1209 |
TestTransferOwnershipNotSupportedL(KMmTsyVoice2LineName);
|
|
1210 |
|
|
1211 |
CleanupStack::PopAndDestroy(this);
|
|
1212 |
|
|
1213 |
}
|
|
1214 |
|
|
1215 |
|
|
1216 |
/**
|
|
1217 |
@SYMTestCaseID BA-CTSY-COWN-CTO-0006
|
|
1218 |
@SYMComponent telephony_ctsy
|
|
1219 |
@SYMTestCaseDesc Test support in CTSY for RCall::TransferOwnership for data calls
|
|
1220 |
@SYMTestPriority High
|
|
1221 |
@SYMTestActions Invokes RCall::TransferOwnership for data calls
|
|
1222 |
@SYMTestExpectedResults Pass
|
|
1223 |
@SYMTestType CT
|
|
1224 |
*/
|
|
1225 |
void CCTsyCallOwnershipFU::TestTransferOwnership0006L()
|
|
1226 |
{
|
|
1227 |
|
|
1228 |
OpenEtelServerL(EUseExtendedError);
|
|
1229 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
1230 |
OpenPhoneL();
|
|
1231 |
|
|
1232 |
RBuf8 expectData;
|
|
1233 |
CleanupClosePushL(expectData);
|
|
1234 |
|
|
1235 |
RBuf8 completeData;
|
|
1236 |
CleanupClosePushL(completeData);
|
|
1237 |
|
|
1238 |
// Open second client
|
|
1239 |
RTelServer telServer2;
|
|
1240 |
TInt err = telServer2.Connect();
|
|
1241 |
ASSERT_EQUALS(KErrNone, err);
|
|
1242 |
CleanupClosePushL(telServer2);
|
|
1243 |
|
|
1244 |
RMobilePhone phone2;
|
|
1245 |
err = phone2.Open(telServer2, KMmTsyPhoneName);
|
|
1246 |
ASSERT_EQUALS(KErrNone, err);
|
|
1247 |
CleanupClosePushL(phone2);
|
|
1248 |
|
|
1249 |
RCall call;
|
|
1250 |
RLine line;
|
|
1251 |
|
|
1252 |
err = line.Open(iPhone, KMmTsyDataLineName);
|
|
1253 |
ASSERT_EQUALS(KErrNone, err)
|
|
1254 |
CleanupClosePushL(line);
|
|
1255 |
|
|
1256 |
TName callName;
|
|
1257 |
err = OpenNewCall(line, call, KMmTsyDataLineName, callName);
|
|
1258 |
ASSERT_EQUALS(KErrNone, err)
|
|
1259 |
CleanupClosePushL(call);
|
|
1260 |
|
|
1261 |
//-------------------------------------------------------------------------
|
|
1262 |
// TEST: failure to dispatch request to CTSY when call is not active
|
|
1263 |
//-------------------------------------------------------------------------
|
|
1264 |
|
|
1265 |
err = call.TransferOwnership();
|
|
1266 |
|
|
1267 |
// CTSY grants call ownerhip to the ETel API client which for example
|
|
1268 |
// dials or answers incoming call. Call is currently in idle state so
|
|
1269 |
// nobody has ownership to this call object. Therefore CTSY returns error
|
|
1270 |
// KErrEtelNotCallOwner to TransferOwnership() request.
|
|
1271 |
ASSERT_EQUALS(KErrEtelNotCallOwner, err)
|
|
1272 |
AssertMockLtsyStatusL();
|
|
1273 |
|
|
1274 |
//-------------------------------------------------------------------------
|
|
1275 |
// TEST: failure to dispatch request to CTSY when there is no client
|
|
1276 |
// interested in the call ownership.
|
|
1277 |
//-------------------------------------------------------------------------
|
|
1278 |
|
|
1279 |
// make call having ownership
|
|
1280 |
const TInt KCallId( 1 );
|
|
1281 |
const RMobilePhone::TMobileService KMobileService( RMobilePhone::ECircuitDataService );
|
|
1282 |
DialL(call, KCallId, KMobileService);
|
|
1283 |
|
|
1284 |
// make connected (just for coverage)
|
|
1285 |
ChangeCallStatusL(KCallId, KMobileService, RMobileCall::EStatusConnected);
|
|
1286 |
|
|
1287 |
err = call.TransferOwnership();
|
|
1288 |
ASSERT_EQUALS(KErrEtelNoClientInterestedInThisCall, err)
|
|
1289 |
AssertMockLtsyStatusL();
|
|
1290 |
|
|
1291 |
//-------------------------------------------------------------------------
|
|
1292 |
// TEST C: Successful completion request of
|
|
1293 |
// RCall::TransferOwnership.
|
|
1294 |
//-------------------------------------------------------------------------
|
|
1295 |
|
|
1296 |
// setting and execute AcquireOwnership request
|
|
1297 |
RCall call2;
|
|
1298 |
RLine line2;
|
|
1299 |
|
|
1300 |
err = line2.Open(phone2, KMmTsyDataLineName);
|
|
1301 |
ASSERT_EQUALS(KErrNone, err)
|
|
1302 |
CleanupClosePushL(line2);
|
|
1303 |
|
|
1304 |
// open existing call to send take ownership request
|
|
1305 |
err = call2.OpenExistingCall(line2, callName);
|
|
1306 |
ASSERT_EQUALS(KErrNone, err)
|
|
1307 |
CleanupClosePushL(call2);
|
|
1308 |
|
|
1309 |
TRequestStatus reqStatus;
|
|
1310 |
call2.AcquireOwnership(reqStatus);
|
|
1311 |
|
|
1312 |
// TransferOwnership to call2
|
|
1313 |
err = call.TransferOwnership();
|
|
1314 |
ASSERT_EQUALS(KErrNone, err)
|
|
1315 |
AssertMockLtsyStatusL();
|
|
1316 |
|
|
1317 |
User::WaitForRequest(reqStatus);
|
|
1318 |
ASSERT_EQUALS(KErrNone, reqStatus.Int())
|
|
1319 |
AssertMockLtsyStatusL();
|
|
1320 |
|
|
1321 |
//-------------------------------------------------------------------------
|
|
1322 |
// TEST: failure to dispatch request to CTSY
|
|
1323 |
// when call is owned by other client
|
|
1324 |
//-------------------------------------------------------------------------
|
|
1325 |
|
|
1326 |
err = call.TransferOwnership();
|
|
1327 |
ASSERT_EQUALS(KErrEtelNotCallOwner, err)
|
|
1328 |
AssertMockLtsyStatusL();
|
|
1329 |
|
|
1330 |
//-------------------------------------------------------------------------
|
|
1331 |
// Hang up data call before closing objects. This is because closing of
|
|
1332 |
// connected call object is bad client behaviour. RelinquishOwnership process
|
|
1333 |
// does not go through if data call is in connected state and last client
|
|
1334 |
// closes handle to the data call object.
|
|
1335 |
|
|
1336 |
TRequestStatus mockLtsyStatus;
|
|
1337 |
iMockLTSY.NotifyTerminated(mockLtsyStatus);
|
|
1338 |
|
|
1339 |
RMobilePhone::TMobileService mobileService = RMobilePhone::ECircuitDataService;
|
|
1340 |
TInt hangUpCause = KErrGsmReleaseByUser;
|
|
1341 |
TBool autoStChangeDisable = EFalse;
|
|
1342 |
TMockLtsyCallData2<TInt, TBool> mockData1(KCallId, mobileService, hangUpCause,
|
|
1343 |
autoStChangeDisable);
|
|
1344 |
mockData1.SerialiseL(expectData);
|
|
1345 |
iMockLTSY.ExpectL(EEtelCallHangUp, expectData, KErrNone);
|
|
1346 |
|
|
1347 |
//Make HangUp request
|
|
1348 |
call2.HangUp(reqStatus);
|
|
1349 |
|
|
1350 |
RMobileCall::TMobileCallStatus mobileCallStatus = RMobileCall::EStatusIdle;
|
|
1351 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockData2(KCallId,
|
|
1352 |
mobileService, mobileCallStatus);
|
|
1353 |
mockData2.SerialiseL(completeData);
|
|
1354 |
iMockLTSY.CompleteL(EMobileCallNotifyMobileCallStatusChange, KErrGsmReleaseByUser, completeData);
|
|
1355 |
|
|
1356 |
User::WaitForRequest(reqStatus);
|
|
1357 |
ASSERT_EQUALS(KErrNone, reqStatus.Int());
|
|
1358 |
User::WaitForRequest(mockLtsyStatus);
|
|
1359 |
ASSERT_EQUALS(KErrNone, mockLtsyStatus.Int());
|
|
1360 |
|
|
1361 |
//-------------------------------------------------------------------------
|
|
1362 |
|
|
1363 |
AssertMockLtsyStatusL();
|
|
1364 |
|
|
1365 |
CleanupStack::PopAndDestroy(9, this); // call2, line2, call, line, phone2,
|
|
1366 |
// telServer2, completeData, expectData, this
|
|
1367 |
}
|
|
1368 |
|
|
1369 |
|
|
1370 |
/**
|
|
1371 |
@SYMTestCaseID BA-CTSY-COWN-CTO-00011
|
|
1372 |
@SYMComponent telephony_ctsy
|
|
1373 |
@SYMTestCaseDesc Test support in CTSY for RCall::TransferOwnership for fax calls
|
|
1374 |
@SYMTestPriority High
|
|
1375 |
@SYMTestActions Invokes RCall::TransferOwnership for fax calls
|
|
1376 |
@SYMTestExpectedResults Pass
|
|
1377 |
@SYMTestType CT
|
|
1378 |
*/
|
|
1379 |
void CCTsyCallOwnershipFU::TestTransferOwnership00011L()
|
|
1380 |
{
|
|
1381 |
|
|
1382 |
OpenEtelServerL(EUseExtendedError);
|
|
1383 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
1384 |
OpenPhoneL();
|
|
1385 |
|
|
1386 |
ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 330401);
|
|
1387 |
// RCall::TransferOwnership returns KErrEtelNotCallOwner
|
|
1388 |
// instead of KErrNotSupported for fax calls
|
|
1389 |
|
|
1390 |
TestTransferOwnershipNotSupportedL(KMmTsyFaxLineName);
|
|
1391 |
|
|
1392 |
CleanupStack::PopAndDestroy(this);
|
|
1393 |
|
|
1394 |
}
|