2008-01-04 Alp Toker <alp@atoker.com>
[WebKit-https.git] / WebKitTools / DumpRenderTree / gtk / LayoutTestControllerGtk.cpp
index 944a17fb9b4084eb39980e50469eb62e9c2af973..82af22ec082bf0b4d9233f4151d7730a4da8c11b 100644 (file)
@@ -35,6 +35,8 @@
 #include <JavaScriptCore/JSRetainPtr.h>
 #include <JavaScriptCore/JSStringRef.h>
 
+#include <glib.h>
+
 LayoutTestController::~LayoutTestController()
 {
     // FIXME: implement
@@ -162,9 +164,15 @@ static gboolean waitToDumpWatchdogFired(void*)
 
 void LayoutTestController::setWaitToDump(bool waitUntilDone)
 {
+    static const int timeoutSeconds = 10;
+
     m_waitToDump = waitUntilDone;
     if (m_waitToDump && !waitToDumpWatchdog)
-        waitToDumpWatchdog = g_timeout_add_seconds(10, waitToDumpWatchdogFired, 0);
+#if GLIB_CHECK_VERSION(2,14,0)
+        waitToDumpWatchdog = g_timeout_add_seconds(timeoutSeconds, waitToDumpWatchdogFired, 0);
+#else
+        waitToDumpWatchdog = g_timeout_add(timeoutSeconds * 1000, waitToDumpWatchdogFired, 0);
+#endif
 }
 
 int LayoutTestController::windowCount()
@@ -183,3 +191,8 @@ void LayoutTestController::setAuthorAndUserStylesEnabled(bool flag)
     // FIXME: implement
 }
 
+void LayoutTestController::execCommand(JSStringRef name, JSStringRef value)
+{
+    // FIXME: implement
+}
+