4 <script src=
"../../resources/js-test.js"></script>
7 description("This tests verifies that HTMLCollection.namedItem() argument is mandatory");
9 var testLink
= document
.getElementById("testLink");
10 var htmlCollection
= document
.getElementsByTagName("a");
11 shouldBe("htmlCollection.__proto__", "HTMLCollection.prototype");
12 shouldBe("htmlCollection.length", "1");
13 shouldBe("htmlCollection.namedItem('testLink')", "testLink");
14 shouldThrow("htmlCollection.namedItem()", '"TypeError: Failed to execute \'namedItem\' on \'HTMLCollection\': 1 argument required, but only 0 present."');