| Index: LayoutTests/imported/web-platform-tests/html/dom/documents/dom-tree-accessors/document.forms.html
|
| diff --git a/LayoutTests/imported/web-platform-tests/html/dom/documents/dom-tree-accessors/document.forms.html b/LayoutTests/imported/web-platform-tests/html/dom/documents/dom-tree-accessors/document.forms.html
|
| index 1b04af92a0c7984e5f3d780e7a4f0eff9318fb8f..6554c82b449bc5a225083ba4464b1491618d323f 100644
|
| --- a/LayoutTests/imported/web-platform-tests/html/dom/documents/dom-tree-accessors/document.forms.html
|
| +++ b/LayoutTests/imported/web-platform-tests/html/dom/documents/dom-tree-accessors/document.forms.html
|
| @@ -34,11 +34,16 @@ test(function() {
|
| assert_equals(document.forms.item(1).id, "form2");
|
| assert_equals(document.forms.namedItem("form1").id, "form1");
|
| assert_equals(document.forms.namedItem("form2").id, "form2");
|
| - assert_equals(document.forms.item("form1").id, "form1");
|
| - assert_equals(document.forms.item("form2").id, "form2");
|
| }, "document.forms")
|
|
|
| test(function() {
|
| + // The `item` method takes one *numeric* argument. Passing a string to `item`
|
| + // results in that string getting converted to 0
|
| + assert_equals(document.forms.item("form1").id, "form1");
|
| + assert_equals(document.forms.item("form2").id, "form1");
|
| +}, "document.forms.item with string arg")
|
| +
|
| +test(function() {
|
| assert_equals(document.forms[""], undefined);
|
| assert_equals(document.forms.namedItem(""), null);
|
| }, "document.forms with empty string")
|
|
|