зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1854726 [wpt PR 42105] - Fix all-with-discrete transition test, a=testonly
Automatic update from web-platform-tests Fix all-with-discrete transition test Issues with the test: * TransitionStart was being tested before confirming that the animation was ready. The timing of when the animation is ready is UA dependent. * Waiting a single frame after starting the animation ensures the transtionstart event is queued, but event dispatch could be in the next frame We can avoid the timing nuances by simply querying all animations. The query itself forces a style update. The animation will be in a play-pending state at this point so the transitionstart has not had a chance to fire; however, we can verify that the animation is a CSSTransition for the expected property. This test still fails on Firefox, but that is due to not supporting "allow-discrete". The test passes reliably in Chrome. Bug: 1477833 Change-Id: I4360d7f66e25b5026a17d332a8f6a3af7482d2dc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4880561 Reviewed-by: Joey Arhar <jarhar@chromium.org> Commit-Queue: Kevin Ellis <kevers@chromium.org> Cr-Commit-Position: refs/heads/main@{#1199763} -- wpt-commits: 6e5d0de739160bf99505eea5381a1981f913a323 wpt-pr: 42105
This commit is contained in:
Родитель
7d2ef613ba
Коммит
257f478b64
|
@ -22,13 +22,11 @@
|
|||
|
||||
<script>
|
||||
promise_test(async () => {
|
||||
let transitionstartFired = false;
|
||||
target.addEventListener('transitionstart', () => {
|
||||
transitionstartFired = true;
|
||||
});
|
||||
await waitForAnimationFrames(2);
|
||||
target.classList.add('animated');
|
||||
await waitForAnimationFrames(1);
|
||||
assert_true(transitionstartFired);
|
||||
const anims = document.getAnimations();
|
||||
assert_equals(anims.length, 1,
|
||||
"Did not start a discrete-property transition");
|
||||
assert_equals(anims[0].transitionProperty, 'float');
|
||||
}, 'transition:all with transition-behavior:allow-discrete should animate discrete properties.');
|
||||
</script>
|
||||
|
|
Загрузка…
Ссылка в новой задаче