Bug 1628188: Fix formautofill unit tests r=zbraniecki
authorAdam Roach [:abr] <adam@nostrum.com>
Wed, 03 Jun 2020 20:19:17 +0000
changeset 533779 3e4fa9e3ccea9718f1b8d3fe5a651d804b79ce35
parent 533778 6b7a59f43f9b7f5398d6bb99b749af9fce062fd9
child 533780 ec3b786afe744aed08d454a180dfb5a1a70aba5a
push id37477
push userdluca@mozilla.com
push dateThu, 04 Jun 2020 04:19:27 +0000
treeherdermozilla-central@6fd265574f27 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerszbraniecki
bugs1628188
milestone79.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 1628188: Fix formautofill unit tests r=zbraniecki Differential Revision: https://phabricator.services.mozilla.com/D78125
browser/extensions/formautofill/test/unit/head.js
--- a/browser/extensions/formautofill/test/unit/head.js
+++ b/browser/extensions/formautofill/test/unit/head.js
@@ -296,30 +296,32 @@ function objectMatches(object, fields) {
     }
     actual[key] = object[key];
   }
   return ObjectUtils.deepEqual(actual, fields);
 }
 
 add_task(async function head_initialize() {
   Services.prefs.setStringPref("extensions.formautofill.available", "on");
+  Services.prefs.setBoolPref("extensions.experiments.enabled", true);
   Services.prefs.setBoolPref(
     "extensions.formautofill.creditCards.available",
     true
   );
   Services.prefs.setBoolPref(
     "extensions.formautofill.heuristics.enabled",
     true
   );
   Services.prefs.setBoolPref("extensions.formautofill.section.enabled", true);
   Services.prefs.setBoolPref("dom.forms.autocomplete.formautofill", true);
 
   // Clean up after every test.
   registerCleanupFunction(function head_cleanup() {
     Services.prefs.clearUserPref("extensions.formautofill.available");
+    Services.prefs.clearUserPref("extensions.experiments.enabled");
     Services.prefs.clearUserPref(
       "extensions.formautofill.creditCards.available"
     );
     Services.prefs.clearUserPref("extensions.formautofill.heuristics.enabled");
     Services.prefs.clearUserPref("extensions.formautofill.section.enabled");
     Services.prefs.clearUserPref("dom.forms.autocomplete.formautofill");
   });