Index: components/history/core/browser/top_sites_impl_unittest.cc |
diff --git a/components/history/core/browser/top_sites_impl_unittest.cc b/components/history/core/browser/top_sites_impl_unittest.cc |
index f6dc42e2b23bb18906df06db2650fb760aae86a8..de40df0b7d0ee1ae0fd462814df59b0f16123538 100644 |
--- a/components/history/core/browser/top_sites_impl_unittest.cc |
+++ b/components/history/core/browser/top_sites_impl_unittest.cc |
@@ -53,7 +53,9 @@ class WaitForHistoryTask : public HistoryDBTask { |
return true; |
} |
- void DoneRunOnMainThread() override { base::MessageLoop::current()->Quit(); } |
+ void DoneRunOnMainThread() override { |
+ base::MessageLoop::current()->QuitWhenIdle(); |
+ } |
private: |
~WaitForHistoryTask() override {} |
@@ -104,7 +106,7 @@ class TopSitesQuerier { |
urls_ = data; |
number_of_callbacks_++; |
if (waiting_) { |
- base::MessageLoop::current()->Quit(); |
+ base::MessageLoop::current()->QuitWhenIdle(); |
waiting_ = false; |
} |
} |
@@ -211,7 +213,7 @@ class TopSitesImplTest : public HistoryUnitTestBase { |
// Quit the current message loop when invoked. Useful when running a nested |
// message loop. |
- void QuitCallback() { base::MessageLoop::current()->Quit(); } |
+ void QuitCallback() { base::MessageLoop::current()->QuitWhenIdle(); } |
// Adds a page to history. |
void AddPageToHistory(const GURL& url) { |