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

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

Issue 2798963003: Use ScopedTaskEnvironment instead of MessageLoop in components unit tests. (Closed)
Patch Set: Created 3 years, 8 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/zero_suggest_provider_unittest.cc
diff --git a/components/omnibox/browser/zero_suggest_provider_unittest.cc b/components/omnibox/browser/zero_suggest_provider_unittest.cc
index e60556abd4c048972fe80e740a26213e1e9c3565..8bb0e48217456359f0532d1c3ca9b48dcfcb68c0 100644
--- a/components/omnibox/browser/zero_suggest_provider_unittest.cc
+++ b/components/omnibox/browser/zero_suggest_provider_unittest.cc
@@ -8,6 +8,7 @@
#include "base/metrics/field_trial.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/test/scoped_task_environment.h"
#include "components/history/core/browser/top_sites.h"
#include "components/metrics/proto/omnibox_event.pb.h"
#include "components/omnibox/browser/autocomplete_provider_listener.h"
@@ -165,7 +166,7 @@ class ZeroSuggestProviderTest : public testing::Test,
void CreatePersonalizedFieldTrial();
void CreateMostVisitedFieldTrial();
- base::MessageLoop message_loop_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
// Needed for OmniboxFieldTrial::ActivateStaticTrials().
std::unique_ptr<base::FieldTrialList> field_trial_list_;

Powered by Google App Engine
This is Rietveld 408576698