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
This commit is contained in:
Kartikaya Gupta 2017-08-14 16:25:58 -04:00
Родитель ae69f895c2
Коммит a857960541
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -24,7 +24,16 @@ function scrollOuter() {
function checkScroll() { function checkScroll() {
var outerScroll = document.getElementById('outer').contentWindow.scrollY; 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(); subtestDone();
} }