diff -r cfea66083b62 -r baacf668fe89 phoneapp/phoneuiqtviewadapter/tsrc/ut_phoneuicommandcontroller/unit_tests.cpp --- a/phoneapp/phoneuiqtviewadapter/tsrc/ut_phoneuicommandcontroller/unit_tests.cpp Mon Oct 04 16:06:10 2010 +0300 +++ b/phoneapp/phoneuiqtviewadapter/tsrc/ut_phoneuicommandcontroller/unit_tests.cpp Fri Oct 15 12:58:46 2010 +0300 @@ -49,8 +49,8 @@ // From PhoneUIQtViewIF BubbleManagerIF& bubbleManager (); - void addBubbleCommand (int bubbleId, const PhoneAction& action); - void clearBubbleCommands (int bubbleId); + void addBubbleCommand (int bubbleId, HbAction *action) {}; + void clearBubbleCommands (int bubbleId) {}; void addParticipantListAction( int commandId, const QString &text, @@ -58,7 +58,7 @@ void clearParticipantListActions(); void hideToolbar () { }; void showToolbar () { m_showToolbarCalled = true; }; - void setToolbarActions (const QList& actions) {m_toolbarActionCount = actions.count(); }; + void setToolbarActions (const QList &actions) {m_toolbarActionCount = actions.count(); }; int volumeSliderValue () { m_volumeSliderValueCalled = true; return 5; }; void removeVolumeSlider () { m_removeVolumeSliderCalled = true; }; void setVolumeSliderValue ( @@ -78,7 +78,8 @@ void clearAndHideDialpad() { m_clearAndHideDialpadCalled = true;}; void clearDialpad() {}; void bringToForeground() {}; - void setMenuActions(const QList& ) { m_setMenuActionsCalled = true;}; + void hide() {}; + void setMenuActions(const QList & ) { m_setMenuActionsCalled = true;}; void shutdownPhoneApp() {}; void setBackButtonVisible(bool ) {}; HbMenu &menuReference(){ HbMenu* menu = NULL; return *menu;}; @@ -221,17 +222,6 @@ return *this; } -void TestPhoneUiCommandController::addBubbleCommand ( - int bubbleId, const PhoneAction& action) -{ - -} - -void TestPhoneUiCommandController::clearBubbleCommands (int bubbleId) -{ - -} - void TestPhoneUiCommandController::addParticipantListAction( int commandId, const QString& text, @@ -325,7 +315,7 @@ callStates[callId] = EPEStateConnected; serviceIds[callId] = serviceId; - QMap actions = + QList actions = m_commandController->pushButtonActionsForCall( callState, emergencyCall, @@ -334,9 +324,9 @@ serviceId, callId); - QVERIFY(0buttonsController()-> @@ -378,8 +368,8 @@ serviceId, callId); - QVERIFY(0pushButtonActionsForCall( @@ -566,8 +556,8 @@ serviceId, callId); - QVERIFY(0buttonsController()-> @@ -649,8 +639,8 @@ serviceId, callId); - QVERIFY(0pushButtonActionsForCall( @@ -661,8 +651,8 @@ serviceId, 3); - QVERIFY(0pushButtonActionsForCall( @@ -673,8 +663,8 @@ serviceId, 2); - QVERIFY(0 actions = + QList actions = m_commandController->toolBarActions( R_PHONEUI_DIALER_CBA, callStates, @@ -710,10 +700,10 @@ callId); QVERIFY(4==actions.count()); - QVERIFY(EPhoneInCallCmdActivateIhf == actions.at(0)->command()); - QVERIFY(EPhoneInCallCmdHold == actions.at(1)->command()); - QVERIFY(EPhoneInCallCmdContacts == actions.at(2)->command()); - QVERIFY(EPhoneInCallCmdDialer == actions.at(3)->command()); + QVERIFY(EPhoneInCallCmdActivateIhf == actions[0]->property("command")); + QVERIFY(EPhoneInCallCmdHold == actions[1]->property("command")); + QVERIFY(EPhoneInCallCmdContacts == actions[2]->property("command")); + QVERIFY(EPhoneInCallCmdDialer == actions[3]->property("command")); qDeleteAll(actions); actions.clear(); @@ -772,10 +762,10 @@ callId); QVERIFY(4==actions.count()); - QVERIFY(EPhoneInCallCmdJoin == actions.at(0)->command()); - QVERIFY(EPhoneInCallCmdUnhold == actions.at(1)->command()); - QVERIFY(EPhoneInCallCmdEndThisOutgoingCall == actions.at(2)->command()); - QVERIFY(EPhoneCallComingCmdSilent == actions.at(3)->command()); + QVERIFY(EPhoneInCallCmdJoin == actions[0]->property("command")); + QVERIFY(EPhoneInCallCmdUnhold == actions[1]->property("command")); + QVERIFY(EPhoneInCallCmdEndThisOutgoingCall == actions[2]->property("command")); + QVERIFY(EPhoneCallComingCmdSilent == actions[3]->property("command")); qDeleteAll(actions); actions.clear();