| <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(); |
| // On the Mac, element text is exposed in StaticText children; in ATK, in the element itself. |
| var titleText = titleUIElement.childrenCount ? titleUIElement.childAtIndex(0) : titleUIElement; |
| if (titleText.stringValue == "AXValue: Password") { |
| result.innerText += "Test passed\n"; |
| } |
| else { |
| result.innerText += "Test failed\n"; |
| } |
| } |
| </script> |
| </body> |
| </html> |