blob: c9e50acab1f26c767196ddde5dd6bfbad41efa7b [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test.js"></script>
</head>
<body id="body">
<label tabindex=0 onclick="performEvent();" id="labelElement">label</label>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that a label element without a corresponding control will perform a press action on itself instead of nothing.");
function performEvent() {
testRunner.notifyDone();
}
if (window.accessibilityController) {
testRunner.waitUntilDone();
document.getElementById("body").focus();
var body = accessibilityController.focusedElement;
var label = body.childAtIndex(0).childAtIndex(0);
// if successful, performEvent() will be called and we'll successfully parse.
label.press();
}
</script>
</body>
</html>