| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>HTML Test: element.outerHTML to verify XML fragment serialization alg
orithm</title> | 4 <title>HTML Test: element.outerHTML to verify XML fragment serialization alg
orithm</title> |
| 5 <link rel="author" title="Intel" href="http://www.intel.com/"> | 5 <link rel="author" title="Intel" href="http://www.intel.com/"> |
| 6 <link rel="help" href="https://w3c.github.io/DOM-Parsing/#dfn-concept-serial
ize-xml"> | 6 <link rel="help" href="https://w3c.github.io/DOM-Parsing/#dfn-concept-serial
ize-xml"> |
| 7 <link rel="help" href="https://w3c.github.io/DOM-Parsing/#widl-Element-outer
HTML"> | 7 <link rel="help" href="https://w3c.github.io/DOM-Parsing/#widl-Element-outer
HTML"> |
| 8 <script src="../../../../../resources/testharness.js"></script> | 8 <script src="/resources/testharness.js"></script> |
| 9 <script src="../../../../../resources/testharnessreport.js"></script> | 9 <script src="/resources/testharnessreport.js"></script> |
| 10 <script src="../html-element-list.js"></script> | 10 <script src="../html-element-list.js"></script> |
| 11 </head> | 11 </head> |
| 12 <body> | 12 <body> |
| 13 <div id="log"></div> | 13 <div id="log"></div> |
| 14 <script> | 14 <script> |
| 15 test(function() { | 15 test(function() { |
| 16 var doc = document.implementation.createDocument(null, ""); | 16 var doc = document.implementation.createDocument(null, ""); |
| 17 assert_equals(doc.contentType, "application/xml"); | 17 assert_equals(doc.contentType, "application/xml"); |
| 18 var html_ns = "http://www.w3.org/1999/xhtml"; | 18 var html_ns = "http://www.w3.org/1999/xhtml"; |
| 19 elements_with_end_tag.forEach(function(ele) { | 19 elements_with_end_tag.forEach(function(ele) { |
| 20 test(function() { | 20 test(function() { |
| 21 var e = doc.createElementNS(html_ns, ele); | 21 var e = doc.createElementNS(html_ns, ele); |
| 22 assert_equals(e.outerHTML, | 22 assert_equals(e.outerHTML, |
| 23 `<${ele} xmlns="${html_ns}"></${ele}>`, | 23 `<${ele} xmlns="${html_ns}"></${ele}>`, |
| 24 ele + " node created." ); | 24 ele + " node created." ); |
| 25 }, "Node for " + ele); | 25 }, "Node for " + ele); |
| 26 }); | 26 }); |
| 27 elements_without_end_tag.forEach(function(ele) { | 27 elements_without_end_tag.forEach(function(ele) { |
| 28 test(function() { | 28 test(function() { |
| 29 var e = doc.createElementNS(html_ns, ele); | 29 var e = doc.createElementNS(html_ns, ele); |
| 30 assert_equals(e.outerHTML, | 30 assert_equals(e.outerHTML, |
| 31 `<${ele} xmlns="${html_ns}" />`, | 31 `<${ele} xmlns="${html_ns}" />`, |
| 32 ele + " node created." ); | 32 ele + " node created." ); |
| 33 }, "Node for " + ele); | 33 }, "Node for " + ele); |
| 34 }); | 34 }); |
| 35 }, document.title); | 35 }, document.title); |
| 36 </script> | 36 </script> |
| 37 </body> | 37 </body> |
| 38 </html> | 38 </html> |
| OLD | NEW |