Index: LayoutTests/svg/custom/use-referencing-animation-crash.html |
diff --git a/LayoutTests/svg/custom/use-referencing-animation-crash.html b/LayoutTests/svg/custom/use-referencing-animation-crash.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7fd17f2dcafa072115683f9c1c6932c64610a16d |
--- /dev/null |
+++ b/LayoutTests/svg/custom/use-referencing-animation-crash.html |
@@ -0,0 +1,35 @@ |
+<!DOCTYPE html> |
+<svg> |
+ <set id='cssPropAnim' xlink:href='#cssPropAnim' attributeName='fill' to='gold'></set> |
+ <rect id='someRect'><animate></animate></rect> |
+ <use clip-path='url(#someRect)' xlink:href='#cssPropAnim'></use> |
+</svg> |
+<p>PASS if no crash in debug.</p> |
+<script> |
+if (window.testRunner) { |
+ testRunner.dumpAsText(); |
+ testRunner.waitUntilDone(); |
+} |
+function completionTrigger() { |
+ var set = document.createElementNS('http://www.w3.org/2000/svg', 'set'); |
+ set.setAttribute('attributeName', 'x'); |
+ set.setAttribute('to', '0'); |
+ set.onbegin = function() { |
+ if (window.testRunner) |
+ testRunner.notifyDone(); |
+ }; |
+ return set; |
+} |
+var root = document.getElementsByTagName('svg')[0]; |
+root.pauseAnimations(); |
+ |
+onload = function () { |
+ requestAnimationFrame(function() { |
+ setTimeout(function() { |
+ root.style.zoom = 2; |
+ root.appendChild(document.getElementById('someRect').cloneNode(true)); |
+ root.appendChild(completionTrigger()); |
+ }, 0); |
+ }); |
+} |
+</script> |