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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLTableSectionElement/rows.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/HTMLTableSectionElement/rows.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/HTMLTableSectionElement/rows.html b/third_party/WebKit/LayoutTests/fast/dom/HTMLTableSectionElement/rows.html
index 5e37f1cad24bde9c1eab2031298b9d1ddfa8c575..a3315d8857e9cc47a6376c701a16e3ed9187cf1c 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/HTMLTableSectionElement/rows.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/HTMLTableSectionElement/rows.html
@@ -4,6 +4,49 @@
<script src="../../../resources/js-test.js"></script>
</head>
<body>
-<script src="script-tests/rows.js"></script>
+<script>
+description('Test behavior of the HTMLTableSectionElement rows attribute in cases where there is unusual nesting.');
+
+function checkRowNesting(tag)
+{
+ var body = document.createElement("tbody");
+ var container = document.createElement(tag);
+ var row = document.createElement("tr");
+ body.appendChild(container);
+ container.appendChild(row);
+ return body.rows.length;
+}
+
+var sectionTags = [
+ "tbody",
+ "tfoot",
+ "thead",
+];
+
+var otherTags = [
+ "col",
+ "colgroup",
+ "div",
+ "form",
+ "script",
+ "table",
+ "td",
+ "th",
+];
+
+for (i = 0; i < otherTags.length; ++i)
+ shouldBe('checkRowNesting("' + otherTags[i] + '")', '0');
+
+debug('');
+
+for (i = 0; i < sectionTags.length; ++i)
+ shouldBe('checkRowNesting("' + sectionTags[i] + '")', '0');
+
+debug('');
+
+shouldBe('checkRowNesting("tr")', '1');
+
+debug('');
+</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698