Bug 1645881 [wpt PR 24154] - Fix timing of when transition generation is updated, a=testonly
authorKevin Ellis <kevers@chromium.org>
Mon, 22 Jun 2020 10:40:20 +0000
changeset 536800 78353d7ea0c7cb8cce1d55003c824e8541b1caf8
parent 536799 b2d83712270e447f98668047f731f7a1a5b168e3
child 536801 19aa1a523a7e08bf57166235aae9d48fa8400fcc
push id37533
push userdluca@mozilla.com
push dateTue, 23 Jun 2020 21:38:40 +0000
treeherdermozilla-central@d48aa0f0aa0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1645881, 24154, 1095105, 2246924, 778503
milestone79.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1645881 [wpt PR 24154] - Fix timing of when transition generation is updated, a=testonly Automatic update from web-platform-tests Fix timing of when transition generation is updated Previously, the transition generation was updated when an ontransition event was generated; however, this timing is too late since a transition created after a style flush should be in a new transition generation even if in the same animation frame. Bug: 1095105 Change-Id: Ibf90a68b8f57357f3e26a98af7e10ee0d63b4bbc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2246924 Reviewed-by: Xida Chen <xidachen@chromium.org> Commit-Queue: Kevin Ellis <kevers@chromium.org> Cr-Commit-Position: refs/heads/master@{#778503} -- wpt-commits: 5a7701e9361d47708f6ebba417620ffaf8e11311 wpt-pr: 24154
testing/web-platform/tests/css/css-transitions/Document-getAnimations.tentative.html
--- a/testing/web-platform/tests/css/css-transitions/Document-getAnimations.tentative.html
+++ b/testing/web-platform/tests/css/css-transitions/Document-getAnimations.tentative.html
@@ -67,24 +67,25 @@ promise_test(async t => {
   div.style.left = '100px';
 
   var animations = document.getAnimations();
   assert_equals(animations.length, 2,
                 'getAnimations returns two running CSS Transitions');
   assert_equals(animations[0].transitionProperty, 'left');
   assert_equals(animations[1].transitionProperty, 'top');
 
-  await waitForAnimationFrames(2);
-
+  // Add one more transition. As the previous call to getAnimations triggered a
+  // style change, the new animation is in a higher transition generation even
+  // though no frame was rendered for the previous transitions.
   div.style.opacity = '1'
   div.style.transition = 'all 100s';
   div.style.opacity = '0'
   animations = document.getAnimations();
   assert_equals(animations.length, 3,
-                'getAnimations returns two running CSS Transitions');
+                'getAnimations returns three running CSS Transitions');
   assert_equals(animations[0].transitionProperty, 'left', '1');
   assert_equals(animations[1].transitionProperty, 'top', '2');
   assert_equals(animations[2].transitionProperty, 'opacity', '3');
 }, 'getAnimations for CSS Transitions sort by transition generation');
 
 function pseudoTest(description, testMarkerPseudos) {
   test(t => {
     // Create two divs with the following arrangement: