| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 QuicServerSessionTest() | 65 QuicServerSessionTest() |
| 66 : crypto_config_(QuicCryptoServerConfig::TESTING, | 66 : crypto_config_(QuicCryptoServerConfig::TESTING, |
| 67 QuicRandom::GetInstance()) { | 67 QuicRandom::GetInstance()) { |
| 68 config_.SetMaxStreamsPerConnection(kMaxStreamsForTest, | 68 config_.SetMaxStreamsPerConnection(kMaxStreamsForTest, |
| 69 kMaxStreamsForTest); | 69 kMaxStreamsForTest); |
| 70 config_.SetInitialStreamFlowControlWindowToSend( | 70 config_.SetInitialStreamFlowControlWindowToSend( |
| 71 kInitialStreamFlowControlWindowForTest); | 71 kInitialStreamFlowControlWindowForTest); |
| 72 config_.SetInitialSessionFlowControlWindowToSend( | 72 config_.SetInitialSessionFlowControlWindowToSend( |
| 73 kInitialSessionFlowControlWindowForTest); | 73 kInitialSessionFlowControlWindowForTest); |
| 74 | 74 |
| 75 connection_ = | 75 connection_ = new StrictMock<MockConnection>(Perspective::IS_SERVER, |
| 76 new StrictMock<MockConnection>(true, SupportedVersions(GetParam())); | 76 SupportedVersions(GetParam())); |
| 77 session_.reset(new QuicServerSession(config_, connection_, &owner_)); | 77 session_.reset(new QuicServerSession(config_, connection_, &owner_)); |
| 78 MockClock clock; | 78 MockClock clock; |
| 79 handshake_message_.reset(crypto_config_.AddDefaultConfig( | 79 handshake_message_.reset(crypto_config_.AddDefaultConfig( |
| 80 QuicRandom::GetInstance(), &clock, | 80 QuicRandom::GetInstance(), &clock, |
| 81 QuicCryptoServerConfig::ConfigOptions())); | 81 QuicCryptoServerConfig::ConfigOptions())); |
| 82 session_->InitializeSession(crypto_config_); | 82 session_->InitializeSession(crypto_config_); |
| 83 visitor_ = QuicConnectionPeer::GetVisitor(connection_); | 83 visitor_ = QuicConnectionPeer::GetVisitor(connection_); |
| 84 } | 84 } |
| 85 | 85 |
| 86 StrictMock<MockQuicServerSessionVisitor> owner_; | 86 StrictMock<MockQuicServerSessionVisitor> owner_; |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 cached_network_params.set_serving_region(kTestServingRegion); | 417 cached_network_params.set_serving_region(kTestServingRegion); |
| 418 crypto_stream->set_previous_cached_network_params(cached_network_params); | 418 crypto_stream->set_previous_cached_network_params(cached_network_params); |
| 419 EXPECT_CALL(*connection_, ResumeConnectionState(_)).Times(1); | 419 EXPECT_CALL(*connection_, ResumeConnectionState(_)).Times(1); |
| 420 session_->OnConfigNegotiated(); | 420 session_->OnConfigNegotiated(); |
| 421 } | 421 } |
| 422 | 422 |
| 423 } // namespace | 423 } // namespace |
| 424 } // namespace test | 424 } // namespace test |
| 425 } // namespace tools | 425 } // namespace tools |
| 426 } // namespace net | 426 } // namespace net |
| OLD | NEW |