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

Unified Diff: components/prefs/pref_member_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/prefs/pref_member_unittest.cc
diff --git a/components/prefs/pref_member_unittest.cc b/components/prefs/pref_member_unittest.cc
index bc75bc862ccb3f3516de1591db2fb0438ef4b895..df67710fd600d66a2c2a01cc12c18d67c231b055 100644
--- a/components/prefs/pref_member_unittest.cc
+++ b/components/prefs/pref_member_unittest.cc
@@ -9,6 +9,7 @@
#include "base/memory/ptr_util.h"
#include "base/single_thread_task_runner.h"
#include "base/synchronization/waitable_event.h"
+#include "base/test/scoped_task_environment.h"
#include "base/threading/thread.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/testing_pref_service.h"
@@ -104,7 +105,7 @@ class PrefMemberTestClass {
} // anonymous namespace
class PrefMemberTest : public testing::Test {
- base::MessageLoop message_loop_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
};
TEST_F(PrefMemberTest, BasicGetAndSet) {

Powered by Google App Engine
This is Rietveld 408576698