| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 protected: | 46 protected: |
| 47 QuicServerSessionTest() | 47 QuicServerSessionTest() |
| 48 : crypto_config_(QuicCryptoServerConfig::TESTING, | 48 : crypto_config_(QuicCryptoServerConfig::TESTING, |
| 49 QuicRandom::GetInstance()) { | 49 QuicRandom::GetInstance()) { |
| 50 config_.SetDefaults(); | 50 config_.SetDefaults(); |
| 51 config_.set_max_streams_per_connection(3, 3); | 51 config_.set_max_streams_per_connection(3, 3); |
| 52 | 52 |
| 53 connection_ = | 53 connection_ = |
| 54 new StrictMock<MockConnection>(true, SupportedVersions(GetParam())); | 54 new StrictMock<MockConnection>(true, SupportedVersions(GetParam())); |
| 55 session_.reset(new QuicServerSession( | 55 session_.reset(new QuicServerSession( |
| 56 config_, connection_, &owner_)); | 56 config_, connection_, kInitialFlowControlWindowForTest, &owner_)); |
| 57 session_->InitializeSession(crypto_config_); | 57 session_->InitializeSession(crypto_config_); |
| 58 visitor_ = QuicConnectionPeer::GetVisitor(connection_); | 58 visitor_ = QuicConnectionPeer::GetVisitor(connection_); |
| 59 } | 59 } |
| 60 | 60 |
| 61 QuicVersion version() const { return connection_->version(); } | 61 QuicVersion version() const { return connection_->version(); } |
| 62 | 62 |
| 63 StrictMock<MockQuicServerSessionVisitor> owner_; | 63 StrictMock<MockQuicServerSessionVisitor> owner_; |
| 64 StrictMock<MockConnection>* connection_; | 64 StrictMock<MockConnection>* connection_; |
| 65 QuicConfig config_; | 65 QuicConfig config_; |
| 66 QuicCryptoServerConfig crypto_config_; | 66 QuicCryptoServerConfig crypto_config_; |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 // Incoming streams on the server session must be odd. | 176 // Incoming streams on the server session must be odd. |
| 177 EXPECT_CALL(*connection_, SendConnectionClose(QUIC_INVALID_STREAM_ID)); | 177 EXPECT_CALL(*connection_, SendConnectionClose(QUIC_INVALID_STREAM_ID)); |
| 178 EXPECT_EQ(NULL, | 178 EXPECT_EQ(NULL, |
| 179 QuicServerSessionPeer::GetIncomingDataStream(session_.get(), 4)); | 179 QuicServerSessionPeer::GetIncomingDataStream(session_.get(), 4)); |
| 180 } | 180 } |
| 181 | 181 |
| 182 } // namespace | 182 } // namespace |
| 183 } // namespace test | 183 } // namespace test |
| 184 } // namespace tools | 184 } // namespace tools |
| 185 } // namespace net | 185 } // namespace net |
| OLD | NEW |