| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 // Calling this function creates a request context. | 104 // Calling this function creates a request context. |
| 105 browser_context_->GetResourceContext()->GetRequestContext(); | 105 browser_context_->GetResourceContext()->GetRequestContext(); |
| 106 base::RunLoop().RunUntilIdle(); | 106 base::RunLoop().RunUntilIdle(); |
| 107 } | 107 } |
| 108 | 108 |
| 109 ~URLLoaderFactoryImplTest() override { | 109 ~URLLoaderFactoryImplTest() override { |
| 110 rdh_.SetDelegate(nullptr); | 110 rdh_.SetDelegate(nullptr); |
| 111 net::URLRequestFilter::GetInstance()->ClearHandlers(); | 111 net::URLRequestFilter::GetInstance()->ClearHandlers(); |
| 112 | 112 |
| 113 resource_message_filter_->OnChannelClosing(); |
| 113 rdh_.CancelRequestsForProcess(resource_message_filter_->child_id()); | 114 rdh_.CancelRequestsForProcess(resource_message_filter_->child_id()); |
| 114 base::RunLoop().RunUntilIdle(); | 115 base::RunLoop().RunUntilIdle(); |
| 115 MojoAsyncResourceHandler::SetAllocationSizeForTesting( | 116 MojoAsyncResourceHandler::SetAllocationSizeForTesting( |
| 116 MojoAsyncResourceHandler::kDefaultAllocationSize); | 117 MojoAsyncResourceHandler::kDefaultAllocationSize); |
| 117 } | 118 } |
| 118 | 119 |
| 119 void GetContexts(ResourceType resource_type, | 120 void GetContexts(ResourceType resource_type, |
| 120 ResourceContext** resource_context, | 121 ResourceContext** resource_context, |
| 121 net::URLRequestContext** request_context) { | 122 net::URLRequestContext** request_context) { |
| 122 *resource_context = browser_context_->GetResourceContext(); | 123 *resource_context = browser_context_->GetResourceContext(); |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 ASSERT_FALSE(rdh_.GetURLRequest(GlobalRequestID(kChildId, kRequestId))); | 420 ASSERT_FALSE(rdh_.GetURLRequest(GlobalRequestID(kChildId, kRequestId))); |
| 420 } | 421 } |
| 421 | 422 |
| 422 INSTANTIATE_TEST_CASE_P(URLLoaderFactoryImplTest, | 423 INSTANTIATE_TEST_CASE_P(URLLoaderFactoryImplTest, |
| 423 URLLoaderFactoryImplTest, | 424 URLLoaderFactoryImplTest, |
| 424 ::testing::Values(128, 32 * 1024)); | 425 ::testing::Values(128, 32 * 1024)); |
| 425 | 426 |
| 426 } // namespace | 427 } // namespace |
| 427 | 428 |
| 428 } // namespace content | 429 } // namespace content |
| OLD | NEW |