blob: 12f81e338dca8b5f14f01b88268cdf6b29ff215b [file] [log] [blame]
<html>
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
<body id="body">
<!-- This test makes sure that a secure text field has the correct title ui element -->
<label for="accountpassword"><span class="dslabel">Password</span></label><br>
<input size="30" maxlength="32" id="accountpassword" type="password" name="theAccountPW">
<div id="result"></div>
<script>
if (window.accessibilityController) {
var result = document.getElementById("result");
var pass = document.getElementById("accountpassword");
pass.focus();
var titleUIElement = accessibilityController.focusedElement.titleUIElement();
var titleText = titleUIElement.childAtIndex(0);
if (titleText.stringValue == "AXValue: Password") {
result.innerText += "Test passed\n";
}
else {
result.innerText += "Test failed\n";
}
}
</script>
</body>
</html>