Bug 1613705 - [localization] part16: Fix preferences language menu selection test. r=platform-i18n-reviewers,dminor
Depends on D116755 Differential Revision: https://phabricator.services.mozilla.com/D116791
This commit is contained in:
@@ -259,13 +259,11 @@ function getBundleForLocales(newLocales) {
|
|||||||
Services.locale.lastFallbackLocale,
|
Services.locale.lastFallbackLocale,
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
function generateBundles(resourceIds) {
|
|
||||||
return L10nRegistry.getInstance().generateBundles(locales, resourceIds);
|
|
||||||
}
|
|
||||||
return new Localization(
|
return new Localization(
|
||||||
["browser/preferences/preferences.ftl", "branding/brand.ftl"],
|
["browser/preferences/preferences.ftl", "branding/brand.ftl"],
|
||||||
false,
|
false,
|
||||||
{ generateBundles }
|
undefined,
|
||||||
|
locales
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -284,6 +284,12 @@ add_task(async function testDisabledBrowserLanguages() {
|
|||||||
is(pl.version, "1.0", "pl is the old 1.0 version");
|
is(pl.version, "1.0", "pl is the old 1.0 version");
|
||||||
assertLocaleOrder(selected, "en-US,he");
|
assertLocaleOrder(selected, "en-US,he");
|
||||||
|
|
||||||
|
// Wait for the children menu to be populated.
|
||||||
|
await BrowserTestUtils.waitForCondition(
|
||||||
|
() => !!available.children.length,
|
||||||
|
"Children list populated"
|
||||||
|
);
|
||||||
|
|
||||||
// Only fr is enabled and not selected, so it's the only locale available.
|
// Only fr is enabled and not selected, so it's the only locale available.
|
||||||
assertAvailableLocales(available, ["fr"]);
|
assertAvailableLocales(available, ["fr"]);
|
||||||
|
|
||||||
@@ -413,7 +419,7 @@ add_task(async function testReorderingBrowserLanguages() {
|
|||||||
ok(secondDialogId, "There was an id on the second dialog");
|
ok(secondDialogId, "There was an id on the second dialog");
|
||||||
ok(firstDialogId != secondDialogId, "The dialog ids are different");
|
ok(firstDialogId != secondDialogId, "The dialog ids are different");
|
||||||
ok(
|
ok(
|
||||||
firstDialogId < secondDialogId,
|
parseInt(firstDialogId) < parseInt(secondDialogId),
|
||||||
"The second dialog id is larger than the first"
|
"The second dialog id is larger than the first"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user