Index: net/quic/quic_session_test.cc |
diff --git a/net/quic/quic_session_test.cc b/net/quic/quic_session_test.cc |
index b2dfa0e5878e97d90561337bac708ff9a2f27fb4..a8cbc723811bc69003b78f918156056bfefe4502 100644 |
--- a/net/quic/quic_session_test.cc |
+++ b/net/quic/quic_session_test.cc |
@@ -104,11 +104,12 @@ class StreamBlocker { |
class TestSession : public QuicSession { |
public: |
- explicit TestSession(QuicConnection* connection) |
- : QuicSession(connection, DefaultQuicConfig()), |
+ explicit TestSession(QuicConnection* connection, |
+ uint32 max_initial_flow_control_window) |
+ : QuicSession(connection, max_initial_flow_control_window, |
+ DefaultQuicConfig()), |
crypto_stream_(this), |
- writev_consumes_all_data_(false) { |
- } |
+ writev_consumes_all_data_(false) {} |
virtual TestCryptoStream* GetCryptoStream() OVERRIDE { |
return &crypto_stream_; |
@@ -165,7 +166,7 @@ class QuicSessionTest : public ::testing::TestWithParam<QuicVersion> { |
protected: |
QuicSessionTest() |
: connection_(new MockConnection(true, SupportedVersions(GetParam()))), |
- session_(connection_) { |
+ session_(connection_, kInitialFlowControlWindowForTest) { |
headers_[":host"] = "www.google.com"; |
headers_[":path"] = "/index.hml"; |
headers_[":scheme"] = "http"; |
@@ -617,6 +618,17 @@ TEST_P(QuicSessionTest, InvalidFlowControlWindowInHandshake) { |
session_.OnConfigNegotiated(); |
} |
+TEST_P(QuicSessionTest, InvalidFlowControlWindow) { |
+ QuicConnection* connection = |
+ new MockConnection(true, SupportedVersions(GetParam())); |
+ |
+ const uint32 kSmallerFlowControlWindow = kDefaultFlowControlSendWindow - 1; |
+ TestSession session(connection, kSmallerFlowControlWindow); |
+ |
+ EXPECT_EQ(kDefaultFlowControlSendWindow, |
+ session.max_flow_control_receive_window_bytes()); |
+} |
+ |
} // namespace |
} // namespace test |
} // namespace net |