Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <script src="../../resources/js-test.js"></script> | |
| 3 <script> | |
| 4 jsTestIsAsync = true; | |
| 5 description("Removing animated use target indirectly from the document should no t cause crash."); | |
| 6 | |
| 7 function loadedSVGToBeMoved() | |
| 8 { | |
| 9 debug("loaded SVG to be moved"); | |
| 10 | |
| 11 moveFromOtherToLocal(); | |
| 12 } | |
| 13 | |
| 14 var count = 0; | |
| 15 function moveFromOtherToLocal() | |
| 16 { | |
| 17 if (++count > 3) | |
| 18 finishJSTest(); | |
| 19 | |
| 20 var source = document.getElementById("otherWindow").contentDocument; | |
| 21 var defs = source.getElementById("defs"); | |
| 22 | |
| 23 var target = document.getElementById("localWindow"); | |
| 24 target.appendChild(defs); | |
| 25 | |
| 26 debug("other -> local"); | |
| 27 window.requestAnimationFrame(moveFromLocalToOther); | |
| 28 } | |
| 29 | |
| 30 function moveFromLocalToOther() | |
| 31 { | |
| 32 var source = document.getElementById("localWindow"); | |
| 33 var defs = source.getElementById("defs"); | |
| 34 | |
| 35 var target = document.getElementById("otherWindow").contentDocument.document Element; | |
| 36 target.appendChild(defs); | |
| 37 | |
| 38 debug("local -> other"); | |
| 39 window.requestAnimationFrame(moveFromOtherToLocal); | |
| 40 } | |
| 41 </script> | |
| 42 <iframe id="otherWindow" src="resources/svg-with-animate-use.svg" onload="loaded SVGToBeMoved()"></iframe> | |
| 43 <svg id="localWindow"> | |
| 44 <use xlink:href="#template" /> | |
|
pdr.
2014/05/24 06:13:07
Is this needed?
kouhei (in TOK)
2014/05/26 03:44:58
Yes. The element w/ id #template will be |appendCh
| |
| 45 </svg> | |
| 46 <p>Test pass if no crash.</p> | |
| OLD | NEW |