diff options
author | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-04 00:43:59 +0000 |
---|---|---|
committer | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-04 00:43:59 +0000 |
commit | 98a9d1251324e4d70f3bdbda53a763db0663c4a3 (patch) | |
tree | 54bc3e53bc1596fc98db2ac86609f8c136d7b8ac /net/quic/quic_framer_test.cc | |
parent | 15429abf3b71f29b1bb21d493aa0a7220242b39b (diff) | |
download | chromium_src-98a9d1251324e4d70f3bdbda53a763db0663c4a3.zip chromium_src-98a9d1251324e4d70f3bdbda53a763db0663c4a3.tar.gz chromium_src-98a9d1251324e4d70f3bdbda53a763db0663c4a3.tar.bz2 |
Land Recent QUIC Changes
Set the delayed ack timer to 0ms intstead of 100ms for crypto handshake
packets.
This both provides a more accurate RTT estimate early on in a connection
and gives the server confidence the handshake has completed and it's
safe to increase the CWND further.
Merge internal change: 64134758
https://codereview.chromium.org/221373005/
Making framer capable of handling stream frame headers in packets
correctly when using FEC. Stream frame length is always written, even
for the last stream frame with FEC, to avoid boundary condition and
padding issues in the framer.
These changes are working towards getting FEC up and running correctly.
Merge internal change: 64080142
https://codereview.chromium.org/212223011/
Change to QUIC's TLP timer to set it based on the last pending packet,
even when that packet has no retransmittable frames.
Merge internal change: 64059923
https://codereview.chromium.org/220163008/
QUIC - cleanup changes fixed while sync'ing with internal source tree.
https://codereview.chromium.org/212523003/
R=rch@chromium.org
Review URL: https://codereview.chromium.org/220723013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261606 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic/quic_framer_test.cc')
-rw-r--r-- | net/quic/quic_framer_test.cc | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/net/quic/quic_framer_test.cc b/net/quic/quic_framer_test.cc index 96fc39b..56adfc9 100644 --- a/net/quic/quic_framer_test.cc +++ b/net/quic/quic_framer_test.cc @@ -3899,6 +3899,62 @@ TEST_P(QuicFramerTest, BuildStreamFramePacket) { AsChars(packet), arraysize(packet)); } +TEST_P(QuicFramerTest, BuildStreamFramePacketInFecGroup) { + QuicPacketHeader header; + header.public_header.connection_id = GG_UINT64_C(0xFEDCBA9876543210); + header.public_header.reset_flag = false; + header.public_header.version_flag = false; + header.fec_flag = false; + header.entropy_flag = true; + header.packet_sequence_number = GG_UINT64_C(0x77123456789ABC); + header.is_in_fec_group = IN_FEC_GROUP; + header.fec_group = GG_UINT64_C(0x77123456789ABC); + + QuicStreamFrame stream_frame; + stream_frame.stream_id = 0x01020304; + stream_frame.fin = true; + stream_frame.offset = GG_UINT64_C(0xBA98FEDC32107654); + stream_frame.data = MakeIOVector("hello world!"); + + QuicFrames frames; + frames.push_back(QuicFrame(&stream_frame)); + unsigned char packet[] = { + // public flags (8 byte connection_id) + 0x3C, + // connection_id + 0x10, 0x32, 0x54, 0x76, + 0x98, 0xBA, 0xDC, 0xFE, + // packet sequence number + 0xBC, 0x9A, 0x78, 0x56, + 0x34, 0x12, + // private flags (entropy, is_in_fec_group) + 0x03, + // FEC group + 0x00, + // frame type (stream frame with fin and data length field) + 0xFF, + // stream id + 0x04, 0x03, 0x02, 0x01, + // offset + 0x54, 0x76, 0x10, 0x32, + 0xDC, 0xFE, 0x98, 0xBA, + // data length (since packet is in an FEC group) + 0x0C, 0x00, + // data + 'h', 'e', 'l', 'l', + 'o', ' ', 'w', 'o', + 'r', 'l', 'd', '!', + }; + + scoped_ptr<QuicPacket> data( + framer_.BuildUnsizedDataPacket(header, frames).packet); + ASSERT_TRUE(data != NULL); + + test::CompareCharArraysWithHexError("constructed packet", + data->data(), data->length(), + AsChars(packet), arraysize(packet)); +} + TEST_P(QuicFramerTest, BuildStreamFramePacketWithVersionFlag) { QuicPacketHeader header; header.public_header.connection_id = GG_UINT64_C(0xFEDCBA9876543210); |