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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLTableElement/early-acid3-66-excerpt.html

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/dom/HTMLTableElement/early-acid3-66-excerpt.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/HTMLTableElement/early-acid3-66-excerpt.html b/third_party/WebKit/LayoutTests/fast/dom/HTMLTableElement/early-acid3-66-excerpt.html
index efb783ad264dd51b9dcc766b17d1af5edfe93097..0a6fb3e2213636d9d6ae2d6e9514ea8619e00199 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/HTMLTableElement/early-acid3-66-excerpt.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/HTMLTableElement/early-acid3-66-excerpt.html
@@ -4,6 +4,45 @@
<script src="../../../resources/js-test.js"></script>
</head>
<body>
-<script src="script-tests/early-acid3-66-excerpt.js"></script>
+<script>
+description('An excerpt from an early Acid3 test 66: test the ordering and creation of rows');
+
+var table = document.createElement('table');
+var rows = [
+ document.createElement('tr'), // 0: ends up first child of the tfoot
+ document.createElement('tr'), // 1: goes at the end of the table
+ document.createElement('tr'), // 2: becomes second child of thead
+ document.createElement('tr'), // 3: becomes third child of the thead
+ document.createElement('tr'), // 4: not in the table
+ table.insertRow(0), // 5: not in the table
+ table.createTFoot().insertRow(0) // 6: ends up second in the tfoot
+];
+rows[6].parentNode.appendChild(rows[0]);
+table.appendChild(rows[1]);
+table.insertBefore(document.createElement('thead'), table.firstChild);
+table.firstChild.appendChild(rows[2]);
+rows[2].parentNode.appendChild(rows[3]);
+rows[4].appendChild(rows[5].parentNode);
+table.insertRow(0);
+table.tFoot.appendChild(rows[6]);
+
+shouldBe("table.rows.length", "6");
+shouldBe("table.getElementsByTagName('tr').length", "6");
+shouldBe("table.childNodes.length", "3");
+shouldBe("table.tHead", "table.childNodes[0]");
+shouldBe("table.tHead.childNodes[0]", "table.getElementsByTagName('tr')[0]");
+shouldBe("table.tHead.childNodes[1]", "table.getElementsByTagName('tr')[1]");
+shouldBe("rows[2]", "table.getElementsByTagName('tr')[1]");
+shouldBe("table.tHead.childNodes[2]", "table.getElementsByTagName('tr')[2]");
+shouldBe("rows[3]", "table.getElementsByTagName('tr')[2]");
+shouldBe("table.tFoot", "table.childNodes[1]");
+shouldBe("table.tFoot.childNodes[0]", "table.getElementsByTagName('tr')[3]");
+shouldBe("rows[0]", "table.getElementsByTagName('tr')[3]");
+shouldBe("table.tFoot.childNodes[1]", "table.getElementsByTagName('tr')[4]");
+shouldBe("rows[6]", "table.getElementsByTagName('tr')[4]");
+shouldBe("table.childNodes[2]", "table.getElementsByTagName('tr')[5]");
+shouldBe("rows[1]", "table.getElementsByTagName('tr')[5]");
+shouldBe("table.tBodies.length", "0");
+</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698