mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Implement deleteRow and insertRow for <table> element
Continued from #6936
This commit is contained in:
parent
02d8894945
commit
3d383f21ae
8 changed files with 81 additions and 77 deletions
|
@ -43,4 +43,12 @@ test(function () {
|
|||
});
|
||||
}, "HTMLTableSectionElement deleteRow(-2)");
|
||||
|
||||
test(function () {
|
||||
assert_equals(tbody.rows.length, 1);
|
||||
tbody.deleteRow(-1);
|
||||
assert_equals(tbody.rows.length, 0);
|
||||
tbody.deleteRow(-1);
|
||||
assert_equals(tbody.rows.length, 0);
|
||||
}, "HTMLTableSectionElement deleteRow(-1) with no rows");
|
||||
|
||||
</script>
|
||||
|
|
|
@ -35,6 +35,12 @@ test(function () {
|
|||
assert_equals(tbody.rows.length, 4);
|
||||
}, "HTMLTableSectionElement insertRow()");
|
||||
|
||||
test(function () {
|
||||
var trEle = tbody.insertRow(tbody.rows.length);
|
||||
assert_equals(tbody.rows[tbody.rows.length - 1], trEle);
|
||||
assert_equals(tbody.rows.length, 5);
|
||||
}, "HTMLTableSectionElement insertRow(rows.length)");
|
||||
|
||||
test(function () {
|
||||
assert_throws("IndexSizeError", function () {
|
||||
tbody.insertRow(-2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue