Bug 111973 - [GTK][WK2] REGRESSION(r145081): Unit tests not working if locale is not English
Summary: [GTK][WK2] REGRESSION(r145081): Unit tests not working if locale is not English
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-11 04:40 PDT by Manuel Rego Casasnovas
Modified: 2013-03-12 03:09 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.43 KB, patch)
2013-03-11 04:44 PDT, Manuel Rego Casasnovas
no flags Details | Formatted Diff | Diff
Patch (1.92 KB, patch)
2013-03-11 10:28 PDT, Manuel Rego Casasnovas
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Rego Casasnovas 2013-03-11 04:40:56 PDT
Since we added support for localization in WebKit2GTK+ the unit tests didn't work if you are not using English locale.
Comment 1 Manuel Rego Casasnovas 2013-03-11 04:44:20 PDT
Created attachment 192439 [details]
Patch
Comment 2 WebKit Review Bot 2013-03-11 04:46:54 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Carlos Garcia Campos 2013-03-11 05:19:30 PDT
Comment on attachment 192439 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=192439&action=review

LGTM, thanks!

> Source/WebKit2/ChangeLog:8
> +        Fix unit tests setting the environment variable LC_ALL to C.

Please explain here that the problem is that the web process doesn't inherit the locale set in the UI process and uses the system one. In the UI process gtk_test_init call setlocale to reset the locale, but that's not inherited by the web process and we end up with a different locale used by UI and web processes. This is only a problem in some of the tests like the context menu and printing one where we compare strings from both processes.
Comment 4 Manuel Rego Casasnovas 2013-03-11 10:28:05 PDT
Created attachment 192499 [details]
Patch

Upload new version with a better ChangeLog explaining the problem and the solution.
Comment 5 Carlos Garcia Campos 2013-03-12 03:00:01 PDT
Comment on attachment 192499 [details]
Patch

Thanks!
Comment 6 WebKit Review Bot 2013-03-12 03:09:46 PDT
Comment on attachment 192499 [details]
Patch

Clearing flags on attachment: 192499

Committed r145508: <http://trac.webkit.org/changeset/145508>
Comment 7 WebKit Review Bot 2013-03-12 03:09:50 PDT
All reviewed patches have been landed.  Closing bug.