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

Unified Diff: net/quic/congestion_control/tcp_cubic_sender_test.cc

Issue 530343003: Landing Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0828
Patch Set: Created 6 years, 3 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/congestion_control/tcp_cubic_sender.cc ('k') | net/quic/quic_connection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/tcp_cubic_sender_test.cc
diff --git a/net/quic/congestion_control/tcp_cubic_sender_test.cc b/net/quic/congestion_control/tcp_cubic_sender_test.cc
index cc52da6c7d244d9917ff64b2344730c7656a2e5c..f6afdc8122852f3143930d9ba6ed9824cb87ae2a 100644
--- a/net/quic/congestion_control/tcp_cubic_sender_test.cc
+++ b/net/quic/congestion_control/tcp_cubic_sender_test.cc
@@ -15,6 +15,7 @@
#include "net/quic/test_tools/quic_config_peer.h"
#include "testing/gtest/include/gtest/gtest.h"
+using std::make_pair;
using std::min;
namespace net {
@@ -86,11 +87,12 @@ class TcpCubicSenderTest : public ::testing::Test {
sender_->rtt_stats_.UpdateRtt(QuicTime::Delta::FromMilliseconds(60),
QuicTime::Delta::Zero(),
clock_.Now());
- SendAlgorithmInterface::CongestionMap acked_packets;
- SendAlgorithmInterface::CongestionMap lost_packets;
+ SendAlgorithmInterface::CongestionVector acked_packets;
+ SendAlgorithmInterface::CongestionVector lost_packets;
for (int i = 0; i < n; ++i) {
++acked_sequence_number_;
- acked_packets[acked_sequence_number_] = standard_packet_;
+ acked_packets.push_back(
+ make_pair(acked_sequence_number_, standard_packet_));
}
sender_->OnCongestionEvent(
true, bytes_in_flight_, acked_packets, lost_packets);
@@ -99,11 +101,12 @@ class TcpCubicSenderTest : public ::testing::Test {
}
void LoseNPackets(int n) {
- SendAlgorithmInterface::CongestionMap acked_packets;
- SendAlgorithmInterface::CongestionMap lost_packets;
+ SendAlgorithmInterface::CongestionVector acked_packets;
+ SendAlgorithmInterface::CongestionVector lost_packets;
for (int i = 0; i < n; ++i) {
++acked_sequence_number_;
- lost_packets[acked_sequence_number_] = standard_packet_;
+ lost_packets.push_back(
+ make_pair(acked_sequence_number_, standard_packet_));
}
sender_->OnCongestionEvent(
false, bytes_in_flight_, acked_packets, lost_packets);
@@ -112,9 +115,10 @@ class TcpCubicSenderTest : public ::testing::Test {
// Does not increment acked_sequence_number_.
void LosePacket(QuicPacketSequenceNumber sequence_number) {
- SendAlgorithmInterface::CongestionMap acked_packets;
- SendAlgorithmInterface::CongestionMap lost_packets;
- lost_packets[sequence_number] = standard_packet_;
+ SendAlgorithmInterface::CongestionVector acked_packets;
+ SendAlgorithmInterface::CongestionVector lost_packets;
+ lost_packets.push_back(
+ make_pair(sequence_number, standard_packet_));
sender_->OnCongestionEvent(
false, bytes_in_flight_, acked_packets, lost_packets);
bytes_in_flight_ -= kDefaultTCPMSS;
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender.cc ('k') | net/quic/quic_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698