diff --git a/toolkit/components/passwordmgr/test/mochitest/pwmgr_common.js b/toolkit/components/passwordmgr/test/mochitest/pwmgr_common.js --- a/toolkit/components/passwordmgr/test/mochitest/pwmgr_common.js +++ b/toolkit/components/passwordmgr/test/mochitest/pwmgr_common.js @@ -701,19 +701,16 @@ chromeScript.destroy(); }); return chromeScript; } -/** Manage logins in parent chrome process. - * */ -function manageLoginsInParent() { - return runInParent(function addLoginsInParentInner() { - /* eslint-env mozilla/chrome-script */ - addMessageListener("removeAllUserFacingLogins", () => { - Services.logins.removeAllUserFacingLogins(); - }); - +/** Initialize with a list of logins. The logins are added within the parent chrome process. + * @param {array} aLogins - a list of logins to add. Each login is an array of the arguments + * that would be passed to nsLoginInfo.init(). + */ +async function addLoginsInParent(...aLogins) { + let script = runInParent(function addLoginsInParentInner() { /* eslint-env mozilla/chrome-script */ addMessageListener("addLogins", async logins => { let nsLoginInfo = Components.Constructor( "@mozilla.org/login-manager/loginInfo;1", Ci.nsILoginInfo, @@ -726,30 +723,10 @@ } catch (e) { assert.ok(false, "addLogins threw: " + e); } }); }); -} - -/** Initialize with a list of logins. The logins are added within the parent chrome process. - * @param {array} aLogins - a list of logins to add. Each login is an array of the arguments - * that would be passed to nsLoginInfo.init(). - */ -async function addLoginsInParent(...aLogins) { - const script = manageLoginsInParent(); - await script.sendQuery("addLogins", aLogins); - return script; -} - -/** Initialize with a list of logins, after removing all user facing logins. - * The logins are added within the parent chrome process. - * @param {array} aLogins - a list of logins to add. Each login is an array of the arguments - * that would be passed to nsLoginInfo.init(). - */ -async function setStoredLoginsAsync(...aLogins) { - const script = manageLoginsInParent(); - script.sendQuery("removeAllUserFacingLogins"); await script.sendQuery("addLogins", aLogins); return script; } /* diff --git a/toolkit/components/passwordmgr/test/mochitest/test_input_events.html b/toolkit/components/passwordmgr/test/mochitest/test_input_events.html --- a/toolkit/components/passwordmgr/test/mochitest/test_input_events.html +++ b/toolkit/components/passwordmgr/test/mochitest/test_input_events.html @@ -6,73 +6,93 @@ - + Login Manager test: input events should fire. -

- -

+
 
+
+

+ + +