Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1170)

Side by Side Diff: LayoutTests/fast/dom/HTMLTableRowElement/insertCell-skips-non-td-th.html

Issue 262163008: HTMLTableSectionElement.insertRow(0) / HTMLTableRowElement.insertCell(0) do not behave correctly (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix nits Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLTableRowElement/insertCell-skips-non-td-th-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <link rel="help" href="http://www.whatwg.org/specs/web-apps/current-work/multipa ge/tabular-data.html#dom-tr-insertcell">
5 <script src="../../../resources/js-test.js"></script>
6 </head>
7 <body>
8 <script>
9 description("Tests that HTMLTableRowElement.insertCell() skips non &lt;td&gt; / &lt;th&gt; children.");
10
11 var tr = document.createElement("tr");
12 shouldBe("tr.__proto__", "HTMLTableRowElement.prototype");
13
14 tr.appendChild(new Text("TEXT"));
15 tr.appendChild(document.createElement("a"));
16 tr.insertCell(-1).innerHTML = "1";
17 // The insertCell() method must create a td element, insert it as a child of the
18 // tr element, immediately before the indexth td or th element in the cells
19 // collection, and finally must return the newly created td element.
20 tr.insertCell(0).innerHTML = "0";
21
22 var childNodes = tr.childNodes;
23 shouldBe("childNodes.length", "4");
24 shouldBeEqualToString("childNodes[0].nodeValue", "TEXT");
25 shouldBeEqualToString("childNodes[1].tagName", "A");
26 shouldBeEqualToString("childNodes[2].innerHTML", "0");
27 shouldBeEqualToString("childNodes[3].innerHTML", "1");
28 </script>
29 </body>
30 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLTableRowElement/insertCell-skips-non-td-th-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698