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

Unified Diff: net/quic/quic_config_test.cc

Issue 446283002: Include the socket receive buffer in the connection handshake. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@improve_SendAlgorithmSimulator_72332690
Patch Set: Created 6 years, 4 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
Index: net/quic/quic_config_test.cc
diff --git a/net/quic/quic_config_test.cc b/net/quic/quic_config_test.cc
index 9f3e27daecac8a210224b11c1b31b156b2532e41..86f435f83b0faee96ed8727908c4073f86403e46 100644
--- a/net/quic/quic_config_test.cc
+++ b/net/quic/quic_config_test.cc
@@ -42,6 +42,7 @@ TEST_F(QuicConfigTest, ToHandshakeMessage) {
config_.set_idle_connection_state_lifetime(QuicTime::Delta::FromSeconds(5),
QuicTime::Delta::FromSeconds(2));
config_.set_max_streams_per_connection(4, 2);
+ config_.SetSocketReceiveBufferToSend(kDefaultSocketReceiveBuffer);
CryptoHandshakeMessage msg;
config_.ToHandshakeMessage(&msg);
@@ -66,6 +67,10 @@ 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);
+
const QuicTag* out;
size_t out_len;
error = msg.GetTaglist(kCGST, &out, &out_len);
@@ -107,6 +112,7 @@ TEST_F(QuicConfigTest, ProcessClientHello) {
2 * kInitialStreamFlowControlWindowForTest);
client_config.SetInitialSessionFlowControlWindowToSend(
2 * kInitialSessionFlowControlWindowForTest);
+ client_config.SetSocketReceiveBufferToSend(kDefaultSocketReceiveBuffer);
QuicTagVector copt;
copt.push_back(kTBBR);
copt.push_back(kFHDR);
@@ -137,6 +143,8 @@ TEST_F(QuicConfigTest, ProcessClientHello) {
2 * kInitialStreamFlowControlWindowForTest);
EXPECT_EQ(config_.ReceivedInitialSessionFlowControlWindowBytes(),
2 * kInitialSessionFlowControlWindowForTest);
+ EXPECT_EQ(config_.ReceivedSocketReceiveBuffer(),
+ kDefaultSocketReceiveBuffer);
}
TEST_F(QuicConfigTest, ProcessServerHello) {
@@ -159,6 +167,7 @@ TEST_F(QuicConfigTest, ProcessServerHello) {
2 * kInitialStreamFlowControlWindowForTest);
server_config.SetInitialSessionFlowControlWindowToSend(
2 * kInitialSessionFlowControlWindowForTest);
+ server_config.SetSocketReceiveBufferToSend(kDefaultSocketReceiveBuffer);
CryptoHandshakeMessage msg;
server_config.ToHandshakeMessage(&msg);
string error_details;
@@ -183,6 +192,8 @@ TEST_F(QuicConfigTest, ProcessServerHello) {
2 * kInitialStreamFlowControlWindowForTest);
EXPECT_EQ(config_.ReceivedInitialSessionFlowControlWindowBytes(),
2 * kInitialSessionFlowControlWindowForTest);
+ EXPECT_EQ(config_.ReceivedSocketReceiveBuffer(),
+ kDefaultSocketReceiveBuffer);
}
TEST_F(QuicConfigTest, MissingOptionalValuesInCHLO) {
« no previous file with comments | « net/quic/quic_config.cc ('k') | net/quic/quic_protocol.h » ('j') | net/quic/quic_protocol.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698