Commit fd1847f3 authored by ckitagawa's avatar ckitagawa Committed by Chromium LUCI CQ

[Paint Preview] Reduce flakiness of DontReload test

FindIt identified this test as being rarely flaky on Linux ASan. As a
result, I've expanded the ScopedAllowBlocking to avoid the crash. It
looks like if the PostTask didn't run in the scoped block it would
sometimes crash.

https://analysis.chromium.org/p/chromium/flake-portal/analysis/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyQwsSDEZsYWtlQ3VscHJpdCIxY2hyb21pdW0vNjJhNzlmNjFjOWVjMGJmMmRkODQ1Y2RkZjZmYjQ3ZTkyMGIzNTVhNgw

Change-Id: I6e6d5252c2c95e3222231442228e4b560a52f0ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622321Reviewed-by: default avatarMehran Mahmoudi <mahmoudi@chromium.org>
Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842216}
parent 93c9d23b
...@@ -376,6 +376,9 @@ IN_PROC_BROWSER_TEST_P(PaintPreviewBrowserTest, ...@@ -376,6 +376,9 @@ IN_PROC_BROWSER_TEST_P(PaintPreviewBrowserTest,
#endif #endif
IN_PROC_BROWSER_TEST_P(PaintPreviewBrowserTest, IN_PROC_BROWSER_TEST_P(PaintPreviewBrowserTest,
MAYBE_DontReloadInRenderProcessExit) { MAYBE_DontReloadInRenderProcessExit) {
// In the FileSystem variant of this test, blocking needs to be permitted to
// allow cleanup to work during the crash.
base::ScopedAllowBlockingForTesting scope;
LoadPage(http_server_.GetURL("a.com", "/title1.html")); LoadPage(http_server_.GetURL("a.com", "/title1.html"));
content::WebContents* web_contents = GetWebContents(); content::WebContents* web_contents = GetWebContents();
...@@ -414,15 +417,12 @@ IN_PROC_BROWSER_TEST_P(PaintPreviewBrowserTest, ...@@ -414,15 +417,12 @@ IN_PROC_BROWSER_TEST_P(PaintPreviewBrowserTest,
.Then(loop.QuitClosure())); .Then(loop.QuitClosure()));
// Crash the renderer. // Crash the renderer.
{ content::RenderProcessHost* process =
base::ScopedAllowBlockingForTesting scope; GetWebContents()->GetMainFrame()->GetProcess();
content::RenderProcessHost* process = content::RenderProcessHostWatcher crash_observer(
GetWebContents()->GetMainFrame()->GetProcess(); process, content::RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT);
content::RenderProcessHostWatcher crash_observer( process->Shutdown(0);
process, content::RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT); crash_observer.Wait();
process->Shutdown(0);
crash_observer.Wait();
}
// The browser would have crashed before the loop exited if the callback was // The browser would have crashed before the loop exited if the callback was
// not posted. // not posted.
......
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