blob: 97d4c1bfbf7a91128aa30794dae591ece8f73339 [file] [log] [blame] [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" value="abcde">
<script>
var output = "This test ensures we return a valid selected text range for password inputs.\n\n";
if (window.accessibilityController) {
window.jsTestIsAsync = true;
var password = accessibilityController.accessibleElementById("password");
output += `Initial selected text range: ${password.selectedTextRange}\n`;
password.setSelectedTextRange(3, 0);
setTimeout(async function() {
output += await expectAsync("password.selectedTextRange", "'{3, 0}'");
debug(output);
finishJSTest();
}, 0);
}
</script>
</body>
</html>