Run android startup tasks asyncronously in browser tests as in prod
The android startup tasks were run synchronously when a |ui_task| was present (ie in browser tests) because android browser tests were expecting synchronous initialization, however java initialization is asynchronous anyways. So we have a RunLoop in BrowserTestBase pumping tasks and waiting for java initialization to complete, which is done as a (possibly asynchronous) side effect of the |ui_task| running. Thus we can stop branching here for tests and just post the startup tasks in browser tests as we would do normally in production. And the RunLoop in BrowserTestBase::SetUp() will run them all, eventually running the |ui_task|. R=avi@chromium.org Bug: 961849 Change-Id: Ic4724895e7b3762c401f2e781907816e2048e1ec Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1671069 Commit-Queue: danakj <danakj@chromium.org> Reviewed-by:Avi Drissman <avi@chromium.org> Cr-Commit-Position: refs/heads/master@{#672154}
Showing
Please register or sign in to comment