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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html

Issue 2634323002: Import wpt@aae3e1b6ffb8b24acb777450933ceeafd97e3655 (Closed)
Patch Set: Modify TestExpectations or download new baselines for tests. Created 3 years, 11 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: third_party/WebKit/LayoutTests/imported/wpt/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html b/third_party/WebKit/LayoutTests/imported/wpt/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html
index 8c8e1dbc1bf9a9a9f9d3851e5a2aac8c864999d4..aa9f0a5d5e0c210156a50253cf66a8777674867e 100644
--- a/third_party/WebKit/LayoutTests/imported/wpt/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html
+++ b/third_party/WebKit/LayoutTests/imported/wpt/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html
@@ -7,8 +7,8 @@
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<form id="f1">
- <input type="radio" id="r1">
- <keygen id="kg" name="key"></keygen>
+ <input type="radio" id="r1" name="ra">
+ <keygen id="kg" name="key"></keygen> <!-- we test that it does *not* appear in form.elements -->
</form>
<form id="f2">
<table>
@@ -39,7 +39,7 @@ setup(function () {
//length
test(function () {
- assert_equals(coll1.length, 2, "The length attribute is incorrect.");
+ assert_equals(coll1.length, 1, "The length attribute is incorrect.");
assert_equals(coll2.length, 4, "The length attribute is incorrect.");
}, "The length attribute must return the number of elements in the form");
@@ -83,17 +83,22 @@ test(function () {
}, "The namedItem(name) must return null if there is no matched element");
test(function () {
- assert_equals(coll1.namedItem("kg"), document.getElementById("kg"), "Controls can be named by 'id' attribute.");
- assert_equals(coll1.namedItem("key"), document.getElementById("kg"), "Controls can be named by 'name' attribute.");
+ assert_equals(coll1.namedItem("r1"), document.getElementById("r1"), "Controls can be named by 'id' attribute.");
+ assert_equals(coll1.namedItem("ra"), document.getElementById("r1"), "Controls can be named by 'name' attribute.");
}, "Controls can be indexed by id or name attribute");
test(function () {
+ assert_equals(coll1.namedItem("kg"), null, "Keygen does not show up when queried by id.");
+ assert_equals(coll1.namedItem("key"), null, "Keygen does not show up when queried by name.");
+}, "Keygen controls do not show up at all");
+
+test(function () {
assert_equals(coll2.namedItem("btn").length, 2, "The length attribute should be 2.");
}, "The namedItem(name) must return the items with id or name attribute");
//various controls in fieldset and form
var containers = ["form", "fieldset"],
- controls = ["button", "fieldset", "input", "keygen", "object", "output", "select", "textarea"];
+ controls = ["button", "fieldset", "input", "object", "output", "select", "textarea"];
for (var m = 0; m < containers.length; m++) {
test(function () {
var container = document.createElement(containers[m]);

Powered by Google App Engine
This is Rietveld 408576698