зеркало из https://github.com/mozilla/gecko-dev.git
Bug 752781. Wait for a refresh driver run to complete before testing whether scrolling has happened. r=mats
This commit is contained in:
Родитель
32be605238
Коммит
d9ececf589
|
@ -57,12 +57,19 @@ function runTest() {
|
|||
|
||||
scrollDown15PxWithPixelScrolling(scrollbox);
|
||||
|
||||
setTimeout(function checkThatScrollIsFinishedAlmostInstantly() {
|
||||
is(scrollbox.scrollTop, scrollTopBefore + 15, "Pixel scrolling should have finished after waiting for one 0-interval timer. We shouldn't be scrolling smoothly, even though the pref is set.")
|
||||
win.close();
|
||||
clearPrefs();
|
||||
SimpleTest.finish();
|
||||
}, 0);
|
||||
// wait for the next refresh driver run
|
||||
window.mozRequestAnimationFrame(function() {
|
||||
// actually, wait for the next one before checking results, since
|
||||
// scrolling might not be flushed until after this code has run
|
||||
window.mozRequestAnimationFrame(function() {
|
||||
is(scrollbox.scrollTop, scrollTopBefore + 15,
|
||||
"Pixel scrolling should have finished after one refresh driver iteration. " +
|
||||
"We shouldn't be scrolling smoothly, even though the pref is set.");
|
||||
win.close();
|
||||
clearPrefs();
|
||||
SimpleTest.finish();
|
||||
});
|
||||
});
|
||||
}, win);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче