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

Unified Diff: ash/test/ash_test_base.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 | « ash/drag_drop/drag_drop_controller.cc ('k') | ash/wm/toplevel_window_event_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/ash_test_base.cc
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc
index 5b92cd83336731decd2bfc8c39466acdd402798e..e0ce896c545ded7a23655c2cee8d2d4e798e9b02 100644
--- a/ash/test/ash_test_base.cc
+++ b/ash/test/ash_test_base.cc
@@ -9,6 +9,7 @@
#include "ash/shell.h"
#include "ash/test/test_shell_delegate.h"
+#include "base/run_loop.h"
#include "base/string_split.h"
#include "content/public/test/web_contents_tester.h"
#include "ui/aura/env.h"
@@ -90,8 +91,9 @@ void AshTestBase::UpdateMonitor(const std::string& display_specs) {
void AshTestBase::RunAllPendingInMessageLoop() {
#if !defined(OS_MACOSX)
- message_loop_.RunAllPendingWithDispatcher(
- aura::Env::GetInstance()->GetDispatcher());
+ DCHECK(MessageLoopForUI::current() == &message_loop_);
+ base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher());
+ run_loop.RunUntilIdle();
#endif
}
« no previous file with comments | « ash/drag_drop/drag_drop_controller.cc ('k') | ash/wm/toplevel_window_event_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698