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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 session_.get(), kClientDataStreamId1); | 285 session_.get(), kClientDataStreamId1); |
286 ASSERT_TRUE(stream); | 286 ASSERT_TRUE(stream); |
287 EXPECT_EQ(FEC_PROTECT_OPTIONAL, stream->fec_policy()); | 287 EXPECT_EQ(FEC_PROTECT_OPTIONAL, stream->fec_policy()); |
288 } | 288 } |
289 | 289 |
290 class MockQuicCryptoServerStream : public QuicCryptoServerStream { | 290 class MockQuicCryptoServerStream : public QuicCryptoServerStream { |
291 public: | 291 public: |
292 explicit MockQuicCryptoServerStream( | 292 explicit MockQuicCryptoServerStream( |
293 const QuicCryptoServerConfig& crypto_config, QuicSession* session) | 293 const QuicCryptoServerConfig& crypto_config, QuicSession* session) |
294 : QuicCryptoServerStream(crypto_config, session) {} | 294 : QuicCryptoServerStream(crypto_config, session) {} |
295 virtual ~MockQuicCryptoServerStream() {} | 295 ~MockQuicCryptoServerStream() override {} |
296 | 296 |
297 MOCK_METHOD1(SendServerConfigUpdate, | 297 MOCK_METHOD1(SendServerConfigUpdate, |
298 void(const CachedNetworkParameters* cached_network_parameters)); | 298 void(const CachedNetworkParameters* cached_network_parameters)); |
299 | 299 |
300 private: | 300 private: |
301 DISALLOW_COPY_AND_ASSIGN(MockQuicCryptoServerStream); | 301 DISALLOW_COPY_AND_ASSIGN(MockQuicCryptoServerStream); |
302 }; | 302 }; |
303 | 303 |
304 TEST_P(QuicServerSessionTest, BandwidthEstimates) { | 304 TEST_P(QuicServerSessionTest, BandwidthEstimates) { |
305 if (version() <= QUIC_VERSION_21) { | 305 if (version() <= QUIC_VERSION_21) { |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 EXPECT_CALL(*crypto_stream, | 380 EXPECT_CALL(*crypto_stream, |
381 SendServerConfigUpdate(EqualsProto(expected_network_params))) | 381 SendServerConfigUpdate(EqualsProto(expected_network_params))) |
382 .Times(1); | 382 .Times(1); |
383 session_->OnCongestionWindowChange(now); | 383 session_->OnCongestionWindowChange(now); |
384 } | 384 } |
385 | 385 |
386 } // namespace | 386 } // namespace |
387 } // namespace test | 387 } // namespace test |
388 } // namespace tools | 388 } // namespace tools |
389 } // namespace net | 389 } // namespace net |
OLD | NEW |