diff --git a/google_apis/gcm/base/socket_stream_unittest.cc b/google_apis/gcm/base/socket_stream_unittest.cc index 918a411feccaa1..25b9261135160e 100644 --- a/google_apis/gcm/base/socket_stream_unittest.cc +++ b/google_apis/gcm/base/socket_stream_unittest.cc @@ -91,6 +91,7 @@ class GCMSocketStreamTest : public testing::Test { // net:: components. net::AddressList address_list_; + std::unique_ptr network_change_notifier_; std::unique_ptr network_service_; network::mojom::NetworkContextPtr network_context_ptr_; net::MockClientSocketFactory socket_factory_; @@ -104,6 +105,7 @@ class GCMSocketStreamTest : public testing::Test { GCMSocketStreamTest::GCMSocketStreamTest() : scoped_task_environment_( base::test::ScopedTaskEnvironment::MainThreadType::IO), + network_change_notifier_(net::NetworkChangeNotifier::CreateMock()), network_service_(network::NetworkService::CreateForTesting()), url_request_context_(true /* delay_initialization */) { address_list_ = net::AddressList::CreateFromIPAddress( diff --git a/google_apis/gcm/engine/connection_factory_impl_unittest.cc b/google_apis/gcm/engine/connection_factory_impl_unittest.cc index f35955d805d632..65d99f8397a682 100644 --- a/google_apis/gcm/engine/connection_factory_impl_unittest.cc +++ b/google_apis/gcm/engine/connection_factory_impl_unittest.cc @@ -304,6 +304,7 @@ class ConnectionFactoryImplTest std::unique_ptr run_loop_; GURL connected_server_; + std::unique_ptr network_change_notifier_; std::unique_ptr network_service_; network::mojom::NetworkContextPtr network_context_ptr_; std::unique_ptr network_context_; @@ -320,6 +321,7 @@ ConnectionFactoryImplTest::ConnectionFactoryImplTest() base::Bind(&ConnectionFactoryImplTest::ConnectionsComplete, base::Unretained(this))), run_loop_(new base::RunLoop()), + network_change_notifier_(net::NetworkChangeNotifier::CreateMock()), network_service_(network::NetworkService::CreateForTesting()) { network::mojom::NetworkContextParamsPtr params = network::mojom::NetworkContextParams::New(); diff --git a/google_apis/gcm/engine/connection_handler_impl_unittest.cc b/google_apis/gcm/engine/connection_handler_impl_unittest.cc index d047f271d308b9..7ec425e36dc0b9 100644 --- a/google_apis/gcm/engine/connection_handler_impl_unittest.cc +++ b/google_apis/gcm/engine/connection_handler_impl_unittest.cc @@ -191,6 +191,7 @@ class GCMConnectionHandlerImplTest : public testing::Test { net::AddressList address_list_; base::test::ScopedTaskEnvironment scoped_task_environment_; std::unique_ptr run_loop_; + std::unique_ptr network_change_notifier_; std::unique_ptr network_service_; network::mojom::NetworkContextPtr network_context_ptr_; net::MockClientSocketFactory socket_factory_; @@ -205,6 +206,7 @@ GCMConnectionHandlerImplTest::GCMConnectionHandlerImplTest() : last_error_(0), scoped_task_environment_( base::test::ScopedTaskEnvironment::MainThreadType::IO), + network_change_notifier_(net::NetworkChangeNotifier::CreateMock()), network_service_(network::NetworkService::CreateForTesting()), url_request_context_(true /* delay_initialization */) { address_list_ = net::AddressList::CreateFromIPAddress(