blob: 5b547ace3ba05ab0c0b9c3aa0ffc72ad1d13e2c4 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body id="body">
<div id="content">
<div id="test1" role="button">X</div>
<div id="test2" role="button" aria-haspopup="true">X</div>
<div id="test3" role="button" aria-haspopup="false">X</div>
<div id="test4" role="button" aria-haspopup="dialog">X</div>
<div id="test5" role="button" aria-haspopup="grid">X</div>
<div id="test6" role="button" aria-haspopup="listbox">X</div>
<div id="test7" role="button" aria-haspopup="menu">X</div>
<div id="test8" role="button" aria-haspopup="tree">X</div>
<div id="test9" role="button" aria-haspopup="foo">X</div>
<div id="test10" role="button" aria-haspopup="">X</div>
<div id="test11" role="combobox">X</div>
<div id="test12" role="combobox" aria-haspopup="true">X</div>
<div id="test13" role="combobox" aria-haspopup="false">X</div>
<div id="test14" role="combobox" aria-haspopup="dialog">X</div>
<div id="test15" role="combobox" aria-haspopup="grid">X</div>
<div id="test16" role="combobox" aria-haspopup="listbox">X</div>
<div id="test17" role="combobox" aria-haspopup="menu">X</div>
<div id="test18" role="combobox" aria-haspopup="tree">X</div>
<div id="test19" role="combobox" aria-haspopup="foo">X</div>
<div id="test20" role="combobox" aria-haspopup="">X</div>
</div>
<p id="description"></p>
<div id="console"></div>
<script>
function platformAttributes(axElement) {
var allAttributes = axElement.allAttributes().split("\n");
var length = allAttributes.length;
for (var i = 0; i < length; i++) {
var string = allAttributes[i];
if (string.startsWith("AXPlatformAttributes"))
return string;
}
return "";
}
description("This tests the exposure of aria-haspopup");
if (window.accessibilityController) {
for (var i = 1; i <= 20; i++) {
var axElement = accessibilityController.accessibleElementById("test" + i);
debug("\ntest" + i + " hasPopup: " + axElement.hasPopup);
debug(platformAttributes(axElement));
}
document.getElementById("content").style.visibility = "hidden";
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>