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

Unified Diff: components/sync/engine_impl/js_sync_manager_observer_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/engine_impl/js_sync_manager_observer_unittest.cc
diff --git a/components/sync/engine_impl/js_sync_manager_observer_unittest.cc b/components/sync/engine_impl/js_sync_manager_observer_unittest.cc
index 5279ab38d8afa30d129e279d4d75cc6ecd5b6ad7..52774eeb5cae6ad7463a9a6269ce0c31815fc9ab 100644
--- a/components/sync/engine_impl/js_sync_manager_observer_unittest.cc
+++ b/components/sync/engine_impl/js_sync_manager_observer_unittest.cc
@@ -8,6 +8,7 @@
#include "base/location.h"
#include "base/run_loop.h"
+#include "base/test/scoped_task_environment.h"
#include "base/values.h"
#include "components/sync/base/model_type.h"
#include "components/sync/engine/connection_status.h"
@@ -33,7 +34,7 @@ class JsSyncManagerObserverTest : public testing::Test {
private:
// This must be destroyed after the member variables below in order
// for WeakHandles to be destroyed properly.
- base::MessageLoop message_loop_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
protected:
StrictMock<MockJsEventHandler> mock_js_event_handler_;

Powered by Google App Engine
This is Rietveld 408576698