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

Side by Side Diff: net/http/http_stream_factory_impl_unittest.cc

Issue 903213003: Enable QUIC for proxies based on Finch config and command line switch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added TODO Created 5 years, 10 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
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/http/http_stream_factory_impl.h" 5 #include "net/http/http_stream_factory_impl.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 EXPECT_TRUE(iter != retry_info.end()); 616 EXPECT_TRUE(iter != retry_info.end());
617 } 617 }
618 618
619 TEST_P(HttpStreamFactoryTest, UnreachableQuicProxyMarkedAsBad) { 619 TEST_P(HttpStreamFactoryTest, UnreachableQuicProxyMarkedAsBad) {
620 scoped_ptr<ProxyService> proxy_service_; 620 scoped_ptr<ProxyService> proxy_service_;
621 proxy_service_.reset( 621 proxy_service_.reset(
622 ProxyService::CreateFixedFromPacResult("QUIC bad:99; DIRECT")); 622 ProxyService::CreateFixedFromPacResult("QUIC bad:99; DIRECT"));
623 623
624 HttpNetworkSession::Params params_; 624 HttpNetworkSession::Params params_;
625 params_.enable_quic = true; 625 params_.enable_quic = true;
626 params_.enable_quic_for_proxies = true;
626 scoped_refptr<SSLConfigServiceDefaults> ssl_config_service_( 627 scoped_refptr<SSLConfigServiceDefaults> ssl_config_service_(
627 new SSLConfigServiceDefaults); 628 new SSLConfigServiceDefaults);
628 HttpServerPropertiesImpl http_server_properties; 629 HttpServerPropertiesImpl http_server_properties;
629 MockClientSocketFactory socket_factory_; 630 MockClientSocketFactory socket_factory_;
630 params_.client_socket_factory = &socket_factory_; 631 params_.client_socket_factory = &socket_factory_;
631 MockHostResolver host_resolver_; 632 MockHostResolver host_resolver_;
632 params_.host_resolver = &host_resolver_; 633 params_.host_resolver = &host_resolver_;
633 TransportSecurityState transport_security_state_; 634 TransportSecurityState transport_security_state_;
634 params_.transport_security_state = &transport_security_state_; 635 params_.transport_security_state = &transport_security_state_;
635 params_.proxy_service = proxy_service_.get(); 636 params_.proxy_service = proxy_service_.get();
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); 1355 EXPECT_TRUE(waiter.used_proxy_info().is_direct());
1355 1356
1356 // Make sure there is no orphaned job. it is already canceled. 1357 // Make sure there is no orphaned job. it is already canceled.
1357 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>( 1358 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>(
1358 session->http_stream_factory_for_websocket())->num_orphaned_jobs()); 1359 session->http_stream_factory_for_websocket())->num_orphaned_jobs());
1359 } 1360 }
1360 1361
1361 } // namespace 1362 } // namespace
1362 1363
1363 } // namespace net 1364 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698