editor.flags &= ~kIMEStateChangeFlags;
ok(editor.composing,
description + "#1 IME composition was committed unexpectedly");
is(gUtils.IMEStatus, gUtils.IME_STATUS_ENABLED,
description + "#1 IME isn't enabled on HTML editor");
editor.flags |=
~(kIMEStateChangeFlags | kFlagsNotAllowedWithHTMLEditor);
ok(editor.composing,
description + "#2 IME composition was committed unexpectedly");
is(gUtils.IMEStatus, gUtils.IME_STATUS_ENABLED,
description + "#2 IME isn't enabled on HTML editor");
editor.flags = flags;
ok(editor.composing,
description + "#3 IME composition was committed unexpectedly");
is(gUtils.IMEStatus, gUtils.IME_STATUS_ENABLED,
description + "#3 IME isn't enabled on HTML editor");
// cancel the composition
synthesizeComposition({ type: "compositioncommit", data: "" });
container.removeAttribute("contenteditable");
}
function runEditableSubframeTests() {
window.open("window_imestate_iframes.html", "_blank", "width=600,height=600");
}
function runTestPasswordFieldOnDialog() {
if (document.activeElement) {
document.activeElement.blur();
}
vardialog;
function WindowObserver() {
Services.obs.addObserver(this, "domwindowopened");
}
function onPasswordDialogLoad() {
ok(true, "onPasswordDialogLoad is called"); dialog.removeEventListener("load", onPasswordDialogLoad);
passwordField = dialog.document.getElementById("password1Textbox");
passwordField.addEventListener("focus", onPasswordFieldFocus);
}
function onPasswordFieldFocus() {
ok(true, "onPasswordFieldFocus is called");
passwordField.removeEventListener("focus", onPasswordFieldFocus); var utils = dialog.windowUtils;
is(utils.IMEStatus, utils.IME_STATUS_PASSWORD, "IME isn't disabled on a password field of password dialog");
synthesizeKey("VK_ESCAPE", { }, dialog);
}
}
SimpleTest.waitForFocus(async () => {
// test whether the IME state and composition are not changed unexpectedly
runEditorFlagChangeTests();
// test password field on dialog
// XXX temporary disable against failure
// runTestPasswordFieldOnDialog();
// This will call onFinish(), so, this test must be the last.
// TODO: Make this test run with remote content too.
runEditableSubframeTests();
});
function onFinish() {
SimpleTest.finish();
}
</script>
</body>
</html>
¤ Dauer der Verarbeitung: 0.27 Sekunden
(vorverarbeitet)
¤
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 ist noch experimentell.