Skip to content

Commit

Permalink
Use setTimeout (step_timeout) too
Browse files Browse the repository at this point in the history
  • Loading branch information
foolip committed May 15, 2017
1 parent a453a1c commit dcb1462
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
p.catch(t.step_func(() => rejected = true));
Promise.resolve().then(t.step_func(() => assert_true(rejected)));
}
// Wait two animation frames to ensure that no events are fired. (One should
// be enough per spec, but this makes the test flaky in Firefox.)
// Per spec the fullscreenerror event should be fired at the next animtion
// frame, but at least Gecko and WebKit will instead effectively do "queue a
// task to fire ...". Use both rAF and setTimeout to fail even if the timing
// of the (unexpected) event isn't as expected.
requestAnimationFrame(t.step_func(() => {
requestAnimationFrame(t.step_func_done());
step_timeout(t.step_func_done());
}));
});

Expand Down

0 comments on commit dcb1462

Please sign in to comment.