Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to freeze timeline clock for testing #634

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ewilligers
Copy link
Contributor

Players may have non-zero start time, and/or playback rates other than
one. As noted in https://github.com/web-animations/web-animations-js/issues/628, calling document.timeline._pauseAnimationsForTesting
with the current timeline time will change such players' currentTime, and
will change the animated elements' computed style.

We implement a new testing method _freezeClockForTesting that avoids
changing any of the players, it simply freezes the timeline's
currentTime to the supplied time.

Players may have non-zero start time, and/or playback rates other than
one. As noted in Issue web-animations#628, calling
document.timeline._pauseAnimationsForTesting with the current timeline
time will change such players' currentTime, and will change the animated
elements' computed style.

We implement a new testing method _freezeClockForTesting that avoids
changing any of the players, it simply freezes the timeline's
currentTime to the supplied time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants