mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +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
|
@ -4650,12 +4650,6 @@
|
|||
[HTMLTableSectionElement interface: existence and properties of interface object]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement interface: operation insertRow(long)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement interface: operation deleteRow(long)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement interface: attribute align]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -4668,18 +4662,6 @@
|
|||
[HTMLTableSectionElement interface: attribute vAlign]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement interface: document.createElement("tbody") must inherit property "insertRow" with the proper type (1)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement interface: calling insertRow(long) on document.createElement("tbody") with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement interface: document.createElement("tbody") must inherit property "deleteRow" with the proper type (2)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement interface: calling deleteRow(long) on document.createElement("tbody") with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement interface: document.createElement("tbody") must inherit property "align" with the proper type (3)]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -4692,18 +4674,6 @@
|
|||
[HTMLTableSectionElement interface: document.createElement("tbody") must inherit property "vAlign" with the proper type (6)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement interface: document.createElement("thead") must inherit property "insertRow" with the proper type (1)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement interface: calling insertRow(long) on document.createElement("thead") with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement interface: document.createElement("thead") must inherit property "deleteRow" with the proper type (2)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement interface: calling deleteRow(long) on document.createElement("thead") with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement interface: document.createElement("thead") must inherit property "align" with the proper type (3)]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -4716,18 +4686,6 @@
|
|||
[HTMLTableSectionElement interface: document.createElement("thead") must inherit property "vAlign" with the proper type (6)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement interface: document.createElement("tfoot") must inherit property "insertRow" with the proper type (1)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement interface: calling insertRow(long) on document.createElement("tfoot") with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement interface: document.createElement("tfoot") must inherit property "deleteRow" with the proper type (2)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement interface: calling deleteRow(long) on document.createElement("tfoot") with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement interface: document.createElement("tfoot") must inherit property "align" with the proper type (3)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
[deleteRow.html]
|
||||
type: testharness
|
||||
[HTMLTableSectionElement deleteRow(0)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement deleteRow(-1)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement deleteRow(rows.length)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement deleteRow(-2)]
|
||||
expected: FAIL
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
[insertRow.html]
|
||||
type: testharness
|
||||
[HTMLTableSectionElement insertRow(0)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement insertRow(-1)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement insertRow()]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement insertRow(-2)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableSectionElement insertRow(rows.length + 1)]
|
||||
expected: FAIL
|
||||
|
|
@ -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