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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLTableSectionElement/rows.html

Issue 2785963002: Move tests for table elements to LayoutTests/html/tabular_data/. (Closed)
Patch Set: Created 3 years, 8 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 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <script>
8 description('Test behavior of the HTMLTableSectionElement rows attribute in case s where there is unusual nesting.');
9
10 function checkRowNesting(tag)
11 {
12 var body = document.createElement("tbody");
13 var container = document.createElement(tag);
14 var row = document.createElement("tr");
15 body.appendChild(container);
16 container.appendChild(row);
17 return body.rows.length;
18 }
19
20 var sectionTags = [
21 "tbody",
22 "tfoot",
23 "thead",
24 ];
25
26 var otherTags = [
27 "col",
28 "colgroup",
29 "div",
30 "form",
31 "script",
32 "table",
33 "td",
34 "th",
35 ];
36
37 for (i = 0; i < otherTags.length; ++i)
38 shouldBe('checkRowNesting("' + otherTags[i] + '")', '0');
39
40 debug('');
41
42 for (i = 0; i < sectionTags.length; ++i)
43 shouldBe('checkRowNesting("' + sectionTags[i] + '")', '0');
44
45 debug('');
46
47 shouldBe('checkRowNesting("tr")', '1');
48
49 debug('');
50 </script>
51 </body>
52 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698