Implement HTMLTableRowElement::Cells

Extracted from #6936
This commit is contained in:
David Zbarsky 2015-10-01 19:53:35 -04:00 committed by Corey Farwell
parent ba2714f4f6
commit 4e64ff499b
5 changed files with 64 additions and 11 deletions

View file

@ -17743,6 +17743,10 @@
"path": "html/semantics/tabular-data/the-tbody-element/insertRow.html",
"url": "/html/semantics/tabular-data/the-tbody-element/insertRow.html"
},
{
"path": "html/semantics/tabular-data/the-tr-element/cells.html",
"url": "/html/semantics/tabular-data/the-tr-element/cells.html"
},
{
"path": "html/semantics/tabular-data/the-tr-element/deleteCell.html",
"url": "/html/semantics/tabular-data/the-tr-element/deleteCell.html"

View file

@ -4791,9 +4791,6 @@
[HTMLTableRowElement interface: attribute sectionRowIndex]
expected: FAIL
[HTMLTableRowElement interface: attribute cells]
expected: FAIL
[HTMLTableRowElement interface: operation insertCell(long)]
expected: FAIL
@ -4818,9 +4815,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 "cells" with the proper type (2)]
expected: FAIL
[HTMLTableRowElement interface: document.createElement("tr") must inherit property "insertCell" with the proper type (3)]
expected: FAIL

View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTMLTableRowElement#cells</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<table>
<tr id="testTr">
<td>First</td>
<div><td>Second</td></div>
<td>Third
<table>
<tr><td>Nested first</td></tr>
</table>
</td>
<img>
</tr>
</table>
<script>
var tr = document.getElementById("testTr");
test(function () {
tr.insertBefore(document.createElementNS("foo", "td"), tr.children[1]);
assert_array_equals(tr.cells, [tr.children[0], tr.children[2], tr.children[3]]);
}, "HTMLTableRowElement cells ignores nested tables and non-HTML elements");
</script>