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

Side by Side Diff: net/quic/quic_stream_factory_test.cc

Issue 127463003: Completely disable use of bind() with pseudo-random port selection on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: On Windows, avoid "port selection" in Stable or Beta channels automatically Created 6 years, 11 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/quic_stream_factory.cc ('k') | no next file » | 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 "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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 class QuicStreamFactoryTest : public ::testing::TestWithParam<QuicVersion> { 72 class QuicStreamFactoryTest : public ::testing::TestWithParam<QuicVersion> {
73 protected: 73 protected:
74 QuicStreamFactoryTest() 74 QuicStreamFactoryTest()
75 : random_generator_(0), 75 : random_generator_(0),
76 maker_(GetParam(), 0), 76 maker_(GetParam(), 0),
77 clock_(new MockClock()), 77 clock_(new MockClock()),
78 factory_(&host_resolver_, &socket_factory_, 78 factory_(&host_resolver_, &socket_factory_,
79 base::WeakPtr<HttpServerProperties>(), 79 base::WeakPtr<HttpServerProperties>(),
80 &crypto_client_stream_factory_, 80 &crypto_client_stream_factory_,
81 &random_generator_, clock_, kDefaultMaxPacketSize, 81 &random_generator_, clock_, kDefaultMaxPacketSize,
82 SupportedVersions(GetParam())), 82 SupportedVersions(GetParam()), true),
83 host_port_proxy_pair_(HostPortPair(kDefaultServerHostName, 83 host_port_proxy_pair_(HostPortPair(kDefaultServerHostName,
84 kDefaultServerPort), 84 kDefaultServerPort),
85 ProxyServer::Direct()), 85 ProxyServer::Direct()),
86 is_https_(false), 86 is_https_(false),
87 cert_verifier_(CertVerifier::CreateDefault()) { 87 cert_verifier_(CertVerifier::CreateDefault()) {
88 factory_.set_require_confirmation(false); 88 factory_.set_require_confirmation(false);
89 } 89 }
90 90
91 91
92 int GetSourcePortForNewSession(const HostPortProxyPair& destination) { 92 int GetSourcePortForNewSession(const HostPortProxyPair& destination) {
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 QuicCryptoClientConfig::CachedState* cached2 = 872 QuicCryptoClientConfig::CachedState* cached2 =
873 crypto_config2->LookupOrCreate(host_port_proxy_pair2.first.host()); 873 crypto_config2->LookupOrCreate(host_port_proxy_pair2.first.host());
874 EXPECT_NE(cached1->source_address_token(), cached2->source_address_token()); 874 EXPECT_NE(cached1->source_address_token(), cached2->source_address_token());
875 EXPECT_TRUE(cached2->source_address_token().empty()); 875 EXPECT_TRUE(cached2->source_address_token().empty());
876 EXPECT_FALSE(cached2->proof_valid()); 876 EXPECT_FALSE(cached2->proof_valid());
877 } 877 }
878 } 878 }
879 879
880 } // namespace test 880 } // namespace test
881 } // namespace net 881 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_stream_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698