OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/quic/quic_config.h" | 5 #include "net/quic/quic_config.h" |
6 | 6 |
7 #include "net/quic/crypto/crypto_handshake_message.h" | 7 #include "net/quic/crypto/crypto_handshake_message.h" |
8 #include "net/quic/crypto/crypto_protocol.h" | 8 #include "net/quic/crypto/crypto_protocol.h" |
9 #include "net/quic/quic_flags.h" | 9 #include "net/quic/quic_flags.h" |
10 #include "net/quic/quic_protocol.h" | 10 #include "net/quic/quic_protocol.h" |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 const QuicErrorCode error = | 264 const QuicErrorCode error = |
265 config_.ProcessPeerHello(msg, CLIENT, &error_details); | 265 config_.ProcessPeerHello(msg, CLIENT, &error_details); |
266 DVLOG(1) << QuicUtils::ErrorToString(error); | 266 DVLOG(1) << QuicUtils::ErrorToString(error); |
267 EXPECT_EQ(QUIC_CRYPTO_MESSAGE_PARAMETER_NO_OVERLAP, error); | 267 EXPECT_EQ(QUIC_CRYPTO_MESSAGE_PARAMETER_NO_OVERLAP, error); |
268 } | 268 } |
269 | 269 |
270 TEST_F(QuicConfigTest, InvalidFlowControlWindow) { | 270 TEST_F(QuicConfigTest, InvalidFlowControlWindow) { |
271 // QuicConfig should not accept an invalid flow control window to send to the | 271 // QuicConfig should not accept an invalid flow control window to send to the |
272 // peer: the receive window must be at least the default of 16 Kb. | 272 // peer: the receive window must be at least the default of 16 Kb. |
273 QuicConfig config; | 273 QuicConfig config; |
274 const uint64 kInvalidWindow = kDefaultFlowControlSendWindow - 1; | 274 const uint64 kInvalidWindow = kMinimumFlowControlSendWindow - 1; |
275 EXPECT_DFATAL(config.SetInitialFlowControlWindowToSend(kInvalidWindow), | 275 EXPECT_DFATAL(config.SetInitialFlowControlWindowToSend(kInvalidWindow), |
276 "Initial flow control receive window"); | 276 "Initial flow control receive window"); |
277 | 277 |
278 EXPECT_EQ(kDefaultFlowControlSendWindow, | 278 EXPECT_EQ(kMinimumFlowControlSendWindow, |
279 config.GetInitialFlowControlWindowToSend()); | 279 config.GetInitialFlowControlWindowToSend()); |
280 } | 280 } |
281 | 281 |
282 } // namespace | 282 } // namespace |
283 } // namespace test | 283 } // namespace test |
284 } // namespace net | 284 } // namespace net |
OLD | NEW |