Bug 1630781 - Adjust test to account for extra composite required for WR hit-test. r=botond

We have had to apply this same fix in other tests in the past, for example in
helper_hittest_basic.html.

Differential Revision: https://phabricator.services.mozilla.com/D72045
This commit is contained in:
Kartikaya Gupta 2020-04-26 17:05:21 +00:00
parent ead6b2732c
commit 7a46942dee

View File

@ -519,6 +519,14 @@ function doOuterScroll(subframe, oldpos) {
}
function doInnerScrollAgain(subframe, oldpos) {
// Tick the refresh driver once to make sure the compositor has sent the
// updated scroll offset for the outer scroller to WebRender, so that the
// hit-test in sendWheelAndPaint takes it into account. (This isn't needed
// if using non-WR layers, but doesn't hurt either).
var dwu = SpecialPowers.getDOMWindowUtils(window);
dwu.advanceTimeAndRefresh(16);
dwu.restoreNormalRefresh();
sendWheelAndPaint(subframe, 10, 10, DefaultEvent, function() {
var newpos = new ScrollTops();
ok(oldpos.outerScrollTop == newpos.outerScrollTop, "viewport should not have scrolled");