32 lines
920 B
HTML
32 lines
920 B
HTML
<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>
|