| 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/spdy/spdy_session.h" | 7 #include "net/spdy/spdy_session.h" |
| 8 #include "net/spdy/spdy_test_util.h" | 8 #include "net/spdy/spdy_test_util.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 TEST_F(SpdyStreamTest, SendDataAfterOpen) { | 134 TEST_F(SpdyStreamTest, SendDataAfterOpen) { |
| 135 SpdySessionDependencies session_deps; | 135 SpdySessionDependencies session_deps; |
| 136 | 136 |
| 137 session_ = SpdySessionDependencies::SpdyCreateSession(&session_deps); | 137 session_ = SpdySessionDependencies::SpdyCreateSession(&session_deps); |
| 138 SpdySessionPoolPeer pool_peer_(session_->spdy_session_pool()); | 138 SpdySessionPoolPeer pool_peer_(session_->spdy_session_pool()); |
| 139 | 139 |
| 140 const SpdyHeaderInfo kSynStartHeader = { | 140 const SpdyHeaderInfo kSynStartHeader = { |
| 141 spdy::SYN_STREAM, | 141 spdy::SYN_STREAM, |
| 142 1, | 142 1, |
| 143 0, | 143 0, |
| 144 SPDY_PRIORITY_LOWEST, | 144 net::ConvertRequestPriorityToSpdyPriority(LOWEST), |
| 145 spdy::CONTROL_FLAG_NONE, | 145 spdy::CONTROL_FLAG_NONE, |
| 146 false, | 146 false, |
| 147 spdy::INVALID, | 147 spdy::INVALID, |
| 148 NULL, | 148 NULL, |
| 149 0, | 149 0, |
| 150 spdy::DATA_FLAG_NONE | 150 spdy::DATA_FLAG_NONE |
| 151 }; | 151 }; |
| 152 static const char* const kGetHeaders[] = { | 152 static const char* const kGetHeaders[] = { |
| 153 "method", | 153 "method", |
| 154 "GET", | 154 "GET", |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 | 223 |
| 224 EXPECT_TRUE(delegate->send_headers_completed()); | 224 EXPECT_TRUE(delegate->send_headers_completed()); |
| 225 EXPECT_EQ("200", (*delegate->response())["status"]); | 225 EXPECT_EQ("200", (*delegate->response())["status"]); |
| 226 EXPECT_EQ("HTTP/1.1", (*delegate->response())["version"]); | 226 EXPECT_EQ("HTTP/1.1", (*delegate->response())["version"]); |
| 227 EXPECT_EQ(std::string("\0hello!\xff", 8), delegate->received_data()); | 227 EXPECT_EQ(std::string("\0hello!\xff", 8), delegate->received_data()); |
| 228 EXPECT_EQ(8, delegate->data_sent()); | 228 EXPECT_EQ(8, delegate->data_sent()); |
| 229 EXPECT_TRUE(delegate->closed()); | 229 EXPECT_TRUE(delegate->closed()); |
| 230 } | 230 } |
| 231 | 231 |
| 232 } // namespace net | 232 } // namespace net |
| OLD | NEW |