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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 CachedNetworkParameters expected_network_params; | 350 CachedNetworkParameters expected_network_params; |
351 expected_network_params.set_bandwidth_estimate_bytes_per_second( | 351 expected_network_params.set_bandwidth_estimate_bytes_per_second( |
352 bandwidth_recorder.BandwidthEstimate().ToBytesPerSecond()); | 352 bandwidth_recorder.BandwidthEstimate().ToBytesPerSecond()); |
353 expected_network_params.set_max_bandwidth_estimate_bytes_per_second( | 353 expected_network_params.set_max_bandwidth_estimate_bytes_per_second( |
354 bandwidth_recorder.MaxBandwidthEstimate().ToBytesPerSecond()); | 354 bandwidth_recorder.MaxBandwidthEstimate().ToBytesPerSecond()); |
355 expected_network_params.set_max_bandwidth_timestamp_seconds( | 355 expected_network_params.set_max_bandwidth_timestamp_seconds( |
356 bandwidth_recorder.MaxBandwidthTimestamp()); | 356 bandwidth_recorder.MaxBandwidthTimestamp()); |
357 expected_network_params.set_min_rtt_ms(session_->connection() | 357 expected_network_params.set_min_rtt_ms(session_->connection() |
358 ->sent_packet_manager() | 358 ->sent_packet_manager() |
359 .GetRttStats() | 359 .GetRttStats() |
360 ->min_rtt() | 360 ->MinRtt() |
361 .ToMilliseconds()); | 361 .ToMilliseconds()); |
362 expected_network_params.set_previous_connection_state( | 362 expected_network_params.set_previous_connection_state( |
363 CachedNetworkParameters::CONGESTION_AVOIDANCE); | 363 CachedNetworkParameters::CONGESTION_AVOIDANCE); |
364 expected_network_params.set_timestamp( | 364 expected_network_params.set_timestamp( |
365 session_->connection()->clock()->WallNow().ToUNIXSeconds()); | 365 session_->connection()->clock()->WallNow().ToUNIXSeconds()); |
366 expected_network_params.set_serving_region(serving_region); | 366 expected_network_params.set_serving_region(serving_region); |
367 | 367 |
368 EXPECT_CALL(*crypto_stream, | 368 EXPECT_CALL(*crypto_stream, |
369 SendServerConfigUpdate(EqualsProto(expected_network_params), _)) | 369 SendServerConfigUpdate(EqualsProto(expected_network_params), _)) |
370 .Times(1); | 370 .Times(1); |
371 session_->OnCongestionWindowChange(now); | 371 session_->OnCongestionWindowChange(now); |
372 } | 372 } |
373 | 373 |
374 } // namespace | 374 } // namespace |
375 } // namespace test | 375 } // namespace test |
376 } // namespace tools | 376 } // namespace tools |
377 } // namespace net | 377 } // namespace net |
OLD | NEW |