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

Unified Diff: net/quic/quic_config_test.cc

Issue 2011933002: Add alternate server address to QuicConfig. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@122546126
Patch Set: Created 4 years, 7 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_config.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_config_test.cc
diff --git a/net/quic/quic_config_test.cc b/net/quic/quic_config_test.cc
index b18673e0c5e7d1a76484b700e7d0603b2854cb04..c347b970eceb402873ce2177f168a305c0c5be1e 100644
--- a/net/quic/quic_config_test.cc
+++ b/net/quic/quic_config_test.cc
@@ -112,6 +112,7 @@ TEST_F(QuicConfigTest, ProcessClientHello) {
}
TEST_F(QuicConfigTest, ProcessServerHello) {
+ const IPEndPoint kTestServerAddress(IPAddress(127, 0, 3, 1), 1234);
QuicConfig server_config;
QuicTagVector cgst;
cgst.push_back(kQBIC);
@@ -126,6 +127,7 @@ TEST_F(QuicConfigTest, ProcessServerHello) {
server_config.SetInitialSessionFlowControlWindowToSend(
2 * kInitialSessionFlowControlWindowForTest);
server_config.SetSocketReceiveBufferToSend(kDefaultSocketReceiveBuffer);
+ server_config.SetAlternateServerAddressToSend(kTestServerAddress);
CryptoHandshakeMessage msg;
server_config.ToHandshakeMessage(&msg);
string error_details;
@@ -143,6 +145,8 @@ TEST_F(QuicConfigTest, ProcessServerHello) {
EXPECT_EQ(config_.ReceivedInitialSessionFlowControlWindowBytes(),
2 * kInitialSessionFlowControlWindowForTest);
EXPECT_EQ(config_.ReceivedSocketReceiveBuffer(), kDefaultSocketReceiveBuffer);
+ EXPECT_TRUE(config_.HasReceivedAlternateServerAddress());
+ EXPECT_EQ(kTestServerAddress, config_.ReceivedAlternateServerAddress());
}
TEST_F(QuicConfigTest, MissingOptionalValuesInCHLO) {
« no previous file with comments | « net/quic/quic_config.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698