3 <html class=
"reftest-wait">
5 <title>Infinite duration animation
</title>
6 <link rel=
"match" href=
"infinite-duration-animation-ref.html">
7 <script src=
"/common/reftest-wait.js"></script>
8 <script src=
"../../testcommon.js"></script>
11 border:
1px solid white;
36 <div id=
"box-1"></div>
37 <div id=
"box-2"></div>
39 This test creates an infinite duration animations, which should be stuck at
40 a progress of
0. If any blue pixels appear in the screenshot, the test
45 onload
= async
function() {
46 // Double rAF to ensure that we are not bogged down during initialization
47 // and the compositor is ready.
48 waitForAnimationFrames(2).then(() => {
49 const elem
= document
.getElementById('box-1');
51 { transform
: 'translateX(0px)' },
52 { transform
: 'translateX(100px)' }
55 new KeyframeEffect(elem
, keyframes
,
56 {iterations
: 3, duration
: Infinity
});
57 const animation
= new Animation(effect
);
59 animation
.ready
.then(() => {
60 takeScreenshotDelayed(100);