From c8932f02deb06cc5fa8acfb16a747604793d00ed Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Sun, 13 Sep 2015 14:26:17 -0400 Subject: [PATCH] Bug 1203375 - Focus the password manager dialog after the Show Passwords prompt closes --- .../test/browser/browser_passwordmgr_editing.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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");