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 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
935 | 935 |
936 MockConnect connect_data(SYNCHRONOUS, OK); | 936 MockConnect connect_data(SYNCHRONOUS, OK); |
937 MockRead reads[] = { | 937 MockRead reads[] = { |
938 MockRead(SYNCHRONOUS, ERR_IO_PENDING) // Stall forever. | 938 MockRead(SYNCHRONOUS, ERR_IO_PENDING) // Stall forever. |
939 }; | 939 }; |
940 StaticSocketDataProvider data(reads, arraysize(reads), NULL, 0); | 940 StaticSocketDataProvider data(reads, arraysize(reads), NULL, 0); |
941 data.set_connect_data(connect_data); | 941 data.set_connect_data(connect_data); |
942 session_deps.socket_factory->AddSocketDataProvider(&data); | 942 session_deps.socket_factory->AddSocketDataProvider(&data); |
943 | 943 |
944 SSLSocketDataProvider ssl(SYNCHRONOUS, OK); | 944 SSLSocketDataProvider ssl(SYNCHRONOUS, OK); |
945 ssl.origin_bound_cert_type = CLIENT_CERT_ECDSA_SIGN; | 945 ssl.domain_bound_cert_type = CLIENT_CERT_ECDSA_SIGN; |
946 ssl.protocol_negotiated = SSLClientSocket::kProtoSPDY2; | 946 ssl.protocol_negotiated = SSLClientSocket::kProtoSPDY2; |
947 session_deps.socket_factory->AddSSLSocketDataProvider(&ssl); | 947 session_deps.socket_factory->AddSSLSocketDataProvider(&ssl); |
948 | 948 |
949 scoped_refptr<HttpNetworkSession> http_session( | 949 scoped_refptr<HttpNetworkSession> http_session( |
950 SpdySessionDependencies::SpdyCreateSession(&session_deps)); | 950 SpdySessionDependencies::SpdyCreateSession(&session_deps)); |
951 | 951 |
952 const std::string kTestHost("www.foo.com"); | 952 const std::string kTestHost("www.foo.com"); |
953 const int kTestPort = 80; | 953 const int kTestPort = 80; |
954 HostPortPair test_host_port_pair(kTestHost, kTestPort); | 954 HostPortPair test_host_port_pair(kTestHost, kTestPort); |
955 HostPortProxyPair pair(test_host_port_pair, ProxyServer::Direct()); | 955 HostPortProxyPair pair(test_host_port_pair, ProxyServer::Direct()); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1061 net::NetLog::PHASE_NONE); | 1061 net::NetLog::PHASE_NONE); |
1062 | 1062 |
1063 CapturingNetLog::Entry entry = entries[pos]; | 1063 CapturingNetLog::Entry entry = entries[pos]; |
1064 NetLogSpdySessionCloseParameter* request_params = | 1064 NetLogSpdySessionCloseParameter* request_params = |
1065 static_cast<NetLogSpdySessionCloseParameter*>( | 1065 static_cast<NetLogSpdySessionCloseParameter*>( |
1066 entry.extra_parameters.get()); | 1066 entry.extra_parameters.get()); |
1067 EXPECT_EQ(ERR_CONNECTION_CLOSED, request_params->status()); | 1067 EXPECT_EQ(ERR_CONNECTION_CLOSED, request_params->status()); |
1068 } | 1068 } |
1069 | 1069 |
1070 } // namespace net | 1070 } // namespace net |
OLD | NEW |