phoneapp/phoneuiqtviewadapter/tsrc/ut_phoneuiqtviewadapter/unit_tests.cpp
changeset 65 2a5d4ab426d3
parent 50 377c906a8701
child 74 d1c62c765e48
--- a/phoneapp/phoneuiqtviewadapter/tsrc/ut_phoneuiqtviewadapter/unit_tests.cpp	Mon Aug 23 15:42:12 2010 +0300
+++ b/phoneapp/phoneuiqtviewadapter/tsrc/ut_phoneuiqtviewadapter/unit_tests.cpp	Fri Sep 03 13:33:36 2010 +0300
@@ -60,6 +60,7 @@
 extern bool m_removeGlobalWaitNoteCalled;
 extern bool m_ordinalPositionCalled;
 extern bool m_sendToBackgroundCalled;
+extern bool m_phoneVisibleReturnValue;
 
 #define PHONE_QT_VIEW_ADAPTER_TEST_MAIN(TestObject) \
 int main(int argc, char *argv[]) \
@@ -117,7 +118,7 @@
         {m_dialpadVisibilityCalled = true;
     return m_isDialpadVisible; }
     QString dialpadText() {return m_dialpadText;};
-    void clearDialpad() {};
+    void clearDialpad() { m_clearDialpadCalled = true; };
     void clearAndHideDialpad() { m_clearAndHideDialpadCalled = true;};
     void bringToForeground() {};
     void setMenuActions(const QList<PhoneAction*>& ) { m_setMenuActionsCalled = true;};
@@ -269,6 +270,7 @@
     bool m_showDialpadCalled;
     bool m_hideDialpadCalled;
     bool m_dialpadVisibilityCalled;
+    bool m_clearDialpadCalled;
     bool m_clearAndHideDialpadCalled;
     bool m_ExpandConferenceCalled;
     bool m_setMenuActionsCalled;
@@ -1099,14 +1101,16 @@
 void TestPhoneUIQtViewAdapter::testRemoveDialpad ()
 {
     m_clearAndHideDialpadCalled = false;
-
     m_adapter->ExecuteCommandL(EPhoneViewRemoveNumberEntry);
-    QVERIFY( m_clearAndHideDialpadCalled == true );
-    
+    QVERIFY( m_clearAndHideDialpadCalled == true );   
     m_clearAndHideDialpadCalled = false;
 
+    m_clearDialpadCalled = false;
+    m_phoneVisibleReturnValue = true;
     m_adapter->ExecuteCommandL(EPhoneViewClearNumberEntryContent);
-    QVERIFY( m_clearAndHideDialpadCalled == true );
+    QVERIFY( m_clearDialpadCalled == true );
+    m_phoneVisibleReturnValue = false;
+    m_clearDialpadCalled = false;
 }
 
 void TestPhoneUIQtViewAdapter::testGetDialpadStringLength ()
@@ -1324,11 +1328,13 @@
     m_adapter->ExecuteCommand(EPhoneViewSetIhfFlag,&param);
     m_adapter->ExecuteCommand(EPhoneViewSetMuteFlag,&param);
     m_adapter->ExecuteCommand(EPhoneViewSetBluetoothAvailableFlag,&param);
+    m_adapter->ExecuteCommand(EPhoneViewSetSoftRejectDimmed,&param);
 
     QVERIFY(m_phoneButtonFlags & PhoneUIQtButtonsController::Ihf);
     QVERIFY(m_phoneButtonFlags & PhoneUIQtButtonsController::Mute);
     QVERIFY(m_phoneButtonFlags & PhoneUIQtButtonsController::Btaa);
     QVERIFY(m_phoneButtonFlags & PhoneUIQtButtonsController::BluetoothAvailable);
+    QVERIFY(m_phoneButtonFlags & PhoneUIQtButtonsController::DisableSoftReject);
 }
 
 void TestPhoneUIQtViewAdapter::testCaptureEndKey()