blob: 05991c5db0477c34f16f999cb445b503c2cf4aa7 [file] [log] [blame]
cfleizach@apple.comf46f53b2009-04-21 16:19:51 +00001<html>
2<script>
rniwa@webkit.org3526ecc32012-06-12 20:37:15 +00003 if (window.testRunner)
4 testRunner.dumpAsText();
cfleizach@apple.comf46f53b2009-04-21 16:19:51 +00005</script>
6<body id="body">
7
8 <!-- This test makes sure that a secure text field has the correct title ui element -->
9
10 <label for="accountpassword"><span class="dslabel">Password</span></label><br>
11 <input size="30" maxlength="32" id="accountpassword" type="password" name="theAccountPW">
12
13 <div id="result"></div>
14
15
16 <script>
17 if (window.accessibilityController) {
18 var result = document.getElementById("result");
19
20 var pass = document.getElementById("accountpassword");
21 pass.focus();
22 var titleUIElement = accessibilityController.focusedElement.titleUIElement();
jdiggs@igalia.com66d826c2015-05-01 19:39:28 +000023 // On the Mac, element text is exposed in StaticText children; in ATK, in the element itself.
24 var titleText = titleUIElement.childrenCount ? titleUIElement.childAtIndex(0) : titleUIElement;
dmazzoni@google.comef9d3352012-10-19 08:01:06 +000025 if (titleText.stringValue == "AXValue: Password") {
cfleizach@apple.comf46f53b2009-04-21 16:19:51 +000026 result.innerText += "Test passed\n";
27 }
28 else {
29 result.innerText += "Test failed\n";
30 }
31 }
32 </script>
33</body>
34</html>