Skip to content

Commit

Permalink
Fix Flaky Composite Order test
Browse files Browse the repository at this point in the history
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
  • Loading branch information
shengha2 authored and chromium-wpt-export-bot committed Mar 12, 2020
1 parent 413a5f5 commit 2837765
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions css/css-animations/CSSAnimation-compositeOrder.tentative.html
Expand Up @@ -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.");
Expand Down

0 comments on commit 2837765

Please sign in to comment.