| OLD | NEW |
| 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 request_context->set_job_factory(job_factory_.get()); | 281 request_context->set_job_factory(job_factory_.get()); |
| 282 request_context->set_network_delegate(network_delegate_.get()); | 282 request_context->set_network_delegate(network_delegate_.get()); |
| 283 host_.EnableStaleWhileRevalidateForTesting(); | 283 host_.EnableStaleWhileRevalidateForTesting(); |
| 284 } | 284 } |
| 285 | 285 |
| 286 AsyncRevalidationManagerTest() | 286 AsyncRevalidationManagerTest() |
| 287 : AsyncRevalidationManagerTest( | 287 : AsyncRevalidationManagerTest( |
| 288 base::WrapUnique(new net::TestNetworkDelegate)) {} | 288 base::WrapUnique(new net::TestNetworkDelegate)) {} |
| 289 | 289 |
| 290 void TearDown() override { | 290 void TearDown() override { |
| 291 filter_->OnChannelClosing(); |
| 291 host_.CancelRequestsForProcess(filter_->child_id()); | 292 host_.CancelRequestsForProcess(filter_->child_id()); |
| 292 host_.Shutdown(); | 293 host_.Shutdown(); |
| 293 host_.CancelRequestsForContext(browser_context_->GetResourceContext()); | 294 host_.CancelRequestsForContext(browser_context_->GetResourceContext()); |
| 294 browser_context_.reset(); | 295 browser_context_.reset(); |
| 295 base::RunLoop().RunUntilIdle(); | 296 base::RunLoop().RunUntilIdle(); |
| 296 } | 297 } |
| 297 | 298 |
| 298 void SetResponse(const std::string& headers, const std::string& data) { | 299 void SetResponse(const std::string& headers, const std::string& data) { |
| 299 job_factory_->SetResponse(headers, data); | 300 job_factory_->SetResponse(headers, data); |
| 300 } | 301 } |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 // already completed. | 549 // already completed. |
| 549 EXPECT_TRUE(NextRequestWasDestroyed()); | 550 EXPECT_TRUE(NextRequestWasDestroyed()); |
| 550 | 551 |
| 551 // But no others. | 552 // But no others. |
| 552 EXPECT_TRUE(IsEmpty()); | 553 EXPECT_TRUE(IsEmpty()); |
| 553 } | 554 } |
| 554 | 555 |
| 555 } // namespace | 556 } // namespace |
| 556 | 557 |
| 557 } // namespace content | 558 } // namespace content |
| OLD | NEW |