Bug 148168 - [Cocoa] Cannot mock the system language
Summary: [Cocoa] Cannot mock the system language
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-18 23:21 PDT by Myles C. Maxfield
Modified: 2015-08-26 23:02 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2015-08-18 23:21:20 PDT
I have gotten a few bugs recently which were only discoverable when the system language was set to non-English. We need some way to mock this so that our tests can run in these other environments.
Comment 1 Alexey Proskuryakov 2015-08-19 08:58:58 PDT
There is internals.overrideUserPreferredLanguages(). Unfortunately, WebKit and WebCore code is not very consistent, and we often check the language and locale directly.

Also, it's not always obvious where we should be using system language, and where we should be using system locale.
Comment 2 Myles C. Maxfield 2015-08-26 23:02:37 PDT
See also: https://bugs.webkit.org/show_bug.cgi?id=76138