Title: [145508] trunk/Source/WebKit2
Revision
145508
Author
[email protected]
Date
2013-03-12 03:07:32 -0700 (Tue, 12 Mar 2013)

Log Message

[GTK][WK2] REGRESSION(r145081): Unit tests not working if locale is not English
https://bugs.webkit.org/show_bug.cgi?id=111973

Patch by Manuel Rego Casasnovas <[email protected]> on 2013-03-12
Reviewed by Carlos Garcia Campos.

The problem is that the UIProcess locale is reseted to C in
gtk_test_init, however the WebProcess does not inherit the locale set in
the UIProcess and it uses the system one (that could be different to
English). So, there were problems in some tests that are comparing
strings from both processes like WebKit2APITests/TestPrinting and
WebKit2APITests/TestWebKitWebContext. The solution is to set the locale
environment variable LC_ALL to C in order to reset WebProcess locale
too.

* UIProcess/API/gtk/tests/TestMain.cpp:
(main): Set environment variable LC_ALL to C.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (145507 => 145508)


--- trunk/Source/WebKit2/ChangeLog	2013-03-12 09:52:03 UTC (rev 145507)
+++ trunk/Source/WebKit2/ChangeLog	2013-03-12 10:07:32 UTC (rev 145508)
@@ -1,3 +1,22 @@
+2013-03-12  Manuel Rego Casasnovas  <[email protected]>
+
+        [GTK][WK2] REGRESSION(r145081): Unit tests not working if locale is not English
+        https://bugs.webkit.org/show_bug.cgi?id=111973
+
+        Reviewed by Carlos Garcia Campos.
+
+        The problem is that the UIProcess locale is reseted to C in
+        gtk_test_init, however the WebProcess does not inherit the locale set in
+        the UIProcess and it uses the system one (that could be different to
+        English). So, there were problems in some tests that are comparing
+        strings from both processes like WebKit2APITests/TestPrinting and
+        WebKit2APITests/TestWebKitWebContext. The solution is to set the locale
+        environment variable LC_ALL to C in order to reset WebProcess locale
+        too.
+
+        * UIProcess/API/gtk/tests/TestMain.cpp:
+        (main): Set environment variable LC_ALL to C.
+
 2013-03-11  Brady Eidson  <[email protected]>
 
         Loads are never canceled in the NetworkProcess

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestMain.cpp (145507 => 145508)


--- trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestMain.cpp	2013-03-12 09:52:03 UTC (rev 145507)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestMain.cpp	2013-03-12 10:07:32 UTC (rev 145508)
@@ -40,6 +40,7 @@
     gtk_test_init(&argc, &argv, 0);
     g_setenv("WEBKIT_EXEC_PATH", WEBKIT_EXEC_PATH, FALSE);
     g_setenv("WEBKIT_INJECTED_BUNDLE_PATH", WEBKIT_INJECTED_BUNDLE_PATH, FALSE);
+    g_setenv("LC_ALL", "C", TRUE);
     g_test_bug_base("https://bugs.webkit.org/");
 
     registerGResource();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to