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

Unified Diff: net/quic/quic_packet_generator_test.cc

Issue 1421853006: Landing Recent QUIC changes until: Fri Oct 30 22:23:58 2015 +0000 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments 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
« no previous file with comments | « net/quic/quic_packet_generator.cc ('k') | net/quic/quic_protocol.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 044dfa4f6342b95b2132eee1752802b511f30150..0dcf22918e23eb790216dab961bacec2919d4467 100644
--- a/net/quic/quic_packet_generator_test.cc
+++ b/net/quic/quic_packet_generator_test.cc
@@ -1217,7 +1217,35 @@ TEST_P(QuicPacketGeneratorTest, ResetFecGroupNoTimeout) {
// FEC_ANY_TRIGGER.
CheckPacketIsFec(8, 7);
}
- EXPECT_TRUE(creator_->IsFecProtected());
+ EXPECT_FALSE(creator_->IsFecProtected());
+
+ // Do the another send (with MAY_FEC_PROTECT) on a different stream id, which
+ // should not produce an FEC packet because the last FEC group has been
+ // closed.
+ {
+ InSequence dummy;
+ EXPECT_CALL(delegate_, OnSerializedPacket(_))
+ .WillOnce(Invoke(this, &QuicPacketGeneratorTest::SavePacket));
+ EXPECT_CALL(delegate_, OnSerializedPacket(_))
+ .WillOnce(Invoke(this, &QuicPacketGeneratorTest::SavePacket));
+ EXPECT_CALL(delegate_, OnSerializedPacket(_))
+ .WillOnce(Invoke(this, &QuicPacketGeneratorTest::SavePacket));
+ }
+ consumed = generator_.ConsumeData(9, CreateData(data_len), 0, true,
+ MAY_FEC_PROTECT, nullptr);
+ EXPECT_EQ(data_len, consumed.bytes_consumed);
+ EXPECT_TRUE(consumed.fin_consumed);
+ EXPECT_FALSE(generator_.HasQueuedFrames());
+ if (generator_.fec_send_policy() == FEC_ALARM_TRIGGER) {
+ CheckPacketHasSingleStreamFrame(6);
+ CheckPacketHasSingleStreamFrame(7);
+ CheckPacketHasSingleStreamFrame(8);
+ } else {
+ CheckPacketHasSingleStreamFrame(9);
+ CheckPacketHasSingleStreamFrame(10);
+ CheckPacketHasSingleStreamFrame(11);
+ }
+ EXPECT_FALSE(creator_->IsFecProtected());
}
// 1. Create and send one packet with MUST_FEC_PROTECT.
« no previous file with comments | « net/quic/quic_packet_generator.cc ('k') | net/quic/quic_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698