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/quic_connection.h" | 9 #include "net/quic/quic_connection.h" |
10 #include "net/quic/quic_utils.h" | 10 #include "net/quic/quic_utils.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 namespace { | 46 namespace { |
47 | 47 |
48 class QuicServerSessionTest : public ::testing::TestWithParam<QuicVersion> { | 48 class QuicServerSessionTest : public ::testing::TestWithParam<QuicVersion> { |
49 protected: | 49 protected: |
50 QuicServerSessionTest() | 50 QuicServerSessionTest() |
51 : crypto_config_(QuicCryptoServerConfig::TESTING, | 51 : crypto_config_(QuicCryptoServerConfig::TESTING, |
52 QuicRandom::GetInstance()) { | 52 QuicRandom::GetInstance()) { |
53 config_.SetDefaults(); | 53 config_.SetDefaults(); |
54 config_.set_max_streams_per_connection(3, 3); | 54 config_.set_max_streams_per_connection(3, 3); |
55 config_.SetInitialFlowControlWindowToSend(kInitialFlowControlWindowForTest); | 55 config_.SetInitialFlowControlWindowToSend( |
| 56 kInitialSessionFlowControlWindowForTest); |
| 57 config_.SetInitialStreamFlowControlWindowToSend( |
| 58 kInitialStreamFlowControlWindowForTest); |
| 59 config_.SetInitialSessionFlowControlWindowToSend( |
| 60 kInitialSessionFlowControlWindowForTest); |
56 | 61 |
57 connection_ = | 62 connection_ = |
58 new StrictMock<MockConnection>(true, SupportedVersions(GetParam())); | 63 new StrictMock<MockConnection>(true, SupportedVersions(GetParam())); |
59 session_.reset(new QuicServerSession(config_, connection_, &owner_)); | 64 session_.reset(new QuicServerSession(config_, connection_, &owner_)); |
60 session_->InitializeSession(crypto_config_); | 65 session_->InitializeSession(crypto_config_); |
61 visitor_ = QuicConnectionPeer::GetVisitor(connection_); | 66 visitor_ = QuicConnectionPeer::GetVisitor(connection_); |
62 } | 67 } |
63 | 68 |
64 QuicVersion version() const { return connection_->version(); } | 69 QuicVersion version() const { return connection_->version(); } |
65 | 70 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 // Incoming streams on the server session must be odd. | 179 // Incoming streams on the server session must be odd. |
175 EXPECT_CALL(*connection_, SendConnectionClose(QUIC_INVALID_STREAM_ID)); | 180 EXPECT_CALL(*connection_, SendConnectionClose(QUIC_INVALID_STREAM_ID)); |
176 EXPECT_EQ(NULL, | 181 EXPECT_EQ(NULL, |
177 QuicServerSessionPeer::GetIncomingDataStream(session_.get(), 4)); | 182 QuicServerSessionPeer::GetIncomingDataStream(session_.get(), 4)); |
178 } | 183 } |
179 | 184 |
180 } // namespace | 185 } // namespace |
181 } // namespace test | 186 } // namespace test |
182 } // namespace tools | 187 } // namespace tools |
183 } // namespace net | 188 } // namespace net |
OLD | NEW |