| 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 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1099 SpdySessionDependencies session_deps; | 1099 SpdySessionDependencies session_deps; |
| 1100 session_deps.host_resolver->set_synchronous_mode(true); | 1100 session_deps.host_resolver->set_synchronous_mode(true); |
| 1101 | 1101 |
| 1102 MockConnect connect_data(SYNCHRONOUS, OK); | 1102 MockConnect connect_data(SYNCHRONOUS, OK); |
| 1103 scoped_ptr<SpdyFrame> goaway(ConstructSpdyGoAway()); | 1103 scoped_ptr<SpdyFrame> goaway(ConstructSpdyGoAway()); |
| 1104 MockRead reads[] = { | 1104 MockRead reads[] = { |
| 1105 CreateMockRead(*goaway), | 1105 CreateMockRead(*goaway), |
| 1106 MockRead(SYNCHRONOUS, 0, 0) // EOF | 1106 MockRead(SYNCHRONOUS, 0, 0) // EOF |
| 1107 }; | 1107 }; |
| 1108 | 1108 |
| 1109 net::CapturingBoundNetLog log(net::CapturingNetLog::kUnbounded); | 1109 CapturingBoundNetLog log; |
| 1110 | 1110 |
| 1111 StaticSocketDataProvider data(reads, arraysize(reads), NULL, 0); | 1111 StaticSocketDataProvider data(reads, arraysize(reads), NULL, 0); |
| 1112 data.set_connect_data(connect_data); | 1112 data.set_connect_data(connect_data); |
| 1113 session_deps.socket_factory->AddSocketDataProvider(&data); | 1113 session_deps.socket_factory->AddSocketDataProvider(&data); |
| 1114 | 1114 |
| 1115 SSLSocketDataProvider ssl(SYNCHRONOUS, OK); | 1115 SSLSocketDataProvider ssl(SYNCHRONOUS, OK); |
| 1116 session_deps.socket_factory->AddSSLSocketDataProvider(&ssl); | 1116 session_deps.socket_factory->AddSSLSocketDataProvider(&ssl); |
| 1117 | 1117 |
| 1118 scoped_refptr<HttpNetworkSession> http_session( | 1118 scoped_refptr<HttpNetworkSession> http_session( |
| 1119 SpdySessionDependencies::SpdyCreateSession(&session_deps)); | 1119 SpdySessionDependencies::SpdyCreateSession(&session_deps)); |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1348 EXPECT_EQ(3u, spdy_stream2->stream_id()); | 1348 EXPECT_EQ(3u, spdy_stream2->stream_id()); |
| 1349 | 1349 |
| 1350 spdy_stream1->Cancel(); | 1350 spdy_stream1->Cancel(); |
| 1351 spdy_stream1 = NULL; | 1351 spdy_stream1 = NULL; |
| 1352 | 1352 |
| 1353 spdy_stream2->Cancel(); | 1353 spdy_stream2->Cancel(); |
| 1354 spdy_stream2 = NULL; | 1354 spdy_stream2 = NULL; |
| 1355 } | 1355 } |
| 1356 | 1356 |
| 1357 } // namespace net | 1357 } // namespace net |
| OLD | NEW |