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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 bandwidth_recorder.MaxBandwidthEstimate().ToBytesPerSecond()); | 345 bandwidth_recorder.MaxBandwidthEstimate().ToBytesPerSecond()); |
346 expected_network_params.set_max_bandwidth_timestamp_seconds( | 346 expected_network_params.set_max_bandwidth_timestamp_seconds( |
347 bandwidth_recorder.MaxBandwidthTimestamp()); | 347 bandwidth_recorder.MaxBandwidthTimestamp()); |
348 expected_network_params.set_min_rtt_ms(session_->connection() | 348 expected_network_params.set_min_rtt_ms(session_->connection() |
349 ->sent_packet_manager() | 349 ->sent_packet_manager() |
350 .GetRttStats() | 350 .GetRttStats() |
351 ->min_rtt() | 351 ->min_rtt() |
352 .ToMilliseconds()); | 352 .ToMilliseconds()); |
353 expected_network_params.set_previous_connection_state( | 353 expected_network_params.set_previous_connection_state( |
354 CachedNetworkParameters::CONGESTION_AVOIDANCE); | 354 CachedNetworkParameters::CONGESTION_AVOIDANCE); |
| 355 expected_network_params.set_timestamp( |
| 356 session_->connection()->clock()->WallNow().ToUNIXSeconds()); |
355 expected_network_params.set_serving_region(serving_region); | 357 expected_network_params.set_serving_region(serving_region); |
356 | 358 |
357 EXPECT_CALL(*crypto_stream, | 359 EXPECT_CALL(*crypto_stream, |
358 SendServerConfigUpdate(EqualsProto(expected_network_params))) | 360 SendServerConfigUpdate(EqualsProto(expected_network_params))) |
359 .Times(1); | 361 .Times(1); |
360 session_->OnCongestionWindowChange(now); | 362 session_->OnCongestionWindowChange(now); |
361 } | 363 } |
362 | 364 |
363 } // namespace | 365 } // namespace |
364 } // namespace test | 366 } // namespace test |
365 } // namespace tools | 367 } // namespace tools |
366 } // namespace net | 368 } // namespace net |
OLD | NEW |