Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Unified Diff: LayoutTests/svg/dom/remove-use-target-element-indirectly.html

Issue 298873003: SVG: SVGAnimateElement should not cache |m_animatedElements| (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove_unused_line Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..e5e1059ddc5dcbb80421a39e29f7364ba1855eec
--- /dev/null
+++ b/LayoutTests/svg/dom/remove-use-target-element-indirectly.html
@@ -0,0 +1,47 @@
+<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.
+<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");
+
+ 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.
+}
+
+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");
+
+ 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.
+}
+</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>

Powered by Google App Engine
This is Rietveld 408576698