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

Unified Diff: net/quic/core/quic_config_test.cc

Issue 2747443002: Landing recent QUIC changes until Sun Mar 5 09:18:09 2017 +0000 (Closed)
Patch Set: Fixed formatting errors in quic_error_mapping.cc Created 3 years, 9 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/core/quic_config.cc ('k') | net/quic/core/quic_connection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_config_test.cc
diff --git a/net/quic/core/quic_config_test.cc b/net/quic/core/quic_config_test.cc
index 4445e00a9e3f7213bc90b9cf1e8576456cb96c97..06e789d67e37332844690a17931926bb5cae0754 100644
--- a/net/quic/core/quic_config_test.cc
+++ b/net/quic/core/quic_config_test.cc
@@ -33,7 +33,9 @@ TEST_F(QuicConfigTest, ToHandshakeMessage) {
config_.SetIdleNetworkTimeout(QuicTime::Delta::FromSeconds(5),
QuicTime::Delta::FromSeconds(2));
config_.SetMaxStreamsPerConnection(4, 2);
- config_.SetSocketReceiveBufferToSend(kDefaultSocketReceiveBuffer);
+ if (!FLAGS_quic_reloadable_flag_quic_no_socket_receive_buffer) {
+ config_.SetSocketReceiveBufferToSend(kDefaultSocketReceiveBuffer);
+ }
CryptoHandshakeMessage msg;
config_.ToHandshakeMessage(&msg);
@@ -54,9 +56,11 @@ TEST_F(QuicConfigTest, ToHandshakeMessage) {
EXPECT_EQ(QUIC_NO_ERROR, error);
EXPECT_EQ(kInitialSessionFlowControlWindowForTest, value);
- error = msg.GetUint32(kSRBF, &value);
- EXPECT_EQ(QUIC_NO_ERROR, error);
- EXPECT_EQ(kDefaultSocketReceiveBuffer, value);
+ if (!FLAGS_quic_reloadable_flag_quic_no_socket_receive_buffer) {
+ error = msg.GetUint32(kSRBF, &value);
+ EXPECT_EQ(QUIC_NO_ERROR, error);
+ EXPECT_EQ(kDefaultSocketReceiveBuffer, value);
+ }
}
TEST_F(QuicConfigTest, ProcessClientHello) {
@@ -73,7 +77,9 @@ TEST_F(QuicConfigTest, ProcessClientHello) {
2 * kInitialStreamFlowControlWindowForTest);
client_config.SetInitialSessionFlowControlWindowToSend(
2 * kInitialSessionFlowControlWindowForTest);
- client_config.SetSocketReceiveBufferToSend(kDefaultSocketReceiveBuffer);
+ if (!FLAGS_quic_reloadable_flag_quic_no_socket_receive_buffer) {
+ client_config.SetSocketReceiveBufferToSend(kDefaultSocketReceiveBuffer);
+ }
client_config.SetForceHolBlocking();
QuicTagVector copt;
copt.push_back(kTBBR);
@@ -109,7 +115,10 @@ TEST_F(QuicConfigTest, ProcessClientHello) {
2 * kInitialStreamFlowControlWindowForTest);
EXPECT_EQ(config_.ReceivedInitialSessionFlowControlWindowBytes(),
2 * kInitialSessionFlowControlWindowForTest);
- EXPECT_EQ(config_.ReceivedSocketReceiveBuffer(), kDefaultSocketReceiveBuffer);
+ if (!FLAGS_quic_reloadable_flag_quic_no_socket_receive_buffer) {
+ EXPECT_EQ(config_.ReceivedSocketReceiveBuffer(),
+ kDefaultSocketReceiveBuffer);
+ }
}
TEST_F(QuicConfigTest, ProcessServerHello) {
@@ -129,7 +138,9 @@ TEST_F(QuicConfigTest, ProcessServerHello) {
2 * kInitialStreamFlowControlWindowForTest);
server_config.SetInitialSessionFlowControlWindowToSend(
2 * kInitialSessionFlowControlWindowForTest);
- server_config.SetSocketReceiveBufferToSend(kDefaultSocketReceiveBuffer);
+ if (!FLAGS_quic_reloadable_flag_quic_no_socket_receive_buffer) {
+ server_config.SetSocketReceiveBufferToSend(kDefaultSocketReceiveBuffer);
+ }
server_config.SetAlternateServerAddressToSend(kTestServerAddress);
CryptoHandshakeMessage msg;
server_config.ToHandshakeMessage(&msg);
@@ -147,7 +158,10 @@ TEST_F(QuicConfigTest, ProcessServerHello) {
2 * kInitialStreamFlowControlWindowForTest);
EXPECT_EQ(config_.ReceivedInitialSessionFlowControlWindowBytes(),
2 * kInitialSessionFlowControlWindowForTest);
- EXPECT_EQ(config_.ReceivedSocketReceiveBuffer(), kDefaultSocketReceiveBuffer);
+ if (!FLAGS_quic_reloadable_flag_quic_no_socket_receive_buffer) {
+ EXPECT_EQ(config_.ReceivedSocketReceiveBuffer(),
+ kDefaultSocketReceiveBuffer);
+ }
EXPECT_TRUE(config_.HasReceivedAlternateServerAddress());
EXPECT_EQ(kTestServerAddress, config_.ReceivedAlternateServerAddress());
}
« no previous file with comments | « net/quic/core/quic_config.cc ('k') | net/quic/core/quic_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698