| OLD | NEW |
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../fast/js/resources/js-test-pre.js"></script> | 4 <script src="../../fast/js/resources/js-test-pre.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <script> | 7 <script> |
| 8 description("This test ensures that tree mutation on the load doesn't break cons
istency."); | 8 description("This test ensures that tree mutation on the load doesn't break cons
istency."); |
| 9 var invoked = false; | 9 var invoked = false; |
| 10 var spanElement = document.createElementNS("http://www.w3.org/1999/xhtml", "span
"); | 10 var spanElement = document.createElementNS("http://www.w3.org/1999/xhtml", "span
"); |
| 11 var divElement = document.createElementNS("http://www.w3.org/1999/xhtml", "div")
; | 11 var divElement = document.createElementNS("http://www.w3.org/1999/xhtml", "div")
; |
| 12 var useElement = document.createElementNS("http://www.w3.org/2000/svg", "use"); | 12 var useElement = document.createElementNS("http://www.w3.org/2000/svg", "use"); |
| 13 var emptyDocument = document.implementation.createDocument("", "", null); | 13 var emptyDocument = document.implementation.createDocument("", "", null); |
| 14 | 14 |
| 15 document.body.appendChild(spanElement); | 15 document.body.appendChild(spanElement); |
| 16 divElement.appendChild(useElement); | 16 divElement.appendChild(useElement); |
| 17 useElement.addEventListener("load", function () { emptyDocument.adoptNode(useEle
ment); invoked = true; }, false); | 17 useElement.addEventListener("load", function () { emptyDocument.adoptNode(useEle
ment); invoked = true; }, false); |
| 18 spanElement.appendChild(divElement); | 18 spanElement.appendChild(divElement); |
| 19 document.body.appendChild(useElement); | 19 document.body.appendChild(useElement); |
| 20 shouldBeFalse("invoked"); | 20 shouldBeFalse("invoked"); |
| 21 | 21 |
| 22 jsTestIsAsync = true; | 22 jsTestIsAsync = true; |
| 23 setTimeout(function() { | 23 setTimeout(function() { |
| 24 shouldBeTrue("invoked"); | 24 shouldBeTrue("invoked"); |
| 25 finishJSTest(); | 25 finishJSTest(); |
| 26 }, 1); | 26 }, 1); |
| 27 | 27 |
| 28 </script> | 28 </script> |
| 29 <script src="../../fast/js/resources/js-test-post.js"></script> | |
| 30 <body> | 29 <body> |
| 31 </html> | 30 </html> |
| OLD | NEW |