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

Side by Side Diff: net/quic/quic_sent_packet_manager_test.cc

Issue 112953003: Remove a QUIC test only flag(limit_rto_increase_for_tests) to limit the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
« no previous file with comments | « net/quic/quic_sent_packet_manager.cc ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/quic_sent_packet_manager.h" 5 #include "net/quic/quic_sent_packet_manager.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "net/quic/test_tools/quic_sent_packet_manager_peer.h" 8 #include "net/quic/test_tools/quic_sent_packet_manager_peer.h"
9 #include "net/quic/test_tools/quic_test_utils.h" 9 #include "net/quic/test_tools/quic_test_utils.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 EXPECT_EQ(delay, 1053 EXPECT_EQ(delay,
1054 QuicSentPacketManagerPeer::GetRetransmissionDelay(&manager_)); 1054 QuicSentPacketManagerPeer::GetRetransmissionDelay(&manager_));
1055 delay = delay.Add(delay); 1055 delay = delay.Add(delay);
1056 EXPECT_CALL(*send_algorithm_, OnPacketAbandoned(i + 1, _)); 1056 EXPECT_CALL(*send_algorithm_, OnPacketAbandoned(i + 1, _));
1057 EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout()); 1057 EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout());
1058 manager_.OnRetransmissionTimeout(); 1058 manager_.OnRetransmissionTimeout();
1059 RetransmitNextPacket(i + 2); 1059 RetransmitNextPacket(i + 2);
1060 } 1060 }
1061 } 1061 }
1062 1062
1063 TEST_F(QuicSentPacketManagerTest, GetTestTransmissionDelayTailDrop) {
1064 FLAGS_limit_rto_increase_for_tests = true;
1065
1066 SendDataPacket(1);
1067 QuicTime::Delta delay = QuicTime::Delta::FromMilliseconds(500);
1068 EXPECT_CALL(*send_algorithm_, RetransmissionDelay())
1069 .WillRepeatedly(Return(delay));
1070
1071 // No backoff for the first 5 retransmissions.
1072 for (int i = 0; i < 5; ++i) {
1073 EXPECT_EQ(delay,
1074 QuicSentPacketManagerPeer::GetRetransmissionDelay(&manager_));
1075 EXPECT_CALL(*send_algorithm_, OnPacketAbandoned(i + 1, _));
1076 EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout());
1077 manager_.OnRetransmissionTimeout();
1078 RetransmitNextPacket(i + 2);
1079 }
1080
1081 // Then backoff starts
1082 EXPECT_EQ(delay.Add(delay),
1083 QuicSentPacketManagerPeer::GetRetransmissionDelay(&manager_));
1084 }
1085
1086 } // namespace 1063 } // namespace
1087 } // namespace test 1064 } // namespace test
1088 } // namespace net 1065 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_sent_packet_manager.cc ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698