OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_proxy_client_socket_pool.h" | 5 #include "net/http/http_proxy_client_socket_pool.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 typedef ::testing::TestWithParam<HttpProxyType> TestWithHttpParam; | 44 typedef ::testing::TestWithParam<HttpProxyType> TestWithHttpParam; |
45 | 45 |
46 } // namespace | 46 } // namespace |
47 | 47 |
48 class HttpProxyClientSocketPoolTest : public TestWithHttpParam { | 48 class HttpProxyClientSocketPoolTest : public TestWithHttpParam { |
49 protected: | 49 protected: |
50 HttpProxyClientSocketPoolTest() | 50 HttpProxyClientSocketPoolTest() |
51 : ssl_config_(), | 51 : ssl_config_(), |
52 ignored_transport_socket_params_(new TransportSocketParams( | 52 ignored_transport_socket_params_(new TransportSocketParams( |
53 HostPortPair("proxy", 80), LOWEST, GURL(), false, false)), | 53 HostPortPair("proxy", 80), LOWEST, false, false)), |
54 ignored_ssl_socket_params_(new SSLSocketParams( | 54 ignored_ssl_socket_params_(new SSLSocketParams( |
55 ignored_transport_socket_params_, NULL, NULL, | 55 ignored_transport_socket_params_, NULL, NULL, |
56 ProxyServer::SCHEME_DIRECT, HostPortPair("www.google.com", 443), | 56 ProxyServer::SCHEME_DIRECT, HostPortPair("www.google.com", 443), |
57 ssl_config_, 0, false, false)), | 57 ssl_config_, 0, false, false)), |
58 tcp_histograms_("MockTCP"), | 58 tcp_histograms_("MockTCP"), |
59 transport_socket_pool_( | 59 transport_socket_pool_( |
60 kMaxSockets, kMaxSocketsPerGroup, | 60 kMaxSockets, kMaxSocketsPerGroup, |
61 &tcp_histograms_, | 61 &tcp_histograms_, |
62 &socket_factory_), | 62 &socket_factory_), |
63 ssl_histograms_("MockSSL"), | 63 ssl_histograms_("MockSSL"), |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 // HTTPS or SPDY Proxy CONNECT responses are trustworthy | 520 // HTTPS or SPDY Proxy CONNECT responses are trustworthy |
521 EXPECT_EQ(ERR_HTTPS_PROXY_TUNNEL_RESPONSE, rv); | 521 EXPECT_EQ(ERR_HTTPS_PROXY_TUNNEL_RESPONSE, rv); |
522 EXPECT_TRUE(handle_.is_initialized()); | 522 EXPECT_TRUE(handle_.is_initialized()); |
523 EXPECT_TRUE(handle_.socket()); | 523 EXPECT_TRUE(handle_.socket()); |
524 } | 524 } |
525 } | 525 } |
526 | 526 |
527 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. | 527 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. |
528 | 528 |
529 } // namespace net | 529 } // namespace net |
OLD | NEW |