blob: ca57c2f6453884873e32592a238be147cb222e72 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Test that the first element can end while others continue without crashing, and the second
can end and remain frozen. Also test that a third element can animate after the second has ended
but that the result is still to return to the second animation's freeze position. -->
<rect x='0' y='0' width='50' height='50' fill='green'>
<animate id="an1" attributeName='x' from='0' to='100' begin='0s' dur='1s' />
<animate id="an2" attributeName='x' from='200' to='250' begin='1.5s' dur='1s' fill='freeze' />
<animate id="an3" attributeName='x' from='50' to='0' begin='2.5s' dur='0.5s' />
</rect>
<!-- Test that a second element can take priority over the first from 0-1s, then
test that the first element can animate for 1s, and finally test that the
second element can once again animate after the first has ended. After all
animations end, test that they are removed and the rect returns to its home. -->
<rect x='200' y='75' width='50' height='50' fill='green'>
<animate id="an4" attributeName='x' from='0' to='10' begin='1s' dur='1s'/>
<animate id="an5" attributeName='x' from='100' to='0' begin='0s' dur='2.5s'/>
</rect>
<!-- Test that a repeating animation can take priority over another animation, and that the
end state is the second animation's freeze value. Also test that, after a pause, a third
animation can take over and have its freeze value satisfied at the end. -->
<rect x='0' y='150' width='50' height='50' fill='green'>
<animate id="an6" attributeName='x' from='200' to='240' begin='0s' dur='2s' fill='freeze'/>
<animate id="an7" attributeName='x' from='0' to='5' begin='1s' dur='0.1s' repeatCount="5" fill='freeze'/>
<animate id="an8" attributeName='x' from='250' to='150' begin='3s' dur='1s' fill='freeze'/>
</rect>
<!-- Test that 4 animations can animate a rect in 20px 'steps' and that correct freeze values are
honored even though the animation elements are specified in non-sequential order. Also test
that two repeating animations (active for only a short duration) only momentarily
affect the overall animation and are correctly removed. -->
<rect x='0' y='225' width='50' height='50' fill='green'>
<animate id="an9" attributeName='x' from='200' to='250' begin='1.6s' dur='0.1s' repeatCount="2" fill='remove'/>
<animate id="anA" attributeName='x' from='160' to='180' begin='3s' dur='0.5s' fill='freeze'/>
<animate id="anB" attributeName='x' from='110' to='130' begin='2s' dur='0.5s' fill='freeze'/>
<animate id="anC" attributeName='x' from='10' to='30' begin='0s' dur='0.5s' fill='freeze'/>
<animate id="anD" attributeName='x' from='60' to='80' begin='1s' dur='0.5s' fill='freeze'/>
<animate id="anE" attributeName='x' from='200' to='250' begin='3.6s' dur='0.1s' repeatCount="2" fill='remove'/>
</rect>
</svg>