Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(493)

Unified Diff: chrome/test/base/in_process_browser_test.cc

Issue 10479018: Add base::RunLoop and update ui_test_utils to use it to reduce flakiness (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: darin feedback Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..0719a0cbafcbcae428178021f59625b34f023b49 100644
--- a/chrome/test/base/in_process_browser_test.cc
+++ b/chrome/test/base/in_process_browser_test.cc
@@ -373,6 +373,10 @@ 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.
+ ui_test_utils::RunAllPendingInMessageLoop();
+
QuitBrowsers();
CHECK(BrowserList::empty());
}

Powered by Google App Engine
This is Rietveld 408576698