blob: 67f29a7449e7c11f3be7c5104af282f914589333 [file] [log] [blame]
<html>
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
<body id="body">
<div id="result"></div>
<!-- This test checks that an element will expose AXPress as an action if it listens for onClick -->
<div onclick="alert('hello');">this is an on click handler</div>
<script>
if (window.accessibilityController) {
var result = document.getElementById("result");
var body = document.getElementById("body");
body.focus();
var focusedElement = accessibilityController.focusedElement;
var textElement = focusedElement.childAtIndex(0).childAtIndex(0);
if (textElement.isPressActionSupported()) {
result.innerText += "Test passed\n";
}
else {
result.innerText += "Test failed\n";
}
}
</script>
</body>
</html>