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

Unified Diff: net/quic/quic_received_packet_manager_test.cc

Issue 420313005: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0723
Patch Set: change QUIC packet size to 1350 Created 6 years, 5 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
Index: net/quic/quic_received_packet_manager_test.cc
diff --git a/net/quic/quic_received_packet_manager_test.cc b/net/quic/quic_received_packet_manager_test.cc
index b2a52c8537c619f386a84661834c21992b40e1a4..4d203a3fa178c6de27bea5700ea00b7b63d3b822 100644
--- a/net/quic/quic_received_packet_manager_test.cc
+++ b/net/quic/quic_received_packet_manager_test.cc
@@ -307,18 +307,18 @@ TEST_F(QuicReceivedPacketManagerTest, UpdateReceivedPacketInfo) {
QuicTime two_ms = QuicTime::Zero().Add(QuicTime::Delta::FromMilliseconds(2));
received_manager_.RecordPacketReceived(0u, header, two_ms);
- ReceivedPacketInfo info;
- received_manager_.UpdateReceivedPacketInfo(&info, QuicTime::Zero());
+ QuicAckFrame ack;
+ received_manager_.UpdateReceivedPacketInfo(&ack, QuicTime::Zero());
// When UpdateReceivedPacketInfo with a time earlier than the time of the
// largest observed packet, make sure that the delta is 0, not negative.
- EXPECT_EQ(QuicTime::Delta::Zero(), info.delta_time_largest_observed);
+ EXPECT_EQ(QuicTime::Delta::Zero(), ack.delta_time_largest_observed);
QuicTime four_ms = QuicTime::Zero().Add(QuicTime::Delta::FromMilliseconds(4));
- received_manager_.UpdateReceivedPacketInfo(&info, four_ms);
+ received_manager_.UpdateReceivedPacketInfo(&ack, four_ms);
// When UpdateReceivedPacketInfo after not having received a new packet,
// the delta should still be accurate.
EXPECT_EQ(QuicTime::Delta::FromMilliseconds(2),
- info.delta_time_largest_observed);
+ ack.delta_time_largest_observed);
}
TEST_F(QuicReceivedPacketManagerTest, UpdateReceivedConnectionStats) {
@@ -337,12 +337,12 @@ TEST_F(QuicReceivedPacketManagerTest, RevivedPacket) {
RecordPacketReceipt(3, 0);
RecordPacketRevived(2);
- ReceivedPacketInfo info;
- received_manager_.UpdateReceivedPacketInfo(&info, QuicTime::Zero());
- EXPECT_EQ(1u, info.missing_packets.size());
- EXPECT_EQ(2u, *info.missing_packets.begin());
- EXPECT_EQ(1u, info.revived_packets.size());
- EXPECT_EQ(2u, *info.missing_packets.begin());
+ QuicAckFrame ack;
+ received_manager_.UpdateReceivedPacketInfo(&ack, QuicTime::Zero());
+ EXPECT_EQ(1u, ack.missing_packets.size());
+ EXPECT_EQ(2u, *ack.missing_packets.begin());
+ EXPECT_EQ(1u, ack.revived_packets.size());
+ EXPECT_EQ(2u, *ack.missing_packets.begin());
}
TEST_F(QuicReceivedPacketManagerTest, PacketRevivedThenReceived) {
@@ -351,10 +351,10 @@ TEST_F(QuicReceivedPacketManagerTest, PacketRevivedThenReceived) {
RecordPacketRevived(2);
RecordPacketReceipt(2, 0);
- ReceivedPacketInfo info;
- received_manager_.UpdateReceivedPacketInfo(&info, QuicTime::Zero());
- EXPECT_TRUE(info.missing_packets.empty());
- EXPECT_TRUE(info.revived_packets.empty());
+ QuicAckFrame ack;
+ received_manager_.UpdateReceivedPacketInfo(&ack, QuicTime::Zero());
+ EXPECT_TRUE(ack.missing_packets.empty());
+ EXPECT_TRUE(ack.revived_packets.empty());
}

Powered by Google App Engine
This is Rietveld 408576698