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/time.h" | 10 #include "base/time.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 &http_proxy_histograms_, | 79 &http_proxy_histograms_, |
80 &host_resolver_, | 80 &host_resolver_, |
81 &transport_socket_pool_, | 81 &transport_socket_pool_, |
82 NULL, | 82 NULL, |
83 NULL) { | 83 NULL) { |
84 scoped_refptr<SSLConfigService> ssl_config_service( | 84 scoped_refptr<SSLConfigService> ssl_config_service( |
85 new SSLConfigServiceDefaults); | 85 new SSLConfigServiceDefaults); |
86 ssl_config_service->GetSSLConfig(&ssl_config_); | 86 ssl_config_service->GetSSLConfig(&ssl_config_); |
87 } | 87 } |
88 | 88 |
| 89 virtual void SetUp() OVERRIDE { |
| 90 // Disable sending PING. |
| 91 SpdySession::set_enable_ping_based_connection_checking(false); |
| 92 } |
| 93 |
| 94 virtual void TearDown() OVERRIDE { |
| 95 // Enable sending PING. |
| 96 SpdySession::set_enable_ping_based_connection_checking(true); |
| 97 } |
| 98 |
89 void CreatePool(bool transport_pool, bool http_proxy_pool, bool socks_pool) { | 99 void CreatePool(bool transport_pool, bool http_proxy_pool, bool socks_pool) { |
90 ssl_histograms_.reset(new ClientSocketPoolHistograms("SSLUnitTest")); | 100 ssl_histograms_.reset(new ClientSocketPoolHistograms("SSLUnitTest")); |
91 pool_.reset(new SSLClientSocketPool( | 101 pool_.reset(new SSLClientSocketPool( |
92 kMaxSockets, | 102 kMaxSockets, |
93 kMaxSocketsPerGroup, | 103 kMaxSocketsPerGroup, |
94 ssl_histograms_.get(), | 104 ssl_histograms_.get(), |
95 NULL /* host_resolver */, | 105 NULL /* host_resolver */, |
96 NULL /* cert_verifier */, | 106 NULL /* cert_verifier */, |
97 NULL /* origin_bound_cert_service */, | 107 NULL /* origin_bound_cert_service */, |
98 NULL /* dnsrr_resolver */, | 108 NULL /* dnsrr_resolver */, |
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 EXPECT_TRUE(session_->spdy_session_pool()->HasSession(test_hosts[2].pair)); | 746 EXPECT_TRUE(session_->spdy_session_pool()->HasSession(test_hosts[2].pair)); |
737 | 747 |
738 session_->spdy_session_pool()->CloseAllSessions(); | 748 session_->spdy_session_pool()->CloseAllSessions(); |
739 } | 749 } |
740 | 750 |
741 // It would be nice to also test the timeouts in SSLClientSocketPool. | 751 // It would be nice to also test the timeouts in SSLClientSocketPool. |
742 | 752 |
743 } // namespace | 753 } // namespace |
744 | 754 |
745 } // namespace net | 755 } // namespace net |
OLD | NEW |