Title: [160481] trunk/Source/WebKit2
Revision
160481
Author
[email protected]
Date
2013-12-12 01:17:23 -0800 (Thu, 12 Dec 2013)

Log Message

[GTK] WebProcess tests are failing with newer glib
https://bugs.webkit.org/show_bug.cgi?id=125621

Reviewed by Martin Robinson.

Newer versions of glib unset the DISPLAY env variable in
g_test_dbus_up(). The WebProcess needs the DISPLAY variable to
work, and it's important to keep its value when running the tests
under Xvfb.

* UIProcess/API/gtk/tests/WebProcessTestRunner.cpp:
(WebProcessTestRunner::WebProcessTestRunner): Restore the DISPLAY
env variable after calling g_test_dbus_up().

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (160480 => 160481)


--- trunk/Source/WebKit2/ChangeLog	2013-12-12 09:12:40 UTC (rev 160480)
+++ trunk/Source/WebKit2/ChangeLog	2013-12-12 09:17:23 UTC (rev 160481)
@@ -1,5 +1,21 @@
 2013-12-12  Carlos Garcia Campos  <[email protected]>
 
+        [GTK] WebProcess tests are failing with newer glib
+        https://bugs.webkit.org/show_bug.cgi?id=125621
+
+        Reviewed by Martin Robinson.
+
+        Newer versions of glib unset the DISPLAY env variable in
+        g_test_dbus_up(). The WebProcess needs the DISPLAY variable to
+        work, and it's important to keep its value when running the tests
+        under Xvfb.
+
+        * UIProcess/API/gtk/tests/WebProcessTestRunner.cpp:
+        (WebProcessTestRunner::WebProcessTestRunner): Restore the DISPLAY
+        env variable after calling g_test_dbus_up().
+
+2013-12-12  Carlos Garcia Campos  <[email protected]>
+
         [GTK] Make sure unit tests don't use GVFS and dconf
         https://bugs.webkit.org/show_bug.cgi?id=125620
 

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTestRunner.cpp (160480 => 160481)


--- trunk/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTestRunner.cpp	2013-12-12 09:12:40 UTC (rev 160480)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTestRunner.cpp	2013-12-12 09:17:23 UTC (rev 160481)
@@ -26,7 +26,11 @@
     : m_mainLoop(g_main_loop_new(0, TRUE))
     , m_bus(adoptGRef(g_test_dbus_new(G_TEST_DBUS_NONE)))
 {
+    // Save the DISPLAY env var to restore it after calling g_test_dbus_up() that unsets it.
+    // See https://bugs.webkit.org/show_bug.cgi?id=125621.
+    const char* display = g_getenv("DISPLAY");
     g_test_dbus_up(m_bus.get());
+    g_setenv("DISPLAY", display, FALSE);
     m_connection = adoptGRef(g_bus_get_sync(G_BUS_TYPE_SESSION, 0, 0));
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to