test_bug1003539.html (1122B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=1003539 5 --> 6 <head> 7 <meta charset="utf-8"> 8 <title>Test for Bug 1003539</title> 9 <script src="/tests/SimpleTest/SimpleTest.js"></script> 10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 11 <script type="application/javascript"> 12 13 /** Test for Bug 1003539 */ 14 // Refering to this specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/tabular-data.html#dom-table-insertrow 15 var tab; 16 tab = document.createElement("table"); 17 tab.createTHead(); 18 tab.insertRow(); 19 is(tab.innerHTML, '<thead></thead><tbody><tr></tr></tbody>', "Row should be inserted in the tbody."); 20 21 tab = document.createElement("table"); 22 tab.createTBody(); 23 tab.createTBody(); 24 tab.insertRow(); 25 is(tab.innerHTML, '<tbody></tbody><tbody><tr></tr></tbody>', "Row should be inserted in the last tbody."); 26 </script> 27 </head> 28 <body> 29 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1003539">Mozilla Bug 1003539</a> 30 <p id="display"></p> 31 <div id="content" style="display: none"> 32 33 </div> 34 <pre id="test"> 35 </pre> 36 </body> 37 </html>