Bug 1654586 - pref on pwmgr doorhanger updates for browser_doorhanger_autocomplete_values;r=bdanforth
authorSeverin <srudie@mozilla.com>
Thu, 23 Jul 2020 23:52:54 +0000
changeset 541846 2343a1ba8c7a43b01375ee5c34d8630a7155a387
parent 541845 838b5ddfbcb401d14eb184928127c1ed13f4bbe2
child 541847 a66fbaa1eab2e0956defc9ee596c6cc65121f840
push id37633
push userccoroiu@mozilla.com
push dateFri, 24 Jul 2020 09:32:06 +0000
treeherdermozilla-central@141543043270 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbdanforth
bugs1654586
milestone80.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 1654586 - pref on pwmgr doorhanger updates for browser_doorhanger_autocomplete_values;r=bdanforth Differential Revision: https://phabricator.services.mozilla.com/D84554
toolkit/components/passwordmgr/test/browser/browser_doorhanger_autocomplete_values.js
--- a/toolkit/components/passwordmgr/test/browser/browser_doorhanger_autocomplete_values.js
+++ b/toolkit/components/passwordmgr/test/browser/browser_doorhanger_autocomplete_values.js
@@ -127,16 +127,22 @@ function _validateTestCase(tc) {
   } else {
     ok(
       !tc.expectedValues.length,
       "Validate test case.  A hidden dropmarker implies no expected values"
     );
   }
 }
 
+async function _setPrefs() {
+  await SpecialPowers.pushPrefEnv({
+    set: [["signon.capture.inputChanges.enabled", true]],
+  });
+}
+
 function _addSavedLogin(username) {
   Services.logins.addLogin(
     LoginTestUtils.testData.formLogin({
       origin: "https://example.com",
       formActionOrigin: "https://example.com",
       username,
       password: "Saved login passwords not used in this test",
     })
@@ -157,16 +163,17 @@ function _getSuggestedValues(document) {
   let numRows = autocompletePopup.view.matchCount;
   for (let i = 0; i < numRows; i++) {
     suggestedValues.push(autocompletePopup.view.getValueAt(i));
   }
   return suggestedValues;
 }
 
 add_task(async function test_edit_password() {
+  await _setPrefs();
   for (let testCase of TEST_CASES) {
     info("Test case: " + JSON.stringify(testCase));
     _validateTestCase(testCase);
 
     // Clean state before the test case is executed.
     await LoginTestUtils.clearData();
     await cleanupDoorhanger();
     await cleanupPasswordNotifications();