OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/core/congestion_control/bbr_sender.h" | 5 #include "net/quic/core/congestion_control/bbr_sender.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "net/quic/core/congestion_control/rtt_stats.h" | 12 #include "net/quic/core/congestion_control/rtt_stats.h" |
13 #include "net/quic/core/quic_protocol.h" | 13 #include "net/quic/core/quic_packets.h" |
14 #include "net/quic/core/quic_utils.h" | 14 #include "net/quic/core/quic_utils.h" |
15 #include "net/quic/test_tools/mock_clock.h" | 15 #include "net/quic/test_tools/mock_clock.h" |
16 #include "net/quic/test_tools/quic_config_peer.h" | 16 #include "net/quic/test_tools/quic_config_peer.h" |
17 #include "net/quic/test_tools/quic_connection_peer.h" | 17 #include "net/quic/test_tools/quic_connection_peer.h" |
18 #include "net/quic/test_tools/quic_sent_packet_manager_peer.h" | 18 #include "net/quic/test_tools/quic_sent_packet_manager_peer.h" |
19 #include "net/quic/test_tools/quic_test_utils.h" | 19 #include "net/quic/test_tools/quic_test_utils.h" |
20 #include "net/quic/test_tools/simulator/quic_endpoint.h" | 20 #include "net/quic/test_tools/simulator/quic_endpoint.h" |
21 #include "net/quic/test_tools/simulator/simulator.h" | 21 #include "net/quic/test_tools/simulator/simulator.h" |
22 #include "net/quic/test_tools/simulator/switch.h" | 22 #include "net/quic/test_tools/simulator/switch.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 [this]() { return sender_->ExportDebugState().gain_cycle_index == 1; }, | 425 [this]() { return sender_->ExportDebugState().gain_cycle_index == 1; }, |
426 timeout); | 426 timeout); |
427 ASSERT_TRUE(simulator_result); | 427 ASSERT_TRUE(simulator_result); |
428 simulator_.RunFor(0.75 * sender_->ExportDebugState().min_rtt); | 428 simulator_.RunFor(0.75 * sender_->ExportDebugState().min_rtt); |
429 EXPECT_EQ(BbrSender::PROBE_BW, sender_->ExportDebugState().mode); | 429 EXPECT_EQ(BbrSender::PROBE_BW, sender_->ExportDebugState().mode); |
430 EXPECT_EQ(2, sender_->ExportDebugState().gain_cycle_index); | 430 EXPECT_EQ(2, sender_->ExportDebugState().gain_cycle_index); |
431 } | 431 } |
432 | 432 |
433 } // namespace test | 433 } // namespace test |
434 } // namespace net | 434 } // namespace net |
OLD | NEW |