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

Side by Side Diff: content/browser/loader/async_revalidation_manager_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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/async_revalidation_manager.h" 5 #include "content/browser/loader/async_revalidation_manager.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 request_context->set_job_factory(job_factory_.get()); 282 request_context->set_job_factory(job_factory_.get());
283 request_context->set_network_delegate(network_delegate_.get()); 283 request_context->set_network_delegate(network_delegate_.get());
284 host_.EnableStaleWhileRevalidateForTesting(); 284 host_.EnableStaleWhileRevalidateForTesting();
285 } 285 }
286 286
287 AsyncRevalidationManagerTest() 287 AsyncRevalidationManagerTest()
288 : AsyncRevalidationManagerTest( 288 : AsyncRevalidationManagerTest(
289 base::WrapUnique(new net::TestNetworkDelegate)) {} 289 base::WrapUnique(new net::TestNetworkDelegate)) {}
290 290
291 void TearDown() override { 291 void TearDown() override {
292 filter_->OnChannelClosing();
292 host_.CancelRequestsForProcess(filter_->child_id()); 293 host_.CancelRequestsForProcess(filter_->child_id());
293 host_.Shutdown(); 294 host_.Shutdown();
294 host_.CancelRequestsForContext(browser_context_->GetResourceContext()); 295 host_.CancelRequestsForContext(browser_context_->GetResourceContext());
295 browser_context_.reset(); 296 browser_context_.reset();
296 base::RunLoop().RunUntilIdle(); 297 base::RunLoop().RunUntilIdle();
297 } 298 }
298 299
299 void SetResponse(const std::string& headers, const std::string& data) { 300 void SetResponse(const std::string& headers, const std::string& data) {
300 job_factory_->SetResponse(headers, data); 301 job_factory_->SetResponse(headers, data);
301 } 302 }
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 // already completed. 550 // already completed.
550 EXPECT_TRUE(NextRequestWasDestroyed()); 551 EXPECT_TRUE(NextRequestWasDestroyed());
551 552
552 // But no others. 553 // But no others.
553 EXPECT_TRUE(IsEmpty()); 554 EXPECT_TRUE(IsEmpty());
554 } 555 }
555 556
556 } // namespace 557 } // namespace
557 558
558 } // namespace content 559 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/async_resource_handler_unittest.cc ('k') | content/browser/loader/resource_dispatcher_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698