| Index: net/quic/congestion_control/time_loss_algorithm_test.cc
|
| diff --git a/net/quic/congestion_control/time_loss_algorithm_test.cc b/net/quic/congestion_control/time_loss_algorithm_test.cc
|
| index b964d2863a47a13585f6d2cbc17ccc81bedd66d9..1e9b7e5610b80512a9c8fbb9f6778c7b5b291ffe 100644
|
| --- a/net/quic/congestion_control/time_loss_algorithm_test.cc
|
| +++ b/net/quic/congestion_control/time_loss_algorithm_test.cc
|
| @@ -12,8 +12,14 @@
|
| #include "net/quic/test_tools/mock_clock.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| +using std::vector;
|
| +
|
| namespace net {
|
| namespace test {
|
| +namespace {
|
| +
|
| +// Default packet length.
|
| +const uint32 kDefaultLength = 1000;
|
|
|
| class TimeLossAlgorithmTest : public ::testing::Test {
|
| protected:
|
| @@ -24,9 +30,16 @@ class TimeLossAlgorithmTest : public ::testing::Test {
|
| clock_.Now());
|
| }
|
|
|
| + ~TimeLossAlgorithmTest() override {
|
| + STLDeleteElements(&packets_);
|
| + }
|
| +
|
| void SendDataPacket(QuicPacketSequenceNumber sequence_number) {
|
| + packets_.push_back(QuicPacket::NewDataPacket(
|
| + nullptr, kDefaultLength, false, PACKET_8BYTE_CONNECTION_ID, false,
|
| + PACKET_1BYTE_SEQUENCE_NUMBER));
|
| SerializedPacket packet(sequence_number, PACKET_1BYTE_SEQUENCE_NUMBER,
|
| - nullptr, 0, new RetransmittableFrames());
|
| + packets_.back(), 0, new RetransmittableFrames());
|
| unacked_packets_.AddSentPacket(packet, 0, NOT_RETRANSMISSION, clock_.Now(),
|
| 1000, true);
|
| }
|
| @@ -43,6 +56,7 @@ class TimeLossAlgorithmTest : public ::testing::Test {
|
| }
|
| }
|
|
|
| + vector<QuicPacket*> packets_;
|
| QuicUnackedPacketMap unacked_packets_;
|
| TimeLossAlgorithm loss_algorithm_;
|
| RttStats rtt_stats_;
|
| @@ -134,5 +148,6 @@ TEST_F(TimeLossAlgorithmTest, MultipleLossesAtOnce) {
|
| EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
|
| }
|
|
|
| +} // namespace
|
| } // namespace test
|
| } // namespace net
|
|
|