Commit ac44c26f authored by Olivier Li's avatar Olivier Li Committed by Commit Bot

Improve comments for...

Improve comments for ExtensionWebRequestApiTest.WebRequestApiDoesNotCrashOnErrorAfterProfileDestroyed

Original comments were a little incorrect.

Change-Id: Icb52d1e83ae176be5b019ec9b5874e9193f72c8c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1887430Reviewed-by: default avatarDominic Battré <battre@chromium.org>
Commit-Queue: Dominic Battré <battre@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711270}
parent 27216761
......@@ -1911,9 +1911,12 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest,
// We are about to destroy a profile. In production that will only happen
// as part of the destruction of BrowserProcess's ProfileManager. This
// happens in ShutdownPostThreadsStop(). This means that to have this test
// represent production we have to make sure that no tasks are pending before
// we destroy the profile.
// happens in PostMainMessageLoopRun(). This means that to have this test
// represent production we have to make sure that no tasks are pending on the
// main thread before we destroy the profile. We also would need to prohibit
// the posting of new tasks on the main thread as in production the main
// thread's message loop will not be accepting them. We fallback on flushing
// the ThreadPool here to avoid the posts coming from it.
content::RunAllTasksUntilIdle();
ProfileDestroyer::DestroyProfileWhenAppropriate(temp_profile);
......
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