| 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 <div id="result"></div> | 8 <div id="result"></div> |
| 9 | 9 |
| 10 <!-- This test checks that an element will expose AXPress as an action if it
listens for onClick --> | 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> | 11 <div onclick="alert('hello');">this is an on click handler</div> |
| 12 | 12 |
| 13 <script> | 13 <script> |
| 14 if (window.accessibilityController) { | 14 if (window.accessibilityController) { |
| 15 var result = document.getElementById("result"); | 15 var result = document.getElementById("result"); |
| 16 | 16 |
| 17 var body = document.getElementById("body"); | 17 var body = document.getElementById("body"); |
| 18 body.focus(); | 18 body.focus(); |
| 19 var focusedElement = accessibilityController.focusedElement; | 19 var focusedElement = accessibilityController.focusedElement; |
| 20 var textElement = focusedElement.childAtIndex(0).childAtIndex(0); | 20 var textElement = focusedElement.childAtIndex(1).childAtIndex(0); |
| 21 | 21 |
| 22 if (textElement.isPressActionSupported()) { | 22 if (textElement.isPressActionSupported()) { |
| 23 result.innerText += "Test passed\n"; | 23 result.innerText += "Test passed\n"; |
| 24 } | 24 } |
| 25 else { | 25 else { |
| 26 result.innerText += "Test failed\n"; | 26 result.innerText += "Test failed\n"; |
| 27 } | 27 } |
| 28 } | 28 } |
| 29 </script> | 29 </script> |
| 30 </body> | 30 </body> |
| 31 </html> | 31 </html> |
| OLD | NEW |