Bug 927349 part 27 - Make DevTools actor wait on ready promise when playing; r=pbrosset

This commit is contained in:
Brian Birtles 2014-12-25 16:28:25 +09:00
Родитель aa18819813
Коммит 17a2e4daea
2 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -178,6 +178,7 @@ let AnimationPlayerActor = ActorClass({
*/ */
play: method(function() { play: method(function() {
this.player.play(); this.player.play();
return this.player.ready;
}, { }, {
request: {}, request: {},
response: {} response: {}

Просмотреть файл

@ -38,8 +38,11 @@ function* playStateIsUpdatedDynamically(walker, front) {
let [player] = yield front.getAnimationPlayersForNode(node); let [player] = yield front.getAnimationPlayersForNode(node);
is(player.initialState.playState, "running", // Bug 1113091 - We should wait for the player to become ready then
"The playState is running while the transition is running"); // test for the "running" state only
ok(player.initialState.playState == "running" ||
player.initialState.playState == "pending",
"The playState is running or pending while the transition is running");
info("Wait until the animation stops (more than 1000ms)"); info("Wait until the animation stops (more than 1000ms)");
yield wait(1500); // Waiting 1.5sec for good measure yield wait(1500); // Waiting 1.5sec for good measure