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

Unified Diff: net/quic/quic_connection_test.cc

Issue 398873003: Adds dynamic setting of FEC group size based on the connection's current (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_connection.cc ('k') | net/quic/quic_packet_creator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection_test.cc
diff --git a/net/quic/quic_connection_test.cc b/net/quic/quic_connection_test.cc
index 746d6e19801811cc6d2731714dd4aceb78703ad5..a0587b5d9dd436b648a8592fd33a152f2c02c37d 100644
--- a/net/quic/quic_connection_test.cc
+++ b/net/quic/quic_connection_test.cc
@@ -3945,6 +3945,21 @@ TEST_P(QuicConnectionTest, AckNotifierCallbackAfterFECRecovery) {
ProcessFecPacket(2, 1, true, !kEntropyFlag, packet);
}
+TEST_P(QuicConnectionTest, NetworkChangeVisitorCallbacksChangeFecState) {
+ QuicPacketCreator* creator =
+ QuicConnectionPeer::GetPacketCreator(&connection_);
+ size_t max_packets_per_fec_group = creator->max_packets_per_fec_group();
+
+ QuicSentPacketManager::NetworkChangeVisitor* visitor =
+ QuicSentPacketManagerPeer::GetNetworkChangeVisitor(
+ QuicConnectionPeer::GetSentPacketManager(&connection_));
+ EXPECT_TRUE(visitor);
+
+ // Increase FEC group size by increasing congestion window to a large number.
+ visitor->OnCongestionWindowChange(1000 * kDefaultTCPMSS);
+ EXPECT_LT(max_packets_per_fec_group, creator->max_packets_per_fec_group());
+}
+
class MockQuicConnectionDebugVisitor
: public QuicConnectionDebugVisitor {
public:
« no previous file with comments | « net/quic/quic_connection.cc ('k') | net/quic/quic_packet_creator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698