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

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

Issue 1037633002: Add a QUIC connection option(BWMX) to resume to the max bandwidth (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Populate_RTT_info_89043159
Patch Set: Created 5 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
« no previous file with comments | « net/quic/quic_sent_packet_manager.cc ('k') | net/quic/quic_server_session.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/quic_flags.h" 8 #include "net/quic/quic_flags.h"
9 #include "net/quic/test_tools/quic_config_peer.h" 9 #include "net/quic/test_tools/quic_config_peer.h"
10 #include "net/quic/test_tools/quic_sent_packet_manager_peer.h" 10 #include "net/quic/test_tools/quic_sent_packet_manager_peer.h"
(...skipping 1701 matching lines...) Expand 10 before | Expand all | Expand 10 after
1712 EXPECT_EQ(initial_rtt_us, manager_.GetRttStats()->initial_rtt_us()); 1712 EXPECT_EQ(initial_rtt_us, manager_.GetRttStats()->initial_rtt_us());
1713 } 1713 }
1714 1714
1715 TEST_F(QuicSentPacketManagerTest, ResumeConnectionState) { 1715 TEST_F(QuicSentPacketManagerTest, ResumeConnectionState) {
1716 // The sent packet manager should use the RTT from CachedNetworkParameters if 1716 // The sent packet manager should use the RTT from CachedNetworkParameters if
1717 // it is provided. 1717 // it is provided.
1718 const int kRttMs = 1234; 1718 const int kRttMs = 1234;
1719 CachedNetworkParameters cached_network_params; 1719 CachedNetworkParameters cached_network_params;
1720 cached_network_params.set_min_rtt_ms(kRttMs); 1720 cached_network_params.set_min_rtt_ms(kRttMs);
1721 1721
1722 EXPECT_CALL(*send_algorithm_, ResumeConnectionState(_)); 1722 EXPECT_CALL(*send_algorithm_, ResumeConnectionState(_, false));
1723 manager_.ResumeConnectionState(cached_network_params); 1723 manager_.ResumeConnectionState(cached_network_params, false);
1724 EXPECT_EQ(kRttMs * kNumMicrosPerMilli, 1724 EXPECT_EQ(kRttMs * kNumMicrosPerMilli,
1725 static_cast<uint64>(manager_.GetRttStats()->initial_rtt_us())); 1725 static_cast<uint64>(manager_.GetRttStats()->initial_rtt_us()));
1726 } 1726 }
1727 1727
1728 } // namespace 1728 } // namespace
1729 } // namespace test 1729 } // namespace test
1730 } // namespace net 1730 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_sent_packet_manager.cc ('k') | net/quic/quic_server_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698