blob: a723ed7abec6d9729f9388914be8c19378747a3c [file] [edit]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/accessibility-helper.js"></script>
<script src="../resources/js-test.js"></script>
</head>
<body>
<input type="password" id="password-input">
<script>
var testOutput = "This test ensures that inserting text into a password field works.\n\n";
var passwordInput;
if (window.accessibilityController) {
window.jsTestIsAsync = true;
testOutput += "Focusing #password-input, and then inserting text 'foo' into it.\n";
// Put focus into the password input so `insertText` has a target.
document.getElementById("password-input").focus();
passwordInput = accessibilityController.accessibleElementById("password-input");
passwordInput.insertText("foo");
setTimeout(async function() {
testOutput += await expectAsync("passwordInput.stringValue", "'AXValue: \\u2022\\u2022\\u2022'");
debug(testOutput);
finishJSTest();
}, 0);
}
</script>
</body>
</html>