Bug 1493711 - Enable langpack download on release and Beta r=jaws

Fix the message bar showing when the "search" option is selected. A value
was added in 597134aa66 for testing but the change handler was expecting
no value to be set for search.

Differential Revision: https://phabricator.services.mozilla.com/D10967

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mark Striemer 2018-11-06 00:33:13 +00:00
parent a23912a91d
commit e9bacee270
3 changed files with 6 additions and 5 deletions

View file

@ -1748,8 +1748,8 @@ pref("app.shield.optoutstudies.enabled", false);
// Multi-lingual preferences // Multi-lingual preferences
pref("intl.multilingual.enabled", false); pref("intl.multilingual.enabled", false);
// AMO only serves language packs for release versions, so this feature only works on release. // AMO only serves language packs for release and beta versions.
#ifdef RELEASE #ifdef RELEASE_OR_BETA
pref("intl.multilingual.downloadEnabled", true); pref("intl.multilingual.downloadEnabled", true);
#else #else
pref("intl.multilingual.downloadEnabled", false); pref("intl.multilingual.downloadEnabled", false);

View file

@ -822,9 +822,7 @@ var gMainPane = {
onBrowserLanguageChange(event) { onBrowserLanguageChange(event) {
let locale = event.target.value; let locale = event.target.value;
// If there is no value, then this is the search option, leave the if (locale == "search") {
// message bar in its current state.
if (!locale) {
return; return;
} else if (locale == Services.locale.requestedLocale) { } else if (locale == Services.locale.requestedLocale) {
this.hideConfirmLanguageChangeMessageBar(); this.hideConfirmLanguageChangeMessageBar();

View file

@ -311,6 +311,9 @@ add_task(async function testInstallFromAMO() {
// Open the dialog. // Open the dialog.
let {dialogDoc, available, requested} = await openDialog(doc, true); let {dialogDoc, available, requested} = await openDialog(doc, true);
// Make sure the message bar is still hidden.
is(messageBar.hidden, true, "The message bar is still hidden after searching");
let dropdown = dialogDoc.getElementById("availableLocales"); let dropdown = dialogDoc.getElementById("availableLocales");
if (dropdown.itemCount == 1) { if (dropdown.itemCount == 1) {
await waitForMutation( await waitForMutation(