104 m_resourceAdapter->buttonsController (); |
107 m_resourceAdapter->buttonsController (); |
105 |
108 |
106 |
109 |
107 QMap<PhoneAction::ActionType, PhoneAction *> map; |
110 QMap<PhoneAction::ActionType, PhoneAction *> map; |
108 PhoneAction *action = map [PhoneAction::LeftButton]; |
111 PhoneAction *action = map [PhoneAction::LeftButton]; |
109 |
|
110 map = m_resourceAdapter->convert (R_PHONEUI_CALLHANDLING_INCOMINGCALL_CBA); |
|
111 QCOMPARE (map.size (), 2); |
|
112 action = map [PhoneAction::ToolbarButton1]; |
|
113 QCOMPARE (action->icon (), HbIcon("qtg_mono_send")); |
|
114 action = map [PhoneAction::ToolbarButton2]; |
|
115 QCOMPARE (action->icon (), HbIcon("qtg_mono_speaker_off")); |
|
116 QCOMPARE (action->command (), (int)EPhoneCallComingCmdSilent); |
|
117 |
|
118 map = m_resourceAdapter->convert (R_PHONEUI_CALLHANDLING_INCOMINGCALL_REJECT_CBA); |
|
119 QCOMPARE (map.size (), 2); |
|
120 action = map [PhoneAction::ToolbarButton1]; |
|
121 QCOMPARE (action->icon (), HbIcon("qtg_mono_send")); |
|
122 action = map [PhoneAction::ToolbarButton2]; |
|
123 QCOMPARE (action->icon (), HbIcon("qtg_mono_reject_call")); |
|
124 //Command is disabled |
|
125 //QCOMPARE (action->command (), (int)EPhoneCallComingCmdReject); |
|
126 |
|
127 map = m_resourceAdapter->convert (R_PHONEUI_CALLHANDLING_INCOMINGCALL_SOFT_REJECT_CBA); |
|
128 QCOMPARE (map.size (), 2); |
|
129 action = map [PhoneAction::ToolbarButton1]; |
|
130 QCOMPARE (action->icon (), HbIcon("qtg_mono_send")); |
|
131 action = map [PhoneAction::ToolbarButton2]; |
|
132 QCOMPARE (action->icon (), HbIcon("qtg_mono_speaker_off")); |
|
133 //Command is disabled |
|
134 //QCOMPARE (action->command (), (int)EPhoneCallComingCmdReject); |
|
135 |
|
136 map = m_resourceAdapter->convert (R_PHONEUI_CALLHANDLING_CALLWAITING_CBA); |
|
137 QCOMPARE (map.size (), 2); |
|
138 action = map [PhoneAction::ToolbarButton1]; |
|
139 QCOMPARE (action->icon (), HbIcon("qtg_mono_send")); |
|
140 action = map [PhoneAction::ToolbarButton2]; |
|
141 QCOMPARE (action->icon (), HbIcon("qtg_mono_join_call")); |
|
142 QCOMPARE (action->command (), (int)EPhoneInCallCmdJoin); |
|
143 |
|
144 testIncallToolbar( R_PHONEUI_DIALER_CBA ); |
|
145 testIncallToolbar( R_PHONEUI_INCALL_DIALER_CBA ); |
|
146 testIncallToolbar( R_PHONEUI_CALLHANDLING_CALLSETUP_EMPTY_DTMFDIALER_CBA ); |
|
147 testIncallToolbar( R_PHONEUI_CALLHANDLING_INCALL_UNHOLD_CBA ); |
|
148 testIncallToolbar( R_PHONEUI_CALLHANDLING_INCALL_UNMUTE_CBA ); |
|
149 |
112 |
150 map = m_resourceAdapter->convert (R_PHONEUI_MTCAL_INCOMING_CALL); |
113 map = m_resourceAdapter->convert (R_PHONEUI_MTCAL_INCOMING_CALL); |
151 QCOMPARE (map.size (), 1); |
114 QCOMPARE (map.size (), 1); |
152 action = map [PhoneAction::Text]; |
115 action = map [PhoneAction::Text]; |
153 QVERIFY( false == action->text().isEmpty() ); |
116 QVERIFY( false == action->text().isEmpty() ); |
306 QVERIFY( false == testString17.isEmpty() ); |
246 QVERIFY( false == testString17.isEmpty() ); |
307 |
247 |
308 QString testString18 = m_resourceAdapter->convertToString(R_PHONE_ERROR_NO_SERVICE); |
248 QString testString18 = m_resourceAdapter->convertToString(R_PHONE_ERROR_NO_SERVICE); |
309 QVERIFY( false == testString18.isEmpty() ); |
249 QVERIFY( false == testString18.isEmpty() ); |
310 |
250 |
|
251 QString testString19 = m_resourceAdapter->convertToString(R_NOTETEXT_NUMBER_BARRED); |
|
252 QVERIFY( false == testString19.isEmpty() ); |
|
253 |
|
254 /*QString testString20 = m_resourceAdapter->convertToString(R_PHONEUI_NO_VIDEO_NETWORK); |
|
255 QVERIFY( false == testString20.isEmpty() );*/ |
|
256 |
|
257 QString testString21 = m_resourceAdapter->convertToString(R_PHONEUI_VIDEO_CALL_NOT_POSSIBLE); |
|
258 QVERIFY( false == testString21.isEmpty() ); |
|
259 |
|
260 QString testString22 = m_resourceAdapter->convertToString(R_CALL_INFO_CAUSE_VALUE127); |
|
261 QVERIFY( false == testString22.isEmpty() ); |
|
262 |
|
263 QString testString23 = m_resourceAdapter->convertToString(R_CALL_INFO_NOT_SUPPORTED); |
|
264 QVERIFY( false == testString23.isEmpty() ); |
|
265 |
|
266 QString testString24 = m_resourceAdapter->convertToString(R_CALL_INFO_SERVICE_NOT_AVAILABLE); |
|
267 QVERIFY( false == testString24.isEmpty() ); |
|
268 |
|
269 QString testString25 = m_resourceAdapter->convertToString(R_CALL_INFO_CAUSE_VALUE38); |
|
270 QVERIFY( false == testString25.isEmpty() ); |
|
271 |
|
272 QString testString26 = m_resourceAdapter->convertToString(R_CALL_INFO_CAUSE_VALUE55); |
|
273 QVERIFY( false == testString26.isEmpty() ); |
|
274 |
|
275 QString testString27 = m_resourceAdapter->convertToString(R_CALL_INFO_CAUSE_VALUE58); |
|
276 QVERIFY( false == testString27.isEmpty() ); |
|
277 |
|
278 QString testString28 = m_resourceAdapter->convertToString(R_NOTE_PHONE_OUT_OF_3G_COVERAGE); |
|
279 QVERIFY( false == testString28.isEmpty() ); |
|
280 |
|
281 QString testString29 = m_resourceAdapter->convertToString(R_NOTE_VIDEO_CALL_ONLY_POSSIBLE_UNDER_3G_COVERAGE); |
|
282 QVERIFY( false == testString29.isEmpty() ); |
|
283 |
|
284 QString testString30 = m_resourceAdapter->convertToString(R_NOTE_CALLED_NUMBER_HAS_BARRED_INCOMING_CALLS); |
|
285 QVERIFY( false == testString30.isEmpty() ); |
|
286 |
|
287 QString testString31 = m_resourceAdapter->convertToString(R_INCAL_REMOTE_CREATE_CONFERENCE_TEXT); |
|
288 QVERIFY( false == testString31.isEmpty() ); |
|
289 |
|
290 QString testString32 = m_resourceAdapter->convertToString(R_NOTETEXT_CALL_BARRINGS); |
|
291 QVERIFY( false == testString32.isEmpty() ); |
|
292 |
|
293 QString testString33 = m_resourceAdapter->convertToString(R_CALL_INFO_CAUSE_VALUE16); |
|
294 QVERIFY( false == testString33.isEmpty() ); |
|
295 |
|
296 QString testString34 = m_resourceAdapter->convertToString(R_CALL_INFO_CAUSE_VALUE18); |
|
297 QVERIFY( false == testString34.isEmpty() ); |
|
298 |
|
299 QString testString35 = m_resourceAdapter->convertToString(R_CALL_INFO_CAUSE_VALUE21); |
|
300 QVERIFY( false == testString35.isEmpty() ); |
|
301 |
|
302 QString testString36 = m_resourceAdapter->convertToString(R_CALL_INFO_CAUSE_VALUE22); |
|
303 QVERIFY( false == testString36.isEmpty() ); |
|
304 |
|
305 QString testString37 = m_resourceAdapter->convertToString(R_CALL_INFO_CAUSE_VALUE34); |
|
306 QVERIFY( false == testString37.isEmpty() ); |
|
307 |
|
308 QString testString38 = m_resourceAdapter->convertToString(R_PHONE_ERROR_CALL_NOT_ALLOWED_FDN); |
|
309 QVERIFY( false == testString38.isEmpty() ); |
|
310 |
|
311 QString testString39 = m_resourceAdapter->convertToString(R_NOTE_UNABLE_TO_MAKE_VIDEO_CALL_NOT_SUPPORTED_BY_OTHER_PHONE); |
|
312 QVERIFY( false == testString39.isEmpty() ); |
|
313 |
|
314 QString testString40 = m_resourceAdapter->convertToString(R_NOTETEXT_DIVERTING_INCOMING_CALL); |
|
315 QVERIFY( false == testString40.isEmpty() ); |
|
316 |
|
317 QString testString41 = m_resourceAdapter->convertToString(R_NOTETEXT_DIVERTING); |
|
318 QVERIFY( false == testString41.isEmpty() ); |
|
319 |
|
320 QString testString42 = m_resourceAdapter->convertToString(R_NOTETEXT_ALL_INCOMING_CALLS_DIVERTED); |
|
321 QVERIFY( false == testString42.isEmpty() ); |
|
322 |
|
323 QString testString43 = m_resourceAdapter->convertToString(R_PHONE_ERROR_CHECK_CLIR); |
|
324 QVERIFY( false == testString43.isEmpty() ); |
|
325 |
|
326 QString testString44 = m_resourceAdapter->convertToString(R_PHONE_SS_NOTIFICATION_CLIR_SUPPR_REJECT_TEXT); |
|
327 QVERIFY( false == testString44.isEmpty() ); |
|
328 |
|
329 QString testString45 = m_resourceAdapter->convertToString(R_NOTE_TEXT_CLIR_CHANGE); |
|
330 QVERIFY( false == testString45.isEmpty() ); |
|
331 |
|
332 QString testString46 = m_resourceAdapter->convertToString(R_PHONE_ERROR_CHECK_NETWORK_SERVICES); |
|
333 QVERIFY( false == testString46.isEmpty() ); |
|
334 |
|
335 QString testString47 = m_resourceAdapter->convertToString(R_PHONE_INCALL_INFO_VIDEO_CALL_NOT_ALLOWED_DURING_RESTORE); |
|
336 QVERIFY( false == testString47.isEmpty() ); |
|
337 |
311 QString testString99 = m_resourceAdapter->convertToString(0); |
338 QString testString99 = m_resourceAdapter->convertToString(0); |
312 QCOMPARE( testString99, QString ("") ); |
339 QCOMPARE( testString99, QString ("") ); |
313 } |
340 } |
314 |
341 |
315 void TestPhoneResourceAdapter::testConvertToString2 () |
342 void TestPhoneResourceAdapter::testConvertToString2 () |
316 { |
343 { |
317 m_resourceAdapter = PhoneResourceAdapter::Instance (this); |
344 m_resourceAdapter = PhoneResourceAdapter::Instance (this); |
318 |
345 |
319 QString testString = m_resourceAdapter->convertToString( |
346 QString testString = m_resourceAdapter->convertToStringWithParam( |
320 R_PHONE_TEXT_COLP_CONNECTED, QString("123456")); |
347 R_PHONE_TEXT_COLP_CONNECTED, QString("123456")); |
321 |
348 |
322 QVERIFY( false == testString.isEmpty() ); |
349 QVERIFY( false == testString.isEmpty() ); |
323 |
350 |
324 QString testString2 = m_resourceAdapter->convertToString(0, QString()); |
351 QString testString2 = m_resourceAdapter->convertToStringWithParam(0, QString()); |
325 QCOMPARE( testString2, QString ("") ); |
352 QCOMPARE( testString2, QString ("") ); |
326 } |
353 } |
327 |
354 |
328 void TestPhoneResourceAdapter::testIncallToolbar (int id) |
355 void TestPhoneResourceAdapter::testIncallToolbar (int id) |
329 { |
356 { |
412 |
435 |
413 testList = m_resourceAdapter->convertToHbActions(0); |
436 testList = m_resourceAdapter->convertToHbActions(0); |
414 QCOMPARE( testList.count(), 0 ); |
437 QCOMPARE( testList.count(), 0 ); |
415 } |
438 } |
416 |
439 |
|
440 void TestPhoneResourceAdapter::testConvertToToolBarCommandList () |
|
441 { |
|
442 m_resourceAdapter = PhoneResourceAdapter::Instance(this); |
|
443 PhoneUIQtButtonsController* buttonsController = |
|
444 m_resourceAdapter->buttonsController(); |
|
445 |
|
446 QList<PhoneAction::ToolBarItem> testList; |
|
447 |
|
448 testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_INCOMINGCALL_CBA); |
|
449 QCOMPARE(2,testList.count()); |
|
450 QVERIFY(PhoneCallComingCmdSoftReject == testList.at(0).mCommandId); |
|
451 QVERIFY(PhoneCallComingCmdSilent == testList.at(1).mCommandId); |
|
452 QVERIFY(true == testList.at(0).mEnabled); |
|
453 QVERIFY(true == testList.at(1).mEnabled); |
|
454 testList.clear(); |
|
455 |
|
456 testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_INCOMINGCALL_REJECT_CBA); |
|
457 QCOMPARE(2,testList.count()); |
|
458 QVERIFY(PhoneCallComingCmdSoftReject == testList.at(0).mCommandId); |
|
459 QVERIFY(PhoneInCallCmdReject == testList.at(1).mCommandId); |
|
460 QVERIFY(true == testList.at(0).mEnabled); |
|
461 QVERIFY(true == testList.at(1).mEnabled); |
|
462 testList.clear(); |
|
463 |
|
464 testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_INCOMINGCALL_SOFT_REJECT_CBA); |
|
465 QCOMPARE(2,testList.count()); |
|
466 QVERIFY(PhoneCallComingCmdSoftReject == testList.at(0).mCommandId); |
|
467 QVERIFY(PhoneCallComingCmdSilent == testList.at(1).mCommandId); |
|
468 QVERIFY(true == testList.at(0).mEnabled); |
|
469 QVERIFY(false == testList.at(1).mEnabled); |
|
470 testList.clear(); |
|
471 |
|
472 testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_CALLWAITING_CBA); |
|
473 QCOMPARE(2,testList.count()); |
|
474 QVERIFY(PhoneCallComingCmdSoftReject == testList.at(0).mCommandId); |
|
475 QVERIFY(PhoneInCallCmdJoinToConference == testList.at(1).mCommandId); |
|
476 QVERIFY(true == testList.at(0).mEnabled); |
|
477 QVERIFY(false == testList.at(1).mEnabled); |
|
478 testList.clear(); |
|
479 |
|
480 testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_EMERGENCY_CBA); |
|
481 QCOMPARE(2,testList.count()); |
|
482 QVERIFY(PhoneInCallCmdActivateIhf == testList.at(0).mCommandId); |
|
483 QVERIFY(PhoneInCallCmdOpenDialer == testList.at(1).mCommandId); |
|
484 QVERIFY(true == testList.at(0).mEnabled); |
|
485 QVERIFY(true == testList.at(1).mEnabled); |
|
486 testList.clear(); |
|
487 |
|
488 testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_DIALER_CBA); |
|
489 QCOMPARE(4,testList.count()); |
|
490 QVERIFY(PhoneInCallCmdActivateIhf == testList.at(0).mCommandId); |
|
491 QVERIFY(PhoneInCallCmdHold == testList.at(1).mCommandId); |
|
492 QVERIFY(PhoneInCallCmdOpenContacts == testList.at(2).mCommandId); |
|
493 QVERIFY(PhoneInCallCmdOpenDialer == testList.at(3).mCommandId); |
|
494 QVERIFY(true == testList.at(0).mEnabled); |
|
495 QVERIFY(true == testList.at(1).mEnabled); |
|
496 QVERIFY(true == testList.at(2).mEnabled); |
|
497 QVERIFY(true == testList.at(3).mEnabled); |
|
498 testList.clear(); |
|
499 |
|
500 testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_CALLSETUP_EMPTY_DTMFDIALER_CBA); |
|
501 QCOMPARE(4,testList.count()); |
|
502 QVERIFY(PhoneInCallCmdActivateIhf == testList.at(0).mCommandId); |
|
503 QVERIFY(PhoneInCallCmdHold == testList.at(1).mCommandId); |
|
504 QVERIFY(PhoneInCallCmdOpenContacts == testList.at(2).mCommandId); |
|
505 QVERIFY(PhoneInCallCmdOpenDialer == testList.at(3).mCommandId); |
|
506 QVERIFY(true == testList.at(0).mEnabled); |
|
507 QVERIFY(true == testList.at(1).mEnabled); |
|
508 QVERIFY(true == testList.at(2).mEnabled); |
|
509 QVERIFY(true == testList.at(3).mEnabled); |
|
510 testList.clear(); |
|
511 |
|
512 // Set flags hold and ihf |
|
513 buttonsController->setButtonFlags(PhoneUIQtButtonsController::Ihf,true); |
|
514 buttonsController->setButtonFlags(PhoneUIQtButtonsController::Hold,true); |
|
515 |
|
516 testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_EMERGENCY_CBA); |
|
517 QCOMPARE(2,testList.count()); |
|
518 QVERIFY(PhoneInCallCmdDeactivateIhf == testList.at(0).mCommandId); |
|
519 QVERIFY(PhoneInCallCmdOpenDialer == testList.at(1).mCommandId); |
|
520 QVERIFY(true == testList.at(0).mEnabled); |
|
521 QVERIFY(true == testList.at(1).mEnabled); |
|
522 testList.clear(); |
|
523 |
|
524 testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_INCALL_DIALER_CBA); |
|
525 QCOMPARE(4,testList.count()); |
|
526 QVERIFY(PhoneInCallCmdDeactivateIhf == testList.at(0).mCommandId); |
|
527 QVERIFY(PhoneInCallCmdUnhold == testList.at(1).mCommandId); |
|
528 QVERIFY(PhoneInCallCmdOpenContacts == testList.at(2).mCommandId); |
|
529 QVERIFY(PhoneInCallCmdOpenDialer == testList.at(3).mCommandId); |
|
530 QVERIFY(true == testList.at(0).mEnabled); |
|
531 QVERIFY(true == testList.at(1).mEnabled); |
|
532 QVERIFY(true == testList.at(2).mEnabled); |
|
533 QVERIFY(true == testList.at(3).mEnabled); |
|
534 testList.clear(); |
|
535 |
|
536 testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_CALLSETUP_EMPTY_DTMFDIALER_CBA); |
|
537 QCOMPARE(4,testList.count()); |
|
538 QVERIFY(PhoneInCallCmdDeactivateIhf == testList.at(0).mCommandId); |
|
539 QVERIFY(PhoneInCallCmdUnhold == testList.at(1).mCommandId); |
|
540 QVERIFY(PhoneInCallCmdOpenContacts == testList.at(2).mCommandId); |
|
541 QVERIFY(PhoneInCallCmdOpenDialer == testList.at(3).mCommandId); |
|
542 QVERIFY(true == testList.at(0).mEnabled); |
|
543 QVERIFY(true == testList.at(1).mEnabled); |
|
544 QVERIFY(true == testList.at(2).mEnabled); |
|
545 QVERIFY(true == testList.at(3).mEnabled); |
|
546 testList.clear(); |
|
547 |
|
548 // Set flag multi call |
|
549 buttonsController->setButtonFlags(PhoneUIQtButtonsController::MultiCall,true); |
|
550 |
|
551 testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_INCALL_UNHOLD_CBA); |
|
552 QCOMPARE(4,testList.count()); |
|
553 QVERIFY(PhoneInCallCmdDeactivateIhf == testList.at(0).mCommandId); |
|
554 QVERIFY(PhoneInCallCmdSwap == testList.at(1).mCommandId); |
|
555 QVERIFY(PhoneInCallCmdCreateConference == testList.at(2).mCommandId); |
|
556 QVERIFY(PhoneInCallCmdOpenDialer == testList.at(3).mCommandId); |
|
557 QVERIFY(true == testList.at(0).mEnabled); |
|
558 QVERIFY(true == testList.at(1).mEnabled); |
|
559 QVERIFY(true == testList.at(2).mEnabled); |
|
560 QVERIFY(true == testList.at(3).mEnabled); |
|
561 testList.clear(); |
|
562 |
|
563 testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_CALLSETUP_EMPTY_DTMFDIALER_CBA); |
|
564 QCOMPARE(4,testList.count()); |
|
565 QVERIFY(PhoneInCallCmdDeactivateIhf == testList.at(0).mCommandId); |
|
566 QVERIFY(PhoneInCallCmdSwap == testList.at(1).mCommandId); |
|
567 QVERIFY(PhoneInCallCmdCreateConference == testList.at(2).mCommandId); |
|
568 QVERIFY(PhoneInCallCmdOpenDialer == testList.at(3).mCommandId); |
|
569 QVERIFY(true == testList.at(0).mEnabled); |
|
570 QVERIFY(true == testList.at(1).mEnabled); |
|
571 QVERIFY(true == testList.at(2).mEnabled); |
|
572 QVERIFY(true == testList.at(3).mEnabled); |
|
573 testList.clear(); |
|
574 |
|
575 // Set flag outgoing and conference call |
|
576 buttonsController->setButtonFlags(PhoneUIQtButtonsController::Outgoing,true); |
|
577 buttonsController->setButtonFlags(PhoneUIQtButtonsController::Conference,true); |
|
578 |
|
579 testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_INCALL_UNMUTE_CBA); |
|
580 QCOMPARE(4,testList.count()); |
|
581 QVERIFY(PhoneInCallCmdDeactivateIhf == testList.at(0).mCommandId); |
|
582 QVERIFY(PhoneInCallCmdSwap == testList.at(1).mCommandId); |
|
583 QVERIFY(PhoneInCallCmdJoinToConference == testList.at(2).mCommandId); |
|
584 QVERIFY(PhoneInCallCmdOpenDialer == testList.at(3).mCommandId); |
|
585 QVERIFY(true == testList.at(0).mEnabled); |
|
586 QVERIFY(false == testList.at(1).mEnabled); |
|
587 QVERIFY(false == testList.at(2).mEnabled); |
|
588 QVERIFY(true == testList.at(3).mEnabled); |
|
589 testList.clear(); |
|
590 |
|
591 testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_CALLSETUP_EMPTY_DTMFDIALER_CBA); |
|
592 QCOMPARE(4,testList.count()); |
|
593 QVERIFY(PhoneInCallCmdDeactivateIhf == testList.at(0).mCommandId); |
|
594 QVERIFY(PhoneInCallCmdSwap == testList.at(1).mCommandId); |
|
595 QVERIFY(PhoneInCallCmdJoinToConference == testList.at(2).mCommandId); |
|
596 QVERIFY(PhoneInCallCmdOpenDialer == testList.at(3).mCommandId); |
|
597 QVERIFY(true == testList.at(0).mEnabled); |
|
598 QVERIFY(false == testList.at(1).mEnabled); |
|
599 QVERIFY(false == testList.at(2).mEnabled); |
|
600 QVERIFY(true == testList.at(3).mEnabled); |
|
601 testList.clear(); |
|
602 } |
|
603 |
|
604 void TestPhoneResourceAdapter::testBtToolBarCommandList () |
|
605 { |
|
606 m_resourceAdapter = PhoneResourceAdapter::Instance(this); |
|
607 PhoneUIQtButtonsController* buttonsController = |
|
608 m_resourceAdapter->buttonsController(); |
|
609 |
|
610 QList<PhoneAction::ToolBarItem> testList; |
|
611 buttonsController->setButtonFlags(PhoneUIQtButtonsController::BluetoothAvailable,true); |
|
612 buttonsController->setButtonFlags(PhoneUIQtButtonsController::IhfAsPushButton,false); |
|
613 |
|
614 testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_INCALL_BTAA_CBA); |
|
615 QVERIFY(0 < testList.count()); |
|
616 QVERIFY(PhoneInCallCmdBtHandsfree == testList.at(0).mCommandId); |
|
617 QVERIFY(true == testList.at(0).mEnabled); |
|
618 testList.clear(); |
|
619 |
|
620 buttonsController->setButtonFlags(PhoneUIQtButtonsController::Btaa,true); |
|
621 testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_INCALL_BTAA_CBA); |
|
622 QVERIFY(0 < testList.count()); |
|
623 QVERIFY(PhoneInCallCmdHandset == testList.at(0).mCommandId); |
|
624 QVERIFY(true == testList.at(0).mEnabled); |
|
625 testList.clear(); |
|
626 } |
|
627 |
417 PHONE_QT_RESOURCE_ADAPTER_TEST_MAIN(TestPhoneResourceAdapter) |
628 PHONE_QT_RESOURCE_ADAPTER_TEST_MAIN(TestPhoneResourceAdapter) |
418 #include "unit_tests.moc" |
629 #include "unit_tests.moc" |