blob: d225a2a44529e6048f3a81714f702eadcaa424c2 [file] [log] [blame]
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<svg>
<stop id="target" offset="1"/>
</svg>
<script>
var asyncHandle = async_test('SVG Attributes should return to their base values after animations have stopped applying.');
var animation = target.animate([
{'svg-offset': '0'},
{'svg-offset': '0.5'},
], 1000);
animation.pause();
animation.currentTime = 500;
requestAnimationFrame(() => {
asyncHandle.step(() => {
assert_equals(target.offset.animVal, 0.25, 'Animation is in effect.');
});
animation.cancel();
requestAnimationFrame(() => {
asyncHandle.step(() => {
assert_equals(target.offset.animVal, 1, 'Animation is no longer in effect.');
});
asyncHandle.done();
});
});
</script>