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.h" | 7 #include "net/quic/crypto/crypto_handshake.h" |
8 #include "net/quic/crypto/crypto_protocol.h" | 8 #include "net/quic/crypto/crypto_protocol.h" |
9 #include "net/quic/quic_protocol.h" | 9 #include "net/quic/quic_protocol.h" |
10 #include "net/quic/quic_sent_packet_manager.h" | 10 #include "net/quic/quic_sent_packet_manager.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 protected: | 22 protected: |
23 QuicConfigTest() { | 23 QuicConfigTest() { |
24 config_.SetDefaults(); | 24 config_.SetDefaults(); |
25 config_.set_initial_round_trip_time_us(kMaxInitialRoundTripTimeUs, 0); | 25 config_.set_initial_round_trip_time_us(kMaxInitialRoundTripTimeUs, 0); |
26 } | 26 } |
27 | 27 |
28 QuicConfig config_; | 28 QuicConfig config_; |
29 }; | 29 }; |
30 | 30 |
31 TEST_F(QuicConfigTest, ToHandshakeMessage) { | 31 TEST_F(QuicConfigTest, ToHandshakeMessage) { |
| 32 FLAGS_enable_quic_pacing = false; |
| 33 config_.SetDefaults(); |
32 config_.set_idle_connection_state_lifetime(QuicTime::Delta::FromSeconds(5), | 34 config_.set_idle_connection_state_lifetime(QuicTime::Delta::FromSeconds(5), |
33 QuicTime::Delta::FromSeconds(2)); | 35 QuicTime::Delta::FromSeconds(2)); |
34 config_.set_max_streams_per_connection(4, 2); | 36 config_.set_max_streams_per_connection(4, 2); |
35 CryptoHandshakeMessage msg; | 37 CryptoHandshakeMessage msg; |
36 config_.ToHandshakeMessage(&msg); | 38 config_.ToHandshakeMessage(&msg); |
37 | 39 |
38 uint32 value; | 40 uint32 value; |
39 QuicErrorCode error = msg.GetUint32(kICSL, &value); | 41 QuicErrorCode error = msg.GetUint32(kICSL, &value); |
40 EXPECT_EQ(QUIC_NO_ERROR, error); | 42 EXPECT_EQ(QUIC_NO_ERROR, error); |
41 EXPECT_EQ(5u, value); | 43 EXPECT_EQ(5u, value); |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 string error_details; | 192 string error_details; |
191 server_config.ToHandshakeMessage(&msg); | 193 server_config.ToHandshakeMessage(&msg); |
192 const QuicErrorCode error = config_.ProcessClientHello(msg, &error_details); | 194 const QuicErrorCode error = config_.ProcessClientHello(msg, &error_details); |
193 LOG(INFO) << QuicUtils::ErrorToString(error); | 195 LOG(INFO) << QuicUtils::ErrorToString(error); |
194 EXPECT_EQ(QUIC_CRYPTO_MESSAGE_PARAMETER_NO_OVERLAP, error); | 196 EXPECT_EQ(QUIC_CRYPTO_MESSAGE_PARAMETER_NO_OVERLAP, error); |
195 } | 197 } |
196 | 198 |
197 } // namespace | 199 } // namespace |
198 } // namespace test | 200 } // namespace test |
199 } // namespace net | 201 } // namespace net |
OLD | NEW |