summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/HTMLTableSectionElement
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/fast/dom/HTMLTableSectionElement')
-rw-r--r--LayoutTests/fast/dom/HTMLTableSectionElement/rows-expected.txt24
-rw-r--r--LayoutTests/fast/dom/HTMLTableSectionElement/rows.html13
-rw-r--r--LayoutTests/fast/dom/HTMLTableSectionElement/script-tests/TEMPLATE.html13
-rw-r--r--LayoutTests/fast/dom/HTMLTableSectionElement/script-tests/rows.js44
4 files changed, 94 insertions, 0 deletions
diff --git a/LayoutTests/fast/dom/HTMLTableSectionElement/rows-expected.txt b/LayoutTests/fast/dom/HTMLTableSectionElement/rows-expected.txt
new file mode 100644
index 0000000..41ce7ab
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLTableSectionElement/rows-expected.txt
@@ -0,0 +1,24 @@
+Test behavior of the HTMLTableSectionElement rows attribute in cases where there is unusual nesting.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS checkRowNesting("col") is 0
+PASS checkRowNesting("colgroup") is 0
+PASS checkRowNesting("div") is 0
+PASS checkRowNesting("form") is 0
+PASS checkRowNesting("script") is 0
+PASS checkRowNesting("table") is 0
+PASS checkRowNesting("td") is 0
+PASS checkRowNesting("th") is 0
+
+PASS checkRowNesting("tbody") is 0
+PASS checkRowNesting("tfoot") is 0
+PASS checkRowNesting("thead") is 0
+
+PASS checkRowNesting("tr") is 1
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/dom/HTMLTableSectionElement/rows.html b/LayoutTests/fast/dom/HTMLTableSectionElement/rows.html
new file mode 100644
index 0000000..163e235
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLTableSectionElement/rows.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/rows.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/dom/HTMLTableSectionElement/script-tests/TEMPLATE.html b/LayoutTests/fast/dom/HTMLTableSectionElement/script-tests/TEMPLATE.html
new file mode 100644
index 0000000..1951c43
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLTableSectionElement/script-tests/TEMPLATE.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="YOUR_JS_FILE_HERE"></script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/dom/HTMLTableSectionElement/script-tests/rows.js b/LayoutTests/fast/dom/HTMLTableSectionElement/script-tests/rows.js
new file mode 100644
index 0000000..80ac6a3
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLTableSectionElement/script-tests/rows.js
@@ -0,0 +1,44 @@
+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('');
+
+var successfullyParsed = true;