OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/tools/quic/quic_server_session.h" | 5 #include "net/tools/quic/quic_server_session.h" |
6 | 6 |
7 #include "net/quic/crypto/cached_network_parameters.h" | 7 #include "net/quic/crypto/cached_network_parameters.h" |
8 #include "net/quic/crypto/quic_crypto_server_config.h" | 8 #include "net/quic/crypto/quic_crypto_server_config.h" |
9 #include "net/quic/crypto/quic_random.h" | 9 #include "net/quic/crypto/quic_random.h" |
10 #include "net/quic/quic_connection.h" | 10 #include "net/quic/quic_connection.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 const size_t kMaxStreamsForTest = 10; | 65 const size_t kMaxStreamsForTest = 10; |
66 | 66 |
67 class QuicServerSessionTest : public ::testing::TestWithParam<QuicVersion> { | 67 class QuicServerSessionTest : public ::testing::TestWithParam<QuicVersion> { |
68 protected: | 68 protected: |
69 QuicServerSessionTest() | 69 QuicServerSessionTest() |
70 : crypto_config_(QuicCryptoServerConfig::TESTING, | 70 : crypto_config_(QuicCryptoServerConfig::TESTING, |
71 QuicRandom::GetInstance()) { | 71 QuicRandom::GetInstance()) { |
72 config_.SetMaxStreamsPerConnection(kMaxStreamsForTest, | 72 config_.SetMaxStreamsPerConnection(kMaxStreamsForTest, |
73 kMaxStreamsForTest); | 73 kMaxStreamsForTest); |
74 config_.SetInitialFlowControlWindowToSend( | |
75 kInitialSessionFlowControlWindowForTest); | |
76 config_.SetInitialStreamFlowControlWindowToSend( | 74 config_.SetInitialStreamFlowControlWindowToSend( |
77 kInitialStreamFlowControlWindowForTest); | 75 kInitialStreamFlowControlWindowForTest); |
78 config_.SetInitialSessionFlowControlWindowToSend( | 76 config_.SetInitialSessionFlowControlWindowToSend( |
79 kInitialSessionFlowControlWindowForTest); | 77 kInitialSessionFlowControlWindowForTest); |
80 | 78 |
81 connection_ = | 79 connection_ = |
82 new StrictMock<MockConnection>(true, SupportedVersions(GetParam())); | 80 new StrictMock<MockConnection>(true, SupportedVersions(GetParam())); |
83 session_.reset(new QuicServerSession(config_, connection_, &owner_)); | 81 session_.reset(new QuicServerSession(config_, connection_, &owner_)); |
84 MockClock clock; | 82 MockClock clock; |
85 handshake_message_.reset(crypto_config_.AddDefaultConfig( | 83 handshake_message_.reset(crypto_config_.AddDefaultConfig( |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 cached_network_params.set_serving_region(kTestServingRegion); | 427 cached_network_params.set_serving_region(kTestServingRegion); |
430 crypto_stream->set_previous_cached_network_params(cached_network_params); | 428 crypto_stream->set_previous_cached_network_params(cached_network_params); |
431 EXPECT_CALL(*connection_, ResumeConnectionState(_)).Times(1); | 429 EXPECT_CALL(*connection_, ResumeConnectionState(_)).Times(1); |
432 session_->OnConfigNegotiated(); | 430 session_->OnConfigNegotiated(); |
433 } | 431 } |
434 | 432 |
435 } // namespace | 433 } // namespace |
436 } // namespace test | 434 } // namespace test |
437 } // namespace tools | 435 } // namespace tools |
438 } // namespace net | 436 } // namespace net |
OLD | NEW |