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

Unified Diff: net/quic/quic_packet_creator_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.cc ('k') | net/quic/quic_packet_generator_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_packet_creator_test.cc
diff --git a/net/quic/quic_packet_creator_test.cc b/net/quic/quic_packet_creator_test.cc
index 6cd2684223bfd817eae493b691dace331028d61d..9b1ff0307a092396401afb0585c219f4ca7eeafd 100644
--- a/net/quic/quic_packet_creator_test.cc
+++ b/net/quic/quic_packet_creator_test.cc
@@ -106,6 +106,7 @@ class QuicPacketCreatorTest : public ::testing::TestWithParam<TestParams> {
serialized_packet_ = *serialized_packet;
serialized_packet_.packet = serialized_packet->packet->Clone();
delete serialized_packet->packet;
+ serialized_packet->retransmittable_frames.clear();
}
protected:
@@ -140,8 +141,8 @@ class QuicPacketCreatorTest : public ::testing::TestWithParam<TestParams> {
~QuicPacketCreatorTest() override {}
SerializedPacket SerializeAllFrames(const QuicFrames& frames) {
- SerializedPacket packet =
- creator_.SerializeAllFrames(frames, buffer_, kMaxPacketSize);
+ SerializedPacket packet = QuicPacketCreatorPeer::SerializeAllFrames(
+ &creator_, frames, buffer_, kMaxPacketSize);
EXPECT_EQ(QuicPacketCreatorPeer::GetEncryptionLevel(&creator_),
packet.encryption_level);
return packet;
@@ -1207,11 +1208,11 @@ TEST_P(QuicPacketCreatorTest, AddFrameAndFlush) {
// Ensure the packet is successfully created.
ASSERT_TRUE(serialized_packet_.packet);
- ASSERT_TRUE(serialized_packet_.retransmittable_frames);
- QuicFrames* retransmittable = serialized_packet_.retransmittable_frames;
- ASSERT_EQ(1u, retransmittable->size());
- EXPECT_EQ(STREAM_FRAME, (*retransmittable)[0].type);
- ASSERT_TRUE((*retransmittable)[0].stream_frame);
+ ASSERT_FALSE(serialized_packet_.retransmittable_frames.empty());
+ const QuicFrames& retransmittable = serialized_packet_.retransmittable_frames;
+ ASSERT_EQ(1u, retransmittable.size());
+ EXPECT_EQ(STREAM_FRAME, retransmittable[0].type);
+ ASSERT_TRUE(retransmittable[0].stream_frame);
ClearSerializedPacket(&serialized_packet_);
EXPECT_FALSE(creator_.HasPendingFrames());
« no previous file with comments | « net/quic/quic_packet_creator.cc ('k') | net/quic/quic_packet_generator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698