rv = confirm("This is the confirm text.");
is(rv, true, "check prompt return value");
await promptDone;
});
// bug 861605 made the arguments to alert/confirm optional (prompt already was).
add_task(async function test_confirm_noargs() {
info("Starting test: Confirm with no args");
state = {
msg: "",
iconClass: "question-icon",
titleHidden: true,
textHidden: true,
passHidden: true,
checkHidden: true,
textValue: "",
passValue: "",
checkMsg: "",
checked: false,
focused: "button0",
defButton: "button0",
};
action = {
buttonClick: "ok",
};
let promptDone = handlePrompt(state, action);
try {
rv = confirm();
ok(true, "confirm() without arguments should not throw!");
} catch (e) {
ok(false, "confirm() without arguments should not throw!");
}
is(rv, true, "check prompt return value");
rv = prompt("This is the Prompt text.");
is(rv, "", "check prompt return value");
await promptDone;
});
// bug 861605 made the arguments to alert/confirm optional (prompt already was).
add_task(async function test_prompt_noargs() {
info("Starting test: Prompt with no args");
state = {
msg: "",
iconClass: "question-icon",
titleHidden: true,
textHidden: false,
passHidden: true,
checkHidden: true,
textValue: "",
passValue: "",
checkMsg: "",
checked: false,
focused: "textField",
defButton: "button0",
};
action = {
buttonClick: "ok",
};
let promptDone = handlePrompt(state, action);
try {
rv = prompt();
ok(true, "prompt() without arguments should not throw!");
} catch (e) {
ok(false, "prompt() without arguments should not throw!");
}
is(rv, "", "check prompt return value");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.