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/quic_crypto_server_config.h" | 7 #include "net/quic/crypto/quic_crypto_server_config.h" |
8 #include "net/quic/crypto/quic_random.h" | 8 #include "net/quic/crypto/quic_random.h" |
9 #include "net/quic/crypto/source_address_token.h" | 9 #include "net/quic/crypto/source_address_token.h" |
10 #include "net/quic/quic_connection.h" | 10 #include "net/quic/quic_connection.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 namespace { | 62 namespace { |
63 | 63 |
64 const size_t kMaxStreamsForTest = 10; | 64 const size_t kMaxStreamsForTest = 10; |
65 | 65 |
66 class QuicServerSessionTest : public ::testing::TestWithParam<QuicVersion> { | 66 class QuicServerSessionTest : public ::testing::TestWithParam<QuicVersion> { |
67 protected: | 67 protected: |
68 QuicServerSessionTest() | 68 QuicServerSessionTest() |
69 : crypto_config_(QuicCryptoServerConfig::TESTING, | 69 : crypto_config_(QuicCryptoServerConfig::TESTING, |
70 QuicRandom::GetInstance()) { | 70 QuicRandom::GetInstance()) { |
71 config_.SetDefaults(); | 71 config_.SetDefaults(); |
72 config_.set_max_streams_per_connection(kMaxStreamsForTest, | 72 config_.SetMaxStreamsPerConnection(kMaxStreamsForTest, |
73 kMaxStreamsForTest); | 73 kMaxStreamsForTest); |
74 config_.SetInitialFlowControlWindowToSend( | 74 config_.SetInitialFlowControlWindowToSend( |
75 kInitialSessionFlowControlWindowForTest); | 75 kInitialSessionFlowControlWindowForTest); |
76 config_.SetInitialStreamFlowControlWindowToSend( | 76 config_.SetInitialStreamFlowControlWindowToSend( |
77 kInitialStreamFlowControlWindowForTest); | 77 kInitialStreamFlowControlWindowForTest); |
78 config_.SetInitialSessionFlowControlWindowToSend( | 78 config_.SetInitialSessionFlowControlWindowToSend( |
79 kInitialSessionFlowControlWindowForTest); | 79 kInitialSessionFlowControlWindowForTest); |
80 | 80 |
81 connection_ = | 81 connection_ = |
82 new StrictMock<MockConnection>(true, SupportedVersions(GetParam())); | 82 new StrictMock<MockConnection>(true, SupportedVersions(GetParam())); |
83 session_.reset(new QuicServerSession(config_, connection_, &owner_)); | 83 session_.reset(new QuicServerSession(config_, connection_, &owner_)); |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 EXPECT_CALL(*crypto_stream, | 359 EXPECT_CALL(*crypto_stream, |
360 SendServerConfigUpdate(EqualsProto(expected_network_params))) | 360 SendServerConfigUpdate(EqualsProto(expected_network_params))) |
361 .Times(1); | 361 .Times(1); |
362 session_->OnCongestionWindowChange(now); | 362 session_->OnCongestionWindowChange(now); |
363 } | 363 } |
364 | 364 |
365 } // namespace | 365 } // namespace |
366 } // namespace test | 366 } // namespace test |
367 } // namespace tools | 367 } // namespace tools |
368 } // namespace net | 368 } // namespace net |
OLD | NEW |