4 <link rel=
"help" href=
"http://www.whatwg.org/specs/web-apps/current-work/multipage/tabular-data.html#htmltableelement">
5 <script src=
"../../../resources/js-test.js"></script>
9 description("Tests that HTMLTableElement.insertRow()'s default argument is -1.");
11 var table
= document
.createElement("table");
12 shouldBe("table.__proto__", "HTMLTableElement.prototype");
14 table
.insertRow().innerHTML
= "1"; // Should append.
15 table
.insertRow().innerHTML
= "2"; // Should append.
16 table
.insertRow(-1).innerHTML
= "3"; // Should append.
17 table
.insertRow(0).innerHTML
= "0"; // Should prepend.
19 var rows
= table
.rows
;
20 shouldBe("rows.length", "4");
21 shouldBeEqualToString("rows[0].innerHTML", "0");
22 shouldBeEqualToString("rows[1].innerHTML", "1");
23 shouldBeEqualToString("rows[2].innerHTML", "2");
24 shouldBeEqualToString("rows[3].innerHTML", "3");