OLD | NEW |
1 <html> | 1 <html> |
2 <script> | 2 <script> |
3 if (window.testRunner) | 3 if (window.testRunner) |
4 testRunner.dumpAsText(); | 4 testRunner.dumpAsText(); |
5 </script> | 5 </script> |
6 <body id="body"> | 6 <body id="body"> |
7 | 7 |
8 <!-- This test makes sure that a secure text field has the correct title ui
element --> | 8 <!-- This test makes sure that a secure text field has the correct title ui
element --> |
9 | 9 |
10 <label for="accountpassword"><span class="dslabel">Password</span></label><b
r> | 10 <label for="accountpassword"><span class="dslabel">Password</span></label><b
r> |
11 <input size="30" maxlength="32" id="accountpassword" type="password" name="t
heAccountPW"> | 11 <input size="30" maxlength="32" id="accountpassword" type="password" name="t
heAccountPW"> |
12 | 12 |
13 <div id="result"></div> | 13 <div id="result"></div> |
14 | 14 |
15 | 15 |
16 <script> | 16 <script> |
17 if (window.accessibilityController) { | 17 if (window.accessibilityController) { |
18 var result = document.getElementById("result"); | 18 var result = document.getElementById("result"); |
19 | 19 |
20 var pass = document.getElementById("accountpassword"); | 20 var pass = document.getElementById("accountpassword"); |
21 pass.focus(); | 21 pass.focus(); |
22 var titleUIElement = accessibilityController.focusedElement.deprecat
edTitleUIElement(); | 22 var titleUIElement = accessibilityController.focusedElement.nameElem
entAtIndex(0); |
23 var titleText = titleUIElement.childAtIndex(0); | 23 var titleText = titleUIElement.childAtIndex(0); |
24 if (titleText.stringValue == "AXValue: Password") { | 24 if (titleText.stringValue == "AXValue: Password") { |
25 result.innerText += "Test passed\n"; | 25 result.innerText += "Test passed\n"; |
26 } | 26 } |
27 else { | 27 else { |
28 result.innerText += "Test failed\n"; | 28 result.innerText += "Test failed\n"; |
29 } | 29 } |
30 } | 30 } |
31 </script> | 31 </script> |
32 </body> | 32 </body> |
33 </html> | 33 </html> |
OLD | NEW |