diff options
Diffstat (limited to 'Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp')
-rw-r--r-- | Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp b/Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp index 254374884..a9f7f409c 100644 --- a/Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp +++ b/Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp @@ -30,37 +30,25 @@ #include "InjectedBundle.h" #include "InjectedBundleUtilities.h" #include <glib.h> -#include <wtf/gobject/GUniquePtr.h> +#include <wtf/glib/GUniquePtr.h> namespace WTR { -static gboolean waitToDumpWatchdogTimerCallback(gpointer) -{ - InjectedBundle::shared().testRunner()->waitToDumpWatchdogTimerFired(); - return FALSE; -} - void TestRunner::platformInitialize() { - m_waitToDumpWatchdogTimer = 0; } void TestRunner::invalidateWaitToDumpWatchdogTimer() { - if (!m_waitToDumpWatchdogTimer) - return; - g_source_remove(m_waitToDumpWatchdogTimer); - m_waitToDumpWatchdogTimer = 0; + m_waitToDumpWatchdogTimer.stop(); } void TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded() { - if (m_waitToDumpWatchdogTimer) + if (m_waitToDumpWatchdogTimer.isActive()) return; - m_waitToDumpWatchdogTimer = g_timeout_add(waitToDumpWatchdogTimerInterval * 1000, - waitToDumpWatchdogTimerCallback, 0); - g_source_set_name_by_id(m_waitToDumpWatchdogTimer, "[WebKit] waitToDumpWatchdogTimerCallback"); + m_waitToDumpWatchdogTimer.startOneShot(m_timeout / 1000.0); } JSRetainPtr<JSStringRef> TestRunner::pathToLocalResource(JSStringRef url) @@ -78,4 +66,9 @@ JSRetainPtr<JSStringRef> TestRunner::pathToLocalResource(JSStringRef url) return JSStringCreateWithUTF8CString(testURI.get()); } +JSRetainPtr<JSStringRef> TestRunner::inspectorTestStubURL() +{ + return JSStringCreateWithUTF8CString("resource:///org/webkitgtk/inspector/UserInterface/TestStub.html"); +} + } // namespace WTR |