Bug 1145439 (Part 2) - Make test_scroll_event_ordering.html wait for rAF to unthrottle. r=roc

This commit is contained in:
Seth Fowler 2015-04-21 09:44:43 -07:00
parent ae663e5c87
commit 3c8556a274

View File

@ -47,9 +47,16 @@ function doTest() {
sendKey("DOWN");
}
SimpleTest.waitForFocus(function() {
SpecialPowers.pushPrefEnv({"set":[[smoothScrollPref, false]]}, doTest);
});
function prepareTest() {
// Start the test after we've gotten at least one rAF callback, to make sure
// that rAF is no longer throttled. (See bug 1145439.)
window.mozRequestAnimationFrame(function() {
SpecialPowers.pushPrefEnv({"set":[[smoothScrollPref, false]]}, doTest);
});
}
SimpleTest.waitForFocus(prepareTest);
</script>
</pre>
</body>