2010-10-08 Balazs Kelemen <kbalazs@webkit.org>
authorkbalazs@webkit.org <kbalazs@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Oct 2010 15:26:57 +0000 (15:26 +0000)
committerkbalazs@webkit.org <kbalazs@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Oct 2010 15:26:57 +0000 (15:26 +0000)
        Reviewed by Andreas Kling.

        [Qt] TestController needs its platform dependent methods
        https://bugs.webkit.org/show_bug.cgi?id=47413

        * WebKitTestRunner/qt/TestControllerQt.cpp:
        (WTR::TestController::initializeInjectedBundlePath):
        If the WTR_INJECTEDBUNDLE_PATH environmental variable is
        set then use that otherwise use the path where the bundle
        lives in a normal trunk build.
        (WTR::TestController::initializeTestPluginDirectory):
        Set the bundle's value. It is not used currently.
        (WTR::TestController::platformInitializeContext):
        * WebKitTestRunner/qt/WebKitTestRunner.pro:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@69401 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitTools/ChangeLog
WebKitTools/WebKitTestRunner/qt/TestControllerQt.cpp
WebKitTools/WebKitTestRunner/qt/WebKitTestRunner.pro

index 116ffc3c7e03cdbaa5a318e4a0ab33146725c439..d1f427b999279953d22a0e856d9a84c619acc4a3 100644 (file)
@@ -1,3 +1,20 @@
+2010-10-08  Balazs Kelemen  <kbalazs@webkit.org>
+
+        Reviewed by Andreas Kling.
+
+        [Qt] TestController needs its platform dependent methods
+        https://bugs.webkit.org/show_bug.cgi?id=47413
+
+        * WebKitTestRunner/qt/TestControllerQt.cpp:
+        (WTR::TestController::initializeInjectedBundlePath):
+        If the WTR_INJECTEDBUNDLE_PATH environmental variable is
+        set then use that otherwise use the path where the bundle
+        lives in a normal trunk build.
+        (WTR::TestController::initializeTestPluginDirectory):
+        Set the bundle's value. It is not used currently.
+        (WTR::TestController::platformInitializeContext):
+        * WebKitTestRunner/qt/WebKitTestRunner.pro:
+
 2010-10-08  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
 
         Reviewed by Kenneth Rohde Christiansen.
index 54eb0a5dd19a750b6f31c2ede607aa374203f647..956a1c80e9cdc6151b3b19ee79a9483d5a46d35d 100644 (file)
 
 #include "TestController.h"
 
-#include "NotImplemented.h"
+#include <cstdlib>
 #include <QCoreApplication>
 #include <QEventLoop>
+#include <QFileInfo>
+#include <QLibrary>
 #include <QObject>
+#include <QtGlobal>
+#include <wtf/text/WTFString.h>
 
 namespace WTR {
 
@@ -82,17 +86,24 @@ void TestController::runUntil(bool& done)
 
 void TestController::initializeInjectedBundlePath()
 {
-    notImplemented();
+    QString path = QLatin1String(getenv("WTR_INJECTEDBUNDLE_PATH"));
+    if (path.isEmpty())
+        path = QFileInfo(QCoreApplication::applicationDirPath() + "/../lib/libWTRInjectedBundle").absoluteFilePath();
+
+    if (QLibrary::isLibrary(QLibrary(path).fileName()))
+        qFatal("Cannot find the injected bundle at %s\n", qPrintable(path));
+
+    m_injectedBundlePath = WKStringCreateWithQString(path);
 }
 
 void TestController::initializeTestPluginDirectory()
 {
-    notImplemented();
+    // This is called after initializeInjectedBundlePath.
+    m_testPluginDirectory = m_injectedBundlePath;
 }
 
 void TestController::platformInitializeContext()
 {
-    notImplemented();
 }
 
 #include "TestControllerQt.moc"
index b1ac70efeb625a87e7f19cfe8efe2f2555e4dc74..a638e651f9dd325ea939d804b6eabdef629d0ae5 100644 (file)
@@ -20,6 +20,7 @@ INCLUDEPATH += \
     $$BASEDIR/../../WebKit2 \
     $$BASEDIR/../../WebKit2/Shared \
     $$BASEDIR/../../WebKit2/UIProcess/API/qt \
+    $$BASEDIR/../../WebKit2/UIProcess/API/cpp/qt \
 
 INCLUDEPATH += \
     $$OUTPUT_DIR/include \