38 lines
1.1 KiB
HTML
38 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script src="../../resources/js-test-pre.js"></script>
|
|
<title>Test Convenience Methods</title>
|
|
</head>
|
|
<body>
|
|
|
|
<!-- Focus test element. -->
|
|
<div id="focus" role="button" style="height:25px; width:25px;" tabindex="0"></div>
|
|
|
|
<!-- FIXME: Add remaining test elements. -->
|
|
|
|
<p id="description"></p>
|
|
<div id="console"></div>
|
|
|
|
<script>
|
|
description("This tests that test convenience methods behave correctly.");
|
|
|
|
if (window.accessibilityController) {
|
|
// isFocused test.
|
|
var focus = accessibilityController.accessibleElementById("focus");
|
|
var isFocusedAttribute = focus.boolAttributeValue("AXFocused");
|
|
var isFocusedConvenience = focus.isFocused;
|
|
shouldBe("isFocusedConvenience", "isFocusedConvenience");
|
|
document.getElementById("focus").focus();
|
|
isFocusedAttribute = focus.boolAttributeValue("AXFocused");
|
|
isFocusedConvenience = focus.isFocused;
|
|
shouldBe("isFocusedConvenience", "isFocusedAttribute");
|
|
|
|
// FIXME: Test remaining convenience methods.
|
|
}
|
|
</script>
|
|
|
|
<script src="../../resources/js-test-post.js"></script>
|
|
</body>
|
|
</html>
|