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

Unified Diff: chrome/test/base/bookmark_load_observer.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: fetch/merge, no change 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/bookmark_load_observer.cc
diff --git a/chrome/test/base/bookmark_load_observer.cc b/chrome/test/base/bookmark_load_observer.cc
index 5b80070149ea290b3e8710262d449a00f40b20ec..acdac8c906d54e8fe6ba7b6f11ca0b94509cabb1 100644
--- a/chrome/test/base/bookmark_load_observer.cc
+++ b/chrome/test/base/bookmark_load_observer.cc
@@ -4,12 +4,14 @@
#include "chrome/test/base/bookmark_load_observer.h"
-#include "base/message_loop.h"
+#include "chrome/test/base/ui_test_utils.h"
-BookmarkLoadObserver::BookmarkLoadObserver() {}
+BookmarkLoadObserver::BookmarkLoadObserver(
+ const base::WeakPtr<MessageLoop::RunLoop>& run_loop)
+ : run_loop_(run_loop) {}
BookmarkLoadObserver::~BookmarkLoadObserver() {}
void BookmarkLoadObserver::Loaded(BookmarkModel* model, bool ids_reassigned) {
- MessageLoop::current()->Quit();
+ ui_test_utils::QuitRunLoop(run_loop_);
}

Powered by Google App Engine
This is Rietveld 408576698