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 "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 // Owned by the |session_|. | 119 // Owned by the |session_|. |
120 TestStream* stream_; | 120 TestStream* stream_; |
121 TestStream* stream2_; | 121 TestStream* stream2_; |
122 | 122 |
123 SpdyHeaderBlock headers_; | 123 SpdyHeaderBlock headers_; |
124 }; | 124 }; |
125 | 125 |
126 INSTANTIATE_TEST_CASE_P(Tests, | 126 INSTANTIATE_TEST_CASE_P(Tests, |
127 QuicSpdyStreamTest, | 127 QuicSpdyStreamTest, |
128 ::testing::ValuesIn(QuicSupportedVersions())); | 128 ::testing::ValuesIn(AllSupportedVersions())); |
129 | 129 |
130 TEST_P(QuicSpdyStreamTest, ProcessHeaders) { | 130 TEST_P(QuicSpdyStreamTest, ProcessHeaders) { |
131 Initialize(kShouldProcessData); | 131 Initialize(kShouldProcessData); |
132 | 132 |
133 string headers = SpdyUtils::SerializeUncompressedHeaders(headers_); | 133 string headers = SpdyUtils::SerializeUncompressedHeaders(headers_); |
134 stream_->OnStreamHeadersPriority(kV3HighestPriority); | 134 stream_->OnStreamHeadersPriority(kV3HighestPriority); |
135 stream_->OnStreamHeaders(headers); | 135 stream_->OnStreamHeaders(headers); |
136 EXPECT_EQ("", stream_->data()); | 136 EXPECT_EQ("", stream_->data()); |
137 EXPECT_EQ(headers, stream_->decompressed_headers()); | 137 EXPECT_EQ(headers, stream_->decompressed_headers()); |
138 stream_->OnStreamHeadersComplete(false, headers.size()); | 138 stream_->OnStreamHeadersComplete(false, headers.size()); |
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
996 | 996 |
997 // Writing Trailers should fail, as the FIN has already been sent. | 997 // Writing Trailers should fail, as the FIN has already been sent. |
998 // populated with the number of body bytes written. | 998 // populated with the number of body bytes written. |
999 EXPECT_DFATAL(stream_->WriteTrailers(SpdyHeaderBlock(), nullptr), | 999 EXPECT_DFATAL(stream_->WriteTrailers(SpdyHeaderBlock(), nullptr), |
1000 "Trailers cannot be sent after a FIN"); | 1000 "Trailers cannot be sent after a FIN"); |
1001 } | 1001 } |
1002 | 1002 |
1003 } // namespace | 1003 } // namespace |
1004 } // namespace test | 1004 } // namespace test |
1005 } // namespace net | 1005 } // namespace net |
OLD | NEW |