mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Bug 1145439 (Part 2) - Make test_scroll_event_ordering.html wait for rAF to unthrottle. r=roc
This commit is contained in:
parent
ae663e5c87
commit
3c8556a274
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user