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

Unified Diff: net/quic/quic_sent_packet_manager_test.cc

Issue 682293004: Change the number of emulated connections in QUIC's congestion control (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@merge_78853598
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_sent_packet_manager.cc ('k') | net/quic/quic_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_sent_packet_manager_test.cc
diff --git a/net/quic/quic_sent_packet_manager_test.cc b/net/quic/quic_sent_packet_manager_test.cc
index 5eabf86a5a617883cc574e68515fc41d70e77eec..71adc12008d9bbc7621cd803f848d57397543ee3 100644
--- a/net/quic/quic_sent_packet_manager_test.cc
+++ b/net/quic/quic_sent_packet_manager_test.cc
@@ -1355,6 +1355,25 @@ TEST_F(QuicSentPacketManagerTest, NegotiateNumConnectionsFromOptions) {
manager_.SetFromConfig(client_config);
}
+TEST_F(QuicSentPacketManagerTest, NegotiateNConnectionFromOptions) {
+ // By default, changing the number of open streams does nothing.
+ manager_.SetNumOpenStreams(5);
+
+ QuicConfig config;
+ QuicTagVector options;
+
+ options.push_back(kNCON);
+ QuicConfigPeer::SetReceivedConnectionOptions(&config, options);
+ EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange(_));
+ EXPECT_CALL(*send_algorithm_, GetCongestionWindow())
+ .WillOnce(Return(100 * kDefaultTCPMSS));
+ EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
+ manager_.SetFromConfig(config);
+
+ EXPECT_CALL(*send_algorithm_, SetNumEmulatedConnections(5));
+ manager_.SetNumOpenStreams(5);
+}
+
TEST_F(QuicSentPacketManagerTest, NegotiateNoTLPFromOptionsAtServer) {
QuicConfig config;
QuicTagVector options;
« no previous file with comments | « net/quic/quic_sent_packet_manager.cc ('k') | net/quic/quic_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698