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

Unified Diff: net/quic/quic_connection_test.cc

Issue 1572033003: relnote: Allowing multipath support negotiation. Protected by --quic_enable_multipath, default valu… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@0044_CL_111708360
Patch Set: rebase after removing 111628983 Created 4 years, 11 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_flags.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 c16ddabda229fd1612676bab3808822e0fa363f4..2f06d7199d16f982d231f6bf50c1c427df5adc96 100644
--- a/net/quic/quic_connection_test.cc
+++ b/net/quic/quic_connection_test.cc
@@ -5572,6 +5572,32 @@ TEST_P(QuicConnectionTest, SendingUnencryptedStreamDataFails) {
EXPECT_FALSE(connection_.connected());
}
+TEST_P(QuicConnectionTest, EnableMultipathNegotiation) {
+ // Test multipath negotiation during crypto handshake. Multipath is enabled
+ // when both endpoints enable multipath.
+ ValueRestore<bool> old_flag(&FLAGS_quic_enable_multipath, true);
+ EXPECT_TRUE(connection_.connected());
+ EXPECT_FALSE(QuicConnectionPeer::IsMultipathEnabled(&connection_));
+ EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
+ QuicConfig config;
+ // Enable multipath on server side.
+ config.SetMultipathEnabled(true);
+
+ // Create a handshake message enables multipath.
+ CryptoHandshakeMessage msg;
+ string error_details;
+ QuicConfig client_config;
+ // Enable multipath on client side.
+ client_config.SetMultipathEnabled(true);
+ client_config.ToHandshakeMessage(&msg);
+ const QuicErrorCode error =
+ config.ProcessPeerHello(msg, CLIENT, &error_details);
+ EXPECT_EQ(QUIC_NO_ERROR, error);
+
+ connection_.SetFromConfig(config);
+ EXPECT_TRUE(QuicConnectionPeer::IsMultipathEnabled(&connection_));
+}
+
} // namespace
} // namespace test
} // namespace net
« no previous file with comments | « net/quic/quic_connection.cc ('k') | net/quic/quic_flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698