mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 752781. Wait for a refresh driver run to complete before testing whether scrolling has happened. r=mats
This commit is contained in:
parent
a0ecbc68c1
commit
1511ce59ff
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user