| 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]);
|
|
|