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

Unified Diff: net/quic/quic_packet_generator_test.cc

Issue 1459343009: Make QuicPacketCreator be able to serialize packet itself when it does not have room for next strea… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@107733506
Patch Set: Created 5 years, 1 month 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_packet_generator_test.cc
diff --git a/net/quic/quic_packet_generator_test.cc b/net/quic/quic_packet_generator_test.cc
index 0dcf22918e23eb790216dab961bacec2919d4467..2c9487ae2bcdc17a9a41a0fd8da3450923778518 100644
--- a/net/quic/quic_packet_generator_test.cc
+++ b/net/quic/quic_packet_generator_test.cc
@@ -716,12 +716,14 @@ TEST_P(QuicPacketGeneratorTest, ConsumeData_FramesPreviouslyQueued) {
EXPECT_TRUE(generator_.HasQueuedFrames());
// This frame will not fit with the existing frame, causing the queued frame
- // to be serialized, and it will not fit with another frame like it, so it is
- // serialized by itself.
+ // to be serialized, and it will be added to a new open packet.
consumed = generator_.ConsumeData(kHeadersStreamId, MakeIOVector("bar"), 3,
true, MAY_FEC_PROTECT, nullptr);
EXPECT_EQ(3u, consumed.bytes_consumed);
EXPECT_TRUE(consumed.fin_consumed);
+ EXPECT_TRUE(generator_.HasQueuedFrames());
+
+ creator_->Flush();
EXPECT_FALSE(generator_.HasQueuedFrames());
PacketContents contents;

Powered by Google App Engine
This is Rietveld 408576698