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/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 Loading... |
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::kProtoSPDY2; | 953 ssl.protocol_negotiated = SSLClientSocket::kProtoSPDY2; |
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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1070 net::NetLog::PHASE_NONE); | 1070 net::NetLog::PHASE_NONE); |
1071 | 1071 |
1072 CapturingNetLog::Entry entry = entries[pos]; | 1072 CapturingNetLog::Entry entry = entries[pos]; |
1073 NetLogSpdySessionCloseParameter* request_params = | 1073 NetLogSpdySessionCloseParameter* request_params = |
1074 static_cast<NetLogSpdySessionCloseParameter*>( | 1074 static_cast<NetLogSpdySessionCloseParameter*>( |
1075 entry.extra_parameters.get()); | 1075 entry.extra_parameters.get()); |
1076 EXPECT_EQ(ERR_CONNECTION_CLOSED, request_params->status()); | 1076 EXPECT_EQ(ERR_CONNECTION_CLOSED, request_params->status()); |
1077 } | 1077 } |
1078 | 1078 |
1079 } // namespace net | 1079 } // namespace net |
OLD | NEW |