Commit e50971ee authored by Kenichi Ishibashi's avatar Kenichi Ishibashi Committed by Commit Bot

Attempt to deflake NavigationBrowserTest.StopInOnStart on weblayer

Similar to crrev.com/c/2352268, accessing browser context in weblayer
seems to initialize BackgroundFetchContext, which depends on
ServiceWorkerStorage::GetUserDataForAllRegistrationsByKeyPrefix().
Tests should wait for the completion of
GetUserDataForAllRegistrationsByKeyPrefix() to avoid hitting DCHECK()
in mojo generated bindings.

Bug: 1115172
Change-Id: I5836e962cd35f07ab46e20b64352f8ef8eb9f353
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2368652Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800466}
parent 6336337c
......@@ -49,6 +49,9 @@ void WebLayerBrowserTest::PreRunTestOnMainThread() {
static_cast<BrowserContextImpl*>(browser_context);
browser_context_impl->profile_impl()->SetDownloadDirectory(
browser_context->GetPath());
// Accessing a browser context may involve storage partition initialization.
// Wait for the initialization to be completed.
base::RunLoop().RunUntilIdle();
}
void WebLayerBrowserTest::PostRunTestOnMainThread() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment