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

Side by Side Diff: net/http/http_network_transaction_unittest.cc

Issue 4339001: Correctly handle SSL Client Authentication requests when connecting... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <math.h> // ceil 7 #include <math.h> // ceil
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 6469 matching lines...) Expand 10 before | Expand all | Expand 10 after
6480 EXPECT_EQ(ERR_IO_PENDING, 6480 EXPECT_EQ(ERR_IO_PENDING,
6481 connection->Init(host_port_pair.ToString(),tcp_params, LOWEST, 6481 connection->Init(host_port_pair.ToString(),tcp_params, LOWEST,
6482 &callback, session->tcp_socket_pool(), 6482 &callback, session->tcp_socket_pool(),
6483 BoundNetLog())); 6483 BoundNetLog()));
6484 EXPECT_EQ(OK, callback.WaitForResult()); 6484 EXPECT_EQ(OK, callback.WaitForResult());
6485 6485
6486 SSLConfig ssl_config; 6486 SSLConfig ssl_config;
6487 session->ssl_config_service()->GetSSLConfig(&ssl_config); 6487 session->ssl_config_service()->GetSSLConfig(&ssl_config);
6488 ClientSocket* socket = connection->release_socket(); 6488 ClientSocket* socket = connection->release_socket();
6489 socket = session->socket_factory()->CreateSSLClientSocket( 6489 socket = session->socket_factory()->CreateSSLClientSocket(
6490 socket, "" , ssl_config, NULL /* ssl_host_info */); 6490 socket, "" , 443, ssl_config, NULL /* ssl_host_info */);
6491 connection->set_socket(socket); 6491 connection->set_socket(socket);
6492 EXPECT_EQ(ERR_IO_PENDING, socket->Connect(&callback)); 6492 EXPECT_EQ(ERR_IO_PENDING, socket->Connect(&callback));
6493 EXPECT_EQ(OK, callback.WaitForResult()); 6493 EXPECT_EQ(OK, callback.WaitForResult());
6494 6494
6495 EXPECT_EQ(OK, spdy_session->InitializeWithSocket(connection.release(), 6495 EXPECT_EQ(OK, spdy_session->InitializeWithSocket(connection.release(),
6496 true, OK)); 6496 true, OK));
6497 6497
6498 trans.reset(new HttpNetworkTransaction(session)); 6498 trans.reset(new HttpNetworkTransaction(session));
6499 6499
6500 rv = trans->Start(&request, &callback, BoundNetLog()); 6500 rv = trans->Start(&request, &callback, BoundNetLog());
(...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after
7670 request.motivation = HttpRequestInfo::PRECONNECT_MOTIVATED; 7670 request.motivation = HttpRequestInfo::PRECONNECT_MOTIVATED;
7671 7671
7672 scoped_ptr<HttpNetworkTransaction> trans(new HttpNetworkTransaction(session)); 7672 scoped_ptr<HttpNetworkTransaction> trans(new HttpNetworkTransaction(session));
7673 7673
7674 int rv = trans->Start(&request, &callback, BoundNetLog()); 7674 int rv = trans->Start(&request, &callback, BoundNetLog());
7675 EXPECT_EQ(ERR_IO_PENDING, rv); 7675 EXPECT_EQ(ERR_IO_PENDING, rv);
7676 EXPECT_EQ(OK, callback.WaitForResult()); 7676 EXPECT_EQ(OK, callback.WaitForResult());
7677 } 7677 }
7678 7678
7679 } // namespace net 7679 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698