| OLD | NEW |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <script src="script-tests/tBodies.js"></script> | 7 <script> |
| 8 description('Test behavior of the HTMLTableElement tBodies attribute in cases wh
ere there is unusual nesting.'); |
| 9 |
| 10 function checkTBodyNesting(tag) |
| 11 { |
| 12 var table = document.createElement("table"); |
| 13 var container = document.createElement(tag); |
| 14 var tbody = document.createElement("tbody"); |
| 15 table.appendChild(container); |
| 16 container.appendChild(tbody); |
| 17 return table.tBodies.length; |
| 18 } |
| 19 |
| 20 var tags = [ |
| 21 "col", |
| 22 "colgroup", |
| 23 "div", |
| 24 "form", |
| 25 "script", |
| 26 "table", |
| 27 "td", |
| 28 "tfoot", |
| 29 "th", |
| 30 "thead", |
| 31 "tr", |
| 32 ]; |
| 33 |
| 34 for (i = 0; i < tags.length; ++i) |
| 35 shouldBe('checkTBodyNesting("' + tags[i] + '")', '0'); |
| 36 |
| 37 debug(''); |
| 38 |
| 39 shouldBe('checkTBodyNesting("tbody")', '1'); |
| 40 |
| 41 debug(''); |
| 42 </script> |
| 8 </body> | 43 </body> |
| 9 </html> | 44 </html> |
| OLD | NEW |