Index: net/quic/core/quic_connection_test.cc |
diff --git a/net/quic/core/quic_connection_test.cc b/net/quic/core/quic_connection_test.cc |
index 144f6744650cd40528db1d7202c704ff1ae64264..b4c6ba81208a16e058ebe7a8c1f9aca2ce181e0e 100644 |
--- a/net/quic/core/quic_connection_test.cc |
+++ b/net/quic/core/quic_connection_test.cc |
@@ -390,6 +390,10 @@ class TestPacketWriter : public QuicPacketWriter { |
return framer_.ping_frames(); |
} |
+ const std::vector<QuicPaddingFrame>& padding_frames() const { |
+ return framer_.padding_frames(); |
+ } |
+ |
size_t last_packet_size() { return last_packet_size_; } |
const QuicVersionNegotiationPacket* version_negotiation_packet() { |
@@ -1776,8 +1780,9 @@ TEST_P(QuicConnectionTest, FramePackingNonCryptoThenCrypto) { |
EXPECT_FALSE(connection_.HasQueuedData()); |
// Parse the last packet and ensure it's the crypto stream frame. |
- EXPECT_EQ(1u, writer_->frame_count()); |
+ EXPECT_EQ(2u, writer_->frame_count()); |
ASSERT_EQ(1u, writer_->stream_frames().size()); |
+ ASSERT_EQ(1u, writer_->padding_frames().size()); |
EXPECT_EQ(kCryptoStreamId, writer_->stream_frames()[0]->stream_id); |
} |
@@ -1854,8 +1859,9 @@ TEST_P(QuicConnectionTest, FramePackingSendv) { |
// Parse the last packet and ensure multiple iovector blocks have |
// been packed into a single stream frame from one stream. |
- EXPECT_EQ(1u, writer_->frame_count()); |
+ EXPECT_EQ(2u, writer_->frame_count()); |
EXPECT_EQ(1u, writer_->stream_frames().size()); |
+ EXPECT_EQ(1u, writer_->padding_frames().size()); |
QuicStreamFrame* frame = writer_->stream_frames()[0].get(); |
EXPECT_EQ(1u, frame->stream_id); |
EXPECT_EQ("ABCD", QuicStringPiece(frame->data_buffer, frame->data_length)); |
@@ -1883,8 +1889,9 @@ TEST_P(QuicConnectionTest, FramePackingSendvQueued) { |
EXPECT_EQ(0u, connection_.NumQueuedPackets()); |
// Parse the last packet and ensure it's one stream frame from one stream. |
- EXPECT_EQ(1u, writer_->frame_count()); |
+ EXPECT_EQ(2u, writer_->frame_count()); |
EXPECT_EQ(1u, writer_->stream_frames().size()); |
+ EXPECT_EQ(1u, writer_->padding_frames().size()); |
EXPECT_EQ(1u, writer_->stream_frames()[0]->stream_id); |
} |
@@ -4175,10 +4182,10 @@ TEST_P(QuicConnectionTest, SendDelayedAckOnOutgoingCryptoPacket) { |
nullptr); |
// Check that ack is bundled with outgoing crypto data. |
if (GetParam().no_stop_waiting) { |
- EXPECT_EQ(2u, writer_->frame_count()); |
+ EXPECT_EQ(3u, writer_->frame_count()); |
EXPECT_TRUE(writer_->stop_waiting_frames().empty()); |
} else { |
- EXPECT_EQ(3u, writer_->frame_count()); |
+ EXPECT_EQ(4u, writer_->frame_count()); |
EXPECT_FALSE(writer_->stop_waiting_frames().empty()); |
} |
EXPECT_FALSE(connection_.GetAckAlarm()->IsSet()); |
@@ -4211,13 +4218,14 @@ TEST_P(QuicConnectionTest, BundleAckForSecondCHLO) { |
ProcessPacket(2); |
// Check that ack is sent and that delayed ack alarm is reset. |
if (GetParam().no_stop_waiting) { |
- EXPECT_EQ(2u, writer_->frame_count()); |
+ EXPECT_EQ(3u, writer_->frame_count()); |
EXPECT_TRUE(writer_->stop_waiting_frames().empty()); |
} else { |
- EXPECT_EQ(3u, writer_->frame_count()); |
+ EXPECT_EQ(4u, writer_->frame_count()); |
EXPECT_FALSE(writer_->stop_waiting_frames().empty()); |
} |
EXPECT_EQ(1u, writer_->stream_frames().size()); |
+ EXPECT_EQ(1u, writer_->padding_frames().size()); |
EXPECT_FALSE(writer_->ack_frames().empty()); |
EXPECT_EQ(2u, writer_->ack_frames().front().largest_observed); |
EXPECT_FALSE(connection_.GetAckAlarm()->IsSet()); |
@@ -4239,13 +4247,14 @@ TEST_P(QuicConnectionTest, BundleAckForSecondCHLOTwoPacketReject) { |
} |
// Check that ack is sent and that delayed ack alarm is reset. |
if (GetParam().no_stop_waiting) { |
- EXPECT_EQ(2u, writer_->frame_count()); |
+ EXPECT_EQ(3u, writer_->frame_count()); |
EXPECT_TRUE(writer_->stop_waiting_frames().empty()); |
} else { |
- EXPECT_EQ(3u, writer_->frame_count()); |
+ EXPECT_EQ(4u, writer_->frame_count()); |
EXPECT_FALSE(writer_->stop_waiting_frames().empty()); |
} |
EXPECT_EQ(1u, writer_->stream_frames().size()); |
+ EXPECT_EQ(1u, writer_->padding_frames().size()); |
EXPECT_FALSE(writer_->ack_frames().empty()); |
EXPECT_EQ(2u, writer_->ack_frames().front().largest_observed); |
EXPECT_FALSE(connection_.GetAckAlarm()->IsSet()); |