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/core/quic_spdy_stream.h" | 5 #include "net/quic/core/quic_spdy_stream.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "net/quic/core/quic_connection.h" | 10 #include "net/quic/core/quic_connection.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 Initialize(kShouldProcessData); | 137 Initialize(kShouldProcessData); |
138 | 138 |
139 stream_->OnStreamHeadersPriority(kV3HighestPriority); | 139 stream_->OnStreamHeadersPriority(kV3HighestPriority); |
140 ProcessHeaders(false, headers_); | 140 ProcessHeaders(false, headers_); |
141 EXPECT_EQ("", stream_->data()); | 141 EXPECT_EQ("", stream_->data()); |
142 EXPECT_FALSE(stream_->header_list().empty()); | 142 EXPECT_FALSE(stream_->header_list().empty()); |
143 EXPECT_FALSE(stream_->IsDoneReading()); | 143 EXPECT_FALSE(stream_->IsDoneReading()); |
144 } | 144 } |
145 | 145 |
146 TEST_P(QuicSpdyStreamTest, ProcessTooLargeHeaderList) { | 146 TEST_P(QuicSpdyStreamTest, ProcessTooLargeHeaderList) { |
147 FLAGS_quic_reloadable_flag_quic_limit_uncompressed_headers = true; | |
148 Initialize(kShouldProcessData); | 147 Initialize(kShouldProcessData); |
149 | 148 |
150 QuicHeaderList headers; | 149 QuicHeaderList headers; |
151 stream_->OnStreamHeadersPriority(kV3HighestPriority); | 150 stream_->OnStreamHeadersPriority(kV3HighestPriority); |
152 | 151 |
153 EXPECT_CALL(*session_, | 152 EXPECT_CALL(*session_, |
154 SendRstStream(stream_->id(), QUIC_HEADERS_TOO_LARGE, 0)); | 153 SendRstStream(stream_->id(), QUIC_HEADERS_TOO_LARGE, 0)); |
155 stream_->OnStreamHeaderList(false, 1 << 20, headers); | 154 stream_->OnStreamHeaderList(false, 1 << 20, headers); |
156 EXPECT_EQ(QUIC_HEADERS_TOO_LARGE, stream_->stream_error()); | 155 EXPECT_EQ(QUIC_HEADERS_TOO_LARGE, stream_->stream_error()); |
157 } | 156 } |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 | 944 |
946 // Writing Trailers should fail, as the FIN has already been sent. | 945 // Writing Trailers should fail, as the FIN has already been sent. |
947 // populated with the number of body bytes written. | 946 // populated with the number of body bytes written. |
948 EXPECT_QUIC_BUG(stream_->WriteTrailers(SpdyHeaderBlock(), nullptr), | 947 EXPECT_QUIC_BUG(stream_->WriteTrailers(SpdyHeaderBlock(), nullptr), |
949 "Trailers cannot be sent after a FIN"); | 948 "Trailers cannot be sent after a FIN"); |
950 } | 949 } |
951 | 950 |
952 } // namespace | 951 } // namespace |
953 } // namespace test | 952 } // namespace test |
954 } // namespace net | 953 } // namespace net |
OLD | NEW |