| 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 "base/memory/ref_counted.h" | 5 #include "base/memory/ref_counted.h" |
| 6 #include "net/base/completion_callback.h" | 6 #include "net/base/completion_callback.h" |
| 7 #include "net/base/net_log_unittest.h" | 7 #include "net/base/net_log_unittest.h" |
| 8 #include "net/spdy/buffered_spdy_framer.h" | 8 #include "net/spdy/buffered_spdy_framer.h" |
| 9 #include "net/spdy/spdy_stream.h" | 9 #include "net/spdy/spdy_stream.h" |
| 10 #include "net/spdy/spdy_http_utils.h" | 10 #include "net/spdy/spdy_http_utils.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 106 |
| 107 scoped_refptr<SpdySession> CreateSpdySession() { | 107 scoped_refptr<SpdySession> CreateSpdySession() { |
| 108 spdy::SpdyFramer::set_enable_compression_default(false); | 108 spdy::SpdyFramer::set_enable_compression_default(false); |
| 109 HostPortPair host_port_pair("www.google.com", 80); | 109 HostPortPair host_port_pair("www.google.com", 80); |
| 110 HostPortProxyPair pair(host_port_pair, ProxyServer::Direct()); | 110 HostPortProxyPair pair(host_port_pair, ProxyServer::Direct()); |
| 111 scoped_refptr<SpdySession> session( | 111 scoped_refptr<SpdySession> session( |
| 112 session_->spdy_session_pool()->Get(pair, BoundNetLog())); | 112 session_->spdy_session_pool()->Get(pair, BoundNetLog())); |
| 113 return session; | 113 return session; |
| 114 } | 114 } |
| 115 | 115 |
| 116 virtual void SetUp() { |
| 117 SpdySession::set_default_protocol(SSLClientSocket::kProtoSPDY2); |
| 118 } |
| 119 |
| 116 virtual void TearDown() { | 120 virtual void TearDown() { |
| 117 MessageLoop::current()->RunAllPending(); | 121 MessageLoop::current()->RunAllPending(); |
| 118 } | 122 } |
| 119 | 123 |
| 120 scoped_refptr<HttpNetworkSession> session_; | 124 scoped_refptr<HttpNetworkSession> session_; |
| 121 }; | 125 }; |
| 122 | 126 |
| 123 TEST_F(SpdyStreamSpdy2Test, SendDataAfterOpen) { | 127 TEST_F(SpdyStreamSpdy2Test, SendDataAfterOpen) { |
| 124 SpdySessionDependencies session_deps; | 128 SpdySessionDependencies session_deps; |
| 125 | 129 |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 net::NetLog::PHASE_NONE); | 403 net::NetLog::PHASE_NONE); |
| 400 | 404 |
| 401 CapturingNetLog::Entry entry = entries[pos]; | 405 CapturingNetLog::Entry entry = entries[pos]; |
| 402 NetLogSpdyStreamErrorParameter* request_params = | 406 NetLogSpdyStreamErrorParameter* request_params = |
| 403 static_cast<NetLogSpdyStreamErrorParameter*>( | 407 static_cast<NetLogSpdyStreamErrorParameter*>( |
| 404 entry.extra_parameters.get()); | 408 entry.extra_parameters.get()); |
| 405 EXPECT_EQ(stream_id, request_params->stream_id()); | 409 EXPECT_EQ(stream_id, request_params->stream_id()); |
| 406 } | 410 } |
| 407 | 411 |
| 408 } // namespace net | 412 } // namespace net |
| OLD | NEW |