Changeset 145508 in webkit


Ignore:
Timestamp:
Mar 12, 2013 3:07:32 AM (11 years ago)
Author:
commit-queue@webkit.org
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 <Manuel Rego Casasnovas> 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.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r145485 r145508  
     12013-03-12  Manuel Rego Casasnovas  <rego@igalia.com>
     2
     3        [GTK][WK2] REGRESSION(r145081): Unit tests not working if locale is not English
     4        https://bugs.webkit.org/show_bug.cgi?id=111973
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        The problem is that the UIProcess locale is reseted to C in
     9        gtk_test_init, however the WebProcess does not inherit the locale set in
     10        the UIProcess and it uses the system one (that could be different to
     11        English). So, there were problems in some tests that are comparing
     12        strings from both processes like WebKit2APITests/TestPrinting and
     13        WebKit2APITests/TestWebKitWebContext. The solution is to set the locale
     14        environment variable LC_ALL to C in order to reset WebProcess locale
     15        too.
     16
     17        * UIProcess/API/gtk/tests/TestMain.cpp:
     18        (main): Set environment variable LC_ALL to C.
     19
    1202013-03-11  Brady Eidson  <beidson@apple.com>
    221
  • trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestMain.cpp

    r139305 r145508  
    4141    g_setenv("WEBKIT_EXEC_PATH", WEBKIT_EXEC_PATH, FALSE);
    4242    g_setenv("WEBKIT_INJECTED_BUNDLE_PATH", WEBKIT_INJECTED_BUNDLE_PATH, FALSE);
     43    g_setenv("LC_ALL", "C", TRUE);
    4344    g_test_bug_base("https://bugs.webkit.org/");
    4445
Note: See TracChangeset for help on using the changeset viewer.