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

Unified Diff: net/quic/quic_sent_packet_manager_test.cc

Issue 786123002: Update from https://crrev.com/307330 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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_server_session.h » ('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 c1e6f2025f7afdbf6ac876c585bba6e1ed90e675..1a907ff9e024e7b28aab7ab6b27bc3dbe8c401e7 100644
--- a/net/quic/quic_sent_packet_manager_test.cc
+++ b/net/quic/quic_sent_packet_manager_test.cc
@@ -1384,6 +1384,20 @@ TEST_F(QuicSentPacketManagerTest, NegotiatePacingFromOptions) {
EXPECT_TRUE(manager_.using_pacing());
}
+TEST_F(QuicSentPacketManagerTest, EnablePacingViaFlag) {
+ EXPECT_FALSE(manager_.using_pacing());
+
+ // If pacing is enabled via command-line flag, it will be turned on,
+ // regardless of the contents of the config.
+ ValueRestore<bool> old_flag(&FLAGS_quic_enable_pacing, true);
+ QuicConfig config;
+ EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange());
+ EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _, /* using_pacing= */ true));
+ manager_.SetFromConfig(config);
+
+ EXPECT_TRUE(manager_.using_pacing());
+}
+
TEST_F(QuicSentPacketManagerTest, NegotiateReceiveWindowFromOptions) {
EXPECT_EQ(kDefaultSocketReceiveBuffer,
QuicSentPacketManagerPeer::GetReceiveWindow(&manager_));
« no previous file with comments | « net/quic/quic_sent_packet_manager.cc ('k') | net/quic/quic_server_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698