| 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 <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 } | 265 } |
| 266 | 266 |
| 267 void VerifyBrokenAlternateProtocolMapping(const HttpRequestInfo& request_info, | 267 void VerifyBrokenAlternateProtocolMapping(const HttpRequestInfo& request_info, |
| 268 bool should_mark_broken) { | 268 bool should_mark_broken) { |
| 269 const url::SchemeHostPort server(request_info.url); | 269 const url::SchemeHostPort server(request_info.url); |
| 270 const AlternativeServiceInfoVector alternative_service_info_vector = | 270 const AlternativeServiceInfoVector alternative_service_info_vector = |
| 271 session_->http_server_properties()->GetAlternativeServiceInfos(server); | 271 session_->http_server_properties()->GetAlternativeServiceInfos(server); |
| 272 EXPECT_EQ(1u, alternative_service_info_vector.size()); | 272 EXPECT_EQ(1u, alternative_service_info_vector.size()); |
| 273 EXPECT_EQ(should_mark_broken, | 273 EXPECT_EQ(should_mark_broken, |
| 274 session_->http_server_properties()->IsAlternativeServiceBroken( | 274 session_->http_server_properties()->IsAlternativeServiceBroken( |
| 275 alternative_service_info_vector[0].alternative_service)); | 275 alternative_service_info_vector[0].alternative_service())); |
| 276 } | 276 } |
| 277 | 277 |
| 278 TestJobFactory job_factory_; | 278 TestJobFactory job_factory_; |
| 279 MockHttpStreamRequestDelegate request_delegate_; | 279 MockHttpStreamRequestDelegate request_delegate_; |
| 280 SpdySessionDependencies session_deps_; | 280 SpdySessionDependencies session_deps_; |
| 281 std::unique_ptr<HttpNetworkSession> session_; | 281 std::unique_ptr<HttpNetworkSession> session_; |
| 282 HttpStreamFactoryImpl* factory_; | 282 HttpStreamFactoryImpl* factory_; |
| 283 HttpStreamFactoryImpl::JobController* job_controller_; | 283 HttpStreamFactoryImpl::JobController* job_controller_; |
| 284 std::unique_ptr<HttpStreamFactoryImpl::Request> request_; | 284 std::unique_ptr<HttpStreamFactoryImpl::Request> request_; |
| 285 std::unique_ptr<SequencedSocketData> tcp_data_; | 285 std::unique_ptr<SequencedSocketData> tcp_data_; |
| (...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1722 Preconnect(kNumPreconects); | 1722 Preconnect(kNumPreconects); |
| 1723 // If experiment is enabled, only 1 stream is requested. | 1723 // If experiment is enabled, only 1 stream is requested. |
| 1724 EXPECT_EQ( | 1724 EXPECT_EQ( |
| 1725 (int)actual_num_connects, | 1725 (int)actual_num_connects, |
| 1726 HttpStreamFactoryImplJobPeer::GetNumStreams(job_controller_->main_job())); | 1726 HttpStreamFactoryImplJobPeer::GetNumStreams(job_controller_->main_job())); |
| 1727 base::RunLoop().RunUntilIdle(); | 1727 base::RunLoop().RunUntilIdle(); |
| 1728 EXPECT_TRUE(HttpStreamFactoryImplPeer::IsJobControllerDeleted(factory_)); | 1728 EXPECT_TRUE(HttpStreamFactoryImplPeer::IsJobControllerDeleted(factory_)); |
| 1729 } | 1729 } |
| 1730 | 1730 |
| 1731 } // namespace net | 1731 } // namespace net |
| OLD | NEW |