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
[css-transitions-2] Make null-effect test properly wait for the transition to start #18457
[css-transitions-2] Make null-effect test properly wait for the transition to start #18457
Conversation
…ition to start Previously this test would just rAF a single frame and assume that the transition had started and that the 'left' had changed. Instead, this PR changes the test to explicitly wait for 'left' to change, so that we can be sure the transition has started before we interrupt it.
Hey Brian, PTAL. Interestingly the test before this one, "After setting a transition's effect to null, a new transition can be started", also fails on Firefox. This appears to be because there's a difference in expectations between Chrome and Firefox as to what the new transition's 'from' value should be. If one adds a few rAFs at the end of the test, you can see the difference more clearly: Chrome: FAIL After setting a transition's effect to null, a new transition can be started assert_equals: expected "0px" but got "0.0813531px" Firefox: FAIL After setting a transition's effect to null, a new transition can be started assert_equals: expected "0px" but got "100.033px" So Chrome is starting the new transition from 0, whereas Firefox starts it from 100px. I would suspect Firefox is correct, but haven't checked the spec yet. |
There are no reviewers for this pull request. Please reach out on W3C's irc server (irc.w3.org, port 6665) on channel #testing (web client) to get help with this. Thank you! |
Looks good. Thanks!
Yeah, I agree, I'm pretty sure it should start from 100px. Perhaps Chrome doesn't flush style for one of the calls to Are you able to check what Chrome is doing and fix the test if necessary? |
Yes, I'll look into this. |
Having looked into it briefly, I believe this should be fixed by Kevin's in-progress refactor of our Animation class to (more) properly match the spec: https://chromium-review.googlesource.com/c/chromium/src/+/1739386 . So I'm going to wait for that to land and verify once it has done so. |
Ok, thanks @stephenmcgruer! |
…ition to start (web-platform-tests#18457) Previously this test would just rAF a single frame and assume that the transition had started and that the 'left' had changed. Instead, this PR changes the test to explicitly wait for 'left' to change, so that we can be sure the transition has started before we interrupt it.
Previously this test would just rAF a single frame and assume that the
transition had started and that the 'left' had changed. Instead, this PR
changes the test to explicitly wait for 'left' to change, so that we can
be sure the transition has started before we interrupt it.