OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/http/http_network_layer.h" | 5 #include "net/http/http_network_layer.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "net/base/net_log.h" | 9 #include "net/base/net_log.h" |
10 #include "net/cert/mock_cert_verifier.h" | 10 #include "net/cert/mock_cert_verifier.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "testing/platform_test.h" | 21 #include "testing/platform_test.h" |
22 | 22 |
23 namespace net { | 23 namespace net { |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 class HttpNetworkLayerTest : public PlatformTest { | 27 class HttpNetworkLayerTest : public PlatformTest { |
28 protected: | 28 protected: |
29 HttpNetworkLayerTest() : ssl_config_service_(new SSLConfigServiceDefaults) {} | 29 HttpNetworkLayerTest() : ssl_config_service_(new SSLConfigServiceDefaults) {} |
30 | 30 |
31 virtual void SetUp() { | 31 void SetUp() override { |
32 ConfigureTestDependencies(ProxyService::CreateDirect()); | 32 ConfigureTestDependencies(ProxyService::CreateDirect()); |
33 } | 33 } |
34 | 34 |
35 void ConfigureTestDependencies(ProxyService* proxy_service) { | 35 void ConfigureTestDependencies(ProxyService* proxy_service) { |
36 cert_verifier_.reset(new MockCertVerifier); | 36 cert_verifier_.reset(new MockCertVerifier); |
37 transport_security_state_.reset(new TransportSecurityState); | 37 transport_security_state_.reset(new TransportSecurityState); |
38 proxy_service_.reset(proxy_service); | 38 proxy_service_.reset(proxy_service); |
39 HttpNetworkSession::Params session_params; | 39 HttpNetworkSession::Params session_params; |
40 session_params.client_socket_factory = &mock_socket_factory_; | 40 session_params.client_socket_factory = &mock_socket_factory_; |
41 session_params.host_resolver = &host_resolver_; | 41 session_params.host_resolver = &host_resolver_; |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 ASSERT_EQ(ERR_CONNECTION_RESET, callback.GetResult(rv)); | 396 ASSERT_EQ(ERR_CONNECTION_RESET, callback.GetResult(rv)); |
397 | 397 |
398 // If the response info is null, that means that any consumer won't | 398 // If the response info is null, that means that any consumer won't |
399 // see the network accessed bit set. | 399 // see the network accessed bit set. |
400 EXPECT_EQ(NULL, trans->GetResponseInfo()); | 400 EXPECT_EQ(NULL, trans->GetResponseInfo()); |
401 } | 401 } |
402 | 402 |
403 } // namespace | 403 } // namespace |
404 | 404 |
405 } // namespace net | 405 } // namespace net |
OLD | NEW |