| Index: chrome/test/base/in_process_browser_test.cc
|
| diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc
|
| index a65d00cbe3f998e07e2bcc8c73ca59141bf3ab76..c87c3f391c43e0add948bf236e4ad22989e20eba 100644
|
| --- a/chrome/test/base/in_process_browser_test.cc
|
| +++ b/chrome/test/base/in_process_browser_test.cc
|
| @@ -373,6 +373,12 @@ void InProcessBrowserTest::RunTestOnMainThreadLoop() {
|
| autorelease_pool_->Recycle();
|
| #endif
|
|
|
| + // Sometimes tests leave Quit tasks in the MessageLoop (for shame), so let's
|
| + // run all pending messages here to avoid preempting the QuitBrowsers tasks.
|
| + // TODO(jbates) Once crbug.com/134753 is fixed, this can be removed because it
|
| + // will not be possible to post Quit tasks.
|
| + ui_test_utils::RunAllPendingInMessageLoop();
|
| +
|
| QuitBrowsers();
|
| CHECK(BrowserList::empty());
|
| }
|
|
|