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

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: phajdan 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
« no previous file with comments | « chrome/test/base/bookmark_load_observer.cc ('k') | chrome/test/base/test_web_dialog_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « chrome/test/base/bookmark_load_observer.cc ('k') | chrome/test/base/test_web_dialog_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698