#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 {
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);
}
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);
// 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;