summaryrefslogtreecommitdiffstats
path: root/net/quic/quic_connection_helper_test.cc
diff options
context:
space:
mode:
authorrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-10 19:11:31 +0000
committerrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-10 19:11:31 +0000
commit082b65bc295b75986ca9dc6a6d6d8056e4d0a8f0 (patch)
treefa29015c1535d81561f7086ab11b7ebd9cba5b75 /net/quic/quic_connection_helper_test.cc
parent4f86bdb85442d7820db10c8980690a7f4d30e533 (diff)
downloadchromium_src-082b65bc295b75986ca9dc6a6d6d8056e4d0a8f0.zip
chromium_src-082b65bc295b75986ca9dc6a6d6d8056e4d0a8f0.tar.gz
chromium_src-082b65bc295b75986ca9dc6a6d6d8056e4d0a8f0.tar.bz2
Change from re-transmitting an packet with a retransmit number to sending a new packet with a new sequence number.
Adds GG_UINT64_C to two value in quic_framer_test.cc merge internal change: 37647530 TBR=jar@chromium.org Initially Committed: 167074 Reverted: 167082 Review URL: https://chromiumcodereview.appspot.com/11377096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167099 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic/quic_connection_helper_test.cc')
-rw-r--r--net/quic/quic_connection_helper_test.cc21
1 files changed, 11 insertions, 10 deletions
diff --git a/net/quic/quic_connection_helper_test.cc b/net/quic/quic_connection_helper_test.cc
index aa7d436..b965563 100644
--- a/net/quic/quic_connection_helper_test.cc
+++ b/net/quic/quic_connection_helper_test.cc
@@ -54,9 +54,11 @@ class TestConnection : public QuicConnection {
bool SendPacket(QuicPacketSequenceNumber sequence_number,
QuicPacket* packet,
- bool resend,
- bool force) {
- return QuicConnection::SendPacket(sequence_number, packet, resend, force);
+ bool should_resend,
+ bool force,
+ bool is_retransmit) {
+ return QuicConnection::SendPacket(
+ sequence_number, packet, should_resend, force, is_retransmit);
}
};
@@ -111,7 +113,6 @@ class QuicConnectionHelperTest : public ::testing::Test {
header_.guid = guid_;
header_.packet_sequence_number = number;
header_.transmission_time = 0;
- header_.retransmission_count = 0;
header_.flags = PACKET_FLAGS_NONE;
header_.fec_group = fec_group;
@@ -119,7 +120,7 @@ class QuicConnectionHelperTest : public ::testing::Test {
QuicFrame frame(&frame1_);
frames.push_back(frame);
QuicPacket* packet;
- framer_.ConstructFragementDataPacket(header_, frames, &packet);
+ framer_.ConstructFrameDataPacket(header_, frames, &packet);
return packet;
}
@@ -165,12 +166,10 @@ TEST_F(QuicConnectionHelperTest, TestResend) {
const uint64 kDefaultResendTimeMs = 500;
connection_.SendStreamData(1, "foo", 0, false, NULL);
- EXPECT_EQ(0u, helper_->header()->retransmission_count);
EXPECT_EQ(0u, helper_->header()->transmission_time);
runner_->RunNextTask();
-
- EXPECT_EQ(1u, helper_->header()->retransmission_count);
+ EXPECT_EQ(2u, helper_->header()->packet_sequence_number);
EXPECT_EQ(kDefaultResendTimeMs * 1000,
helper_->header()->transmission_time);
}
@@ -217,9 +216,11 @@ TEST_F(QuicConnectionHelperTest, SendSchedulerDelayThenSend) {
// Test that if we send a packet with a delay, it ends up queued.
scoped_ptr<QuicPacket> packet(ConstructDataPacket(1, 0));
EXPECT_CALL(*scheduler_, TimeUntilSend(true)).WillOnce(testing::Return(1));
- bool resend = true;
+
+ bool should_resend = true;
bool force = false;
- connection_.SendPacket(1, packet.get(), resend, force);
+ bool is_retransmit = false;
+ connection_.SendPacket(1, packet.get(), should_resend, force, is_retransmit);
EXPECT_EQ(1u, connection_.NumQueuedPackets());
// Advance the clock to fire the alarm, and configure the scheduler