Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / html-collections-named-getter-mandatory-arg.html
blob596a33482eda8b525c8999d8fe44cf9156657da0
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../../resources/js-test.js"></script>
5 <a id="testLink"></a>
6 <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."');
15 </script>
16 </body>
17 </html>