Index: net/test/net_test_suite.cc |
diff --git a/net/test/net_test_suite.cc b/net/test/net_test_suite.cc |
index ff466e6e82bea025d4c81d725e1d74eb6a458818..2c6be66d13e510519f87b2e1274b045be5f49eb4 100644 |
--- a/net/test/net_test_suite.cc |
+++ b/net/test/net_test_suite.cc |
@@ -4,7 +4,8 @@ |
#include "net/test/net_test_suite.h" |
-#include "base/message_loop/message_loop.h" |
+#include "base/memory/ptr_util.h" |
+#include "base/test/scoped_task_environment.h" |
#include "net/base/network_change_notifier.h" |
#include "net/http/http_stream_factory.h" |
#include "net/spdy/chromium/spdy_session.h" |
@@ -32,7 +33,7 @@ void NetTestSuite::Shutdown() { |
// We want to destroy this here before the TestSuite continues to tear down |
// the environment. |
- message_loop_.reset(); |
+ scoped_task_environment_.reset(); |
TestSuite::Shutdown(); |
} |
@@ -51,5 +52,7 @@ void NetTestSuite::InitializeTestThreadNoNetworkChangeNotifier() { |
// the process of running these unit tests. |
host_resolver_proc_->AddRule("*", "127.0.0.1"); |
- message_loop_.reset(new base::MessageLoopForIO()); |
+ scoped_task_environment_ = |
+ base::MakeUnique<base::test::ScopedTaskEnvironment>( |
+ base::test::ScopedTaskEnvironment::MainThreadType::IO); |
} |