Bug 1429824 - Try to prevent races in browser_net_autoscroll.js. r=Honza

MozReview-Commit-ID: 8xkCmd2TFhM

--HG--
extra : rebase_source : a6f6b6881265cd7592cb2ed0acfa342e944cb7b3
This commit is contained in:
Alexandre Poirot 2018-02-09 02:39:45 -08:00
parent 8416e403a2
commit 8a23ea3661

View File

@ -41,6 +41,11 @@ add_task(function* () {
// (3) Now set the scroll position back at the bottom and check that
// additional requests *do* cause the container to scroll down.
// Wait for another request to be displayed in order to ensure that
// scrollTop is set just before next RequestListContent.componentWillUpdate fires.
// If scrollTop is set between componentWillUpdate and componentDidUpdate,
// the view won't be scrolled.
yield waitForNetworkEvents(monitor, 8);
requestsContainer.scrollTop = requestsContainer.scrollHeight;
ok(scrolledToBottom(requestsContainer), "Set scroll position to bottom.");
yield waitForNetworkEvents(monitor, 8);