OLD | NEW |
| (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> | |
OLD | NEW |