436a7229e86dbe23603e3742d5bd5a9dde51a1bf
[WebKit-https.git] / LayoutTests / accessibility / input-auto-fill-button.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../resources/js-test-pre.js"></script>
5 </head>
6 <body>
7 <input type="password" id="password">
8 <script>
9 description("This tests that there exists an accessibility element for the AutoFill button.");
10
11 if (!window.internals || !window.accessibilityController)
12     testFailed("You must run this test in the test tool and have implemented window.internals and window.accessibilityController.");
13 else {
14     internals.setShowAutoFillButton(document.getElementById("password"), true);
15
16     shouldBeEqualToString('accessibilityController.accessibleElementById("password").childAtIndex(0).description', "AXDescription: autofill");
17     shouldBeEqualToString('accessibilityController.accessibleElementById("password").childAtIndex(0).role', "AXRole: AXButton");
18 }
19 </script>
20 <script src="../resources/js-test-post.js"></script>
21 </body>
22 </html>