OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <svg> | 2 <svg> |
3 <marker id="a" markerWidth="2" markerHeight="2" refX="1" refY="1"> | 3 <marker id="a" markerWidth="2" markerHeight="2" refX="1" refY="1"> |
4 <rect width="2" height="2" fill="red"/> | 4 <rect width="2" height="2" fill="red"/> |
5 </marker> | 5 </marker> |
6 <marker id="b" markerWidth="2" markerHeight="2" refX="1" refY="1"> | 6 <marker id="b" markerWidth="2" markerHeight="2" refX="1" refY="1"> |
7 <rect width="2" height="2" fill="green"/> | 7 <rect width="2" height="2" fill="green"/> |
8 </marker> | 8 </marker> |
9 <line stroke-width="50" stroke="red" y1="50" x2="50" y2="50"> | 9 <line stroke-width="50" stroke="red" y1="50" x2="50" y2="50"> |
10 <animate attributeName="marker-end" fill="freeze" dur="10s" values="url(#a);
url(#b)"/> | 10 <animate attributeName="marker-end" fill="freeze" dur="10s" values="url(#a);
url(#b)"/> |
11 </line> | 11 </line> |
12 </svg> | 12 </svg> |
13 <script> | 13 <script> |
14 if (window.testRunner) | 14 if (window.testRunner) |
15 testRunner.waitUntilDone(); | 15 testRunner.waitUntilDone(); |
16 // Advance the timeline to just before the value transition, then wait | 16 // Advance the timeline to just before the value transition, then wait |
17 // for two frames (first red, second green.) | 17 // for two frames (first red, second green.) |
18 // NOTE: Because of "legacy" in the animation engine, we first wait for 25ms, | 18 // NOTE: Because of "legacy" in the animation engine, we first wait for 25ms, |
19 // since no updates will be performed prior to that. Without this the two rAF | 19 // since no updates will be performed prior to that. Without this the two rAF |
20 // calls ought to be enough. | 20 // calls ought to be enough. |
21 document.querySelector('svg').setCurrentTime(5 - 0.001); | 21 document.querySelector('svg').setCurrentTime(5 - 0.001); |
22 onload = function() { | 22 onload = function() { |
23 setTimeout(function() { | 23 setTimeout(function() { |
24 requestAnimationFrame(function() { | 24 setTimeout(function() { |
25 requestAnimationFrame(function() { | 25 requestAnimationFrame(function() { |
26 testRunner.notifyDone(); | 26 requestAnimationFrame(function() { |
| 27 testRunner.notifyDone(); |
| 28 }); |
27 }); | 29 }); |
28 }); | 30 }, 25); |
29 }, 25); | 31 }); |
30 }; | 32 }; |
31 </script> | 33 </script> |
OLD | NEW |