| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "content/browser/loader/url_loader_factory_impl.h" | 5 #include "content/browser/loader/url_loader_factory_impl.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 // Calling this function creates a request context. | 101 // Calling this function creates a request context. |
| 102 browser_context_->GetResourceContext()->GetRequestContext(); | 102 browser_context_->GetResourceContext()->GetRequestContext(); |
| 103 base::RunLoop().RunUntilIdle(); | 103 base::RunLoop().RunUntilIdle(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 ~URLLoaderFactoryImplTest() override { | 106 ~URLLoaderFactoryImplTest() override { |
| 107 rdh_.SetDelegate(nullptr); | 107 rdh_.SetDelegate(nullptr); |
| 108 net::URLRequestFilter::GetInstance()->ClearHandlers(); | 108 net::URLRequestFilter::GetInstance()->ClearHandlers(); |
| 109 | 109 |
| 110 resource_message_filter_->OnChannelClosing(); |
| 110 rdh_.CancelRequestsForProcess(resource_message_filter_->child_id()); | 111 rdh_.CancelRequestsForProcess(resource_message_filter_->child_id()); |
| 111 base::RunLoop().RunUntilIdle(); | 112 base::RunLoop().RunUntilIdle(); |
| 112 MojoAsyncResourceHandler::SetAllocationSizeForTesting( | 113 MojoAsyncResourceHandler::SetAllocationSizeForTesting( |
| 113 MojoAsyncResourceHandler::kDefaultAllocationSize); | 114 MojoAsyncResourceHandler::kDefaultAllocationSize); |
| 114 } | 115 } |
| 115 | 116 |
| 116 void GetContexts(ResourceType resource_type, | 117 void GetContexts(ResourceType resource_type, |
| 117 ResourceContext** resource_context, | 118 ResourceContext** resource_context, |
| 118 net::URLRequestContext** request_context) { | 119 net::URLRequestContext** request_context) { |
| 119 *resource_context = browser_context_->GetResourceContext(); | 120 *resource_context = browser_context_->GetResourceContext(); |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 EXPECT_EQ(net::ERR_ABORTED, client.completion_status().error_code); | 260 EXPECT_EQ(net::ERR_ABORTED, client.completion_status().error_code); |
| 260 } | 261 } |
| 261 | 262 |
| 262 INSTANTIATE_TEST_CASE_P(URLLoaderFactoryImplTest, | 263 INSTANTIATE_TEST_CASE_P(URLLoaderFactoryImplTest, |
| 263 URLLoaderFactoryImplTest, | 264 URLLoaderFactoryImplTest, |
| 264 ::testing::Values(128, 32 * 1024)); | 265 ::testing::Values(128, 32 * 1024)); |
| 265 | 266 |
| 266 } // namespace | 267 } // namespace |
| 267 | 268 |
| 268 } // namespace content | 269 } // namespace content |
| OLD | NEW |