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

Unified Diff: net/quic/quic_packet_creator_test.cc

Issue 18307003: Implement the variable length changes necessary to easily accommodate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merging with TOT Created 7 years, 6 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_protocol.h » ('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 f9721828bd941e60e680e1c17b3353d23f54c94b..7a8daa4cc07ddabc8947aa9dd25f0b3923a18d60 100644
--- a/net/quic/quic_packet_creator_test.cc
+++ b/net/quic/quic_packet_creator_test.cc
@@ -224,14 +224,17 @@ TEST_P(QuicPacketCreatorTest, CreateStreamFrameTooLarge) {
creator_.StopSendingVersion();
}
// A string larger than fits into a frame.
+ size_t payload_length;
creator_.options()->max_packet_length = GetPacketLengthForOneStream(
QuicPacketCreatorPeer::SendVersionInPacket(&creator_),
- NOT_IN_FEC_GROUP, 4);
+ NOT_IN_FEC_GROUP, &payload_length);
QuicFrame frame;
- size_t consumed = creator_.CreateStreamFrame(1u, "testTooLong", 0u, true,
- &frame);
- EXPECT_EQ(4u, consumed);
- CheckStreamFrame(frame, 1u, "test", 0u, false);
+ const string too_long_payload(payload_length * 2, 'a');
+ size_t consumed = creator_.CreateStreamFrame(
+ 1u, too_long_payload, 0u, true, &frame);
+ EXPECT_EQ(payload_length, consumed);
+ const string payload(payload_length, 'a');
+ CheckStreamFrame(frame, 1u, payload, 0u, false);
delete frame.stream_frame;
}
« no previous file with comments | « net/quic/quic_packet_creator.cc ('k') | net/quic/quic_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698