diff --git a/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_editing.js b/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_editing.js index 313152966a09..d13dd18af895 100644 --- a/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_editing.js +++ b/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_editing.js @@ -32,8 +32,9 @@ function synthesizeDblClickOnCell(aTree, column, row) { aTree.ownerDocument.defaultView); } -function togglePasswords() { +function* togglePasswords() { pwmgrdlg.document.querySelector("#togglePasswords").doCommand(); + yield new Promise(resolve => waitForFocus(resolve, pwmgrdlg)); } function* editUsernamePromises(site, oldUsername, newUsername) { @@ -113,9 +114,9 @@ add_task(function* test_edit_multiple_logins() { function* testLoginChange(site, oldUsername, oldPassword, newUsername, newPassword) { addLogin(site, oldUsername, oldPassword); yield* editUsernamePromises(site, oldUsername, newUsername); - togglePasswords(); + yield* togglePasswords(); yield* editPasswordPromises(site, oldPassword, newPassword); - togglePasswords(); + yield* togglePasswords(); } yield* testLoginChange("http://c.tn/", "userC", "passC", "usernameC", "passwordC");