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

Unified Diff: net/quic/quic_sent_packet_manager_test.cc

Issue 2100763003: Replace QUIC's PathMtuAckListener with a non-AckListener approach. Protected by FLAGS_quic_no_mtu_d… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@125674835
Patch Set: Created 4 years, 6 months 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_sent_packet_manager_interface.h ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_sent_packet_manager_test.cc
diff --git a/net/quic/quic_sent_packet_manager_test.cc b/net/quic/quic_sent_packet_manager_test.cc
index 6ead592714a98ab4f9522e4b0b9ece954dea53f4..45cd30bf9d35154ce7093ad2c8c1364a16937529 100644
--- a/net/quic/quic_sent_packet_manager_test.cc
+++ b/net/quic/quic_sent_packet_manager_test.cc
@@ -102,6 +102,8 @@ class QuicSentPacketManagerTest : public ::testing::TestWithParam<TestParams> {
.WillRepeatedly(Return(QuicBandwidth::Zero()));
EXPECT_CALL(*send_algorithm_, InSlowStart()).Times(AnyNumber());
EXPECT_CALL(*send_algorithm_, InRecovery()).Times(AnyNumber());
+ EXPECT_CALL(*network_change_visitor_, OnPathMtuIncreased(1000))
+ .Times(AnyNumber());
}
~QuicSentPacketManagerTest() override {
@@ -1776,6 +1778,24 @@ TEST_P(QuicSentPacketManagerTest, ConnectionMigrationPortChange) {
EXPECT_EQ(2u, manager_.GetConsecutiveTlpCount());
}
+TEST_P(QuicSentPacketManagerTest, PathMtuIncreased) {
+ FLAGS_quic_no_mtu_discovery_ack_listener = true;
+ EXPECT_CALL(*send_algorithm_, OnPacketSent(_, BytesInFlight(), 1, _, _))
+ .Times(1)
+ .WillOnce(Return(true));
+ SerializedPacket packet(kDefaultPathId, 1, PACKET_6BYTE_PACKET_NUMBER,
+ nullptr, kDefaultLength + 100, 0u, false, false);
+ manager_.OnPacketSent(&packet, kInvalidPathId, 0, clock_.Now(),
+ NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA);
+
+ // Ack the large packet and expect the path MTU to increase.
+ ExpectAck(1);
+ EXPECT_CALL(*network_change_visitor_,
+ OnPathMtuIncreased(kDefaultLength + 100));
+ QuicAckFrame ack_frame = InitAckFrame(1);
+ manager_.OnIncomingAck(ack_frame, clock_.Now());
+}
+
} // namespace
} // namespace test
} // namespace net
« no previous file with comments | « net/quic/quic_sent_packet_manager_interface.h ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698