blob: 097c6649fa7ea2a92cd3ab7e8432d4fd641e4b47 [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<!--
Test for WK81350: setCurrentTime() should work when animation is paused.
-->
<body>
<svg id="svg" width="400" height="400">
<rect id="rect" x="0" y="0" width="100" height="100" fill="green">
<animate attributeName="x" from="200" to="400" begin="0s" dur="4s" />
</rect>
</svg>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
}
var svg = document.getElementById("svg");
var rect = document.getElementById("rect");
svg.pauseAnimations();
setTimeout(function() {
svg.setCurrentTime(4);
svg.unpauseAnimations();
setTimeout(function() {
if (rect.x.animVal.value == 0)
document.body.innerHTML = "PASS";
else
document.body.innerHTML = "FAIL : rect.x.animVal.value was " + rect.x.animVal.value + " but we expected 0.";
if (window.testRunner)
testRunner.notifyDone();
}, 1);
}, 50);
</script>
</body>
</html>