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 536817 78353d7ea0c7cb8cce1d55003c824e8541b1caf8
parent 536816 b2d83712270e447f98668047f731f7a1a5b168e3
child 536818 19aa1a523a7e08bf57166235aae9d48fa8400fcc
push id119680
push userwptsync@mozilla.com
push dateTue, 23 Jun 2020 11:08:22 +0000
treeherderautoland@7ca3d4bada73 [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: