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_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/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 SSLConfig ssl_config_; | 223 SSLConfig ssl_config_; |
224 scoped_ptr<ClientSocketPoolHistograms> ssl_histograms_; | 224 scoped_ptr<ClientSocketPoolHistograms> ssl_histograms_; |
225 scoped_ptr<SSLClientSocketPool> pool_; | 225 scoped_ptr<SSLClientSocketPool> pool_; |
226 | 226 |
227 bool enable_ssl_connect_job_waiting_; | 227 bool enable_ssl_connect_job_waiting_; |
228 }; | 228 }; |
229 | 229 |
230 INSTANTIATE_TEST_CASE_P( | 230 INSTANTIATE_TEST_CASE_P( |
231 NextProto, | 231 NextProto, |
232 SSLClientSocketPoolTest, | 232 SSLClientSocketPoolTest, |
233 testing::Values(kProtoSPDY31, kProtoSPDY4_14, kProtoSPDY4_15)); | 233 testing::Values(kProtoSPDY31, kProtoSPDY4_14, kProtoSPDY4_15, kProtoSPDY4)); |
234 | 234 |
235 // Tests that the final socket will connect even if all sockets | 235 // Tests that the final socket will connect even if all sockets |
236 // prior to it fail. | 236 // prior to it fail. |
237 // | 237 // |
238 // All sockets should wait for the first socket to attempt to | 238 // All sockets should wait for the first socket to attempt to |
239 // connect. Once it fails to connect, all other sockets should | 239 // connect. Once it fails to connect, all other sockets should |
240 // attempt to connect. All should fail, except the final socket. | 240 // attempt to connect. All should fail, except the final socket. |
241 TEST_P(SSLClientSocketPoolTest, AllSocketsFailButLast) { | 241 TEST_P(SSLClientSocketPoolTest, AllSocketsFailButLast) { |
242 // Although we request four sockets, the first three socket connect | 242 // Although we request four sockets, the first three socket connect |
243 // failures cause the socket pool to create three more sockets because | 243 // failures cause the socket pool to create three more sockets because |
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1386 ssl.channel_id_sent = true; | 1386 ssl.channel_id_sent = true; |
1387 ssl.SetNextProto(GetParam()); | 1387 ssl.SetNextProto(GetParam()); |
1388 TestIPPoolingDisabled(&ssl); | 1388 TestIPPoolingDisabled(&ssl); |
1389 } | 1389 } |
1390 | 1390 |
1391 // It would be nice to also test the timeouts in SSLClientSocketPool. | 1391 // It would be nice to also test the timeouts in SSLClientSocketPool. |
1392 | 1392 |
1393 } // namespace | 1393 } // namespace |
1394 | 1394 |
1395 } // namespace net | 1395 } // namespace net |
OLD | NEW |