blob: 157905a359464ca4693f29d455cf51535cf532ba [file] [log] [blame]
<html>
<body>
<p>
This test verifies that only document.all is undetectable. Other
HTMLCollections should be detectable.
</p>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
}
function shouldBeUndetectable(name) {
if (document[name]) {
document.write("Failed: document." + name + " is detectable.<br>");
} else {
document.write("Passed: document." + name + " is undetectable.<br>");
}
};
function shouldBeDetectable(name) {
if (document[name]) {
document.write("Passed: document." + name + " is detectable.<br>");
} else {
document.write("Failed: document." + name + " is detectable.<br>");
}
};
var undetectable = ["all"];
var detectable = ["images", "applets", "links", "forms", "anchors",
"embeds", "plugins", "scripts"];
for (var i = 0; i < undetectable.length; i++) {
shouldBeUndetectable(undetectable[i]);
}
for (var i = 0; i < detectable.length; i++) {
shouldBeDetectable(detectable[i]);
}
</script>
</body>
</html>