| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_stream.h" | 5 #include "net/spdy/spdy_stream.h" |
| 6 #include "base/ref_counted.h" | 6 #include "base/ref_counted.h" |
| 7 #include "net/base/mock_host_resolver.h" | 7 #include "net/base/mock_host_resolver.h" |
| 8 #include "net/base/net_errors.h" | 8 #include "net/base/net_errors.h" |
| 9 #include "net/base/ssl_config_service.h" | 9 #include "net/base/ssl_config_service.h" |
| 10 #include "net/base/ssl_config_service_defaults.h" | 10 #include "net/base/ssl_config_service_defaults.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 scoped_refptr<SpdySessionPool> spdy_session_pool; | 71 scoped_refptr<SpdySessionPool> spdy_session_pool; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 HttpNetworkSession* CreateSession(SessionDependencies* session_deps) { | 74 HttpNetworkSession* CreateSession(SessionDependencies* session_deps) { |
| 75 return new HttpNetworkSession(NULL, | 75 return new HttpNetworkSession(NULL, |
| 76 session_deps->host_resolver, | 76 session_deps->host_resolver, |
| 77 session_deps->proxy_service, | 77 session_deps->proxy_service, |
| 78 &session_deps->socket_factory, | 78 &session_deps->socket_factory, |
| 79 session_deps->ssl_config_service, | 79 session_deps->ssl_config_service, |
| 80 session_deps->spdy_session_pool, | 80 session_deps->spdy_session_pool, |
| 81 session_deps->http_auth_handler_factory.get()); | 81 session_deps->http_auth_handler_factory.get(), |
| 82 NULL); |
| 82 } | 83 } |
| 83 | 84 |
| 84 class SpdyStreamTest : public testing::Test { | 85 class SpdyStreamTest : public testing::Test { |
| 85 protected: | 86 protected: |
| 86 SpdyStreamTest() | 87 SpdyStreamTest() |
| 87 : session_(CreateSession(&session_deps_)), | 88 : session_(CreateSession(&session_deps_)), |
| 88 pool_peer_(session_->spdy_session_pool()) {} | 89 pool_peer_(session_->spdy_session_pool()) {} |
| 89 | 90 |
| 90 scoped_refptr<SpdySession> CreateSpdySession() { | 91 scoped_refptr<SpdySession> CreateSpdySession() { |
| 91 HostPortPair host_port_pair("www.google.com", 80); | 92 HostPortPair host_port_pair("www.google.com", 80); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 121 // socket close/error, but we aren't communicating over a socket here. | 122 // socket close/error, but we aren't communicating over a socket here. |
| 122 pool_peer_.RemoveSpdySession(session); | 123 pool_peer_.RemoveSpdySession(session); |
| 123 } | 124 } |
| 124 | 125 |
| 125 // TODO(willchan): Write a longer test for SpdyStream that exercises all | 126 // TODO(willchan): Write a longer test for SpdyStream that exercises all |
| 126 // methods. | 127 // methods. |
| 127 | 128 |
| 128 } // namespace | 129 } // namespace |
| 129 | 130 |
| 130 } // namespace net | 131 } // namespace net |
| OLD | NEW |