OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../js/resources/js-test-pre.js"></script> | 2 <script src="../../js/resources/js-test-pre.js"></script> |
3 <script> | 3 <script> |
4 var parser = new DOMParser(); | 4 var parser = new DOMParser(); |
5 var serializer = new XMLSerializer(); | 5 var serializer = new XMLSerializer(); |
6 var doc, newChild, fragment; | 6 var doc, newChild, fragment; |
7 | 7 |
8 function dumpDocument() { | 8 function dumpDocument() { |
9 debug(escapeHTML(serializer.serializeToString(doc)) + '<br>'); | 9 debug(escapeHTML(serializer.serializeToString(doc)) + '<br>'); |
10 } | 10 } |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 shouldNotThrow('doc.replaceChild(newChild, doc.doctype)'); | 70 shouldNotThrow('doc.replaceChild(newChild, doc.doctype)'); |
71 }); | 71 }); |
72 | 72 |
73 test('replacing element with doctype when an element already exists', functi
on() { | 73 test('replacing element with doctype when an element already exists', functi
on() { |
74 doc = parser.parseFromString('<!DOCTYPE html><body/>', 'text/xml'); | 74 doc = parser.parseFromString('<!DOCTYPE html><body/>', 'text/xml'); |
75 newChild = doc.implementation.createDocumentType('svg', '-//W3C//DTD SVG
1.1//EN', 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'); | 75 newChild = doc.implementation.createDocumentType('svg', '-//W3C//DTD SVG
1.1//EN', 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'); |
76 | 76 |
77 shouldThrow('doc.replaceChild(newChild, doc.documentElement)'); | 77 shouldThrow('doc.replaceChild(newChild, doc.documentElement)'); |
78 }); | 78 }); |
79 </script> | 79 </script> |
80 <script src="../../js/resources/js-test-post.js"></script> | |
OLD | NEW |