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
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../js/resources/js-test-pre.js"></script>
</head>
<body>
<table><tr><td></td></tr></table>
<map><area></area></map>
<select><option></option></select>
<script>
description("This test verifies that collection getters return the same collection when called repeatedly.");
var collections = [
"document.all",
"document.images",
"document.embeds",
"document.applets",
"document.links",
"document.forms",
"document.anchors",
"document.scripts",
"document.getElementsByTagName('table')[0].rows[0].cells",
"document.getElementsByTagName('table')[0].tBodies",
"document.getElementsByTagName('table')[0].tBodies[0].rows",
"document.body.children",
"document.getElementsByTagName('map')[0].areas",
"document.getElementsByTagName('select')[0].options"
];
for (var i = 0; i < collections.length; ++i) {
shouldBe(collections[i], collections[i]);
shouldBeTrue(collections[i] + " === " + collections[i]);
}
</script>
</body>
</html>
|