blob: 6b4bd45dea1454d42d2aebfcd9cbe75a17aef703 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
<html>
<body>
<p>
This test verifies that only document.all is undetectable. Other
HTMLCollections should be detectable.
</p>
<script>
if (window.testRunner) {
testRunner.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 undetectable.<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>
|