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

Unified Diff: net/quic/quic_sent_packet_manager_test.cc

Issue 1667003002: Replace QuicEncryptedPacket's fields with equivalents in SerializedPacket. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@113395732
Patch Set: Created 4 years, 11 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_protocol.cc ('k') | net/quic/quic_unacked_packet_map_test.cc » ('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 0fe84fb1fece3412c563f817f2df0a6e087f0a05..afc826d7b0855c32cc6fd4c68bd32981775c7872 100644
--- a/net/quic/quic_sent_packet_manager_test.cc
+++ b/net/quic/quic_sent_packet_manager_test.cc
@@ -194,10 +194,9 @@ class QuicSentPacketManagerTest : public ::testing::TestWithParam<bool> {
SerializedPacket CreatePacket(QuicPacketNumber packet_number,
bool retransmittable) {
- packets_.push_back(new QuicEncryptedPacket(nullptr, kDefaultLength));
SerializedPacket packet(kDefaultPathId, packet_number,
- PACKET_6BYTE_PACKET_NUMBER, packets_.back(), 0u,
- false, false);
+ PACKET_6BYTE_PACKET_NUMBER, nullptr, kDefaultLength,
+ 0u, false, false);
if (retransmittable) {
packet.retransmittable_frames.push_back(
QuicFrame(new QuicStreamFrame(kStreamId, false, 0, StringPiece())));
@@ -206,10 +205,9 @@ class QuicSentPacketManagerTest : public ::testing::TestWithParam<bool> {
}
SerializedPacket CreateFecPacket(QuicPacketNumber packet_number) {
- packets_.push_back(new QuicEncryptedPacket(nullptr, kDefaultLength));
SerializedPacket serialized(kDefaultPathId, packet_number,
- PACKET_6BYTE_PACKET_NUMBER, packets_.back(), 0u,
- false, false);
+ PACKET_6BYTE_PACKET_NUMBER, nullptr,
+ kDefaultLength, 0u, false, false);
serialized.is_fec_packet = true;
return serialized;
}
@@ -220,7 +218,7 @@ class QuicSentPacketManagerTest : public ::testing::TestWithParam<bool> {
.Times(1)
.WillOnce(Return(true));
SerializedPacket packet(CreateDataPacket(packet_number));
- manager_.OnPacketSent(&packet, 0, clock_.Now(), packet.packet->length(),
+ manager_.OnPacketSent(&packet, 0, clock_.Now(), packet.encrypted_length,
NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA);
}
@@ -234,7 +232,7 @@ class QuicSentPacketManagerTest : public ::testing::TestWithParam<bool> {
packet.retransmittable_frames.push_back(
QuicFrame(new QuicStreamFrame(1, false, 0, StringPiece())));
packet.has_crypto_handshake = IS_HANDSHAKE;
- manager_.OnPacketSent(&packet, 0, clock_.Now(), packet.packet->length(),
+ manager_.OnPacketSent(&packet, 0, clock_.Now(), packet.encrypted_length,
NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA);
}
@@ -245,7 +243,7 @@ class QuicSentPacketManagerTest : public ::testing::TestWithParam<bool> {
.Times(1)
.WillOnce(Return(true));
SerializedPacket packet(CreateFecPacket(packet_number));
- manager_.OnPacketSent(&packet, 0, clock_.Now(), packet.packet->length(),
+ manager_.OnPacketSent(&packet, 0, clock_.Now(), packet.encrypted_length,
NOT_RETRANSMISSION, NO_RETRANSMITTABLE_DATA);
}
@@ -256,7 +254,7 @@ class QuicSentPacketManagerTest : public ::testing::TestWithParam<bool> {
.Times(1)
.WillOnce(Return(false));
SerializedPacket packet(CreatePacket(packet_number, false));
- manager_.OnPacketSent(&packet, 0, clock_.Now(), packet.packet->length(),
+ manager_.OnPacketSent(&packet, 0, clock_.Now(), packet.encrypted_length,
NOT_RETRANSMISSION, NO_RETRANSMITTABLE_DATA);
}
« no previous file with comments | « net/quic/quic_protocol.cc ('k') | net/quic/quic_unacked_packet_map_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698