OLD | NEW |
---|---|
(Empty) | |
1 <script src="../../resources/js-test.js"></script> | |
esprehn
2014/05/23 04:38:17
Missing <!DOCTYPE html>
kouhei (in TOK)
2014/05/23 07:17:15
Done.
| |
2 <script> | |
3 jsTestIsAsync = true; | |
4 description("Removing animated use target indirectly from the document should no t cause crash."); | |
5 | |
6 function loadedSVGToBeMoved() | |
7 { | |
8 debug("loaded SVG to be moved"); | |
9 | |
10 moveFromOtherToLocal(); | |
11 } | |
12 | |
13 var count = 0; | |
14 function moveFromOtherToLocal() | |
15 { | |
16 if (++count > 3) | |
17 finishJSTest(); | |
18 | |
19 var source = document.getElementById("otherWindow").contentDocument; | |
20 var defs = source.getElementById("defs"); | |
21 | |
22 var target = document.getElementById("localWindow"); | |
23 target.appendChild(defs); | |
24 | |
25 debug("other -> local"); | |
26 | |
27 setTimeout(moveFromLocalToOther, 0); | |
esprehn
2014/05/23 04:38:17
What are you waiting for? I think you want request
kouhei (in TOK)
2014/05/23 07:17:15
Done.
| |
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 | |
40 setTimeout(moveFromOtherToLocal, 0); | |
esprehn
2014/05/23 04:38:17
setTimeout is suspect, you probably want something
kouhei (in TOK)
2014/05/23 07:17:15
Done.
| |
41 } | |
42 </script> | |
43 <iframe id="otherWindow" src="resources/svg-with-animate-use.svg" onload="loaded SVGToBeMoved()"></iframe> | |
44 <svg id="localWindow"> | |
45 <use xlink:href="#template" /> | |
46 </svg> | |
47 <p>Test pass if no crash.</p> | |
OLD | NEW |