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

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 more asserts 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
« no previous file with comments | « no previous file | LayoutTests/svg/dom/remove-use-target-element-indirectly-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | LayoutTests/svg/dom/remove-use-target-element-indirectly-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698