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

Unified Diff: net/quic/quic_framer_test.cc

Issue 156233004: Add a LOG(DFATAL) if the sequence number length is too small to fit the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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_framer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_framer_test.cc
diff --git a/net/quic/quic_framer_test.cc b/net/quic/quic_framer_test.cc
index d51565e0c3299518309101d2333d9f4d0d65b858..b4c2b85a8312b6b920cca4c4e4984b6cc35a60f0 100644
--- a/net/quic/quic_framer_test.cc
+++ b/net/quic/quic_framer_test.cc
@@ -4582,7 +4582,7 @@ TEST_P(QuicFramerTest, Truncation) {
QuicAckFrame ack_frame;
ack_frame.received_info.largest_observed = 601;
- ack_frame.sent_info.least_unacked = 0;
+ ack_frame.sent_info.least_unacked = header.packet_sequence_number - 1;
for (uint64 i = 1; i < ack_frame.received_info.largest_observed; i += 2) {
ack_frame.received_info.missing_packets.insert(i);
}
@@ -4606,7 +4606,8 @@ TEST_P(QuicFramerTest, Truncation) {
ASSERT_TRUE(framer_.ProcessPacket(*ack_packet));
ASSERT_EQ(1u, visitor_.ack_frames_.size());
const QuicAckFrame& processed_ack_frame = *visitor_.ack_frames_[0];
- EXPECT_EQ(0u, processed_ack_frame.sent_info.least_unacked);
+ EXPECT_EQ(header.packet_sequence_number - 1,
+ processed_ack_frame.sent_info.least_unacked);
EXPECT_TRUE(processed_ack_frame.received_info.is_truncated);
EXPECT_EQ(510u, processed_ack_frame.received_info.largest_observed);
ASSERT_EQ(255u, processed_ack_frame.received_info.missing_packets.size());
@@ -4630,7 +4631,7 @@ TEST_P(QuicFramerTest, CleanTruncation) {
QuicAckFrame ack_frame;
ack_frame.received_info.largest_observed = 201;
- ack_frame.sent_info.least_unacked = 0;
+ ack_frame.sent_info.least_unacked = header.packet_sequence_number - 2;
for (uint64 i = 1; i < ack_frame.received_info.largest_observed; ++i) {
ack_frame.received_info.missing_packets.insert(i);
}
« no previous file with comments | « net/quic/quic_framer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698