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|.

Bug: 961849
Change-Id: Ic4724895e7b3762c401f2e781907816e2048e1ec
Commit-Queue: danakj <>
Reviewed-by: Avi Drissman <>
Cr-Commit-Position: refs/heads/master@{#672154}
1 file changed