Commit c9934051 authored by John Abd-El-Malek's avatar John Abd-El-Malek Committed by Commit Bot

Fix flakes with prerender browser tests on network service.

The problem was with the new CreateHangingFirstRequestInterceptor implementation for the network service case. Returning "true" from the URLLoaderInterceptor isn't enough to hang the frame request, as the URLLoaderClient interfaceptr's destruction will lead to an error in the renderer and an error page will commit. Prerendering code would then think that the prerender has committed and can be used.

Bug: 800373
Change-Id: Id5b8e20fcec8850b9b00d57cbae803102d95d59d
Reviewed-on: https://chromium-review.googlesource.com/857961Reviewed-by: default avatarYuzhu Shen <yzshen@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528355}
parent c87d6a04
......@@ -984,6 +984,10 @@ class PrerenderBrowserTest : public test_utils::PrerenderInProcessBrowserTest {
static bool first = true;
if (first) {
first = false;
// Need to leak the client pipe, or else the renderer will
// get a disconnect error and load the error page.
auto* leak_client = new content::mojom::URLLoaderClientPtr;
*leak_client = std::move(params->client);
closure.Run();
return true;
}
......@@ -1388,9 +1392,7 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderVisibility) {
}
// crbug.com/708158
// crbug.com/800373
#if (defined(OS_MACOSX) && defined(ADDRESS_SANITIZER)) || \
(defined(OS_LINUX) && !defined(NDEBUG))
#if defined(OS_MACOSX) && defined(ADDRESS_SANITIZER)
#define MAYBE_PrerenderNoCommitNoSwap DISABLED_PrerenderNoCommitNoSwap
#else
#define MAYBE_PrerenderNoCommitNoSwap PrerenderNoCommitNoSwap
......
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