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

Side by Side Diff: content/browser/loader/url_loader_factory_impl_unittest.cc

Issue 2469673002: Invalidate WeakPtrs of ResourceMessageFilter on channel shutdown (Closed)
Patch Set: remove test Created 4 years, 1 month 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
« no previous file with comments | « content/browser/loader/resource_message_filter.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/loader/resource_message_filter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698