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

Unified Diff: components/ntp_tiles/icon_cacher_impl_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/ntp_tiles/icon_cacher_impl_unittest.cc
diff --git a/components/ntp_tiles/icon_cacher_impl_unittest.cc b/components/ntp_tiles/icon_cacher_impl_unittest.cc
index ac2843b941b76554d6bd020a9cd10d47e2730fb5..4a2ddc2513d15138b61251ba2eb978d72ae774fe 100644
--- a/components/ntp_tiles/icon_cacher_impl_unittest.cc
+++ b/components/ntp_tiles/icon_cacher_impl_unittest.cc
@@ -12,6 +12,7 @@
#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/test/mock_callback.h"
+#include "base/test/scoped_task_environment.h"
#include "base/test/test_simple_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "components/favicon/core/favicon_client.h"
@@ -177,7 +178,7 @@ class IconCacherTest : public ::testing::Test {
void WaitForTasksToFinish() { task_runner_->RunUntilIdle(); }
- base::MessageLoop message_loop_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
PopularSites::Site site_;
std::unique_ptr<MockImageFetcher> image_fetcher_;
std::unique_ptr<MockImageDecoder> image_decoder_;

Powered by Google App Engine
This is Rietveld 408576698