Commit 14e6cce5 authored by Kevin Ellis's avatar Kevin Ellis Committed by Commit Bot

Fix flakiness of pausing-an-animation test.

The test had a strict inequality test for current time based on the
fact that the ready promise is typically received in the next frame
after the compositor has paused the animation. However, the test is
validating that the updated playback rate does not take effect too
early, which would result in a big change to current time. Changing
the assert from > to >= still validates what the test was designed for
and accommodates some variability in the delivery time of the ready
promise. The spec does not state that the time must advance before the
ready promise is delivered, just that the animation client must
acknowledge that it is ready.

Bug: 997149
Change-Id: I1a0a5d889d6f8270560c9d4ec8e9de94b429e855
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1773718Reviewed-by: default avatarStephen McGruer <smcgruer@chromium.org>
Commit-Queue: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691138}
parent 5d4eb085
......@@ -4745,7 +4745,6 @@ crbug.com/785230 [ Mac ] external/wpt/css/css-text-decor/text-decoration-skip-in
crbug.com/785230 [ Win ] external/wpt/css/css-text-decor/text-decoration-skip-ink-vertical-001.html [ Failure ]
crbug.com/912362 external/wpt/web-animations/timing-model/timelines/timelines.html [ Failure ]
crbug.com/997149 external/wpt/web-animations/timing-model/animations/pausing-an-animation.html [ Pass Failure ]
# Decoding test timeout on Win7. Marked flaky to get imported in case it's flaky timeout everywhere.
crbug.com/862938 external/wpt/encoding/textdecoder-fatal-single-byte.any.worker.html [ Pass Timeout ]
......
......@@ -66,8 +66,8 @@ promise_test(async t => {
await animation.ready;
// If the current time was updated using the new playback rate it will jump
// back to 25s but if we correctly used the old playback rate the current time
// will be > 50s.
assert_greater_than(animation.currentTime, 50 * MS_PER_SEC);
// will be >= 50s.
assert_greater_than_equal(animation.currentTime, 50 * MS_PER_SEC);
}, 'A pause-pending animation maintains the current time when applying a'
+ ' pending playback rate');
......
This is a testharness.js-based test.
PASS Pausing clears the start time
PASS Aborting a pause preserves the start time
PASS A pending ready promise should be resolved and not replaced when the animation is paused
FAIL A pause-pending animation maintains the current time when applying a pending playback rate assert_greater_than: expected a number greater than 50000 but got 50000
PASS The animation's current time remains fixed after pausing
Harness: the test ran to completion.
This is a testharness.js-based test.
PASS Pausing clears the start time
PASS Aborting a pause preserves the start time
PASS A pending ready promise should be resolved and not replaced when the animation is paused
FAIL A pause-pending animation maintains the current time when applying a pending playback rate assert_greater_than: expected a number greater than 50000 but got 50000
PASS The animation's current time remains fixed after pausing
Harness: the test ran to completion.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment