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

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

Issue 2359503003: Landing Recent QUIC changes until 9:58 AM, Sep 17, 2016 UTC (Closed)
Patch Set: Reverted flag flip. 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_packet_generator_test.cc ('k') | net/quic/core/quic_server_session_base.h » ('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/core/quic_sent_packet_manager.h" 5 #include "net/quic/core/quic_sent_packet_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "net/quic/core/quic_flags.h" 10 #include "net/quic/core/quic_flags.h"
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 QuicConfig config; 1350 QuicConfig config;
1351 QuicTagVector options; 1351 QuicTagVector options;
1352 1352
1353 options.push_back(kRENO); 1353 options.push_back(kRENO);
1354 QuicConfigPeer::SetReceivedConnectionOptions(&config, options); 1354 QuicConfigPeer::SetReceivedConnectionOptions(&config, options);
1355 EXPECT_CALL(*network_change_visitor_, OnCongestionChange()); 1355 EXPECT_CALL(*network_change_visitor_, OnCongestionChange());
1356 manager_.SetFromConfig(config); 1356 manager_.SetFromConfig(config);
1357 EXPECT_EQ(kReno, QuicSentPacketManagerPeer::GetSendAlgorithm(manager_) 1357 EXPECT_EQ(kReno, QuicSentPacketManagerPeer::GetSendAlgorithm(manager_)
1358 ->GetCongestionControlType()); 1358 ->GetCongestionControlType());
1359 1359
1360 // TODO(rtenneti): Enable the following code after BBR code is checked in.
1361 #if 0
1362 options.clear(); 1360 options.clear();
1363 options.push_back(kTBBR); 1361 options.push_back(kTBBR);
1364 QuicConfigPeer::SetReceivedConnectionOptions(&config, options); 1362 QuicConfigPeer::SetReceivedConnectionOptions(&config, options);
1365 EXPECT_CALL(*network_change_visitor_, OnCongestionChange()); 1363 EXPECT_CALL(*network_change_visitor_, OnCongestionChange());
1366 manager_.SetFromConfig(config); 1364 manager_.SetFromConfig(config);
1367 EXPECT_EQ(kBBR, QuicSentPacketManagerPeer::GetSendAlgorithm( 1365 // TODO(vasilvv): change this back to kBBR when the new version is in.
1368 manager_)->GetCongestionControlType()); 1366 EXPECT_EQ(kCubic, QuicSentPacketManagerPeer::GetSendAlgorithm(manager_)
1369 #endif 1367 ->GetCongestionControlType());
1370 1368
1371 options.clear(); 1369 options.clear();
1372 options.push_back(kBYTE); 1370 options.push_back(kBYTE);
1373 QuicConfigPeer::SetReceivedConnectionOptions(&config, options); 1371 QuicConfigPeer::SetReceivedConnectionOptions(&config, options);
1374 EXPECT_CALL(*network_change_visitor_, OnCongestionChange()); 1372 EXPECT_CALL(*network_change_visitor_, OnCongestionChange());
1375 manager_.SetFromConfig(config); 1373 manager_.SetFromConfig(config);
1376 EXPECT_EQ(kCubicBytes, QuicSentPacketManagerPeer::GetSendAlgorithm(manager_) 1374 EXPECT_EQ(kCubicBytes, QuicSentPacketManagerPeer::GetSendAlgorithm(manager_)
1377 ->GetCongestionControlType()); 1375 ->GetCongestionControlType());
1378 1376
1379 options.clear(); 1377 options.clear();
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1663 ExpectAck(1); 1661 ExpectAck(1);
1664 EXPECT_CALL(*network_change_visitor_, 1662 EXPECT_CALL(*network_change_visitor_,
1665 OnPathMtuIncreased(kDefaultLength + 100)); 1663 OnPathMtuIncreased(kDefaultLength + 100));
1666 QuicAckFrame ack_frame = InitAckFrame(1); 1664 QuicAckFrame ack_frame = InitAckFrame(1);
1667 manager_.OnIncomingAck(ack_frame, clock_.Now()); 1665 manager_.OnIncomingAck(ack_frame, clock_.Now());
1668 } 1666 }
1669 1667
1670 } // namespace 1668 } // namespace
1671 } // namespace test 1669 } // namespace test
1672 } // namespace net 1670 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_packet_generator_test.cc ('k') | net/quic/core/quic_server_session_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698