blob: f328935f929b480ca2ac12486df4ebcca183d58f [file] [log] [blame] [edit]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test.js"></script>
<script src="../../resources/accessibility-helper.js"></script>
</head>
<body id="body">
test
<div id="element1" role="group" tabindex="0">text</div>
test
<script>
var output = "This tests that if you access an element that has been removed, it return the correct value for isIgnored (true, that is, it is ignored).\n\n";
var element1;
if (window.accessibilityController) {
window.jsTestIsAsync = true;
document.getElementById("element1").focus();
setTimeout(async function() {
element1 = accessibilityController.focusedElement;
// The element should not be ignored (it should be a group)
output += await expectAsync("element1.isIgnored", "false");
// Remove the element, it should become ignored
document.getElementById("body").removeChild(document.getElementById("element1"));
output += await expectAsync("element1.isIgnored", "true");
debug(output);
finishJSTest();
}, 0);
}
</script>
</body>
</html>