Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: net/quic/quic_spdy_stream_test.cc

Issue 1870833005: relnote: Implements OnHeaderFrameStart and OnHeaderFrameEnd in QuicHeadersStream. Not used in produ… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@06_CL_119188441
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/quic/quic_spdy_stream_test.cc
diff --git a/net/quic/quic_spdy_stream_test.cc b/net/quic/quic_spdy_stream_test.cc
index a50c082470aaec9a86059a8a8332ad43b0c0ff91..3338175c1875bb9c99cdc250978948363a064b40 100644
--- a/net/quic/quic_spdy_stream_test.cc
+++ b/net/quic/quic_spdy_stream_test.cc
@@ -138,6 +138,22 @@ TEST_P(QuicSpdyStreamTest, ProcessHeaders) {
EXPECT_FALSE(stream_->IsDoneReading());
}
+TEST_P(QuicSpdyStreamTest, ProcessHeaderList) {
+ Initialize(kShouldProcessData);
+
+ size_t total_bytes = 0;
+ QuicHeaderList headers;
+ for (auto p : headers_) {
+ headers.OnHeader(p.first, p.second);
+ total_bytes += p.first.size() + p.second.size();
+ }
+ stream_->OnStreamHeadersPriority(kV3HighestPriority);
+ stream_->OnStreamHeaderList(false, total_bytes, headers);
+ EXPECT_EQ("", stream_->data());
+ EXPECT_FALSE(stream_->header_list().empty());
+ EXPECT_FALSE(stream_->IsDoneReading());
+}
+
TEST_P(QuicSpdyStreamTest, ProcessHeadersWithFin) {
Initialize(kShouldProcessData);
@@ -154,6 +170,23 @@ TEST_P(QuicSpdyStreamTest, ProcessHeadersWithFin) {
EXPECT_TRUE(stream_->HasFinalReceivedByteOffset());
}
+TEST_P(QuicSpdyStreamTest, ProcessHeaderListWithFin) {
+ Initialize(kShouldProcessData);
+
+ size_t total_bytes = 0;
+ QuicHeaderList headers;
+ for (auto p : headers_) {
+ headers.OnHeader(p.first, p.second);
+ total_bytes += p.first.size() + p.second.size();
+ }
+ stream_->OnStreamHeadersPriority(kV3HighestPriority);
+ stream_->OnStreamHeaderList(true, total_bytes, headers);
+ EXPECT_EQ("", stream_->data());
+ EXPECT_FALSE(stream_->header_list().empty());
+ EXPECT_FALSE(stream_->IsDoneReading());
+ EXPECT_TRUE(stream_->HasFinalReceivedByteOffset());
+}
+
TEST_P(QuicSpdyStreamTest, ParseHeaderStatusCode) {
// A valid status code should be 3-digit integer. The first digit should be in
// the range of [1, 5]. All the others are invalid.

Powered by Google App Engine
This is Rietveld 408576698