| Index: net/quic/core/quic_connection_test.cc
|
| diff --git a/net/quic/core/quic_connection_test.cc b/net/quic/core/quic_connection_test.cc
|
| index 5d6f9e284dd4d261b0fc44b6043da58cd6bca74d..3bf6045f6df72355efeb75132dad821de2164a72 100644
|
| --- a/net/quic/core/quic_connection_test.cc
|
| +++ b/net/quic/core/quic_connection_test.cc
|
| @@ -5185,9 +5185,12 @@ TEST_P(QuicConnectionTest, ClientReceivesRejOnNonCryptoStream) {
|
|
|
| TEST_P(QuicConnectionTest, CloseConnectionOnPacketTooLarge) {
|
| SimulateNextPacketTooLarge();
|
| - // Although the data packet cannot be written, the send packet manager is
|
| - // informed. Also a connection close packet is sent.
|
| - EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(2);
|
| + if (!FLAGS_quic_only_track_sent_packets) {
|
| + // Although the data packet cannot be written, the send packet manager is
|
| + // informed.
|
| + EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(2);
|
| + }
|
| + // A connection close packet is sent
|
| EXPECT_CALL(visitor_, OnConnectionClosed(QUIC_PACKET_WRITE_ERROR, _,
|
| ConnectionCloseSource::FROM_SELF))
|
| .Times(1);
|
| @@ -5198,7 +5201,9 @@ TEST_P(QuicConnectionTest, AlwaysGetPacketTooLarge) {
|
| // Test even we always get packet too large, we do not infinitely try to send
|
| // close packet.
|
| AlwaysGetPacketTooLarge();
|
| - EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(2);
|
| + if (!FLAGS_quic_only_track_sent_packets) {
|
| + EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(2);
|
| + }
|
| EXPECT_CALL(visitor_, OnConnectionClosed(QUIC_PACKET_WRITE_ERROR, _,
|
| ConnectionCloseSource::FROM_SELF))
|
| .Times(1);
|
|
|