1
0
Fork 0
firefox/testing/web-platform/tests/svg/animations/animate-display-to-none-001.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

30 lines
1.1 KiB
HTML

<!doctype html>
<meta charset="utf-8">
<title>Test that underlying style gets restored when seeking away from the
'to' portion of a SVG/SMIL animation to 'display:none'</title>
<link rel="help" href="https://www.w3.org/TR/smil-animation/#ToAttribute">
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
<link rel="match" href="../struct/reftests/reference/green-100x100.html">
<script>
function go() {
svgElem.pauseAnimations();
/* Seek to 75% of the way through duration, when the animation should be
* imposing the "to" value. (This is necessary to trigger the bug
* that we're regression-testing for here.) */
svgElem.setCurrentTime(3);
/* Now, seek back to 25% of the way through duration, when the underlying
* value should be restored. This should make the green rect show up
* in our reftest screenshot. */
svgElem.setCurrentTime(1);
}
</script>
<body onload="go()">
<svg id="svgElem">
<rect width="100" height="100" fill="red"/>
<rect width="100" height="100" fill="green">
<animate attributeName="display" to="none"
begin="0s" dur="4s"/>
</rect>
</svg>