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

Side by Side Diff: net/spdy/spdy_session_spdy3_unittest.cc

Issue 9617039: Change Origin bound certs -> Domain bound certs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 months 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/spdy/spdy_session_spdy2_unittest.cc ('k') | net/spdy/spdy_stream.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/spdy/spdy_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include "net/base/host_cache.h" 7 #include "net/base/host_cache.h"
8 #include "net/base/ip_endpoint.h" 8 #include "net/base/ip_endpoint.h"
9 #include "net/base/net_log_unittest.h" 9 #include "net/base/net_log_unittest.h"
10 #include "net/spdy/spdy_io_buffer.h" 10 #include "net/spdy/spdy_io_buffer.h"
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 942
943 MockConnect connect_data(SYNCHRONOUS, OK); 943 MockConnect connect_data(SYNCHRONOUS, OK);
944 MockRead reads[] = { 944 MockRead reads[] = {
945 MockRead(SYNCHRONOUS, ERR_IO_PENDING) // Stall forever. 945 MockRead(SYNCHRONOUS, ERR_IO_PENDING) // Stall forever.
946 }; 946 };
947 StaticSocketDataProvider data(reads, arraysize(reads), NULL, 0); 947 StaticSocketDataProvider data(reads, arraysize(reads), NULL, 0);
948 data.set_connect_data(connect_data); 948 data.set_connect_data(connect_data);
949 session_deps.socket_factory->AddSocketDataProvider(&data); 949 session_deps.socket_factory->AddSocketDataProvider(&data);
950 950
951 SSLSocketDataProvider ssl(SYNCHRONOUS, OK); 951 SSLSocketDataProvider ssl(SYNCHRONOUS, OK);
952 ssl.origin_bound_cert_type = CLIENT_CERT_ECDSA_SIGN; 952 ssl.domain_bound_cert_type = CLIENT_CERT_ECDSA_SIGN;
953 ssl.protocol_negotiated = SSLClientSocket::kProtoSPDY3; 953 ssl.protocol_negotiated = SSLClientSocket::kProtoSPDY3;
954 session_deps.socket_factory->AddSSLSocketDataProvider(&ssl); 954 session_deps.socket_factory->AddSSLSocketDataProvider(&ssl);
955 955
956 scoped_refptr<HttpNetworkSession> http_session( 956 scoped_refptr<HttpNetworkSession> http_session(
957 SpdySessionDependencies::SpdyCreateSession(&session_deps)); 957 SpdySessionDependencies::SpdyCreateSession(&session_deps));
958 958
959 const std::string kTestHost("www.foo.com"); 959 const std::string kTestHost("www.foo.com");
960 const int kTestPort = 80; 960 const int kTestPort = 80;
961 HostPortPair test_host_port_pair(kTestHost, kTestPort); 961 HostPortPair test_host_port_pair(kTestHost, kTestPort);
962 HostPortProxyPair pair(test_host_port_pair, ProxyServer::Direct()); 962 HostPortProxyPair pair(test_host_port_pair, ProxyServer::Direct());
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 ConstructSpdySettings(settings)); 1018 ConstructSpdySettings(settings));
1019 MockWrite writes[] = { 1019 MockWrite writes[] = {
1020 CreateMockWrite(*settings_frame), 1020 CreateMockWrite(*settings_frame),
1021 }; 1021 };
1022 StaticSocketDataProvider data(reads, arraysize(reads), 1022 StaticSocketDataProvider data(reads, arraysize(reads),
1023 writes, arraysize(writes)); 1023 writes, arraysize(writes));
1024 data.set_connect_data(connect_data); 1024 data.set_connect_data(connect_data);
1025 session_deps.socket_factory->AddSocketDataProvider(&data); 1025 session_deps.socket_factory->AddSocketDataProvider(&data);
1026 1026
1027 SSLSocketDataProvider ssl(SYNCHRONOUS, OK); 1027 SSLSocketDataProvider ssl(SYNCHRONOUS, OK);
1028 ssl.origin_bound_cert_type = CLIENT_CERT_ECDSA_SIGN; 1028 ssl.domain_bound_cert_type = CLIENT_CERT_ECDSA_SIGN;
1029 ssl.protocol_negotiated = SSLClientSocket::kProtoSPDY3; 1029 ssl.protocol_negotiated = SSLClientSocket::kProtoSPDY3;
1030 session_deps.socket_factory->AddSSLSocketDataProvider(&ssl); 1030 session_deps.socket_factory->AddSSLSocketDataProvider(&ssl);
1031 1031
1032 scoped_refptr<HttpNetworkSession> http_session( 1032 scoped_refptr<HttpNetworkSession> http_session(
1033 SpdySessionDependencies::SpdyCreateSession(&session_deps)); 1033 SpdySessionDependencies::SpdyCreateSession(&session_deps));
1034 1034
1035 const std::string kTestHost("www.foo.com"); 1035 const std::string kTestHost("www.foo.com");
1036 const int kTestPort = 80; 1036 const int kTestPort = 80;
1037 HostPortPair test_host_port_pair(kTestHost, kTestPort); 1037 HostPortPair test_host_port_pair(kTestHost, kTestPort);
1038 HostPortProxyPair pair(test_host_port_pair, ProxyServer::Direct()); 1038 HostPortProxyPair pair(test_host_port_pair, ProxyServer::Direct());
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 net::NetLog::PHASE_NONE); 1146 net::NetLog::PHASE_NONE);
1147 1147
1148 CapturingNetLog::Entry entry = entries[pos]; 1148 CapturingNetLog::Entry entry = entries[pos];
1149 NetLogSpdySessionCloseParameter* request_params = 1149 NetLogSpdySessionCloseParameter* request_params =
1150 static_cast<NetLogSpdySessionCloseParameter*>( 1150 static_cast<NetLogSpdySessionCloseParameter*>(
1151 entry.extra_parameters.get()); 1151 entry.extra_parameters.get());
1152 EXPECT_EQ(ERR_CONNECTION_CLOSED, request_params->status()); 1152 EXPECT_EQ(ERR_CONNECTION_CLOSED, request_params->status());
1153 } 1153 }
1154 1154
1155 } // namespace net 1155 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session_spdy2_unittest.cc ('k') | net/spdy/spdy_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698