mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1418724 - part 5 - Update a couple of tests to be more tolerant of variations in the exact form of the OS regional prefs. r=gandalf
This commit is contained in:
parent
f793736782
commit
f6276a6775
@ -20,7 +20,8 @@ const localeService =
|
||||
Cc["@mozilla.org/intl/localeservice;1"].getService(Ci.mozILocaleService);
|
||||
const mozIntl = Cc["@mozilla.org/mozintl;1"].getService(Ci.mozIMozIntl);
|
||||
|
||||
let rpLocale = localeService.getRegionalPrefsLocales()[0];
|
||||
let rpLocale = localeService.negotiateLanguages(localeService.getRegionalPrefsLocales(),
|
||||
localeService.getAvailableLocales())[0];
|
||||
|
||||
let testData = [
|
||||
{
|
||||
|
@ -14,9 +14,16 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1337234
|
||||
<div id="content" style="display: none">
|
||||
<script>
|
||||
|
||||
let rpLocales = window.getRegionalPrefsLocales();
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
const localeService =
|
||||
Cc["@mozilla.org/intl/localeservice;1"].getService(Ci.mozILocaleService);
|
||||
|
||||
let rpLocales = localeService.negotiateLanguages(window.getRegionalPrefsLocales(),
|
||||
localeService.getAvailableLocales());
|
||||
|
||||
ok(rpLocales.length > 0, "getRegionalPrefsLocales returns at least one locale.");
|
||||
is(rpLocales[0], "en-US", "The first regional prefs locale should be en-US.");
|
||||
is(rpLocales[0], "en-US", "The first regional prefs locale should resolve to en-US.");
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user