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

Unified Diff: components/sync/base/weak_handle_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/sync/base/weak_handle_unittest.cc
diff --git a/components/sync/base/weak_handle_unittest.cc b/components/sync/base/weak_handle_unittest.cc
index 103c54eaf1e7b7b1bd02c6987cf7f13a09b31345..b128f1a4b81523c16e59a0fd82842e0d503f618e 100644
--- a/components/sync/base/weak_handle_unittest.cc
+++ b/components/sync/base/weak_handle_unittest.cc
@@ -5,6 +5,7 @@
#include "components/sync/base/weak_handle.h"
#include "base/run_loop.h"
+#include "base/test/scoped_task_environment.h"
#include "base/threading/thread.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -62,7 +63,7 @@ class WeakHandleTest : public ::testing::Test {
h.Call(from_here, &Base::Test);
}
- base::MessageLoop message_loop_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
};
TEST_F(WeakHandleTest, Uninitialized) {
« no previous file with comments | « components/suggestions/image_manager_unittest.cc ('k') | components/sync/engine_impl/js_mutation_event_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698