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

Unified Diff: net/quic/quic_connection_helper_test.cc

Issue 11377096: Change from re-transmitting an packet with a retransmit number to sending a new packet with a new s… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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_connection.cc ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection_helper_test.cc
diff --git a/net/quic/quic_connection_helper_test.cc b/net/quic/quic_connection_helper_test.cc
index aa7d4363f557fd5ac580dc4aacfd753f802d8273..b965563cb4b3db4d602debeb4371b31ec776c47b 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
« no previous file with comments | « net/quic/quic_connection.cc ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698