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

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

Issue 573763003: client-only - Change QUIC clients to use the initial RTT estimate that (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Increase_flow_control_receive_window_75381087
Patch Set: Created 6 years, 3 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/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/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 1432 matching lines...) Expand 10 before | Expand all | Expand 10 after
1443 QuicConfigPeer::SetReceivedConnectionOptions(&config, options); 1443 QuicConfigPeer::SetReceivedConnectionOptions(&config, options);
1444 EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange(_)); 1444 EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange(_));
1445 EXPECT_CALL(*send_algorithm_, GetCongestionWindow()) 1445 EXPECT_CALL(*send_algorithm_, GetCongestionWindow())
1446 .WillOnce(Return(100 * kDefaultTCPMSS)); 1446 .WillOnce(Return(100 * kDefaultTCPMSS));
1447 EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)); 1447 EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
1448 manager_.SetFromConfig(config); 1448 manager_.SetFromConfig(config);
1449 1449
1450 EXPECT_TRUE(manager_.using_pacing()); 1450 EXPECT_TRUE(manager_.using_pacing());
1451 } 1451 }
1452 1452
1453 TEST_F(QuicSentPacketManagerTest, UseInitialRoundTripTimeToSend) {
1454 uint32 initial_rtt_us = 325000;
1455 EXPECT_NE(initial_rtt_us,
1456 manager_.GetRttStats()->SmoothedRtt().ToMicroseconds());
1457
1458 QuicConfig config;
1459 config.SetInitialRoundTripTimeUsToSend(initial_rtt_us);
1460 EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
1461 EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange(_));
1462 EXPECT_CALL(*send_algorithm_, GetCongestionWindow())
1463 .WillOnce(Return(100 * kDefaultTCPMSS));
1464 manager_.SetFromConfig(config);
1465
1466 EXPECT_EQ(initial_rtt_us,
1467 manager_.GetRttStats()->SmoothedRtt().ToMicroseconds());
1468 }
1469
1453 } // namespace 1470 } // namespace
1454 } // namespace test 1471 } // namespace test
1455 } // namespace net 1472 } // 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