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

Unified Diff: components/omnibox/browser/history_quick_provider_unittest.cc

Issue 2082333002: Remove calls to deprecated MessageLoop methods in components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: components/omnibox/browser/history_quick_provider_unittest.cc
diff --git a/components/omnibox/browser/history_quick_provider_unittest.cc b/components/omnibox/browser/history_quick_provider_unittest.cc
index 0a7dd7b725b64fb760181efd5c143b2178cb7f79..816f298d0d1352fd84de3634709af799530b3ac7 100644
--- a/components/omnibox/browser/history_quick_provider_unittest.cc
+++ b/components/omnibox/browser/history_quick_provider_unittest.cc
@@ -17,6 +17,7 @@
#include "base/format_macros.h"
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/sequenced_worker_pool_owner.h"
@@ -323,7 +324,7 @@ void HistoryQuickProviderTest::TearDown() {
// History index rebuild task is created from main thread during SetUp,
// performed on DB thread and must be deleted on main thread.
// Run main loop to process delete task, to prevent leaks.
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
void HistoryQuickProviderTest::GetTestData(size_t* data_count,
@@ -412,7 +413,7 @@ void HistoryQuickProviderTest::RunTestWithCursor(
base::string16 expected_fill_into_edit,
base::string16 expected_autocompletion) {
SCOPED_TRACE(text); // Minimal hint to query being run.
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
AutocompleteInput input(text, cursor_position, std::string(), GURL(),
metrics::OmniboxEventProto::INVALID_SPEC,
prevent_inline_autocomplete, false, true, true, false,
@@ -472,7 +473,7 @@ bool HistoryQuickProviderTest::GetURLProxy(const GURL& url) {
&task_tracker);
// Run the message loop until GetURLTask::DoneRunOnMainThread stops it. If
// the test hangs, DoneRunOnMainThread isn't being invoked correctly.
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
return result;
}

Powered by Google App Engine
This is Rietveld 408576698