From a857960541cf0cd407f3c84a1cceea8105490630 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Mon, 14 Aug 2017 16:25:58 -0400 Subject: [PATCH] Bug 1388955 - Allow helper_iframe_pan to scroll a little less than the expected 50 pixels on Windows. r=botond MozReview-Commit-ID: AJyzXsszpIr --HG-- extra : rebase_source : 7a79bcfced9721cce8b2327d7412c54cb6badf3b --- gfx/layers/apz/test/mochitest/helper_iframe_pan.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gfx/layers/apz/test/mochitest/helper_iframe_pan.html b/gfx/layers/apz/test/mochitest/helper_iframe_pan.html index 9db9532f4a11..a67c8f45d0c8 100644 --- a/gfx/layers/apz/test/mochitest/helper_iframe_pan.html +++ b/gfx/layers/apz/test/mochitest/helper_iframe_pan.html @@ -24,7 +24,16 @@ function scrollOuter() { function checkScroll() { var outerScroll = document.getElementById('outer').contentWindow.scrollY; - is(outerScroll, 50, "check that the iframe scrolled"); + if (getPlatform() == "windows") { + // On windows, because we run this test with native event synthesization, + // Windows can end up eating the first touchmove which can result in the + // scroll amount being slightly smaller than 50px. See bug 1388955. + dump("iframe scrolled " + outerScroll + "px"); + ok(outerScroll > 45, "iframe scrolled at least 45 px"); + ok(outerScroll <= 50, "iframe scrolled at most 50 px"); + } else { + is(outerScroll, 50, "check that the iframe scrolled"); + } subtestDone(); }