| Index: net/quic/quic_connection_test.cc
|
| diff --git a/net/quic/quic_connection_test.cc b/net/quic/quic_connection_test.cc
|
| index 38ead0ca1c0fd7e1520a5f865a068cb05105352d..6cfe64eabb8a055a6d84ac7c31063d47052409cd 100644
|
| --- a/net/quic/quic_connection_test.cc
|
| +++ b/net/quic/quic_connection_test.cc
|
| @@ -1484,11 +1484,8 @@ TEST_P(QuicConnectionTest, FECSending) {
|
| IN_FEC_GROUP, &payload_length);
|
| creator->set_max_packet_length(length);
|
|
|
| - // Enable FEC.
|
| - creator->set_max_packets_per_fec_group(2);
|
| -
|
| - // Send 4 protected data packets, which will also trigger 2 FEC packets.
|
| - EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(6);
|
| + // Send 4 protected data packets, which should also trigger 1 FEC packet.
|
| + EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(5);
|
| // The first stream frame will have 2 fewer overhead bytes than the other 3.
|
| const string payload(payload_length * 4 + 2, 'a');
|
| connection_.SendStreamDataWithStringWithFec(1, payload, 0, !kFin, NULL);
|
| @@ -1506,8 +1503,7 @@ TEST_P(QuicConnectionTest, FECQueueing) {
|
| connection_.version(), kIncludeVersion, PACKET_1BYTE_SEQUENCE_NUMBER,
|
| IN_FEC_GROUP, &payload_length);
|
| creator->set_max_packet_length(length);
|
| - // Enable FEC.
|
| - creator->set_max_packets_per_fec_group(1);
|
| + EXPECT_TRUE(creator->IsFecEnabled());
|
|
|
| EXPECT_EQ(0u, connection_.NumQueuedPackets());
|
| BlockOnNextWrite();
|
| @@ -1520,9 +1516,8 @@ TEST_P(QuicConnectionTest, FECQueueing) {
|
| }
|
|
|
| TEST_P(QuicConnectionTest, AbandonFECFromCongestionWindow) {
|
| - // Enable FEC.
|
| - QuicConnectionPeer::GetPacketCreator(
|
| - &connection_)->set_max_packets_per_fec_group(1);
|
| + EXPECT_TRUE(QuicConnectionPeer::GetPacketCreator(
|
| + &connection_)->IsFecEnabled());
|
|
|
| // 1 Data and 1 FEC packet.
|
| EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(2);
|
| @@ -1541,9 +1536,8 @@ TEST_P(QuicConnectionTest, AbandonFECFromCongestionWindow) {
|
|
|
| TEST_P(QuicConnectionTest, DontAbandonAckedFEC) {
|
| EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
|
| - // Enable FEC.
|
| - QuicConnectionPeer::GetPacketCreator(
|
| - &connection_)->set_max_packets_per_fec_group(1);
|
| + EXPECT_TRUE(QuicConnectionPeer::GetPacketCreator(
|
| + &connection_)->IsFecEnabled());
|
|
|
| // 1 Data and 1 FEC packet.
|
| EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(6);
|
| @@ -1570,9 +1564,8 @@ TEST_P(QuicConnectionTest, DontAbandonAckedFEC) {
|
|
|
| TEST_P(QuicConnectionTest, AbandonAllFEC) {
|
| EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
|
| - // Enable FEC.
|
| - QuicConnectionPeer::GetPacketCreator(
|
| - &connection_)->set_max_packets_per_fec_group(1);
|
| + EXPECT_TRUE(QuicConnectionPeer::GetPacketCreator(
|
| + &connection_)->IsFecEnabled());
|
|
|
| // 1 Data and 1 FEC packet.
|
| EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(6);
|
| @@ -1687,9 +1680,8 @@ TEST_P(QuicConnectionTest, FramePackingCryptoThenNonCrypto) {
|
| }
|
|
|
| TEST_P(QuicConnectionTest, FramePackingFEC) {
|
| - // Enable FEC.
|
| - QuicConnectionPeer::GetPacketCreator(
|
| - &connection_)->set_max_packets_per_fec_group(6);
|
| + EXPECT_TRUE(QuicConnectionPeer::GetPacketCreator(
|
| + &connection_)->IsFecEnabled());
|
|
|
| CongestionBlockWrites();
|
|
|
|
|