phoneapp/phoneuiqtviewadapter/tsrc/ut_phoneuiqtviewadapter/unit_tests.cpp
changeset 76 cfea66083b62
parent 74 d1c62c765e48
child 78 baacf668fe89
--- a/phoneapp/phoneuiqtviewadapter/tsrc/ut_phoneuiqtviewadapter/unit_tests.cpp	Fri Sep 17 17:09:12 2010 +0300
+++ b/phoneapp/phoneuiqtviewadapter/tsrc/ut_phoneuiqtviewadapter/unit_tests.cpp	Mon Oct 04 16:06:10 2010 +0300
@@ -24,7 +24,6 @@
 #include <hbmainwindow.h>
 #include <phoneappcommands.hrh>
 #include <hbmenu.h>
-#include "qtestmains60.h"
 #include "phoneuiqtviewadapter.h"
 #include "tphonecmdparaminteger.h"
 #include "tphonecmdparamaudiooutput.h"
@@ -43,6 +42,7 @@
 #include "tphonecmdparamglobalnote.h"
 #include "tphonecmdparamstring.h"
 #include "phoneindicatorcontroller.h"
+#include "phoneuitestmain.h"
 
 extern int m_phoneButtonFlags;
 extern bool m_EPhoneViewMuteRingToneOnAnswer_called;
@@ -76,21 +76,6 @@
 extern int m_removeCallHeaderCallId;
 extern bool m_isVoiceCall;
 
-#define PHONE_QT_VIEW_ADAPTER_TEST_MAIN(TestObject) \
-int main(int argc, char *argv[]) \
-    { \
-        HbApplication app(argc, argv); \
-        TestObject tc; \
-        QResource::registerResource("../hbcore.rcc"); \
-        int ret = QTest::qExec(&tc, argc, argv); \
-        /* Core dump if HbIconLoader instance is not destroyed before the application instance. */ \
-        /* HbIconLoader uses QCoreApplication::aboutToQuit() signal to destroy itself. */ \
-        /* app.exec() where the signal is normally emitted is not called here. */ \
-        /* So, invoking the signal explicitly. */ \
-        QMetaObject::invokeMethod(&app, "aboutToQuit", Qt::DirectConnection); \
-        return ret; \
-    }
-
 // Own assert initialization  
 /*void qt_assert(const char *assertion, const char *file, int line)
 {
@@ -222,8 +207,6 @@
     void testEPhoneViewCreateCallHeaderCommand2 ();
     void testEPhoneViewCreateEmergencyCallHeader ();
     void testEPhoneViewUpdateBubble ();
-    void testEPhoneViewUpdateCallHeaderRemoteInfoData ();
-    void testEPhoneViewUpdateCallHeaderRemoteInfoDataAndLabel();
     void testCallIdByState ();
     void testSetToolbarButtons ();
     void testEPhoneViewHideNaviPaneAudioVolume ();
@@ -421,23 +404,6 @@
 
 }
 
-void TestPhoneUIQtViewAdapter::testEPhoneViewUpdateCallHeaderRemoteInfoData()
-{
-    int callId = 3;
-    m_adapter->ExecuteCommandL(EPhoneViewUpdateCallHeaderRemoteInfoData, callId);
-
-    QCOMPARE(m_updateCallHeaderRemoteInfoCallId, callId);
-
-}
-
-void TestPhoneUIQtViewAdapter::testEPhoneViewUpdateCallHeaderRemoteInfoDataAndLabel ()
-{
-    int callId = 3;
-    m_adapter->ExecuteCommandL(EPhoneViewUpdateCallHeaderRemoteInfoDataAndLabel, callId);
-
-    QCOMPARE(m_updateCallHeaderRemoteInfoAndLabelCallId, callId);
-}
-
 void TestPhoneUIQtViewAdapter::testCallIdByState ()
 {
     TPhoneCmdParamCallStateData data;
@@ -1137,5 +1103,5 @@
     QVERIFY(m_capturedKey == Qt::Key_0);
 }
 
-PHONE_QT_VIEW_ADAPTER_TEST_MAIN(TestPhoneUIQtViewAdapter)
+PHONE_UITEST_MAIN(TestPhoneUIQtViewAdapter)
 #include "unit_tests.moc"