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 "net/quic/quic_stream_factory.h" | 5 #include "net/quic/quic_stream_factory.h" |
6 | 6 |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "net/base/test_data_directory.h" | 9 #include "net/base/test_data_directory.h" |
10 #include "net/cert/cert_verifier.h" | 10 #include "net/cert/cert_verifier.h" |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 scoped_ptr<QuicHttpStream> stream( | 569 scoped_ptr<QuicHttpStream> stream( |
570 factory_.CreateIfSessionExists(host_port_proxy_pair_, net_log_)); | 570 factory_.CreateIfSessionExists(host_port_proxy_pair_, net_log_)); |
571 EXPECT_TRUE(stream.get()); | 571 EXPECT_TRUE(stream.get()); |
572 stream.reset(); | 572 stream.reset(); |
573 | 573 |
574 EXPECT_TRUE(socket_data.at_read_eof()); | 574 EXPECT_TRUE(socket_data.at_read_eof()); |
575 EXPECT_TRUE(socket_data.at_write_eof()); | 575 EXPECT_TRUE(socket_data.at_write_eof()); |
576 } | 576 } |
577 | 577 |
578 TEST_P(QuicStreamFactoryTest, CreateConsistentEphemeralPort) { | 578 TEST_P(QuicStreamFactoryTest, CreateConsistentEphemeralPort) { |
579 #if defined(OS_WIN) | |
580 // TODO(jar)bug=329255 Provide better implementation to avoid pop-up warning. | |
581 return; | |
582 #endif | |
583 | |
584 // Sequentially connect to the default host, then another host, and then the | 579 // Sequentially connect to the default host, then another host, and then the |
585 // default host. Verify that the default host gets a consistent ephemeral | 580 // default host. Verify that the default host gets a consistent ephemeral |
586 // port, that is different from the other host's connection. | 581 // port, that is different from the other host's connection. |
587 | 582 |
588 std::string other_server_name = "other.google.com"; | 583 std::string other_server_name = "other.google.com"; |
589 EXPECT_NE(kDefaultServerHostName, other_server_name); | 584 EXPECT_NE(kDefaultServerHostName, other_server_name); |
590 HostPortPair host_port_pair2(other_server_name, kDefaultServerPort); | 585 HostPortPair host_port_pair2(other_server_name, kDefaultServerPort); |
591 HostPortProxyPair host_port_proxy_pair2(host_port_pair2, | 586 HostPortProxyPair host_port_proxy_pair2(host_port_pair2, |
592 host_port_proxy_pair_.second); | 587 host_port_proxy_pair_.second); |
593 | 588 |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
877 QuicCryptoClientConfig::CachedState* cached2 = | 872 QuicCryptoClientConfig::CachedState* cached2 = |
878 crypto_config2->LookupOrCreate(host_port_proxy_pair2.first.host()); | 873 crypto_config2->LookupOrCreate(host_port_proxy_pair2.first.host()); |
879 EXPECT_NE(cached1->source_address_token(), cached2->source_address_token()); | 874 EXPECT_NE(cached1->source_address_token(), cached2->source_address_token()); |
880 EXPECT_TRUE(cached2->source_address_token().empty()); | 875 EXPECT_TRUE(cached2->source_address_token().empty()); |
881 EXPECT_FALSE(cached2->proof_valid()); | 876 EXPECT_FALSE(cached2->proof_valid()); |
882 } | 877 } |
883 } | 878 } |
884 | 879 |
885 } // namespace test | 880 } // namespace test |
886 } // namespace net | 881 } // namespace net |
OLD | NEW |