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/core/quic_config.h" | 5 #include "net/quic/core/quic_config.h" |
6 | 6 |
7 #include "net/quic/core/crypto/crypto_handshake_message.h" | 7 #include "net/quic/core/crypto/crypto_handshake_message.h" |
8 #include "net/quic/core/crypto/crypto_protocol.h" | 8 #include "net/quic/core/crypto/crypto_protocol.h" |
9 #include "net/quic/core/quic_packets.h" | 9 #include "net/quic/core/quic_packets.h" |
10 #include "net/quic/core/quic_time.h" | 10 #include "net/quic/core/quic_time.h" |
11 #include "net/quic/core/quic_utils.h" | 11 #include "net/quic/core/quic_utils.h" |
| 12 #include "net/quic/platform/api/quic_test.h" |
12 #include "net/quic/test_tools/quic_config_peer.h" | 13 #include "net/quic/test_tools/quic_config_peer.h" |
13 #include "net/quic/test_tools/quic_test_utils.h" | 14 #include "net/quic/test_tools/quic_test_utils.h" |
14 #include "net/test/gtest_util.h" | 15 #include "net/test/gtest_util.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | |
16 | 16 |
17 using std::string; | 17 using std::string; |
18 | 18 |
19 namespace net { | 19 namespace net { |
20 namespace test { | 20 namespace test { |
21 namespace { | 21 namespace { |
22 | 22 |
23 class QuicConfigTest : public ::testing::Test { | 23 class QuicConfigTest : public QuicTest { |
24 protected: | 24 protected: |
25 QuicConfig config_; | 25 QuicConfig config_; |
26 }; | 26 }; |
27 | 27 |
28 TEST_F(QuicConfigTest, ToHandshakeMessage) { | 28 TEST_F(QuicConfigTest, ToHandshakeMessage) { |
29 config_.SetInitialStreamFlowControlWindowToSend( | 29 config_.SetInitialStreamFlowControlWindowToSend( |
30 kInitialStreamFlowControlWindowForTest); | 30 kInitialStreamFlowControlWindowForTest); |
31 config_.SetInitialSessionFlowControlWindowToSend( | 31 config_.SetInitialSessionFlowControlWindowToSend( |
32 kInitialSessionFlowControlWindowForTest); | 32 kInitialSessionFlowControlWindowForTest); |
33 config_.SetIdleNetworkTimeout(QuicTime::Delta::FromSeconds(5), | 33 config_.SetIdleNetworkTimeout(QuicTime::Delta::FromSeconds(5), |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 EXPECT_EQ(1u, config_.ReceivedConnectionOptions().size()); | 288 EXPECT_EQ(1u, config_.ReceivedConnectionOptions().size()); |
289 EXPECT_FALSE(config_.HasClientRequestedIndependentOption( | 289 EXPECT_FALSE(config_.HasClientRequestedIndependentOption( |
290 kRENO, Perspective::IS_SERVER)); | 290 kRENO, Perspective::IS_SERVER)); |
291 EXPECT_TRUE(config_.HasClientRequestedIndependentOption( | 291 EXPECT_TRUE(config_.HasClientRequestedIndependentOption( |
292 kTBBR, Perspective::IS_SERVER)); | 292 kTBBR, Perspective::IS_SERVER)); |
293 } | 293 } |
294 | 294 |
295 } // namespace | 295 } // namespace |
296 } // namespace test | 296 } // namespace test |
297 } // namespace net | 297 } // namespace net |
OLD | NEW |