| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |