| Index: components/offline_pages/background/request_queue_unittest.cc
|
| diff --git a/components/offline_pages/background/request_queue_unittest.cc b/components/offline_pages/background/request_queue_unittest.cc
|
| index 8ba805a9b7f3c95c95e6ef263462cc81f76f5819..c7897b08fa6f6cf04f63b45b9d461ce044012b5c 100644
|
| --- a/components/offline_pages/background/request_queue_unittest.cc
|
| +++ b/components/offline_pages/background/request_queue_unittest.cc
|
| @@ -535,8 +535,6 @@ TEST_F(RequestQueueTest, MarkAttemptCompleted) {
|
| update_requests_result()->updated_items.at(0).request_state());
|
| }
|
|
|
| -// Request expiration is detected during the call to pick a request, which
|
| -// is why this test calls PickNextRequest().
|
| TEST_F(RequestQueueTest, CleanStaleRequests) {
|
| // Create a request that is already expired.
|
| base::Time creation_time =
|
| @@ -554,21 +552,14 @@ TEST_F(RequestQueueTest, CleanStaleRequests) {
|
| OfflinerPolicy policy;
|
| RequestNotifierStub notifier;
|
| RequestCoordinatorEventLogger event_logger;
|
| - std::unique_ptr<PickRequestTaskFactory> picker_factory(
|
| - new PickRequestTaskFactory(&policy, ¬ifier, &event_logger));
|
| - queue()->SetPickerFactory(std::move(picker_factory));
|
| + std::unique_ptr<CleanupTaskFactory> cleanup_factory(
|
| + new CleanupTaskFactory(&policy, ¬ifier, &event_logger));
|
| + queue()->SetCleanupFactory(std::move(cleanup_factory));
|
|
|
| // Do a pick and clean operation, which will remove stale entries.
|
| DeviceConditions conditions;
|
| std::set<int64_t> disabled_list;
|
| - queue()->PickNextRequest(
|
| - base::Bind(&RequestQueueTest::RequestPickedCallback,
|
| - base::Unretained(this)),
|
| - base::Bind(&RequestQueueTest::RequestNotPickedCallback,
|
| - base::Unretained(this)),
|
| - base::Bind(&RequestQueueTest::RequestCountCallback,
|
| - base::Unretained(this)),
|
| - conditions, disabled_list);
|
| + queue()->CleanupRequestQueue();
|
|
|
| this->PumpLoop();
|
|
|
|
|