Auto merge of #7977 - frewsxcv:htmltablerowelement-insertcell-deletecell, r=eefriedman

Implement HTMLTableRowElement insertCell and deleteCell



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7977)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-10-16 23:54:52 -06:00
commit ef8119511c
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>