From 28377651797b5ca4221285040bc46f9eb8e29ecb Mon Sep 17 00:00:00 2001 From: haozhe Date: Wed, 11 Mar 2020 19:10:59 -0700 Subject: [PATCH] Fix Flaky Composite Order test This patch fix the flakiness in getting running-animation order by making sure the animation is running before we make a measurement. This test passed all 500 repeated run. Bug:1060216 Change-Id: I8b271e1e0d31dac0203aa3a7bb3359f7f1d1eec6 --- css/css-animations/CSSAnimation-compositeOrder.tentative.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/css/css-animations/CSSAnimation-compositeOrder.tentative.html b/css/css-animations/CSSAnimation-compositeOrder.tentative.html index ee204db792666f1..d55db9a2d117f54 100644 --- a/css/css-animations/CSSAnimation-compositeOrder.tentative.html +++ b/css/css-animations/CSSAnimation-compositeOrder.tentative.html @@ -42,9 +42,9 @@ const animA = div.animate({margin: ["100px","100px"]}, 100000); assert_equals(getComputedStyle(div).marginLeft, '100px'); div.style.animation = 'margin50 100s'; - assert_equals(getComputedStyle(div).marginLeft, '50px'); // Wait for animation starts - await waitForAnimationFrames(2); + await animA.ready; + await waitForAnimationFrames(1); assert_equals(getComputedStyle(div).marginLeft, '100px', "A higher-priority animation is not overriden by a more recent" + "one.");