Skip to content
Permalink
Browse files
[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().

Canonical link: https://commits.webkit.org/143662@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@160481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
carlosgcampos committed Dec 12, 2013
1 parent eae6097 commit bc076cd02f8908f5833e233897b2be909c08a06e
Showing with 20 additions and 0 deletions.
  1. +16 −0 Source/WebKit2/ChangeLog
  2. +4 −0 Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTestRunner.cpp
@@ -1,3 +1,19 @@
2013-12-12 Carlos Garcia Campos <cgarcia@igalia.com>

[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 <cgarcia@igalia.com>

[GTK] Make sure unit tests don't use GVFS and dconf
@@ -26,7 +26,11 @@ WebProcessTestRunner::WebProcessTestRunner()
: 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));
}

0 comments on commit bc076cd

Please sign in to comment.