Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Unified Diff: LayoutTests/imported/web-platform-tests/html/dom/documents/dom-tree-accessors/document.forms.html

Issue 1319333002: update-w3c-deps import using blink 6a21d1a089a3a2fd9e80ada1edd4f48db5408e0c: (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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")

Powered by Google App Engine
This is Rietveld 408576698