Index: LayoutTests/fast/dom/html-collections-named-getter-mandatory-arg.html |
diff --git a/LayoutTests/fast/dom/html-collections-named-getter-mandatory-arg.html b/LayoutTests/fast/dom/html-collections-named-getter-mandatory-arg.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..596a33482eda8b525c8999d8fe44cf9156657da0 |
--- /dev/null |
+++ b/LayoutTests/fast/dom/html-collections-named-getter-mandatory-arg.html |
@@ -0,0 +1,17 @@ |
+<!DOCTYPE html> |
+<html> |
+<body> |
+<script src="../../resources/js-test.js"></script> |
+<a id="testLink"></a> |
+<script> |
+description("This tests verifies that HTMLCollection.namedItem() argument is mandatory"); |
+ |
+var testLink = document.getElementById("testLink"); |
+var htmlCollection = document.getElementsByTagName("a"); |
+shouldBe("htmlCollection.__proto__", "HTMLCollection.prototype"); |
+shouldBe("htmlCollection.length", "1"); |
+shouldBe("htmlCollection.namedItem('testLink')", "testLink"); |
+shouldThrow("htmlCollection.namedItem()", '"TypeError: Failed to execute \'namedItem\' on \'HTMLCollection\': 1 argument required, but only 0 present."'); |
+</script> |
+</body> |
+</html> |