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

Unified Diff: net/quic/quic_packet_generator_test.cc

Issue 1660593004: Landing Recent QUIC changes until 01/28/2016 18:41 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0202
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_packet_creator_test.cc ('k') | net/quic/quic_protocol.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_packet_generator_test.cc
diff --git a/net/quic/quic_packet_generator_test.cc b/net/quic/quic_packet_generator_test.cc
index 15de51fc8b8aac98b9741dc8330af48181a0f3b1..b0986ec295af1816fd6baf60c620558cc4cc03a9 100644
--- a/net/quic/quic_packet_generator_test.cc
+++ b/net/quic/quic_packet_generator_test.cc
@@ -133,6 +133,7 @@ class QuicPacketGeneratorTest : public ::testing::TestWithParam<FecSendPolicy> {
ASSERT_FALSE(packet->packet->owns_buffer());
scoped_ptr<QuicEncryptedPacket> encrypted_deleter(packets_.back().packet);
packets_.back().packet = packets_.back().packet->Clone();
+ packet->retransmittable_frames.clear();
}
protected:
@@ -157,11 +158,11 @@ class QuicPacketGeneratorTest : public ::testing::TestWithParam<FecSendPolicy> {
contents.num_mtu_discovery_frames + num_retransmittable_frames;
if (num_retransmittable_frames == 0) {
- ASSERT_TRUE(packet.retransmittable_frames == nullptr);
+ ASSERT_TRUE(packet.retransmittable_frames.empty());
} else {
- ASSERT_TRUE(packet.retransmittable_frames != nullptr);
+ ASSERT_FALSE(packet.retransmittable_frames.empty());
EXPECT_EQ(num_retransmittable_frames,
- packet.retransmittable_frames->size());
+ packet.retransmittable_frames.size());
}
ASSERT_TRUE(packet.packet != nullptr);
@@ -188,8 +189,8 @@ class QuicPacketGeneratorTest : public ::testing::TestWithParam<FecSendPolicy> {
void CheckPacketHasSingleStreamFrame(size_t packet_index) {
ASSERT_GT(packets_.size(), packet_index);
const SerializedPacket& packet = packets_[packet_index];
- ASSERT_TRUE(packet.retransmittable_frames != nullptr);
- EXPECT_EQ(1u, packet.retransmittable_frames->size());
+ ASSERT_FALSE(packet.retransmittable_frames.empty());
+ EXPECT_EQ(1u, packet.retransmittable_frames.size());
ASSERT_TRUE(packet.packet != nullptr);
ASSERT_TRUE(simple_framer_.ProcessPacket(*packet.packet));
EXPECT_EQ(1u, simple_framer_.num_frames());
@@ -205,7 +206,7 @@ class QuicPacketGeneratorTest : public ::testing::TestWithParam<FecSendPolicy> {
void CheckPacketIsFec(size_t packet_index, QuicPacketNumber fec_group) {
ASSERT_GT(packets_.size(), packet_index);
const SerializedPacket& packet = packets_[packet_index];
- ASSERT_TRUE(packet.retransmittable_frames == nullptr);
+ ASSERT_TRUE(packet.retransmittable_frames.empty());
ASSERT_TRUE(packet.packet != nullptr);
ASSERT_TRUE(simple_framer_.ProcessPacket(*packet.packet));
EXPECT_TRUE(simple_framer_.header().fec_flag);
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/quic/quic_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698