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

Side by Side Diff: net/quic/test_tools/quic_test_utils.h

Issue 2393933002: Move the logic from SendAlgorithmInterface::RetransmissionDelay() into QuicSentPacketManager, becau… (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « net/quic/core/quic_sent_packet_manager_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Common utilities for Quic tests 5 // Common utilities for Quic tests
6 6
7 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 7 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 MOCK_METHOD1(OnRetransmissionTimeout, void(bool)); 749 MOCK_METHOD1(OnRetransmissionTimeout, void(bool));
750 MOCK_METHOD0(OnConnectionMigration, void()); 750 MOCK_METHOD0(OnConnectionMigration, void());
751 MOCK_METHOD0(RevertRetransmissionTimeout, void()); 751 MOCK_METHOD0(RevertRetransmissionTimeout, void());
752 MOCK_CONST_METHOD2(TimeUntilSend, 752 MOCK_CONST_METHOD2(TimeUntilSend,
753 QuicTime::Delta(QuicTime now, 753 QuicTime::Delta(QuicTime now,
754 QuicByteCount bytes_in_flight)); 754 QuicByteCount bytes_in_flight));
755 MOCK_CONST_METHOD1(PacingRate, QuicBandwidth(QuicByteCount)); 755 MOCK_CONST_METHOD1(PacingRate, QuicBandwidth(QuicByteCount));
756 MOCK_CONST_METHOD0(BandwidthEstimate, QuicBandwidth(void)); 756 MOCK_CONST_METHOD0(BandwidthEstimate, QuicBandwidth(void));
757 MOCK_CONST_METHOD0(HasReliableBandwidthEstimate, bool()); 757 MOCK_CONST_METHOD0(HasReliableBandwidthEstimate, bool());
758 MOCK_METHOD1(OnRttUpdated, void(QuicPacketNumber)); 758 MOCK_METHOD1(OnRttUpdated, void(QuicPacketNumber));
759 MOCK_CONST_METHOD0(RetransmissionDelay, QuicTime::Delta(void));
760 MOCK_CONST_METHOD0(GetCongestionWindow, QuicByteCount()); 759 MOCK_CONST_METHOD0(GetCongestionWindow, QuicByteCount());
761 MOCK_CONST_METHOD0(GetDebugState, std::string()); 760 MOCK_CONST_METHOD0(GetDebugState, std::string());
762 MOCK_CONST_METHOD0(InSlowStart, bool()); 761 MOCK_CONST_METHOD0(InSlowStart, bool());
763 MOCK_CONST_METHOD0(InRecovery, bool()); 762 MOCK_CONST_METHOD0(InRecovery, bool());
764 MOCK_CONST_METHOD0(GetSlowStartThreshold, QuicByteCount()); 763 MOCK_CONST_METHOD0(GetSlowStartThreshold, QuicByteCount());
765 MOCK_CONST_METHOD0(GetCongestionControlType, CongestionControlType()); 764 MOCK_CONST_METHOD0(GetCongestionControlType, CongestionControlType());
766 MOCK_METHOD2(ResumeConnectionState, 765 MOCK_METHOD2(ResumeConnectionState,
767 void(const CachedNetworkParameters&, bool)); 766 void(const CachedNetworkParameters&, bool));
768 MOCK_METHOD1(OnApplicationLimited, void(QuicByteCount)); 767 MOCK_METHOD1(OnApplicationLimited, void(QuicByteCount));
769 768
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 T absolute_margin = expected * relative_margin; 1045 T absolute_margin = expected * relative_margin;
1047 1046
1048 EXPECT_GE(expected + absolute_margin, actual); 1047 EXPECT_GE(expected + absolute_margin, actual);
1049 EXPECT_LE(expected - absolute_margin, actual); 1048 EXPECT_LE(expected - absolute_margin, actual);
1050 } 1049 }
1051 1050
1052 } // namespace test 1051 } // namespace test
1053 } // namespace net 1052 } // namespace net
1054 1053
1055 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 1054 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/core/quic_sent_packet_manager_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698