Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: net/tools/quic/quic_server_session_test.cc

Issue 1014433002: Land Recent QUIC Changes until 03/09/2015. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@replaces_Perspective_enun_88006458
Patch Set: Rebase - added NET_EXPORT_PRIVATE to fix compiler error Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/tools/quic/quic_server_session.cc ('k') | net/tools/quic/test_tools/quic_test_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 .ToMilliseconds()); 370 .ToMilliseconds());
371 expected_network_params.set_previous_connection_state( 371 expected_network_params.set_previous_connection_state(
372 CachedNetworkParameters::CONGESTION_AVOIDANCE); 372 CachedNetworkParameters::CONGESTION_AVOIDANCE);
373 expected_network_params.set_timestamp( 373 expected_network_params.set_timestamp(
374 session_->connection()->clock()->WallNow().ToUNIXSeconds()); 374 session_->connection()->clock()->WallNow().ToUNIXSeconds());
375 expected_network_params.set_serving_region(serving_region); 375 expected_network_params.set_serving_region(serving_region);
376 376
377 EXPECT_CALL(*crypto_stream, 377 EXPECT_CALL(*crypto_stream,
378 SendServerConfigUpdate(EqualsProto(expected_network_params))) 378 SendServerConfigUpdate(EqualsProto(expected_network_params)))
379 .Times(1); 379 .Times(1);
380 EXPECT_CALL(*connection_, OnSendConnectionState(_)).Times(1);
380 session_->OnCongestionWindowChange(now); 381 session_->OnCongestionWindowChange(now);
381 } 382 }
382 383
383 TEST_P(QuicServerSessionTest, BandwidthResumptionExperiment) { 384 TEST_P(QuicServerSessionTest, BandwidthResumptionExperiment) {
384 ValueRestore<bool> old_flag( 385 ValueRestore<bool> old_flag(
385 &FLAGS_quic_enable_bandwidth_resumption_experiment, true); 386 &FLAGS_quic_enable_bandwidth_resumption_experiment, true);
386 387
387 // Test that if a client provides a CachedNetworkParameters with the same 388 // Test that if a client provides a CachedNetworkParameters with the same
388 // serving region as the current server, that this data is passed down to the 389 // serving region as the current server, that this data is passed down to the
389 // send algorithm. 390 // send algorithm.
(...skipping 27 matching lines...) Expand all
417 cached_network_params.set_serving_region(kTestServingRegion); 418 cached_network_params.set_serving_region(kTestServingRegion);
418 crypto_stream->set_previous_cached_network_params(cached_network_params); 419 crypto_stream->set_previous_cached_network_params(cached_network_params);
419 EXPECT_CALL(*connection_, ResumeConnectionState(_)).Times(1); 420 EXPECT_CALL(*connection_, ResumeConnectionState(_)).Times(1);
420 session_->OnConfigNegotiated(); 421 session_->OnConfigNegotiated();
421 } 422 }
422 423
423 } // namespace 424 } // namespace
424 } // namespace test 425 } // namespace test
425 } // namespace tools 426 } // namespace tools
426 } // namespace net 427 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_server_session.cc ('k') | net/tools/quic/test_tools/quic_test_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698