Skip to content

Commit

Permalink
Bug 1267388 - introduce a "state" object to represent actual/expected…
Browse files Browse the repository at this point in the history
… prompt state. r=MattN
  • Loading branch information
dolske committed Apr 29, 2016
1 parent a56fac2 commit 1554104
Show file tree
Hide file tree
Showing 2 changed files with 258 additions and 88 deletions.
16 changes: 16 additions & 0 deletions toolkit/components/passwordmgr/test/mochitest/prompt_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,19 @@ function getDialogDoc() {

return null;
}

function checkPromptState(promptState, expectedState) {
// is(promptState.title, expectedState.title, "Checking expected title");
is(promptState.msg, expectedState.msg, "Checking expected message");
is(promptState.textValue, expectedState.textValue, "Checking textbox value");
is(promptState.passValue, expectedState.passValue, "Checking passbox value");
}

function getPromptState(ui) {
let state = {};
state.msg = ui.infoBody.textContent;
state.title = ui.infoTitle.textContent;
state.textValue = ui.loginTextbox.getAttribute("value");
state.passValue = ui.password1Textbox.getAttribute("value");
return state;
}
Loading

0 comments on commit 1554104

Please sign in to comment.