Bug 1493711 - Enable langpack download on release and Beta r=jaws a=jcristau
authorMark Striemer <mstriemer@mozilla.com>
Tue, 06 Nov 2018 00:33:13 +0000
changeset 501107 24ac9d53d202349388e7d35b5bf1934aa76fdc72
parent 501106 8034ed187c948ad0cfea0bca8d840f5fa3c3a980
child 501108 410f4e7ae2feb52dc23db8892829e1b767477849
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, jcristau
bugs1493711
milestone64.0
Bug 1493711 - Enable langpack download on release and Beta r=jaws a=jcristau Fix the message bar showing when the "search" option is selected. A value was added in 597134aa665 for testing but the change handler was expecting no value to be set for search. Differential Revision: https://phabricator.services.mozilla.com/D10967
browser/app/profile/firefox.js
browser/components/preferences/in-content/main.js
browser/components/preferences/in-content/tests/browser_browser_languages_subdialog.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1754,18 +1754,18 @@ pref("app.normandy.shieldLearnMoreUrl", 
 #ifdef MOZ_DATA_REPORTING
 pref("app.shield.optoutstudies.enabled", true);
 #else
 pref("app.shield.optoutstudies.enabled", false);
 #endif
 
 // Multi-lingual preferences
 pref("intl.multilingual.enabled", false);
-// AMO only serves language packs for release versions, so this feature only works on release.
-#ifdef RELEASE
+// AMO only serves language packs for release and beta versions.
+#ifdef RELEASE_OR_BETA
 pref("intl.multilingual.downloadEnabled", true);
 #else
 pref("intl.multilingual.downloadEnabled", false);
 #endif
 
 // Simulate conditions that will happen when the browser
 // is running with Fission enabled. This is meant to assist
 // development and testing of Fission.
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
@@ -817,19 +817,17 @@ var gMainPane = {
       Services.startup.quit(Services.startup.eAttemptQuit | Services.startup.eRestart);
     }
   },
 
   /* Show or hide the confirm change message bar based on the new locale. */
   onBrowserLanguageChange(event) {
     let locale = event.target.value;
 
-    // If there is no value, then this is the search option, leave the
-    // message bar in its current state.
-    if (!locale) {
+    if (locale == "search") {
       return;
     } else if (locale == Services.locale.requestedLocale) {
       this.hideConfirmLanguageChangeMessageBar();
       return;
     }
 
     let locales = Array.from(new Set([
       locale,
--- a/browser/components/preferences/in-content/tests/browser_browser_languages_subdialog.js
+++ b/browser/components/preferences/in-content/tests/browser_browser_languages_subdialog.js
@@ -306,16 +306,19 @@ add_task(async function testInstallFromA
 
   let doc = gBrowser.contentDocument;
   let messageBar = doc.getElementById("confirmBrowserLanguage");
   is(messageBar.hidden, true, "The message bar is hidden at first");
 
   // Open the dialog.
   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");
   if (dropdown.itemCount == 1) {
     await waitForMutation(
       dropdown.firstElementChild,
       {childList: true},
       target => dropdown.itemCount > 1);
   }