Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: net/socket/ssl_client_socket_pool_unittest.cc

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/socket/ssl_client_socket_openssl.cc ('k') | net/socket/tcp_listen_socket.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 SSLConfig ssl_config_; 232 SSLConfig ssl_config_;
233 scoped_ptr<ClientSocketPoolHistograms> ssl_histograms_; 233 scoped_ptr<ClientSocketPoolHistograms> ssl_histograms_;
234 scoped_ptr<SSLClientSocketPool> pool_; 234 scoped_ptr<SSLClientSocketPool> pool_;
235 235
236 bool enable_ssl_connect_job_waiting_; 236 bool enable_ssl_connect_job_waiting_;
237 }; 237 };
238 238
239 INSTANTIATE_TEST_CASE_P( 239 INSTANTIATE_TEST_CASE_P(
240 NextProto, 240 NextProto,
241 SSLClientSocketPoolTest, 241 SSLClientSocketPoolTest,
242 testing::Values(kProtoDeprecatedSPDY2, 242 testing::Values(kProtoSPDY31, kProtoSPDY4_14, kProtoSPDY4_15));
243 kProtoSPDY3, kProtoSPDY31, kProtoSPDY4_14, kProtoSPDY4_15));
244 243
245 // Tests that the final socket will connect even if all sockets 244 // Tests that the final socket will connect even if all sockets
246 // prior to it fail. 245 // prior to it fail.
247 // 246 //
248 // All sockets should wait for the first socket to attempt to 247 // All sockets should wait for the first socket to attempt to
249 // connect. Once it fails to connect, all other sockets should 248 // connect. Once it fails to connect, all other sockets should
250 // attempt to connect. All should fail, except the final socket. 249 // attempt to connect. All should fail, except the final socket.
251 TEST_P(SSLClientSocketPoolTest, AllSocketsFailButLast) { 250 TEST_P(SSLClientSocketPoolTest, AllSocketsFailButLast) {
252 // Although we request four sockets, the first three socket connect 251 // Although we request four sockets, the first three socket connect
253 // failures cause the socket pool to create three more sockets because 252 // failures cause the socket pool to create three more sockets because
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 ssl.channel_id_sent = true; 1395 ssl.channel_id_sent = true;
1397 ssl.SetNextProto(GetParam()); 1396 ssl.SetNextProto(GetParam());
1398 TestIPPoolingDisabled(&ssl); 1397 TestIPPoolingDisabled(&ssl);
1399 } 1398 }
1400 1399
1401 // It would be nice to also test the timeouts in SSLClientSocketPool. 1400 // It would be nice to also test the timeouts in SSLClientSocketPool.
1402 1401
1403 } // namespace 1402 } // namespace
1404 1403
1405 } // namespace net 1404 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_openssl.cc ('k') | net/socket/tcp_listen_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698