Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / secure-textfield-title-ui.html
1 <html>
2 <script>
3     if (window.testRunner)
4         testRunner.dumpAsText();
5 </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();
23             // 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;
25             if (titleText.stringValue == "AXValue: Password") {
26                 result.innerText += "Test passed\n";
27             }
28             else {
29                  result.innerText += "Test failed\n";
30             }
31         }
32     </script>
33 </body>
34 </html>