Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

SVG Preview (Scaled)

Preview of https://hg.mozilla.org/mozilla-central/raw-file/tip/testing/web-platform/tests/svg/animations/animate-rewind-freeze-indefinite.svg
<svg class="reftest-wait" xmlns="http://www.w3.org/2000/svg"
<html:script src="/common/reftest-wait.js"/>
<html:script src="/common/rendering-utils.js"/>
<html:link rel="match" href="reference/green-100x100.svg"/>
<rect width="100" height="100" fill="yellow">
<animate id="anim" attributeName="fill" to="green" dur="1s" begin="indefinite" fill="freeze"/>
</rect>
<script>
let anim = document.getElementById("anim");
anim.beginElement();
document.documentElement.pauseAnimations();
waitForAtLeastOneFrame().then(() => {
document.documentElement.setCurrentTime(1);
waitForAtLeastOneFrame().then(() => {
document.documentElement.setCurrentTime(0);
document.documentElement.setCurrentTime(1);
waitForAtLeastOneFrame().then(takeScreenshot);
});
});
</script>
</svg>