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/tools/quic/quic_spdy_client_stream.h" | 5 #include "net/tools/quic/quic_spdy_client_stream.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "net/quic/core/quic_utils.h" | 10 #include "net/quic/core/quic_utils.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 stream_->OnStreamFrame( | 149 stream_->OnStreamFrame( |
150 QuicStreamFrame(stream_->id(), /*fin=*/false, /*offset=*/0, large_body)); | 150 QuicStreamFrame(stream_->id(), /*fin=*/false, /*offset=*/0, large_body)); |
151 | 151 |
152 EXPECT_NE(QUIC_STREAM_NO_ERROR, stream_->stream_error()); | 152 EXPECT_NE(QUIC_STREAM_NO_ERROR, stream_->stream_error()); |
153 } | 153 } |
154 | 154 |
155 TEST_F(QuicSpdyClientStreamTest, TestNoBidirectionalStreaming) { | 155 TEST_F(QuicSpdyClientStreamTest, TestNoBidirectionalStreaming) { |
156 if (FLAGS_quic_reloadable_flag_quic_always_enable_bidi_streaming) { | 156 if (FLAGS_quic_reloadable_flag_quic_always_enable_bidi_streaming) { |
157 return; | 157 return; |
158 } | 158 } |
159 QuicStreamFrame frame(kClientDataStreamId1, false, 3, StringPiece("asd")); | 159 QuicStreamFrame frame(kClientDataStreamId1, false, 3, QuicStringPiece("asd")); |
160 | 160 |
161 EXPECT_FALSE(stream_->write_side_closed()); | 161 EXPECT_FALSE(stream_->write_side_closed()); |
162 stream_->OnStreamFrame(frame); | 162 stream_->OnStreamFrame(frame); |
163 EXPECT_TRUE(stream_->write_side_closed()); | 163 EXPECT_TRUE(stream_->write_side_closed()); |
164 } | 164 } |
165 | 165 |
166 TEST_F(QuicSpdyClientStreamTest, ReceivingTrailers) { | 166 TEST_F(QuicSpdyClientStreamTest, ReceivingTrailers) { |
167 // Test that receiving trailing headers, containing a final offset, results in | 167 // Test that receiving trailing headers, containing a final offset, results in |
168 // the stream being closed at that byte offset. | 168 // the stream being closed at that byte offset. |
169 // Send headers as usual. | 169 // Send headers as usual. |
(...skipping 20 matching lines...) Expand all Loading... |
190 stream_->OnStreamFrame( | 190 stream_->OnStreamFrame( |
191 QuicStreamFrame(stream_->id(), /*fin=*/false, /*offset=*/0, body_)); | 191 QuicStreamFrame(stream_->id(), /*fin=*/false, /*offset=*/0, body_)); |
192 if (FLAGS_quic_reloadable_flag_quic_always_enable_bidi_streaming) { | 192 if (FLAGS_quic_reloadable_flag_quic_always_enable_bidi_streaming) { |
193 EXPECT_TRUE(stream_->reading_stopped()); | 193 EXPECT_TRUE(stream_->reading_stopped()); |
194 } | 194 } |
195 } | 195 } |
196 | 196 |
197 } // namespace | 197 } // namespace |
198 } // namespace test | 198 } // namespace test |
199 } // namespace net | 199 } // namespace net |
OLD | NEW |