| OLD | NEW |
| (Empty) |
| 1 description('Test behavior of the HTMLTableSectionElement rows attribute in case
s where there is unusual nesting.'); | |
| 2 | |
| 3 function checkRowNesting(tag) | |
| 4 { | |
| 5 var body = document.createElement("tbody"); | |
| 6 var container = document.createElement(tag); | |
| 7 var row = document.createElement("tr"); | |
| 8 body.appendChild(container); | |
| 9 container.appendChild(row); | |
| 10 return body.rows.length; | |
| 11 } | |
| 12 | |
| 13 var sectionTags = [ | |
| 14 "tbody", | |
| 15 "tfoot", | |
| 16 "thead", | |
| 17 ]; | |
| 18 | |
| 19 var otherTags = [ | |
| 20 "col", | |
| 21 "colgroup", | |
| 22 "div", | |
| 23 "form", | |
| 24 "script", | |
| 25 "table", | |
| 26 "td", | |
| 27 "th", | |
| 28 ]; | |
| 29 | |
| 30 for (i = 0; i < otherTags.length; ++i) | |
| 31 shouldBe('checkRowNesting("' + otherTags[i] + '")', '0'); | |
| 32 | |
| 33 debug(''); | |
| 34 | |
| 35 for (i = 0; i < sectionTags.length; ++i) | |
| 36 shouldBe('checkRowNesting("' + sectionTags[i] + '")', '0'); | |
| 37 | |
| 38 debug(''); | |
| 39 | |
| 40 shouldBe('checkRowNesting("tr")', '1'); | |
| 41 | |
| 42 debug(''); | |
| OLD | NEW |