| Index: LayoutTests/svg/dom/remove-use-target-element-indirectly.html
|
| diff --git a/LayoutTests/svg/dom/remove-use-target-element-indirectly.html b/LayoutTests/svg/dom/remove-use-target-element-indirectly.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e7fb1cb7138472780ae6db6989c9f954d3b3c944
|
| --- /dev/null
|
| +++ b/LayoutTests/svg/dom/remove-use-target-element-indirectly.html
|
| @@ -0,0 +1,46 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/js-test.js"></script>
|
| +<script>
|
| +jsTestIsAsync = true;
|
| +description("Removing animated use target indirectly from the document should not cause crash.");
|
| +
|
| +function loadedSVGToBeMoved()
|
| +{
|
| + debug("loaded SVG to be moved");
|
| +
|
| + moveFromOtherToLocal();
|
| +}
|
| +
|
| +var count = 0;
|
| +function moveFromOtherToLocal()
|
| +{
|
| + if (++count > 3)
|
| + finishJSTest();
|
| +
|
| + var source = document.getElementById("otherWindow").contentDocument;
|
| + var defs = source.getElementById("defs");
|
| +
|
| + var target = document.getElementById("localWindow");
|
| + target.appendChild(defs);
|
| +
|
| + debug("other -> local");
|
| + window.requestAnimationFrame(moveFromLocalToOther);
|
| +}
|
| +
|
| +function moveFromLocalToOther()
|
| +{
|
| + var source = document.getElementById("localWindow");
|
| + var defs = source.getElementById("defs");
|
| +
|
| + var target = document.getElementById("otherWindow").contentDocument.documentElement;
|
| + target.appendChild(defs);
|
| +
|
| + debug("local -> other");
|
| + window.requestAnimationFrame(moveFromOtherToLocal);
|
| +}
|
| +</script>
|
| +<iframe id="otherWindow" src="resources/svg-with-animate-use.svg" onload="loadedSVGToBeMoved()"></iframe>
|
| +<svg id="localWindow">
|
| + <use xlink:href="#template" />
|
| +</svg>
|
| +<p>Test pass if no crash.</p>
|
|
|