mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 07:05:24 +00:00
Bug 1153463 - Intermittent browser_animation_setting_currentTime_works_and_pauses.js. r=miker
The failing test was rewinding a player and expecting it to pause at 0. But rewing first pauses (async) and then sets the time (async), and the test was only waiting for the player to pause. With this change, we now also wait until the time is the expected one. --HG-- extra : transplant_source : %23BU%CB%F3%3A%A8%226hWIw%E8VI%3A%94%A4V
This commit is contained in:
parent
2411ce480f
commit
5aebb401b0
@ -362,7 +362,9 @@ function waitForPlayState(player, playState) {
|
||||
let checkPausedAt = Task.async(function*(widget, time) {
|
||||
info("Wait for the next auto-refresh");
|
||||
|
||||
yield waitForPlayState(widget.player, "paused");
|
||||
yield waitForStateCondition(widget.player, state => {
|
||||
return state.playState === "paused" && state.currentTime === time;
|
||||
}, "Waiting for animation to pause at " + time + "ms");
|
||||
|
||||
ok(widget.el.classList.contains("paused"), "The widget is in paused mode");
|
||||
is(widget.player.state.currentTime, time,
|
||||
|
Loading…
Reference in New Issue
Block a user