Index: LayoutTests/svg/animations/animate-restart-never.html |
diff --git a/LayoutTests/svg/animations/animate-restart-never.html b/LayoutTests/svg/animations/animate-restart-never.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3760961145a5fb14aa1eed6ae05e02e403c74ca0 |
--- /dev/null |
+++ b/LayoutTests/svg/animations/animate-restart-never.html |
@@ -0,0 +1,51 @@ |
+<!DOCTYPE html> |
+<head> |
fs
2015/05/04 14:46:51
Not needed.
|
+<script> |
+if (window.testRunner) |
+ testRunner.waitUntilDone(); |
+ |
+function animateTest() |
+{ |
+ var rect = document.getElementById('rect'); |
+ var anim = document.getElementById('anim'); |
+ var actions = [ |
+ function() { |
+ rect.setAttribute("fill", "green"); |
fs
2015/05/04 14:46:51
I'm not quite sure why you'd need this.
Shanmuga Pandi
2015/05/04 15:21:31
As you said earlier, Green color should be used fo
fs
2015/05/04 15:37:11
Yes, but why not just set on the <rect> in the con
Shanmuga Pandi
2015/05/05 06:53:26
Done.
|
+ anim.setAttribute("from", "green"); |
+ anim.setAttribute("to", "red"); |
fs
2015/05/04 14:46:51
The element already have these set?
Shanmuga Pandi
2015/05/04 15:21:31
I will remove this.
|
+ anim.setAttribute("fill", "freeze"); |
fs
2015/05/04 14:46:51
Set this on the element in the content instead.
Shanmuga Pandi
2015/05/04 15:21:31
If I added into this content, then it is really di
fs
2015/05/04 15:37:11
I'd say that either you need fill=freeze or you do
Shanmuga Pandi
2015/05/05 06:53:25
Acknowledged.
|
+ }, |
+ function() { |
+ anim.beginElement(); |
+ }, |
+ function() { |
+ if (window.testRunner) |
+ testRunner.notifyDone(); |
+ }, |
+ ]; |
+ |
+ function nextAction() { |
fs
2015/05/04 14:46:51
Just drop this whole mechanism - it's overkill for
Shanmuga Pandi
2015/05/04 15:21:31
I will try this as you commented.
|
+ var f = actions.shift(); |
+ if (!f) |
+ return; |
+ f(); |
+ setTimeout(nextAction,50); |
+ } |
+ setTimeout(nextAction,50); |
+} |
+</script> |
+</head> |
+<body onload="animateTest()"> |
fs
2015/05/04 14:46:51
Could set onload within <script> instead, and then
|
+<svg height="200" width="200"> |
+ <rect id="rect" width="100px" height="100px" fill="red"/> |
+ <animate id="anim" xlink:href="#rect" |
fs
2015/05/04 14:46:51
Just make this element a child of the <rect> and d
Shanmuga Pandi
2015/05/05 06:53:25
Done.
|
+ begin="0s" |
+ dur="0.01s" |
fs
2015/05/04 14:46:51
I get a suspicion that this will be flaky.
Shanmuga Pandi
2015/05/05 06:53:26
Acknowledged.
|
+ attributeType="xml" |
fs
2015/05/04 14:46:51
This doesn't looked necessary.
Shanmuga Pandi
2015/05/05 06:53:26
Done.
|
+ attributeName="fill" |
+ from="green" to="red" |
+ repeatCount="1" |
fs
2015/05/04 14:46:51
Nor this.
Shanmuga Pandi
2015/05/05 06:53:26
Done.
|
+ restart="never"/> |
+</svg> |
+</body> |
+</html> |