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

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

Issue 8401024: Disable SPDY IP pooling for SSL connections with client authentication. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Remove an incorrect test case Created 9 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
« no previous file with comments | « net/socket/socket_test_util.h ('k') | net/socket/ssl_client_socket_mac.cc » ('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) 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/socket/socket_test_util.h" 5 #include "net/socket/socket_test_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 10
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 if (!allow_unconsumed_reads_) { 232 if (!allow_unconsumed_reads_) {
233 EXPECT_TRUE(reads_.empty()) << "Unconsumed read: " << reads_.front().data; 233 EXPECT_TRUE(reads_.empty()) << "Unconsumed read: " << reads_.front().data;
234 } 234 }
235 reads_.push_back(MockRead(true, data, length)); 235 reads_.push_back(MockRead(true, data, length));
236 } 236 }
237 237
238 SSLSocketDataProvider::SSLSocketDataProvider(bool async, int result) 238 SSLSocketDataProvider::SSLSocketDataProvider(bool async, int result)
239 : connect(async, result), 239 : connect(async, result),
240 next_proto_status(SSLClientSocket::kNextProtoUnsupported), 240 next_proto_status(SSLClientSocket::kNextProtoUnsupported),
241 was_npn_negotiated(false), 241 was_npn_negotiated(false),
242 client_cert_sent(false),
242 cert_request_info(NULL) { 243 cert_request_info(NULL) {
243 } 244 }
244 245
245 SSLSocketDataProvider::~SSLSocketDataProvider() { 246 SSLSocketDataProvider::~SSLSocketDataProvider() {
246 } 247 }
247 248
248 DelayedSocketData::DelayedSocketData( 249 DelayedSocketData::DelayedSocketData(
249 int write_delay, MockRead* reads, size_t reads_count, 250 int write_delay, MockRead* reads, size_t reads_count,
250 MockWrite* writes, size_t writes_count) 251 MockWrite* writes, size_t writes_count)
251 : StaticSocketDataProvider(reads, reads_count, writes, writes_count), 252 : StaticSocketDataProvider(reads, reads_count, writes, writes_count),
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 int64 MockSSLClientSocket::NumBytesRead() const { 1127 int64 MockSSLClientSocket::NumBytesRead() const {
1127 return -1; 1128 return -1;
1128 } 1129 }
1129 1130
1130 base::TimeDelta MockSSLClientSocket::GetConnectTimeMicros() const { 1131 base::TimeDelta MockSSLClientSocket::GetConnectTimeMicros() const {
1131 return base::TimeDelta::FromMicroseconds(-1); 1132 return base::TimeDelta::FromMicroseconds(-1);
1132 } 1133 }
1133 1134
1134 void MockSSLClientSocket::GetSSLInfo(net::SSLInfo* ssl_info) { 1135 void MockSSLClientSocket::GetSSLInfo(net::SSLInfo* ssl_info) {
1135 ssl_info->Reset(); 1136 ssl_info->Reset();
1136 ssl_info->cert = data_->cert_; 1137 ssl_info->cert = data_->cert;
1138 ssl_info->client_cert_sent = data_->client_cert_sent;
1137 } 1139 }
1138 1140
1139 void MockSSLClientSocket::GetSSLCertRequestInfo( 1141 void MockSSLClientSocket::GetSSLCertRequestInfo(
1140 net::SSLCertRequestInfo* cert_request_info) { 1142 net::SSLCertRequestInfo* cert_request_info) {
1141 DCHECK(cert_request_info); 1143 DCHECK(cert_request_info);
1142 if (data_->cert_request_info) { 1144 if (data_->cert_request_info) {
1143 cert_request_info->host_and_port = 1145 cert_request_info->host_and_port =
1144 data_->cert_request_info->host_and_port; 1146 data_->cert_request_info->host_and_port;
1145 cert_request_info->client_certs = data_->cert_request_info->client_certs; 1147 cert_request_info->client_certs = data_->cert_request_info->client_certs;
1146 } else { 1148 } else {
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
1601 1603
1602 const char kSOCKS5OkRequest[] = 1604 const char kSOCKS5OkRequest[] =
1603 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; 1605 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 };
1604 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); 1606 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest);
1605 1607
1606 const char kSOCKS5OkResponse[] = 1608 const char kSOCKS5OkResponse[] =
1607 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; 1609 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 };
1608 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); 1610 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse);
1609 1611
1610 } // namespace net 1612 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socket_test_util.h ('k') | net/socket/ssl_client_socket_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698