Bug 1203375 - Focus the password manager dialog after the Show Passwords prompt closes

This commit is contained in:
Ehsan Akhgari 2015-09-13 14:26:17 -04:00
parent 0d7c4b40a3
commit c8932f02de

View File

@ -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");