Bug 1520404, try to avoid racyness in test_bug1303704.html, r=edgar

Differential Revision: https://phabricator.services.mozilla.com/D78481
This commit is contained in:
Olli Pettay 2020-06-08 11:43:13 +00:00
parent ef8aabcc2d
commit d067c51862

View File

@ -91,8 +91,6 @@ function runTests() {
scrollable.addEventListener('pointerdown', function(ev) {
ev.preventDefault();
}, true);
is(scrollable.scrollTop, 0,
"Scrollable element shouldn't be scrolled initially");
var rect = scrollable.getBoundingClientRect();
var offsetX = rect.width - 5;
var offsetY = rect.height - 5;
@ -118,7 +116,12 @@ function runTests() {
});
}
setTimeout(scrollTest);
setTimeout(() => {
var scrollable = document.getElementById("scrollable");
is(scrollable.scrollTop, 0,
"Scrollable element shouldn't be scrolled initially");
scrollTest();
});
}
SimpleTest.waitForFocus(() => {