|
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 PhoneStore functional unit. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @internalTechnology |
|
20 */ |
|
21 |
|
22 #include "cctsyintegrationtestphonestore.h" |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 CCTSYIntegrationTestPhoneStoreBase::CCTSYIntegrationTestPhoneStoreBase(CEtelSessionMgr& aEtelSessionMgr) |
|
28 : CCTSYIntegrationTestSuiteStepBase(aEtelSessionMgr) |
|
29 /** |
|
30 * Constructor |
|
31 */ |
|
32 { |
|
33 } |
|
34 |
|
35 CCTSYIntegrationTestPhoneStoreBase::~CCTSYIntegrationTestPhoneStoreBase() |
|
36 /* |
|
37 * Destructor |
|
38 */ |
|
39 { |
|
40 } |
|
41 |
|
42 |
|
43 CCTSYIntegrationTestPhoneStore0001::CCTSYIntegrationTestPhoneStore0001(CEtelSessionMgr& aEtelSessionMgr) |
|
44 : CCTSYIntegrationTestPhoneStoreBase(aEtelSessionMgr) |
|
45 /** |
|
46 * Constructor. |
|
47 */ |
|
48 { |
|
49 SetTestStepName(CCTSYIntegrationTestPhoneStore0001::GetTestStepName()); |
|
50 } |
|
51 |
|
52 CCTSYIntegrationTestPhoneStore0001::~CCTSYIntegrationTestPhoneStore0001() |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 { |
|
57 } |
|
58 |
|
59 TVerdict CCTSYIntegrationTestPhoneStore0001::doTestStepL() |
|
60 /** |
|
61 * @SYMTestCaseID BA-CTSY-INT-PSTR-0001 |
|
62 * @SYMFssID BA/CTSY/PSTR-0001 |
|
63 * @SYMTestCaseDesc Get phone store information from unsupported phone books. |
|
64 * @SYMTestPriority High |
|
65 * @SYMTestActions |
|
66 * @SYMTestExpectedResults Pass - KErrNotSupported returned for unsupported phone books. |
|
67 * @SYMTestType CIT |
|
68 * @SYMTestCaseDependencies live/automatic |
|
69 * |
|
70 * Reason for test: Verify KErrNotSupported is returned. |
|
71 * |
|
72 * @return - TVerdict code |
|
73 */ |
|
74 { |
|
75 |
|
76 // |
|
77 // SET UP |
|
78 // |
|
79 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
80 |
|
81 |
|
82 // |
|
83 // SET UP END |
|
84 // |
|
85 |
|
86 StartTest(); |
|
87 |
|
88 // |
|
89 // TEST START |
|
90 // |
|
91 |
|
92 // Check RMobilePhone::GetPhoneStoreInfo returns KErrNotSupported when aStoreName is set to the following: |
|
93 RMobilePhoneStore::TMobilePhoneStoreInfoV1 storeInfo; |
|
94 RMobilePhoneStore::TMobilePhoneStoreInfoV1Pckg storeInfoPkg(storeInfo); |
|
95 TExtEtelRequestStatus phoneStoreInfoRequest(phone,EMobilePhoneGetPhoneStoreInfo); |
|
96 CleanupStack::PushL(phoneStoreInfoRequest); |
|
97 |
|
98 |
|
99 // Check RMobilePhone::GetPhoneStoreInfo returns KErrNotSupported when aStoreName is set to KETelMeAdnPhoneBook |
|
100 phone.GetPhoneStoreInfo(phoneStoreInfoRequest,storeInfoPkg,KETelMeAdnPhoneBook); |
|
101 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest, ETimeLong), |
|
102 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")); |
|
103 ASSERT_EQUALS(phoneStoreInfoRequest.Int(), KErrNotSupported, |
|
104 _L("RMobilePhone::GetPhoneStoreInfo completed with incorrect status")); |
|
105 |
|
106 // Check RMobilePhone::GetPhoneStoreInfo returns KErrNotSupported when aStoreName is set to KETelMeDialledPhoneBook |
|
107 phone.GetPhoneStoreInfo(phoneStoreInfoRequest,storeInfoPkg,KETelMeDialledPhoneBook); |
|
108 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest, ETimeMedium), |
|
109 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")) |
|
110 ASSERT_EQUALS(phoneStoreInfoRequest.Int(), KErrNotSupported, _L("RMobilePhone::GetPhoneStoreInfo completed with incorrect status")) |
|
111 |
|
112 // Check RMobilePhone::GetPhoneStoreInfo returns KErrNotSupported when aStoreName is set to KETelMeMissedPhoneBook |
|
113 phone.GetPhoneStoreInfo(phoneStoreInfoRequest,storeInfoPkg,KETelMeMissedPhoneBook); |
|
114 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest, ETimeMedium), |
|
115 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")) |
|
116 ASSERT_EQUALS(phoneStoreInfoRequest.Int(), KErrNotSupported, _L("RMobilePhone::GetPhoneStoreInfo completed with incorrect status")) |
|
117 |
|
118 // Check RMobilePhone::GetPhoneStoreInfo returns KErrNotSupported when aStoreName is set to KETelMeReceivedPhoneBook |
|
119 phone.GetPhoneStoreInfo(phoneStoreInfoRequest,storeInfoPkg,KETelMeReceivedPhoneBook); |
|
120 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest, ETimeMedium), |
|
121 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")) |
|
122 ASSERT_EQUALS(phoneStoreInfoRequest.Int(), KErrNotSupported, _L("RMobilePhone::GetPhoneStoreInfo completed with incorrect status")) |
|
123 |
|
124 // Check RMobilePhone::GetPhoneStoreInfo returns KErrNotSupported when aStoreName is set to KETelCombinedAdnPhoneBook |
|
125 phone.GetPhoneStoreInfo(phoneStoreInfoRequest,storeInfoPkg,KETelCombinedAdnPhoneBook); |
|
126 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest, ETimeMedium), |
|
127 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")) |
|
128 ASSERT_EQUALS(phoneStoreInfoRequest.Int(), KErrNotSupported, _L("RMobilePhone::GetPhoneStoreInfo completed with incorrect status")) |
|
129 |
|
130 // Check RMobilePhone::GetPhoneStoreInfo returns KErrNotSupported when aStoreName is set to KETelCombinedSmsStore |
|
131 phone.GetPhoneStoreInfo(phoneStoreInfoRequest,storeInfoPkg,KETelCombinedSmsStore); |
|
132 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest, ETimeMedium), |
|
133 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")) |
|
134 ASSERT_EQUALS(phoneStoreInfoRequest.Int(), KErrNotSupported, _L("RMobilePhone::GetPhoneStoreInfo completed with incorrect status")) |
|
135 |
|
136 // Check RMobilePhone::GetPhoneStoreInfo returns KErrNotSupported when aStoreName is set to KETelMeSmsStore |
|
137 phone.GetPhoneStoreInfo(phoneStoreInfoRequest,storeInfoPkg,KETelMeSmsStore); |
|
138 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest, ETimeMedium), |
|
139 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")) |
|
140 ASSERT_EQUALS(phoneStoreInfoRequest.Int(), KErrNotSupported, _L("RMobilePhone::GetPhoneStoreInfo completed with incorrect status")) |
|
141 |
|
142 // |
|
143 // TEST END |
|
144 // |
|
145 |
|
146 StartCleanup(); |
|
147 |
|
148 CleanupStack::PopAndDestroy(1); //phoneStoreInfoRequest |
|
149 |
|
150 return TestStepResult(); |
|
151 } |
|
152 |
|
153 TPtrC CCTSYIntegrationTestPhoneStore0001::GetTestStepName() |
|
154 /** |
|
155 * @return The test step name. |
|
156 */ |
|
157 { |
|
158 return _L("CCTSYIntegrationTestPhoneStore0001"); |
|
159 } |
|
160 |
|
161 |
|
162 |
|
163 CCTSYIntegrationTestPhoneStore0002::CCTSYIntegrationTestPhoneStore0002(CEtelSessionMgr& aEtelSessionMgr) |
|
164 : CCTSYIntegrationTestPhoneStoreBase(aEtelSessionMgr) |
|
165 /** |
|
166 * Constructor. |
|
167 */ |
|
168 { |
|
169 SetTestStepName(CCTSYIntegrationTestPhoneStore0002::GetTestStepName()); |
|
170 } |
|
171 |
|
172 CCTSYIntegrationTestPhoneStore0002::~CCTSYIntegrationTestPhoneStore0002() |
|
173 /** |
|
174 * Destructor. |
|
175 */ |
|
176 { |
|
177 } |
|
178 |
|
179 TVerdict CCTSYIntegrationTestPhoneStore0002::doTestStepL() |
|
180 /** |
|
181 * @SYMTestCaseID BA-CTSY-INT-PSTR-0002 |
|
182 * @SYMFssID BA/CTSY/PSTR-0002 |
|
183 * @SYMTestCaseDesc Get phone store information and capabilities |
|
184 * @SYMTestPriority High |
|
185 * @SYMTestActions |
|
186 * @SYMTestExpectedResults Pass - Phone store information returned correctly. |
|
187 * @SYMTestType CIT |
|
188 * @SYMTestCaseDependencies live/automatic |
|
189 * |
|
190 * Reason for test: Verify phone store information returned is correct. |
|
191 * |
|
192 * @return - TVerdict code |
|
193 * |
|
194 * $CTSYProblem - Getting the phone store information with |
|
195 * RMobilePhone::GetPhoneStoreInfo is returning |
|
196 * KErrNotSupported. The request is being passed through CTSY |
|
197 * to LTSY, and it is LTSY which is retuning KErrNotSupported. |
|
198 * It is happening for these phonebooks: KETelIccAdnPhoneBook |
|
199 * KETelIccFdnPhoneBook KETelEmergencyNumberStore |
|
200 * KETelOwnNumberStore |
|
201 * KETelIccVoiceMailBox |
|
202 * KETelIccSdnPhoneBook |
|
203 * KETelIccBdnPhoneBook |
|
204 * KETelIccVoiceMailBox |
|
205 * KETelIccSmsStore |
|
206 * |
|
207 * These phonebooks were expected to be supported through this IPC. |
|
208 */ |
|
209 { |
|
210 |
|
211 // |
|
212 // SET UP |
|
213 // |
|
214 // Get the phone. |
|
215 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
216 |
|
217 |
|
218 // |
|
219 // SET UP END |
|
220 // |
|
221 |
|
222 StartTest(); |
|
223 |
|
224 // |
|
225 // TEST START |
|
226 // |
|
227 TExtEtelRequestStatus phoneStoreInfoRequest(phone,EMobilePhoneGetPhoneStoreInfo); |
|
228 CleanupStack::PushL(phoneStoreInfoRequest); |
|
229 RMobilePhoneStore::TMobilePhoneStoreInfoV1 phoneStore; |
|
230 RMobilePhoneStore::TMobilePhoneStoreInfoV1Pckg phoneStorePkg(phoneStore); |
|
231 TInt expectedMinCaps = 0; |
|
232 |
|
233 // Call RMobilePhone::GetPhoneStoreInfo with aStoreName = KETelIccAdnPhoneBook |
|
234 phone.GetPhoneStoreInfo(phoneStoreInfoRequest,phoneStorePkg,KETelIccAdnPhoneBook); |
|
235 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest, ETimeLong), |
|
236 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")); |
|
237 |
|
238 if(phoneStoreInfoRequest.Int() != KErrNotSupported) |
|
239 { |
|
240 ASSERT_EQUALS(phoneStoreInfoRequest.Int(), KErrNone, |
|
241 _L("RMobilePhone::GetPhoneStoreInfo returned error.")); |
|
242 // Check RMobilePhone::GetPhoneStoreInfo returns iTotalEntries > 0 |
|
243 // Check RMobilePhone::GetPhoneStoreInfo returns iUsedEntries >= 0 |
|
244 ASSERT_TRUE( phoneStore.iTotalEntries > 0, |
|
245 _L("RMobilePhone::GetPhoneStoreInfo returns 0 total entries.")); |
|
246 ASSERT_TRUE( phoneStore.iUsedEntries >= 0, |
|
247 _L("RMobilePhone::GetPhoneStoreInfo returns invalid used entries.")); |
|
248 |
|
249 // When aStoreName = KETelIccAdnPhoneBook |
|
250 // Check RMobilePhone::GetPhoneStoreInfo returns iType == EPhoneBookStore |
|
251 // Check RMobilePhone::GetPhoneStoreInfo returns iCaps of RMobilePhoneStore::KCapsReadAccess | RMobilePhoneStore::KCapsWriteAccess | RMobilePhoneStore::KCapsDeleteAll | RMobilePhoneStore::KCapsNotifyEvent |
|
252 ASSERT_EQUALS(phoneStore.iType, RMobilePhoneStore::EPhoneBookStore, |
|
253 _L("RMobilePhone::GetPhoneStoreInfo completed with error.")); |
|
254 expectedMinCaps = RMobilePhoneStore::KCapsReadAccess | RMobilePhoneStore::KCapsWriteAccess | RMobilePhoneStore::KCapsDeleteAll | RMobilePhoneStore::KCapsNotifyEvent; |
|
255 ASSERT_BITS_SET(phoneStore.iCaps, expectedMinCaps, KNoUnwantedBits, |
|
256 _L("RMobilePhone::GetPhoneStoreInfo completed with incorrect caps.")); |
|
257 } |
|
258 else |
|
259 { |
|
260 DEBUG_PRINTF2(_L("RMobilePhone::GetPhoneStoreInfo for KETelIccAdnPhoneBook returned %d"), |
|
261 phoneStoreInfoRequest.Int()); |
|
262 } |
|
263 |
|
264 |
|
265 // Call RMobilePhone::GetPhoneStoreInfo with aStoreName = KETelIccFdnPhoneBook |
|
266 TExtEtelRequestStatus phoneStoreInfoRequest2(phone,EMobilePhoneGetPhoneStoreInfo); |
|
267 CleanupStack::PushL(phoneStoreInfoRequest2); |
|
268 phone.GetPhoneStoreInfo(phoneStoreInfoRequest2,phoneStorePkg,KETelIccFdnPhoneBook); |
|
269 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest2, ETimeLong), |
|
270 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")) |
|
271 |
|
272 if(phoneStoreInfoRequest2.Int() != KErrNotSupported) |
|
273 { |
|
274 ASSERT_EQUALS(phoneStoreInfoRequest2.Int(), KErrNone, |
|
275 _L("RMobilePhone::GetPhoneStoreInfo returned error.")); |
|
276 // Check RMobilePhone::GetPhoneStoreInfo returns iTotalEntries > 0 |
|
277 // Check RMobilePhone::GetPhoneStoreInfo returns iUsedEntries >= 0 |
|
278 ASSERT_TRUE( phoneStore.iTotalEntries > 0, |
|
279 _L("RMobilePhone::GetPhoneStoreInfo returns 0 total entries.")); |
|
280 ASSERT_TRUE( phoneStore.iUsedEntries >= 0, |
|
281 _L("RMobilePhone::GetPhoneStoreInfo returns invalid used entries.")); |
|
282 |
|
283 // When aStoreName = KETelIccFdnPhoneBook |
|
284 // Check RMobilePhone::GetPhoneStoreInfo returns iType == EPhoneBookStore |
|
285 // Check RMobilePhone::GetPhoneStoreInfo returns iCaps of RMobilePhoneStore::KCapsReadAccess | RMobilePhoneStore::KCapsWriteAccess | RMobilePhoneStore::KCapsDeleteAll | RMobilePhoneStore::KCapsNotifyEvent |
|
286 ASSERT_EQUALS(phoneStore.iType, RMobilePhoneStore::EPhoneBookStore, |
|
287 _L("RMobilePhone::GetPhoneStoreInfo completed with error.")); |
|
288 expectedMinCaps = RMobilePhoneStore::KCapsReadAccess | RMobilePhoneStore::KCapsWriteAccess | RMobilePhoneStore::KCapsDeleteAll | RMobilePhoneStore::KCapsNotifyEvent; |
|
289 ASSERT_BITS_SET(phoneStore.iCaps, expectedMinCaps, KNoUnwantedBits, |
|
290 _L("RMobilePhone::GetPhoneStoreInfo completed with incorrect caps.")); |
|
291 } |
|
292 else |
|
293 { |
|
294 DEBUG_PRINTF2(_L("RMobilePhone::GetPhoneStoreInfo for KETelIccAdnPhoneBook returned %d"), |
|
295 phoneStoreInfoRequest.Int()); |
|
296 } |
|
297 |
|
298 |
|
299 |
|
300 |
|
301 // Call RMobilePhone::GetPhoneStoreInfo with aStoreName = KETelEmergencyNumberStore |
|
302 TExtEtelRequestStatus phoneStoreInfoRequest3(phone,EMobilePhoneGetPhoneStoreInfo); |
|
303 CleanupStack::PushL(phoneStoreInfoRequest3); |
|
304 phone.GetPhoneStoreInfo(phoneStoreInfoRequest3,phoneStorePkg,KETelEmergencyNumberStore); |
|
305 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest3, ETimeLong), |
|
306 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")); |
|
307 |
|
308 if(phoneStoreInfoRequest3.Int() != KErrNotSupported) |
|
309 { |
|
310 ASSERT_EQUALS(phoneStoreInfoRequest3.Int(), KErrNone, |
|
311 _L("RMobilePhone::GetPhoneStoreInfo with KETelEmergencyNumberStore completed with incorrect status")); |
|
312 // Check RMobilePhone::GetPhoneStoreInfo returns iTotalEntries > 0 |
|
313 // Check RMobilePhone::GetPhoneStoreInfo returns iUsedEntries >= 0 |
|
314 ASSERT_TRUE( phoneStore.iTotalEntries > 0, |
|
315 _L("RMobilePhone::GetPhoneStoreInfo returns 0 total entries.")); |
|
316 ASSERT_TRUE( phoneStore.iUsedEntries >= 0, |
|
317 _L("RMobilePhone::GetPhoneStoreInfo returns invalid used entries.")); |
|
318 |
|
319 // When aStoreName = KETelEmergencyNumberStore |
|
320 // Check RMobilePhone::GetPhoneStoreInfo returns iType == EEmergencyNumberStore |
|
321 // Check RMobilePhone::GetPhoneStoreInfo returns iCaps of RMobilePhoneStore::KCapsReadAccess |
|
322 ASSERT_EQUALS(phoneStore.iType, RMobilePhoneStore::EEmergencyNumberStore, |
|
323 _L("RMobilePhone::GetPhoneStoreInfo completed with error.")); |
|
324 expectedMinCaps = RMobilePhoneStore::KCapsReadAccess; |
|
325 ASSERT_BITS_SET(phoneStore.iCaps, expectedMinCaps, KNoUnwantedBits, |
|
326 _L("RMobilePhone::GetPhoneStoreInfo completed with incorrect caps.")); |
|
327 } |
|
328 else |
|
329 { |
|
330 DEBUG_PRINTF2(_L("RMobilePhone::GetPhoneStoreInfo for KETelIccAdnPhoneBook returned %d"), |
|
331 phoneStoreInfoRequest.Int()); |
|
332 } |
|
333 |
|
334 |
|
335 |
|
336 // Call RMobilePhone::GetPhoneStoreInfo with aStoreName = KETelOwnNumberStore |
|
337 TExtEtelRequestStatus phoneStoreInfoRequest4(phone,EMobilePhoneGetPhoneStoreInfo); |
|
338 CleanupStack::PushL(phoneStoreInfoRequest4); |
|
339 phone.GetPhoneStoreInfo(phoneStoreInfoRequest4,phoneStorePkg,KETelOwnNumberStore); |
|
340 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest4, ETimeLong), |
|
341 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")); |
|
342 |
|
343 if(phoneStoreInfoRequest4.Int() != KErrNotSupported) |
|
344 { |
|
345 ASSERT_EQUALS(phoneStoreInfoRequest4.Int(), KErrNone, |
|
346 _L("RMobilePhone::GetPhoneStoreInfo returned error.")); |
|
347 // Check RMobilePhone::GetPhoneStoreInfo returns iTotalEntries > 0 |
|
348 // Check RMobilePhone::GetPhoneStoreInfo returns iUsedEntries >= 0 |
|
349 ASSERT_TRUE( phoneStore.iTotalEntries > 0, |
|
350 _L("RMobilePhone::GetPhoneStoreInfo returns 0 total entries.")); |
|
351 ASSERT_TRUE( phoneStore.iUsedEntries >= 0, |
|
352 _L("RMobilePhone::GetPhoneStoreInfo returns invalid used entries.")); |
|
353 |
|
354 // When aStoreName = KETelOwnNumberStore |
|
355 // Check RMobilePhone::GetPhoneStoreInfo returns iType == EOwnNumberStore |
|
356 // Check RMobilePhone::GetPhoneStoreInfo returns iCaps of RMobilePhoneStore::KCapsIndividualEntry | RMobilePhoneStore::KCapsReadAccess | RMobilePhoneStore::KCapsWriteAccess | RMobilePhoneStore::KCapsDeleteAll | RMobilePhoneStore::KCapsNotifyEent | RMobilePhoneStore::KCapsWholeStore |
|
357 ASSERT_EQUALS(phoneStore.iType, RMobilePhoneStore::EOwnNumberStore, |
|
358 _L("RMobilePhone::GetPhoneStoreInfo completed with error.")); |
|
359 expectedMinCaps = RMobilePhoneStore::KCapsIndividualEntry | RMobilePhoneStore::KCapsReadAccess | RMobilePhoneStore::KCapsWriteAccess | RMobilePhoneStore::KCapsDeleteAll | RMobilePhoneStore::KCapsNotifyEvent | RMobilePhoneStore::KCapsWholeStore; |
|
360 ASSERT_BITS_SET(phoneStore.iCaps, expectedMinCaps, KNoUnwantedBits, |
|
361 _L("RMobilePhone::GetPhoneStoreInfo completed with incorrect caps.")); |
|
362 |
|
363 } |
|
364 else |
|
365 { |
|
366 DEBUG_PRINTF2(_L("RMobilePhone::GetPhoneStoreInfo for KETelIccAdnPhoneBook returned %d"), |
|
367 phoneStoreInfoRequest.Int()); |
|
368 } |
|
369 |
|
370 |
|
371 |
|
372 |
|
373 |
|
374 // Call RMobilePhone::GetPhoneStoreInfo with aStoreName = KETelIccVoiceMailBox |
|
375 TExtEtelRequestStatus phoneStoreInfoRequest5(phone,EMobilePhoneGetPhoneStoreInfo); |
|
376 CleanupStack::PushL(phoneStoreInfoRequest5); |
|
377 phone.GetPhoneStoreInfo(phoneStoreInfoRequest5,phoneStorePkg,KETelIccVoiceMailBox); |
|
378 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest5, ETimeLong), |
|
379 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")); |
|
380 |
|
381 if(phoneStoreInfoRequest5.Int() != KErrNotSupported) |
|
382 { |
|
383 ASSERT_EQUALS(phoneStoreInfoRequest5.Int(), KErrNone, |
|
384 _L("RMobilePhone::GetPhoneStoreInfo returned error.")); |
|
385 // Check RMobilePhone::GetPhoneStoreInfo returns iTotalEntries > 0 |
|
386 // Check RMobilePhone::GetPhoneStoreInfo returns iUsedEntries >= 0 |
|
387 ASSERT_TRUE( phoneStore.iTotalEntries > 0, |
|
388 _L("RMobilePhone::GetPhoneStoreInfo returns 0 total entries.")); |
|
389 ASSERT_TRUE( phoneStore.iUsedEntries >= 0, |
|
390 _L("RMobilePhone::GetPhoneStoreInfo returns invalid used entries.")); |
|
391 |
|
392 // When aStoreName = KETelIccVoiceMailBox |
|
393 // Check RMobilePhone::GetPhoneStoreInfo returns iType == EPhoneBookStore |
|
394 // Check RMobilePhone::GetPhoneStoreInfo returns iCaps of RMobilePhoneStore::KCapsReadAccess | RMobilePhoneStore::KCapsWriteAccess | RMobilePhoneStore::KCapsDeleteAll | RMobilePhoneStore::KCapsNotifyEvent |
|
395 ASSERT_EQUALS(phoneStore.iType, RMobilePhoneStore::EPhoneBookStore, |
|
396 _L("RMobilePhone::GetPhoneStoreInfo completed with error.")); |
|
397 expectedMinCaps = RMobilePhoneStore::KCapsReadAccess | RMobilePhoneStore::KCapsWriteAccess | RMobilePhoneStore::KCapsDeleteAll | RMobilePhoneStore::KCapsNotifyEvent; |
|
398 ASSERT_BITS_SET(phoneStore.iCaps, expectedMinCaps, KNoUnwantedBits, |
|
399 _L("RMobilePhone::GetPhoneStoreInfo completed with incorrect caps.")); |
|
400 } |
|
401 else |
|
402 { |
|
403 DEBUG_PRINTF2(_L("RMobilePhone::GetPhoneStoreInfo for KETelIccAdnPhoneBook returned %d"), |
|
404 phoneStoreInfoRequest.Int()); |
|
405 |
|
406 } |
|
407 |
|
408 |
|
409 |
|
410 |
|
411 // Call RMobilePhone::GetPhoneStoreInfo with aStoreName = KETelIccSdnPhoneBook |
|
412 TExtEtelRequestStatus phoneStoreInfoRequest6(phone,EMobilePhoneGetPhoneStoreInfo); |
|
413 CleanupStack::PushL(phoneStoreInfoRequest6); |
|
414 phone.GetPhoneStoreInfo(phoneStoreInfoRequest6,phoneStorePkg,KETelIccSdnPhoneBook); |
|
415 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest6, ETimeLong), |
|
416 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")); |
|
417 |
|
418 if(phoneStoreInfoRequest6.Int() != KErrNotSupported) |
|
419 { |
|
420 ASSERT_EQUALS(phoneStoreInfoRequest6.Int(), KErrNone, |
|
421 _L("RMobilePhone::GetPhoneStoreInfo returned error.")); |
|
422 // Check RMobilePhone::GetPhoneStoreInfo returns iTotalEntries > 0 |
|
423 // Check RMobilePhone::GetPhoneStoreInfo returns iUsedEntries >= 0 |
|
424 ASSERT_TRUE( phoneStore.iTotalEntries > 0, |
|
425 _L("RMobilePhone::GetPhoneStoreInfo returns 0 total entries.")); |
|
426 ASSERT_TRUE( phoneStore.iUsedEntries >= 0, |
|
427 _L("RMobilePhone::GetPhoneStoreInfo returns invalid used entries.")); |
|
428 |
|
429 // When aStoreName = KETelIccSdnPhoneBook |
|
430 // Check RMobilePhone::GetPhoneStoreInfo returns iType == EPhoneBookStore |
|
431 // Check RMobilePhone::GetPhoneStoreInfo returns iCaps of RMobilePhoneStore::KCapsReadAccess |
|
432 ASSERT_EQUALS(phoneStore.iType, RMobilePhoneStore::EPhoneBookStore, |
|
433 _L("RMobilePhone::GetPhoneStoreInfo completed with error.")); |
|
434 expectedMinCaps = RMobilePhoneStore::KCapsReadAccess; |
|
435 ASSERT_BITS_SET(phoneStore.iCaps, expectedMinCaps, KNoUnwantedBits, |
|
436 _L("RMobilePhone::GetPhoneStoreInfo completed with incorrect caps.")); |
|
437 |
|
438 } |
|
439 else |
|
440 { |
|
441 DEBUG_PRINTF2(_L("RMobilePhone::GetPhoneStoreInfo for KETelIccAdnPhoneBook returned %d"), |
|
442 phoneStoreInfoRequest.Int()); |
|
443 |
|
444 } |
|
445 |
|
446 |
|
447 |
|
448 |
|
449 |
|
450 // Call RMobilePhone::GetPhoneStoreInfo with aStoreName = KETelIccBdnPhoneBook |
|
451 TExtEtelRequestStatus phoneStoreInfoRequest7(phone,EMobilePhoneGetPhoneStoreInfo); |
|
452 CleanupStack::PushL(phoneStoreInfoRequest7); |
|
453 phone.GetPhoneStoreInfo(phoneStoreInfoRequest7,phoneStorePkg,KETelIccBdnPhoneBook); |
|
454 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest7, ETimeLong), |
|
455 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")); |
|
456 |
|
457 if(phoneStoreInfoRequest7.Int() != KErrNotSupported) |
|
458 { |
|
459 ASSERT_EQUALS(phoneStoreInfoRequest7.Int(), KErrNone, |
|
460 _L("RMobilePhone::GetPhoneStoreInfo returned error.")); |
|
461 // Check RMobilePhone::GetPhoneStoreInfo returns iTotalEntries > 0 |
|
462 // Check RMobilePhone::GetPhoneStoreInfo returns iUsedEntries >= 0 |
|
463 ASSERT_TRUE( phoneStore.iTotalEntries > 0, |
|
464 _L("RMobilePhone::GetPhoneStoreInfo returns 0 total entries.")); |
|
465 ASSERT_TRUE( phoneStore.iUsedEntries >= 0, |
|
466 _L("RMobilePhone::GetPhoneStoreInfo returns invalid used entries.")); |
|
467 |
|
468 // When aStoreName = KETelIccBdnPhoneBook |
|
469 // Check RMobilePhone::GetPhoneStoreInfo returns iType == EPhoneBookStore |
|
470 // Check RMobilePhone::GetPhoneStoreInfo returns iCaps of 0 |
|
471 ASSERT_EQUALS(phoneStore.iType, RMobilePhoneStore::EPhoneBookStore, |
|
472 _L("RMobilePhone::GetPhoneStoreInfo completed with error.")); |
|
473 expectedMinCaps =0x00; |
|
474 ASSERT_BITS_SET(phoneStore.iCaps, expectedMinCaps,KNoUnwantedBits, |
|
475 _L("RMobilePhone::GetPhoneStoreInfo completed with incorrect caps.")); |
|
476 |
|
477 } |
|
478 else |
|
479 { |
|
480 DEBUG_PRINTF2(_L("RMobilePhone::GetPhoneStoreInfo for KETelIccAdnPhoneBook returned %d"), |
|
481 phoneStoreInfoRequest7.Int()); |
|
482 |
|
483 } |
|
484 |
|
485 |
|
486 |
|
487 |
|
488 |
|
489 // Call RMobilePhone::GetPhoneStoreInfo with aStoreName = KETelIccSmsStore |
|
490 TExtEtelRequestStatus phoneStoreInfoRequest8(phone,EMobilePhoneGetPhoneStoreInfo); |
|
491 CleanupStack::PushL(phoneStoreInfoRequest8); |
|
492 phone.GetPhoneStoreInfo(phoneStoreInfoRequest8,phoneStorePkg,KETelIccSmsStore); |
|
493 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest8, ETimeVeryLong), |
|
494 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")); |
|
495 |
|
496 if(phoneStoreInfoRequest8.Int() != KErrNotSupported) |
|
497 { |
|
498 ASSERT_EQUALS(phoneStoreInfoRequest7.Int(), KErrNone, |
|
499 _L("RMobilePhone::GetPhoneStoreInfo returned error.")); |
|
500 // Check RMobilePhone::GetPhoneStoreInfo returns iTotalEntries > 0 |
|
501 // Check RMobilePhone::GetPhoneStoreInfo returns iUsedEntries >= 0 |
|
502 ASSERT_TRUE( phoneStore.iTotalEntries > 0, |
|
503 _L("RMobilePhone::GetPhoneStoreInfo returns 0 total entries.")); |
|
504 ASSERT_TRUE( phoneStore.iUsedEntries >= 0, |
|
505 _L("RMobilePhone::GetPhoneStoreInfo returns invalid used entries.")); |
|
506 |
|
507 // When aStoreName = KETelIccSmsStore |
|
508 // Check RMobilePhone::GetPhoneStoreInfo returns iType == RMobilePhoneStore::EShortMessageStore |
|
509 // Check RMobilePhone::GetPhoneStoreInfo returns iCaps of RMobilePhoneStore::KCapsIndividualEntry | RMobilePhoneStore::KCapsDeleteAll | RMobilePhoneStore::KCapsReadAccess | RMobilePhoneStore::KCapsWriteAccess | RMobilePhoneStore::KCapsNotifyEvent | RMobilePhoneStore::KCapsWholeStore |
|
510 ASSERT_EQUALS(phoneStore.iType, RMobilePhoneStore::EShortMessageStore, |
|
511 _L("RMobilePhone::GetPhoneStoreInfo completed with error.")); |
|
512 expectedMinCaps = RMobilePhoneStore::KCapsIndividualEntry | RMobilePhoneStore::KCapsDeleteAll | RMobilePhoneStore::KCapsReadAccess | RMobilePhoneStore::KCapsWriteAccess | RMobilePhoneStore::KCapsNotifyEvent | RMobilePhoneStore::KCapsWholeStore; |
|
513 ASSERT_BITS_SET(phoneStore.iCaps, expectedMinCaps, KNoUnwantedBits, |
|
514 _L("RMobilePhone::GetPhoneStoreInfo completed with incorrect caps.")); |
|
515 |
|
516 } |
|
517 else |
|
518 { |
|
519 DEBUG_PRINTF2(_L("RMobilePhone::GetPhoneStoreInfo for KETelIccAdnPhoneBook returned %d"), |
|
520 phoneStoreInfoRequest.Int()); |
|
521 |
|
522 } |
|
523 |
|
524 |
|
525 |
|
526 // |
|
527 // TEST END |
|
528 // |
|
529 |
|
530 StartCleanup(); |
|
531 |
|
532 //phoneStoreInfoRequest |
|
533 //phoneStoreInfoRequest2 |
|
534 //phoneStoreInfoRequest3 |
|
535 //phoneStoreInfoRequest4 |
|
536 //phoneStoreInfoRequest5 |
|
537 //phoneStoreInfoRequest6 |
|
538 //phoneStoreInfoRequest7 |
|
539 //phoneStoreInfoRequest8 |
|
540 |
|
541 CleanupStack::PopAndDestroy(8, &phoneStoreInfoRequest); |
|
542 |
|
543 return TestStepResult(); |
|
544 } |
|
545 |
|
546 TPtrC CCTSYIntegrationTestPhoneStore0002::GetTestStepName() |
|
547 /** |
|
548 * @return The test step name. |
|
549 */ |
|
550 { |
|
551 return _L("CCTSYIntegrationTestPhoneStore0002"); |
|
552 } |
|
553 |
|
554 |
|
555 |
|
556 CCTSYIntegrationTestPhoneStore0003::CCTSYIntegrationTestPhoneStore0003(CEtelSessionMgr& aEtelSessionMgr) |
|
557 : CCTSYIntegrationTestPhoneStoreBase(aEtelSessionMgr) |
|
558 /** |
|
559 * Constructor. |
|
560 */ |
|
561 { |
|
562 SetTestStepName(CCTSYIntegrationTestPhoneStore0003::GetTestStepName()); |
|
563 } |
|
564 |
|
565 CCTSYIntegrationTestPhoneStore0003::~CCTSYIntegrationTestPhoneStore0003() |
|
566 /** |
|
567 * Destructor. |
|
568 */ |
|
569 { |
|
570 } |
|
571 |
|
572 TVerdict CCTSYIntegrationTestPhoneStore0003::doTestStepL() |
|
573 /** |
|
574 * @SYMTestCaseID BA-CTSY-INT-PSTR-0003 |
|
575 * @SYMFssID BA/CTSY/PSTR-0003 |
|
576 * @SYMTestCaseDesc Cancel getting phone store information. |
|
577 * @SYMTestPriority High |
|
578 * @SYMTestActions |
|
579 * @SYMTestExpectedResults Pass - KErrCancel returned or KErrNone if it was too late to cancel. |
|
580 * @SYMTestType CIT |
|
581 * @SYMTestCaseDependencies live/automatic |
|
582 * |
|
583 * Reason for test: Verify request is cancelled. |
|
584 * |
|
585 * @return - TVerdict code |
|
586 */ |
|
587 { |
|
588 |
|
589 // |
|
590 // SET UP |
|
591 // |
|
592 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
593 |
|
594 |
|
595 // |
|
596 // SET UP END |
|
597 // |
|
598 |
|
599 StartTest(); |
|
600 |
|
601 // |
|
602 // TEST START |
|
603 // |
|
604 |
|
605 |
|
606 // Get phone store info. with RMobilePhone::GetPhoneStoreInfo with aStoreName=KETelIccAdnPhoneBook |
|
607 TExtEtelRequestStatus phoneStoreInfoRequest(phone,EMobilePhoneGetPhoneStoreInfo); |
|
608 CleanupStack::PushL(phoneStoreInfoRequest); |
|
609 RMobilePhoneStore::TMobilePhoneStoreInfoV1 phoneStore; |
|
610 RMobilePhoneStore::TMobilePhoneStoreInfoV1Pckg phoneStorePkg(phoneStore); |
|
611 phone.GetPhoneStoreInfo(phoneStoreInfoRequest,phoneStorePkg,KETelIccAdnPhoneBook); |
|
612 |
|
613 // Cancel request with RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneGetPhoneStoreInfo) |
|
614 phone.CancelAsyncRequest(EMobilePhoneGetPhoneStoreInfo); |
|
615 |
|
616 // Check request completes with KErrCancel or KErrNone or KErrNotSupported |
|
617 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest, ETimeMedium), |
|
618 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")); |
|
619 ASSERT_TRUE(phoneStoreInfoRequest.Int() == KErrCancel || phoneStoreInfoRequest.Int() == KErrNone || phoneStoreInfoRequest.Int() == KErrNotSupported, |
|
620 _L("RMobilePhone::GetPhoneStoreInfo request completed with error.")); |
|
621 |
|
622 |
|
623 |
|
624 |
|
625 // Repeat test with aStoreName = |
|
626 // Get phone store info. with RMobilePhone::GetPhoneStoreInfo with aStoreName=KETelIccFdnPhoneBook, |
|
627 TExtEtelRequestStatus phoneStoreInfoRequest2(phone,EMobilePhoneGetPhoneStoreInfo); |
|
628 CleanupStack::PushL(phoneStoreInfoRequest2); |
|
629 RMobilePhoneStore::TMobilePhoneStoreInfoV1 phoneStore2; |
|
630 RMobilePhoneStore::TMobilePhoneStoreInfoV1Pckg phoneStorePkg2(phoneStore2); |
|
631 phone.GetPhoneStoreInfo(phoneStoreInfoRequest2,phoneStorePkg2,KETelIccFdnPhoneBook); |
|
632 |
|
633 // Cancel request with RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneGetPhoneStoreInfo) |
|
634 phone.CancelAsyncRequest(EMobilePhoneGetPhoneStoreInfo); |
|
635 |
|
636 // Check request completes with KErrCancel or KErrNone or KErrNotSupported |
|
637 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest2, ETimeMedium), |
|
638 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")); |
|
639 |
|
640 |
|
641 ASSERT_TRUE(phoneStoreInfoRequest2.Int() == KErrCancel || phoneStoreInfoRequest2.Int() == KErrNone || phoneStoreInfoRequest2.Int() == KErrNotSupported, |
|
642 _L("RMobilePhone::GetPhoneStoreInfo request completed with error.")); |
|
643 |
|
644 |
|
645 |
|
646 // Get phone store info. with RMobilePhone::GetPhoneStoreInfo with aStoreName=KETelEmergencyNumberStore, |
|
647 TExtEtelRequestStatus phoneStoreInfoRequest3(phone,EMobilePhoneGetPhoneStoreInfo); |
|
648 CleanupStack::PushL(phoneStoreInfoRequest3); |
|
649 RMobilePhoneStore::TMobilePhoneStoreInfoV1 phoneStore3; |
|
650 RMobilePhoneStore::TMobilePhoneStoreInfoV1Pckg phoneStorePkg3(phoneStore3); |
|
651 phone.GetPhoneStoreInfo(phoneStoreInfoRequest3,phoneStorePkg3,KETelEmergencyNumberStore); |
|
652 |
|
653 // Cancel request with RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneGetPhoneStoreInfo) |
|
654 phone.CancelAsyncRequest(EMobilePhoneGetPhoneStoreInfo); |
|
655 |
|
656 // Check request completes with KErrCancel or KErrNone or KErrNotSupported |
|
657 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest3, ETimeMedium), |
|
658 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")); |
|
659 ASSERT_TRUE(phoneStoreInfoRequest3.Int() == KErrCancel || phoneStoreInfoRequest3.Int() == KErrNone || phoneStoreInfoRequest3.Int() == KErrNotSupported, |
|
660 _L("RMobilePhone::GetPhoneStoreInfo request completed with error.")); |
|
661 |
|
662 |
|
663 |
|
664 // Get phone store info. with RMobilePhone::GetPhoneStoreInfo with aStoreName=KETelOwnNumberStore |
|
665 TExtEtelRequestStatus phoneStoreInfoRequest4(phone,EMobilePhoneGetPhoneStoreInfo); |
|
666 CleanupStack::PushL(phoneStoreInfoRequest4); |
|
667 RMobilePhoneStore::TMobilePhoneStoreInfoV1 phoneStore4; |
|
668 RMobilePhoneStore::TMobilePhoneStoreInfoV1Pckg phoneStorePkg4(phoneStore4); |
|
669 phone.GetPhoneStoreInfo(phoneStoreInfoRequest4,phoneStorePkg4,KETelOwnNumberStore); |
|
670 |
|
671 // Cancel request with RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneGetPhoneStoreInfo) |
|
672 phone.CancelAsyncRequest(EMobilePhoneGetPhoneStoreInfo); |
|
673 |
|
674 // Check request completes with KErrCancel or KErrNone or KErrNotSupported |
|
675 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest4, ETimeMedium), |
|
676 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")); |
|
677 ASSERT_TRUE(phoneStoreInfoRequest4.Int() == KErrCancel || phoneStoreInfoRequest4.Int() == KErrNone || phoneStoreInfoRequest4.Int() == KErrNotSupported, |
|
678 _L("RMobilePhone::GetPhoneStoreInfo request completed with error.")); |
|
679 |
|
680 |
|
681 |
|
682 // Get phone store info. with RMobilePhone::GetPhoneStoreInfo with aStoreName=KETelIccVoiceMailBox |
|
683 TExtEtelRequestStatus phoneStoreInfoRequest5(phone,EMobilePhoneGetPhoneStoreInfo); |
|
684 CleanupStack::PushL(phoneStoreInfoRequest5); |
|
685 RMobilePhoneStore::TMobilePhoneStoreInfoV1 phoneStore5; |
|
686 RMobilePhoneStore::TMobilePhoneStoreInfoV1Pckg phoneStorePkg5(phoneStore5); |
|
687 phone.GetPhoneStoreInfo(phoneStoreInfoRequest5,phoneStorePkg5,KETelIccVoiceMailBox); |
|
688 |
|
689 // Cancel request with RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneGetPhoneStoreInfo) |
|
690 phone.CancelAsyncRequest(EMobilePhoneGetPhoneStoreInfo); |
|
691 |
|
692 // Check request completes with KErrCancel or KErrNone or KErrNotSupported |
|
693 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest5, ETimeMedium), |
|
694 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")); |
|
695 ASSERT_TRUE(phoneStoreInfoRequest5.Int() == KErrCancel || phoneStoreInfoRequest5.Int() == KErrNone || phoneStoreInfoRequest5.Int() == KErrNotSupported, |
|
696 _L("RMobilePhone::GetPhoneStoreInfo request completed with error.")); |
|
697 |
|
698 |
|
699 |
|
700 |
|
701 // Get phone store info. with RMobilePhone::GetPhoneStoreInfo with aStoreName=KETelIccSdnPhoneBook |
|
702 TExtEtelRequestStatus phoneStoreInfoRequest6(phone,EMobilePhoneGetPhoneStoreInfo); |
|
703 CleanupStack::PushL(phoneStoreInfoRequest6); |
|
704 RMobilePhoneStore::TMobilePhoneStoreInfoV1 phoneStore6; |
|
705 RMobilePhoneStore::TMobilePhoneStoreInfoV1Pckg phoneStorePkg6(phoneStore6); |
|
706 phone.GetPhoneStoreInfo(phoneStoreInfoRequest6,phoneStorePkg6,KETelIccSdnPhoneBook); |
|
707 |
|
708 // Cancel request with RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneGetPhoneStoreInfo) |
|
709 phone.CancelAsyncRequest(EMobilePhoneGetPhoneStoreInfo); |
|
710 |
|
711 // Check request completes with KErrCancel or KErrNone or KErrNotSupported |
|
712 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest6, ETimeMedium), |
|
713 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")); |
|
714 ASSERT_TRUE(phoneStoreInfoRequest6.Int() == KErrCancel || phoneStoreInfoRequest6.Int() == KErrNone || phoneStoreInfoRequest6.Int() == KErrNotSupported, |
|
715 _L("RMobilePhone::GetPhoneStoreInfo request completed with error.")); |
|
716 |
|
717 |
|
718 |
|
719 |
|
720 |
|
721 |
|
722 // Get phone store info. with RMobilePhone::GetPhoneStoreInfo with aStoreName=KETelIccBdnPhoneBook, |
|
723 TExtEtelRequestStatus phoneStoreInfoRequest7(phone,EMobilePhoneGetPhoneStoreInfo); |
|
724 CleanupStack::PushL(phoneStoreInfoRequest7); |
|
725 RMobilePhoneStore::TMobilePhoneStoreInfoV1 phoneStore7; |
|
726 RMobilePhoneStore::TMobilePhoneStoreInfoV1Pckg phoneStorePkg7(phoneStore7); |
|
727 phone.GetPhoneStoreInfo(phoneStoreInfoRequest7,phoneStorePkg7,KETelIccBdnPhoneBook); |
|
728 |
|
729 // Cancel request with RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneGetPhoneStoreInfo) |
|
730 phone.CancelAsyncRequest(EMobilePhoneGetPhoneStoreInfo); |
|
731 |
|
732 // Check request completes with KErrCancel or KErrNone or KErrNotSupported |
|
733 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest7, ETimeMedium), |
|
734 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")); |
|
735 ASSERT_TRUE(phoneStoreInfoRequest7.Int() == KErrCancel || phoneStoreInfoRequest7.Int() == KErrNone || phoneStoreInfoRequest7.Int() == KErrNotSupported, |
|
736 _L("RMobilePhone::GetPhoneStoreInfo request completed with error.")); |
|
737 |
|
738 |
|
739 |
|
740 |
|
741 // Get phone store info. with RMobilePhone::GetPhoneStoreInfo with aStoreName=KETelIccVoiceMailBox, |
|
742 TExtEtelRequestStatus phoneStoreInfoRequest8(phone,EMobilePhoneGetPhoneStoreInfo); |
|
743 CleanupStack::PushL(phoneStoreInfoRequest8); |
|
744 RMobilePhoneStore::TMobilePhoneStoreInfoV1 phoneStore8; |
|
745 RMobilePhoneStore::TMobilePhoneStoreInfoV1Pckg phoneStorePkg8(phoneStore8); |
|
746 phone.GetPhoneStoreInfo(phoneStoreInfoRequest8,phoneStorePkg8,KETelIccVoiceMailBox); |
|
747 |
|
748 // Cancel request with RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneGetPhoneStoreInfo) |
|
749 phone.CancelAsyncRequest(EMobilePhoneGetPhoneStoreInfo); |
|
750 |
|
751 // Check request completes with KErrCancel or KErrNone or KErrNotSupported |
|
752 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest8, ETimeMedium), |
|
753 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")); |
|
754 ASSERT_TRUE(phoneStoreInfoRequest8.Int() == KErrCancel || phoneStoreInfoRequest8.Int() == KErrNone || phoneStoreInfoRequest8.Int() == KErrNotSupported, |
|
755 _L("RMobilePhone::GetPhoneStoreInfo request completed with error.")); |
|
756 |
|
757 |
|
758 |
|
759 // Get phone store info. with RMobilePhone::GetPhoneStoreInfo with aStoreName=KETelIccSmsStore |
|
760 TExtEtelRequestStatus phoneStoreInfoRequest9(phone,EMobilePhoneGetPhoneStoreInfo); |
|
761 CleanupStack::PushL(phoneStoreInfoRequest9); |
|
762 RMobilePhoneStore::TMobilePhoneStoreInfoV1 phoneStore9; |
|
763 RMobilePhoneStore::TMobilePhoneStoreInfoV1Pckg phoneStorePkg9(phoneStore8); |
|
764 phone.GetPhoneStoreInfo(phoneStoreInfoRequest9,phoneStorePkg9,KETelIccSmsStore); |
|
765 |
|
766 // Cancel request with RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneGetPhoneStoreInfo) |
|
767 phone.CancelAsyncRequest(EMobilePhoneGetPhoneStoreInfo); |
|
768 |
|
769 // Check request completes with KErrCancel or KErrNone or KErrNotSupported |
|
770 ASSERT_EQUALS(WaitForRequestWithTimeOut(phoneStoreInfoRequest9, ETimeMedium), |
|
771 KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out.")); |
|
772 ASSERT_TRUE(phoneStoreInfoRequest9.Int() == KErrCancel || phoneStoreInfoRequest9.Int() == KErrNone || phoneStoreInfoRequest9.Int() == KErrNotSupported, |
|
773 _L("RMobilePhone::GetPhoneStoreInfo request completed with error.")); |
|
774 |
|
775 |
|
776 // |
|
777 // TEST END |
|
778 // |
|
779 |
|
780 |
|
781 StartCleanup(); |
|
782 |
|
783 //phoneStoreInfoRequest |
|
784 //phoneStoreInfoRequest2 |
|
785 //phoneStoreInfoRequest3 |
|
786 //phoneStoreInfoRequest4 |
|
787 //phoneStoreInfoRequest5 |
|
788 //phoneStoreInfoRequest6 |
|
789 //phoneStoreInfoRequest7 |
|
790 //phoneStoreInfoRequest8 |
|
791 //phoneStoreInfoRequest9 |
|
792 CleanupStack::PopAndDestroy(9); |
|
793 |
|
794 return TestStepResult(); |
|
795 } |
|
796 |
|
797 TPtrC CCTSYIntegrationTestPhoneStore0003::GetTestStepName() |
|
798 /** |
|
799 * @return The test step name. |
|
800 */ |
|
801 { |
|
802 return _L("CCTSYIntegrationTestPhoneStore0003"); |
|
803 } |
|
804 |
|
805 |
|
806 |