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