| 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 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1038 SpdySessionDependencies session_deps; | 1038 SpdySessionDependencies session_deps; |
| 1039 session_deps.host_resolver->set_synchronous_mode(true); | 1039 session_deps.host_resolver->set_synchronous_mode(true); |
| 1040 | 1040 |
| 1041 MockConnect connect_data(SYNCHRONOUS, OK); | 1041 MockConnect connect_data(SYNCHRONOUS, OK); |
| 1042 scoped_ptr<SpdyFrame> goaway(ConstructSpdyGoAway()); | 1042 scoped_ptr<SpdyFrame> goaway(ConstructSpdyGoAway()); |
| 1043 MockRead reads[] = { | 1043 MockRead reads[] = { |
| 1044 CreateMockRead(*goaway), | 1044 CreateMockRead(*goaway), |
| 1045 MockRead(SYNCHRONOUS, 0, 0) // EOF | 1045 MockRead(SYNCHRONOUS, 0, 0) // EOF |
| 1046 }; | 1046 }; |
| 1047 | 1047 |
| 1048 net::CapturingBoundNetLog log(net::CapturingNetLog::kUnbounded); | 1048 CapturingBoundNetLog log; |
| 1049 | 1049 |
| 1050 StaticSocketDataProvider data(reads, arraysize(reads), NULL, 0); | 1050 StaticSocketDataProvider data(reads, arraysize(reads), NULL, 0); |
| 1051 data.set_connect_data(connect_data); | 1051 data.set_connect_data(connect_data); |
| 1052 session_deps.socket_factory->AddSocketDataProvider(&data); | 1052 session_deps.socket_factory->AddSocketDataProvider(&data); |
| 1053 | 1053 |
| 1054 SSLSocketDataProvider ssl(SYNCHRONOUS, OK); | 1054 SSLSocketDataProvider ssl(SYNCHRONOUS, OK); |
| 1055 session_deps.socket_factory->AddSSLSocketDataProvider(&ssl); | 1055 session_deps.socket_factory->AddSSLSocketDataProvider(&ssl); |
| 1056 | 1056 |
| 1057 scoped_refptr<HttpNetworkSession> http_session( | 1057 scoped_refptr<HttpNetworkSession> http_session( |
| 1058 SpdySessionDependencies::SpdyCreateSession(&session_deps)); | 1058 SpdySessionDependencies::SpdyCreateSession(&session_deps)); |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1287 EXPECT_EQ(3u, spdy_stream2->stream_id()); | 1287 EXPECT_EQ(3u, spdy_stream2->stream_id()); |
| 1288 | 1288 |
| 1289 spdy_stream1->Cancel(); | 1289 spdy_stream1->Cancel(); |
| 1290 spdy_stream1 = NULL; | 1290 spdy_stream1 = NULL; |
| 1291 | 1291 |
| 1292 spdy_stream2->Cancel(); | 1292 spdy_stream2->Cancel(); |
| 1293 spdy_stream2 = NULL; | 1293 spdy_stream2 = NULL; |
| 1294 } | 1294 } |
| 1295 | 1295 |
| 1296 } // namespace net | 1296 } // namespace net |
| OLD | NEW |