| Index: LayoutTests/fast/dom/HTMLTableSectionElement/insertRow-skips-non-tr.html
|
| diff --git a/LayoutTests/fast/dom/HTMLTableSectionElement/insertRow-skips-non-tr.html b/LayoutTests/fast/dom/HTMLTableSectionElement/insertRow-skips-non-tr.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b989a56a5e48f8f02a9041c8c096acaf5d2daccc
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/dom/HTMLTableSectionElement/insertRow-skips-non-tr.html
|
| @@ -0,0 +1,30 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| +<link rel="help" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/tabular-data.html#dom-tbody-insertrow">
|
| +<script src="../../../resources/js-test.js"></script>
|
| +</head>
|
| +<body>
|
| +<script>
|
| +description("Tests that HTMLTableSectionElement.insertRow() skips non <tr> children.");
|
| +
|
| +var tb = document.createElement("tbody");
|
| +shouldBe("tb.__proto__", "HTMLTableSectionElement.prototype");
|
| +
|
| +tb.appendChild(new Text("TEXT"));
|
| +tb.appendChild(document.createElement("a"));
|
| +tb.insertRow(-1).innerHTML = "1";
|
| +// The insertRow() method must create a tr element, insert it as a child of the
|
| +// table section element, immediately before the indexth tr element in the rows
|
| +// collection, and finally must return the newly created tr element.
|
| +tb.insertRow(0).innerHTML = "0";
|
| +
|
| +var childNodes = tb.childNodes;
|
| +shouldBe("childNodes.length", "4");
|
| +shouldBeEqualToString("childNodes[0].nodeValue", "TEXT");
|
| +shouldBeEqualToString("childNodes[1].tagName", "A");
|
| +shouldBeEqualToString("childNodes[2].innerHTML", "0");
|
| +shouldBeEqualToString("childNodes[3].innerHTML", "1");
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|