| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <meta charset=utf-8> | 2 <meta charset=utf-8> |
| 3 <title>HTMLTableElement.createTBody</title> | 3 <title>HTMLTableElement.createTBody</title> |
| 4 <script src=../../../../../../resources/testharness.js></script> | 4 <script src=../../../../../../resources/testharness.js></script> |
| 5 <script src=../../../../../../resources/testharnessreport.js></script> | 5 <script src=../../../../../../resources/testharnessreport.js></script> |
| 6 <div id=log></div> | 6 <div id=log></div> |
| 7 <script> | 7 <script> |
| 8 function assert_tbody(tbody) { | 8 function assert_tbody(tbody) { |
| 9 assert_equals(tbody.localName, "tbody"); | 9 assert_equals(tbody.localName, "tbody"); |
| 10 assert_equals(tbody.namespaceURI, htmlNS); | 10 assert_equals(tbody.namespaceURI, htmlNS); |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 var table = document.createElement("table"); | 155 var table = document.createElement("table"); |
| 156 var before = table.appendChild(document.createElement("tbody")); | 156 var before = table.appendChild(document.createElement("tbody")); |
| 157 var after1 = table.appendChild(document.createElement("tfoot")); | 157 var after1 = table.appendChild(document.createElement("tfoot")); |
| 158 var after2 = after1.appendChild(document.createElement("tbody")); | 158 var after2 = after1.appendChild(document.createElement("tbody")); |
| 159 assert_array_equals(table.childNodes, [before, after1]); | 159 assert_array_equals(table.childNodes, [before, after1]); |
| 160 | 160 |
| 161 var tbody = table.createTBody(); | 161 var tbody = table.createTBody(); |
| 162 assert_array_equals(table.childNodes, [before, tbody, after1]); | 162 assert_array_equals(table.childNodes, [before, tbody, after1]); |
| 163 assert_tbody(tbody); | 163 assert_tbody(tbody); |
| 164 }, "A tbody node inside a tfoot child node after a tbody child node"); | 164 }, "A tbody node inside a tfoot child node after a tbody child node"); |
| 165 |
| 166 test(function() { |
| 167 var table = document.createElementNS(htmlNS, "foo:table"); |
| 168 var tbody = table.createTBody(); |
| 169 |
| 170 assert_equals(tbody.prefix, null); |
| 171 }, "A prefixed table creates tbody without prefix"); |
| 172 |
| 165 </script> | 173 </script> |
| OLD | NEW |