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

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

Issue 17302002: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/test_tools/quic_connection_peer.cc ('k') | net/tools/quic/quic_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stddef.h> 5 #include <stddef.h>
6 #include <string> 6 #include <string>
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 } 532 }
533 } 533 }
534 534
535 TEST_F(EndToEndTest, LimitMaxOpenStreams) { 535 TEST_F(EndToEndTest, LimitMaxOpenStreams) {
536 // Server limits the number of max streams to 2. 536 // Server limits the number of max streams to 2.
537 server_config_.set_max_streams_per_connection(2, 2); 537 server_config_.set_max_streams_per_connection(2, 2);
538 // Client tries to negotiate for 10. 538 // Client tries to negotiate for 10.
539 client_config_.set_max_streams_per_connection(10, 5); 539 client_config_.set_max_streams_per_connection(10, 5);
540 540
541 ASSERT_TRUE(Initialize()); 541 ASSERT_TRUE(Initialize());
542 client_->client()->WaitForCryptoHandshakeConfirmed();
542 QuicConfig* client_negotiated_config = client_->client()->session()->config(); 543 QuicConfig* client_negotiated_config = client_->client()->session()->config();
543 EXPECT_EQ(2u, client_negotiated_config->max_streams_per_connection()); 544 EXPECT_EQ(2u, client_negotiated_config->max_streams_per_connection());
544 } 545 }
545 546
546 TEST_F(EndToEndTest, ResetConnection) { 547 TEST_F(EndToEndTest, ResetConnection) {
547 // TODO(rtenneti): Delete this when NSS is supported. 548 // TODO(rtenneti): Delete this when NSS is supported.
548 if (!Aes128Gcm12Encrypter::IsSupported()) { 549 if (!Aes128Gcm12Encrypter::IsSupported()) {
549 LOG(INFO) << "AES GCM not supported. Test skipped."; 550 LOG(INFO) << "AES GCM not supported. Test skipped.";
550 return; 551 return;
551 } 552 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 QuicEpollConnectionHelperPeer::SetWriter(helper, NULL); 605 QuicEpollConnectionHelperPeer::SetWriter(helper, NULL);
605 606
606 EXPECT_EQ(QUIC_STREAM_CONNECTION_ERROR, client_->stream_error()); 607 EXPECT_EQ(QUIC_STREAM_CONNECTION_ERROR, client_->stream_error());
607 EXPECT_EQ(QUIC_ERROR_MIGRATING_ADDRESS, client_->connection_error()); 608 EXPECT_EQ(QUIC_ERROR_MIGRATING_ADDRESS, client_->connection_error());
608 } 609 }
609 610
610 } // namespace 611 } // namespace
611 } // namespace test 612 } // namespace test
612 } // namespace tools 613 } // namespace tools
613 } // namespace net 614 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_connection_peer.cc ('k') | net/tools/quic/quic_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698