Implement HTMLTableRowElement insertCell and deleteCell

This commit is contained in:
Corey Farwell 2015-10-11 23:37:01 -04:00
parent e31ad01103
commit 1f58169263
8 changed files with 108 additions and 106 deletions

View file

@ -4707,12 +4707,6 @@
[HTMLTableRowElement interface: attribute sectionRowIndex]
expected: FAIL
[HTMLTableRowElement interface: operation insertCell(long)]
expected: FAIL
[HTMLTableRowElement interface: operation deleteCell(long)]
expected: FAIL
[HTMLTableRowElement interface: attribute align]
expected: FAIL
@ -4731,18 +4725,6 @@
[HTMLTableRowElement interface: document.createElement("tr") must inherit property "sectionRowIndex" with the proper type (1)]
expected: FAIL
[HTMLTableRowElement interface: document.createElement("tr") must inherit property "insertCell" with the proper type (3)]
expected: FAIL
[HTMLTableRowElement interface: calling insertCell(long) on document.createElement("tr") with too few arguments must throw TypeError]
expected: FAIL
[HTMLTableRowElement interface: document.createElement("tr") must inherit property "deleteCell" with the proper type (4)]
expected: FAIL
[HTMLTableRowElement interface: calling deleteCell(long) on document.createElement("tr") with too few arguments must throw TypeError]
expected: FAIL
[HTMLTableRowElement interface: document.createElement("tr") must inherit property "align" with the proper type (5)]
expected: FAIL

View file

@ -1,14 +0,0 @@
[deleteCell.html]
type: testharness
[HTMLTableRowElement deleteCell(0)]
expected: FAIL
[HTMLTableRowElement deleteCell(-1)]
expected: FAIL
[HTMLTableRowElement deleteCell(-2)]
expected: FAIL
[HTMLTableRowElement deleteCell(cells.length)]
expected: FAIL

View file

@ -1,20 +0,0 @@
[insertCell.html]
type: testharness
[HTMLTableRowElement insertCell(0)]
expected: FAIL
[HTMLTableRowElement insertCell(-1)]
expected: FAIL
[HTMLTableRowElement insertCell(cells.length)]
expected: FAIL
[HTMLTableRowElement insertCell()]
expected: FAIL
[HTMLTableRowElement insertCell(-2)]
expected: FAIL
[HTMLTableRowElement insertCell(cells.length + 1)]
expected: FAIL

View file

@ -43,4 +43,12 @@ test(function () {
});
}, "HTMLTableRowElement deleteCell(cells.length)");
test(function () {
assert_equals(tr.cells.length, 1);
tr.deleteCell(-1);
assert_equals(tr.cells.length, 0);
tr.deleteCell(-1);
assert_equals(tr.cells.length, 0);
}, "HTMLTableRowElement deleteCell(-1) with no cells");
</script>