- From: Olga Gerchikov via GitHub <sysbot+gh@w3.org>
- Date: Mon, 11 May 2020 20:03:46 +0000
- To: public-css-archive@w3.org
Here are the failing tests you requested.
- reverse() example:
```
promise_test(async t => {
const animation = createScrollLinkedAnimation(t); // duration: 1000
// Wait for new animation frame which allows the timeline to compute new
// current time.
await waitForNextFrame();
animation.play();
animation.currentTime = 2000;
// play() invoked by reverse() sets start time to 1000 based on the
// effective playback rate, which is -1.
animation.reverse();
// This fails. Current time is calculated based on playback rate, which is 1.
assert_equals(animation.currentTime, 1000,
'reverse() should start playing from the animation effect end ' +
'if the playbackRate > 0 and the currentTime > effect end');
}, 'Reversing an animation when playbackRate > 0 and currentTime > ' +
'effect end should make it play from the end');
```
- Re-playing finished animation
```
promise_test(async t => {
const animation = createScrollLinkedAnimation(t); // duration: 1000
// Wait for new animation frame which allows the timeline to compute new
// current time.
await waitForNextFrame();
animation.play();
animation.finish();
assert_time_equals_literal(animation.currentTime, 1000);
animation.play();
// This fails. Finished animation has both start and hold time set.
// Start time is initialized to zero, but later it's cleared since the hold time is set.
assert_time_equals_literal(animation.currentTime, 0);
}, 'Playing a finished animation seeks back to the start');
```
--
GitHub Notification of comment by ogerchikov
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/pull/5059#issuecomment-626928324 using your GitHub account
Received on Monday, 11 May 2020 20:04:35 UTC