blob: a07496456426416e04734d6ac619dd7acf50979a [file] [edit]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><!-- webkit-test-runner [ IsAccessibilityIsolatedTreeEnabled=true ] -->
<html>
<head>
<script src="../../resources/js-test.js"></script>
<script src="../../resources/accessibility-helper.js"></script>
</head>
<body id="body">
<div id="textrole" tabindex=0 role="text" aria-label="all at once">
<b>hello world</b>
<i>this is a test</i>
<a href="#">more test</a>
</div>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that you can set an ARIA text role and that it will not have children through hit testing");
if (window.accessibilityController) {
document.getElementById("textrole").focus();
var textrole = accessibilityController.focusedElement;
shouldBe("textrole.role", "platformRoleForStaticText(textrole)");
shouldBe("textrole.stringValue", "'AXValue: all at once'");
// now check the hit-testing
var x = textrole.clickPointX;
var y = textrole.clickPointY;
shouldBe("textrole.elementAtPoint(x, y).isEqual(textrole)", "true");
}
</script>
</body>
</html>