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

Unified Diff: components/invalidation/impl/gcm_network_channel_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/invalidation/impl/gcm_network_channel_unittest.cc
diff --git a/components/invalidation/impl/gcm_network_channel_unittest.cc b/components/invalidation/impl/gcm_network_channel_unittest.cc
index 551bc3b1b0b4e1776c18ac6ae67c5157980f05e0..d78d4be3be169fe85262785f1c08a41438f224f1 100644
--- a/components/invalidation/impl/gcm_network_channel_unittest.cc
+++ b/components/invalidation/impl/gcm_network_channel_unittest.cc
@@ -11,6 +11,7 @@
#include "base/run_loop.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
+#include "base/test/scoped_task_environment.h"
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
#include "google_apis/gaia/google_service_auth_error.h"
@@ -213,7 +214,7 @@ class GCMNetworkChannelTest
}
private:
- base::MessageLoop message_loop_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
TestGCMNetworkChannelDelegate* delegate_;
std::unique_ptr<GCMNetworkChannel> gcm_network_channel_;
scoped_refptr<net::TestURLRequestContextGetter> request_context_getter_;

Powered by Google App Engine
This is Rietveld 408576698