| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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_job_controller.h" | 5 #include "net/http/http_stream_factory_impl_job_controller.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 MainJobSucceedsAfterConnectionChanged) { | 634 MainJobSucceedsAfterConnectionChanged) { |
| 635 base::HistogramTester histogram_tester; | 635 base::HistogramTester histogram_tester; |
| 636 ProxyConfig proxy_config; | 636 ProxyConfig proxy_config; |
| 637 proxy_config.set_auto_detect(true); | 637 proxy_config.set_auto_detect(true); |
| 638 // Use asynchronous proxy resolver. | 638 // Use asynchronous proxy resolver. |
| 639 MockAsyncProxyResolverFactory* proxy_resolver_factory = | 639 MockAsyncProxyResolverFactory* proxy_resolver_factory = |
| 640 new MockAsyncProxyResolverFactory(false); | 640 new MockAsyncProxyResolverFactory(false); |
| 641 session_deps_.proxy_service.reset( | 641 session_deps_.proxy_service.reset( |
| 642 new ProxyService(base::MakeUnique<ProxyConfigServiceFixed>(proxy_config), | 642 new ProxyService(base::MakeUnique<ProxyConfigServiceFixed>(proxy_config), |
| 643 base::WrapUnique(proxy_resolver_factory), nullptr)); | 643 base::WrapUnique(proxy_resolver_factory), nullptr)); |
| 644 session_deps_.quic_do_not_mark_as_broken_on_network_change = true; | |
| 645 | 644 |
| 646 HttpRequestInfo request_info; | 645 HttpRequestInfo request_info; |
| 647 request_info.method = "GET"; | 646 request_info.method = "GET"; |
| 648 request_info.url = GURL("https://www.google.com"); | 647 request_info.url = GURL("https://www.google.com"); |
| 649 Initialize(request_info); | 648 Initialize(request_info); |
| 650 | 649 |
| 651 url::SchemeHostPort server(request_info.url); | 650 url::SchemeHostPort server(request_info.url); |
| 652 AlternativeService alternative_service(kProtoQUIC, server.host(), 443); | 651 AlternativeService alternative_service(kProtoQUIC, server.host(), 443); |
| 653 SetAlternativeService(request_info, alternative_service); | 652 SetAlternativeService(request_info, alternative_service); |
| 654 | 653 |
| (...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1477 Preconnect(kNumPreconects); | 1476 Preconnect(kNumPreconects); |
| 1478 // If experiment is enabled, only 1 stream is requested. | 1477 // If experiment is enabled, only 1 stream is requested. |
| 1479 EXPECT_EQ( | 1478 EXPECT_EQ( |
| 1480 (int)actual_num_connects, | 1479 (int)actual_num_connects, |
| 1481 HttpStreamFactoryImplJobPeer::GetNumStreams(job_controller_->main_job())); | 1480 HttpStreamFactoryImplJobPeer::GetNumStreams(job_controller_->main_job())); |
| 1482 base::RunLoop().RunUntilIdle(); | 1481 base::RunLoop().RunUntilIdle(); |
| 1483 EXPECT_TRUE(HttpStreamFactoryImplPeer::IsJobControllerDeleted(factory_)); | 1482 EXPECT_TRUE(HttpStreamFactoryImplPeer::IsJobControllerDeleted(factory_)); |
| 1484 } | 1483 } |
| 1485 | 1484 |
| 1486 } // namespace net | 1485 } // namespace net |
| OLD | NEW |