Index: net/quic/quic_connection_test.cc |
diff --git a/net/quic/quic_connection_test.cc b/net/quic/quic_connection_test.cc |
index 5636363093d035190bc6c3d87fedf0e86a0039a5..c1e20f038f6c5420212e24020ee03ade42ace7fc 100644 |
--- a/net/quic/quic_connection_test.cc |
+++ b/net/quic/quic_connection_test.cc |
@@ -638,7 +638,7 @@ class QuicConnectionTest : public ::testing::TestWithParam<bool> { |
} |
size_t ProcessFecProtectedPacket(QuicPacketSequenceNumber number, |
- bool expect_revival, bool entropy_flag) { |
+ bool expect_revival, bool entropy_flag) { |
if (expect_revival) { |
EXPECT_CALL(visitor_, OnStreamFrames(_)).WillOnce(Return(accept_packet_)); |
} |
@@ -2785,6 +2785,17 @@ TEST_F(QuicConnectionTest, ReceivedEntropyHashCalculation) { |
EXPECT_EQ(146u, outgoing_ack()->received_info.entropy_hash); |
} |
+TEST_F(QuicConnectionTest, ReceivedEntropyHashCalculationHalfFEC) { |
+ // FEC packets should not change the entropy hash calculation. |
+ EXPECT_CALL(visitor_, OnStreamFrames(_)).WillRepeatedly(Return(true)); |
+ EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); |
+ ProcessDataPacket(1, 1, kEntropyFlag); |
+ ProcessFecPacket(4, 1, false, kEntropyFlag, NULL); |
+ ProcessDataPacket(3, 3, !kEntropyFlag); |
+ ProcessFecPacket(7, 3, false, kEntropyFlag, NULL); |
+ EXPECT_EQ(146u, outgoing_ack()->received_info.entropy_hash); |
+} |
+ |
TEST_F(QuicConnectionTest, UpdateEntropyForReceivedPackets) { |
EXPECT_CALL(visitor_, OnStreamFrames(_)).WillRepeatedly(Return(true)); |
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); |