| 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 <cstddef> | 5 #include <cstddef> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 MockConnect connect_data(SYNCHRONOUS, OK); | 156 MockConnect connect_data(SYNCHRONOUS, OK); |
| 157 data.set_connect_data(connect_data); | 157 data.set_connect_data(connect_data); |
| 158 | 158 |
| 159 session_deps_.socket_factory->AddSocketDataProvider(&data); | 159 session_deps_.socket_factory->AddSocketDataProvider(&data); |
| 160 | 160 |
| 161 InitializeSpdySession(spdy_session, host_port_pair_); | 161 InitializeSpdySession(spdy_session, host_port_pair_); |
| 162 BoundNetLog net_log; | 162 BoundNetLog net_log; |
| 163 | 163 |
| 164 // Conjure up a stream. | 164 // Conjure up a stream. |
| 165 SpdyStream stream(SPDY_PUSH_STREAM, | 165 SpdyStream stream(SPDY_PUSH_STREAM, |
| 166 spdy_session, | 166 spdy_session.get(), |
| 167 std::string(), | 167 std::string(), |
| 168 DEFAULT_PRIORITY, | 168 DEFAULT_PRIORITY, |
| 169 kSpdyStreamInitialWindowSize, | 169 kSpdyStreamInitialWindowSize, |
| 170 kSpdyStreamInitialWindowSize, | 170 kSpdyStreamInitialWindowSize, |
| 171 net_log); | 171 net_log); |
| 172 stream.set_stream_id(2); | 172 stream.set_stream_id(2); |
| 173 EXPECT_FALSE(stream.response_received()); | 173 EXPECT_FALSE(stream.response_received()); |
| 174 EXPECT_FALSE(stream.HasUrl()); | 174 EXPECT_FALSE(stream.HasUrl()); |
| 175 | 175 |
| 176 // Set a couple of headers. | 176 // Set a couple of headers. |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 EXPECT_EQ("HTTP/1.1", delegate.GetResponseHeaderValue("version")); | 404 EXPECT_EQ("HTTP/1.1", delegate.GetResponseHeaderValue("version")); |
| 405 EXPECT_EQ(std::string(), delegate.TakeReceivedData()); | 405 EXPECT_EQ(std::string(), delegate.TakeReceivedData()); |
| 406 EXPECT_TRUE(data.at_write_eof()); | 406 EXPECT_TRUE(data.at_write_eof()); |
| 407 } | 407 } |
| 408 | 408 |
| 409 } // namespace | 409 } // namespace |
| 410 | 410 |
| 411 } // namespace test | 411 } // namespace test |
| 412 | 412 |
| 413 } // namespace net | 413 } // namespace net |
| OLD | NEW |