OLD | NEW |
| (Empty) |
1 <!DOCTYPE HTML PUBLIC> | |
2 <html> | |
3 <head> | |
4 <script src="../resources/js-test.js"></script> | |
5 </head> | |
6 <body> | |
7 | |
8 <p>This tests that the password fields return their selection.</p> | |
9 | |
10 <input id="password" type="password" value="secret"> | |
11 | |
12 <div id="console"></div> | |
13 <script> | |
14 if (window.testRunner && window.accessibilityController) { | |
15 var password = document.getElementById("password"); | |
16 var axPassword = accessibilityController.accessibleElementById("password
"); | |
17 | |
18 password.setSelectionRange(0, 0); | |
19 shouldBe("axPassword.selectedTextRange", "\"{0, 0}\""); | |
20 | |
21 password.setSelectionRange(6, 6); | |
22 shouldBe("axPassword.selectedTextRange", "\"{6, 0}\""); | |
23 | |
24 password.setSelectionRange(2, 6); | |
25 shouldBe("axPassword.selectedTextRange", "\"{2, 4}\""); | |
26 } | |
27 | |
28 </script> | |
29 | |
30 </body> | |
31 </html> | |
OLD | NEW |