Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / onclick-handlers.html
blob67f29a7449e7c11f3be7c5104af282f914589333
1 <html>
2 <script>
3 if (window.testRunner)
4 testRunner.dumpAsText();
5 </script>
6 <body id="body">
8 <div id="result"></div>
10 <!-- This test checks that an element will expose AXPress as an action if it listens for onClick -->
11 <div onclick="alert('hello');">this is an on click handler</div>
13 <script>
14 if (window.accessibilityController) {
15 var result = document.getElementById("result");
17 var body = document.getElementById("body");
18 body.focus();
19 var focusedElement = accessibilityController.focusedElement;
20 var textElement = focusedElement.childAtIndex(0).childAtIndex(0);
22 if (textElement.isPressActionSupported()) {
23 result.innerText += "Test passed\n";
25 else {
26 result.innerText += "Test failed\n";
29 </script>
30 </body>
31 </html>