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

Side by Side Diff: net/quic/congestion_control/tcp_loss_algorithm_test.cc

Issue 183683025: CL generated with data from dead-code analysis using Scythe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/congestion_control/tcp_loss_algorithm.h" 5 #include "net/quic/congestion_control/tcp_loss_algorithm.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
11 #include "net/quic/quic_unacked_packet_map.h" 11 #include "net/quic/quic_unacked_packet_map.h"
12 #include "net/quic/test_tools/mock_clock.h" 12 #include "net/quic/test_tools/mock_clock.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 namespace net { 15 namespace net {
16 namespace test { 16 namespace test {
17 namespace { 17 namespace {
18 18
19 class TcpLossAlgorithmTest : public ::testing::Test { 19 class TcpLossAlgorithmTest : public ::testing::Test {
20 protected: 20 protected:
21 TcpLossAlgorithmTest() 21 TcpLossAlgorithmTest()
22 : unacked_packets_(true), 22 : unacked_packets_(),
23 srtt_(QuicTime::Delta::FromMilliseconds(100)) { } 23 srtt_(QuicTime::Delta::FromMilliseconds(100)) { }
24 24
25 void SendDataPacket(QuicPacketSequenceNumber sequence_number) { 25 void SendDataPacket(QuicPacketSequenceNumber sequence_number) {
26 SerializedPacket packet(sequence_number, PACKET_1BYTE_SEQUENCE_NUMBER, 26 SerializedPacket packet(sequence_number, PACKET_1BYTE_SEQUENCE_NUMBER,
27 NULL, 0, new RetransmittableFrames()); 27 NULL, 0, new RetransmittableFrames());
28 unacked_packets_.AddPacket(packet); 28 unacked_packets_.AddPacket(packet);
29 unacked_packets_.SetPending(sequence_number, clock_.Now(), 1000); 29 unacked_packets_.SetPending(sequence_number, clock_.Now(), 1000);
30 } 30 }
31 31
32 void VerifyLosses(QuicPacketSequenceNumber largest_observed, 32 void VerifyLosses(QuicPacketSequenceNumber largest_observed,
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 unacked_packets_.SetNotPending(2); 157 unacked_packets_.SetNotPending(2);
158 unacked_packets_.NackPacket(1, 1); 158 unacked_packets_.NackPacket(1, 1);
159 unacked_packets_.NeuterPacket(1); 159 unacked_packets_.NeuterPacket(1);
160 VerifyLosses(2, NULL, 0); 160 VerifyLosses(2, NULL, 0);
161 EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout()); 161 EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
162 } 162 }
163 163
164 } // namespace 164 } // namespace
165 } // namespace test 165 } // namespace test
166 } // namespace net 166 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender.cc ('k') | net/quic/congestion_control/time_loss_algorithm_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698