OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/quic/quic_headers_stream.h" | 5 #include "net/quic/quic_headers_stream.h" |
6 | 6 |
7 #include "net/quic/quic_utils.h" | 7 #include "net/quic/quic_utils.h" |
8 #include "net/quic/spdy_utils.h" | 8 #include "net/quic/spdy_utils.h" |
9 #include "net/quic/test_tools/quic_connection_peer.h" | 9 #include "net/quic/test_tools/quic_connection_peer.h" |
10 #include "net/quic/test_tools/quic_spdy_session_peer.h" | 10 #include "net/quic/test_tools/quic_spdy_session_peer.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 QuicHeadersStreamTest() | 123 QuicHeadersStreamTest() |
124 : connection_(new StrictMock<MockConnection>(&helper_, | 124 : connection_(new StrictMock<MockConnection>(&helper_, |
125 perspective(), | 125 perspective(), |
126 GetVersion())), | 126 GetVersion())), |
127 session_(connection_), | 127 session_(connection_), |
128 headers_stream_(QuicSpdySessionPeer::GetHeadersStream(&session_)), | 128 headers_stream_(QuicSpdySessionPeer::GetHeadersStream(&session_)), |
129 body_("hello world"), | 129 body_("hello world"), |
130 framer_(HTTP2), | 130 framer_(HTTP2), |
131 stream_frame_(kHeadersStreamId, /*fin=*/false, /*offset=*/0, ""), | 131 stream_frame_(kHeadersStreamId, /*fin=*/false, /*offset=*/0, ""), |
132 next_promised_stream_id_(2) { | 132 next_promised_stream_id_(2) { |
| 133 FLAGS_quic_always_log_bugs_for_tests = true; |
133 headers_[":version"] = "HTTP/1.1"; | 134 headers_[":version"] = "HTTP/1.1"; |
134 headers_[":status"] = "200 Ok"; | 135 headers_[":status"] = "200 Ok"; |
135 headers_["content-length"] = "11"; | 136 headers_["content-length"] = "11"; |
136 framer_.set_visitor(&visitor_); | 137 framer_.set_visitor(&visitor_); |
137 EXPECT_EQ(version(), session_.connection()->version()); | 138 EXPECT_EQ(version(), session_.connection()->version()); |
138 EXPECT_TRUE(headers_stream_ != nullptr); | 139 EXPECT_TRUE(headers_stream_ != nullptr); |
139 VLOG(1) << GetParam(); | 140 VLOG(1) << GetParam(); |
140 connection_->AdvanceTime(QuicTime::Delta::FromMilliseconds(1)); | 141 connection_->AdvanceTime(QuicTime::Delta::FromMilliseconds(1)); |
141 } | 142 } |
142 | 143 |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 } | 548 } |
548 | 549 |
549 TEST_P(QuicHeadersStreamTest, NoConnectionLevelFlowControl) { | 550 TEST_P(QuicHeadersStreamTest, NoConnectionLevelFlowControl) { |
550 EXPECT_FALSE(ReliableQuicStreamPeer::StreamContributesToConnectionFlowControl( | 551 EXPECT_FALSE(ReliableQuicStreamPeer::StreamContributesToConnectionFlowControl( |
551 headers_stream_)); | 552 headers_stream_)); |
552 } | 553 } |
553 | 554 |
554 } // namespace | 555 } // namespace |
555 } // namespace test | 556 } // namespace test |
556 } // namespace net | 557 } // namespace net |
OLD | NEW |