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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLTableElement/script-tests/early-acid3-66-excerpt.js

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . Created 3 years, 10 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
OLDNEW
(Empty)
1 description('An excerpt from an early Acid3 test 66: test the ordering and creat ion of rows');
2
3 var table = document.createElement('table');
4 var rows = [
5 document.createElement('tr'), // 0: ends up first child of the tfoot
6 document.createElement('tr'), // 1: goes at the end of the table
7 document.createElement('tr'), // 2: becomes second child of thead
8 document.createElement('tr'), // 3: becomes third child of the thead
9 document.createElement('tr'), // 4: not in the table
10 table.insertRow(0), // 5: not in the table
11 table.createTFoot().insertRow(0) // 6: ends up second in the tfoot
12 ];
13 rows[6].parentNode.appendChild(rows[0]);
14 table.appendChild(rows[1]);
15 table.insertBefore(document.createElement('thead'), table.firstChild);
16 table.firstChild.appendChild(rows[2]);
17 rows[2].parentNode.appendChild(rows[3]);
18 rows[4].appendChild(rows[5].parentNode);
19 table.insertRow(0);
20 table.tFoot.appendChild(rows[6]);
21
22 shouldBe("table.rows.length", "6");
23 shouldBe("table.getElementsByTagName('tr').length", "6");
24 shouldBe("table.childNodes.length", "3");
25 shouldBe("table.tHead", "table.childNodes[0]");
26 shouldBe("table.tHead.childNodes[0]", "table.getElementsByTagName('tr')[0]");
27 shouldBe("table.tHead.childNodes[1]", "table.getElementsByTagName('tr')[1]");
28 shouldBe("rows[2]", "table.getElementsByTagName('tr')[1]");
29 shouldBe("table.tHead.childNodes[2]", "table.getElementsByTagName('tr')[2]");
30 shouldBe("rows[3]", "table.getElementsByTagName('tr')[2]");
31 shouldBe("table.tFoot", "table.childNodes[1]");
32 shouldBe("table.tFoot.childNodes[0]", "table.getElementsByTagName('tr')[3]");
33 shouldBe("rows[0]", "table.getElementsByTagName('tr')[3]");
34 shouldBe("table.tFoot.childNodes[1]", "table.getElementsByTagName('tr')[4]");
35 shouldBe("rows[6]", "table.getElementsByTagName('tr')[4]");
36 shouldBe("table.childNodes[2]", "table.getElementsByTagName('tr')[5]");
37 shouldBe("rows[1]", "table.getElementsByTagName('tr')[5]");
38 shouldBe("table.tBodies.length", "0");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698