blob: e2ec7991a1dc4f5fb8690f03eafcd8019d961fac [file] [log] [blame]
<!DOCTYPE HTML>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<input id="input">
<script>
async_test(function(t) {
var input = document.getElementById("input");
input.addEventListener("focus", function() {
t.done();
});
var axInput = accessibilityController.accessibleElementById("input");
axInput.press();
}, "Calling press() focuses an input.");
</script>
<textarea id="textarea"></textarea>
<script>
async_test(function(t) {
var textarea = document.getElementById("textarea");
textarea.addEventListener("focus", function() {
t.done();
});
var axTextarea = accessibilityController.accessibleElementById("textarea");
axTextarea.press();
}, "Calling press() focuses a textarea.");
</script>
<div id="contenteditable" contenteditable></div>
<script>
async_test(function(t) {
var contenteditable = document.getElementById("contenteditable");
contenteditable.addEventListener("click", function() {
t.done();
});
var axContenteditable = accessibilityController.accessibleElementById(
"contenteditable");
axContenteditable.press();
}, "Calling press() focuses a contenteditable.");
</script>