Bug 1385201 - [Form Autofill] Rename "extensions.formautofill.experimental". r=MattN
authorLuke Chang <lchang@mozilla.com>
Fri, 28 Jul 2017 15:50:48 +0800
changeset 422882 698621d200f76c8f2488de80df53abea41372739
parent 422881 6b4fdff681f1732f2b2ff747bb8859f65d66a496
child 422883 e34659defc68d9cd770c5bf953fa38e965ce4874
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMattN
bugs1385201
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1385201 - [Form Autofill] Rename "extensions.formautofill.experimental". r=MattN MozReview-Commit-ID: 8SRu5PoQcMO
browser/app/profile/firefox.js
browser/extensions/formautofill/bootstrap.js
browser/extensions/formautofill/test/unit/head.js
testing/profiles/prefs_general.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1690,20 +1690,22 @@ pref("browser.crashReports.unsubmittedCh
 // chancesUntilSuppress is how many times we'll show the unsubmitted
 // crash report notification across different days and shutdown
 // without a user choice before we suppress the notification for
 // some number of days.
 pref("browser.crashReports.unsubmittedCheck.chancesUntilSuppress", 4);
 pref("browser.crashReports.unsubmittedCheck.autoSubmit", false);
 
 // Preferences for the form autofill system extension
+// The value of "extensions.formautofill.available" can be "on", "off" and "detect".
+// The "detect" means it's enabled if conditions defined in the extension are met.
 #ifdef NIGHTLY_BUILD
-pref("extensions.formautofill.experimental", true);
+pref("extensions.formautofill.available", "on");
 #else
-pref("extensions.formautofill.experimental", false);
+pref("extensions.formautofill.available", "detect");
 #endif
 pref("extensions.formautofill.addresses.enabled", true);
 pref("extensions.formautofill.firstTimeUse", true);
 pref("extensions.formautofill.heuristics.enabled", true);
 pref("extensions.formautofill.loglevel", "Warn");
 
 // Whether or not to restore a session with lazy-browser tabs.
 pref("browser.sessionstore.restore_tabs_lazily", true);
--- a/browser/extensions/formautofill/bootstrap.js
+++ b/browser/extensions/formautofill/bootstrap.js
@@ -36,17 +36,17 @@ function onMaybeOpenPopup(evt) {
     // This window already has autofill stylesheets.
     return;
   }
 
   insertStyleSheet(domWindow, STYLESHEET_URI);
 }
 
 function startup() {
-  if (!Services.prefs.getBoolPref("extensions.formautofill.experimental")) {
+  if (Services.prefs.getStringPref("extensions.formautofill.available") != "on") {
     return;
   }
 
   // Listen for the autocomplete popup message to lazily append our stylesheet related to the popup.
   Services.mm.addMessageListener("FormAutoComplete:MaybeOpenPopup", onMaybeOpenPopup);
 
   let parent = new FormAutofillParent();
   parent.init().catch(Cu.reportError);
--- a/browser/extensions/formautofill/test/unit/head.js
+++ b/browser/extensions/formautofill/test/unit/head.js
@@ -196,19 +196,19 @@ function objectMatches(object, fields) {
       return false;
     }
     actual[key] = object[key];
   }
   return ObjectUtils.deepEqual(actual, fields);
 }
 
 add_task(async function head_initialize() {
-  Services.prefs.setBoolPref("extensions.formautofill.experimental", true);
+  Services.prefs.setStringPref("extensions.formautofill.available", "on");
   Services.prefs.setBoolPref("extensions.formautofill.heuristics.enabled", true);
   Services.prefs.setBoolPref("dom.forms.autocomplete.formautofill", true);
 
   // Clean up after every test.
   do_register_cleanup(function head_cleanup() {
-    Services.prefs.clearUserPref("extensions.formautofill.experimental");
+    Services.prefs.clearUserPref("extensions.formautofill.available");
     Services.prefs.clearUserPref("extensions.formautofill.heuristics.enabled");
     Services.prefs.clearUserPref("dom.forms.autocomplete.formautofill");
   });
 });
--- a/testing/profiles/prefs_general.js
+++ b/testing/profiles/prefs_general.js
@@ -374,17 +374,17 @@ user_pref("media.libavcodec.allow-obsole
 
 user_pref("media.openUnsupportedTypeWithExternalApp", false);
 
 // Disable password capture, so that mochitests that include forms aren't
 // influenced by the presence of the persistent doorhanger notification.
 user_pref("signon.rememberSignons", false);
 
 // Enable form autofill feature testing.
-user_pref("extensions.formautofill.experimental", true);
+user_pref("extensions.formautofill.available", "on");
 
 // Disable all recommended Marionette preferences for Gecko tests.
 // The prefs recommended by Marionette are typically geared towards
 // consumer automation; not vendor testing.
 user_pref("marionette.prefs.recommended", false);
 
 // Disable Screenshots by default for now
 user_pref("extensions.screenshots.system-disabled", true);