OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |