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; | |
wtc
2014/01/08 22:36:05
Our convention is to name the test name as MAYBE_C
| |
582 #endif | |
583 | |
579 // Sequentially connect to the default host, then another host, and then the | 584 // Sequentially connect to the default host, then another host, and then the |
580 // default host. Verify that the default host gets a consistent ephemeral | 585 // default host. Verify that the default host gets a consistent ephemeral |
581 // port, that is different from the other host's connection. | 586 // port, that is different from the other host's connection. |
582 | 587 |
583 std::string other_server_name = "other.google.com"; | 588 std::string other_server_name = "other.google.com"; |
584 EXPECT_NE(kDefaultServerHostName, other_server_name); | 589 EXPECT_NE(kDefaultServerHostName, other_server_name); |
585 HostPortPair host_port_pair2(other_server_name, kDefaultServerPort); | 590 HostPortPair host_port_pair2(other_server_name, kDefaultServerPort); |
586 HostPortProxyPair host_port_proxy_pair2(host_port_pair2, | 591 HostPortProxyPair host_port_proxy_pair2(host_port_pair2, |
587 host_port_proxy_pair_.second); | 592 host_port_proxy_pair_.second); |
588 | 593 |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
872 QuicCryptoClientConfig::CachedState* cached2 = | 877 QuicCryptoClientConfig::CachedState* cached2 = |
873 crypto_config2->LookupOrCreate(host_port_proxy_pair2.first.host()); | 878 crypto_config2->LookupOrCreate(host_port_proxy_pair2.first.host()); |
874 EXPECT_NE(cached1->source_address_token(), cached2->source_address_token()); | 879 EXPECT_NE(cached1->source_address_token(), cached2->source_address_token()); |
875 EXPECT_TRUE(cached2->source_address_token().empty()); | 880 EXPECT_TRUE(cached2->source_address_token().empty()); |
876 EXPECT_FALSE(cached2->proof_valid()); | 881 EXPECT_FALSE(cached2->proof_valid()); |
877 } | 882 } |
878 } | 883 } |
879 | 884 |
880 } // namespace test | 885 } // namespace test |
881 } // namespace net | 886 } // namespace net |
OLD | NEW |