| Index: components/offline_pages/background/request_coordinator_unittest.cc
|
| diff --git a/components/offline_pages/background/request_coordinator_unittest.cc b/components/offline_pages/background/request_coordinator_unittest.cc
|
| index 18b0e67531f3e59c53536a571e5315dfab8a526b..06614b0d240c652ef9369fb8c4e622849fc850a3 100644
|
| --- a/components/offline_pages/background/request_coordinator_unittest.cc
|
| +++ b/components/offline_pages/background/request_coordinator_unittest.cc
|
| @@ -948,10 +948,11 @@ TEST_F(RequestCoordinatorTest, MarkRequestCompleted) {
|
| // Add a request to the queue.
|
| offline_pages::SavePageRequest request1(kRequestId1, kUrl1, kClientId1,
|
| base::Time::Now(), kUserRequested);
|
| - coordinator()->queue()->AddRequest(
|
| - request1, base::Bind(&RequestCoordinatorTest::AddRequestDone,
|
| - base::Unretained(this)));
|
| + int64_t request_id = coordinator()->SavePageLater(
|
| + kUrl1, kClientId1, kUserRequested,
|
| + RequestCoordinator::RequestAvailability::DISABLED_FOR_OFFLINER);
|
| PumpLoop();
|
| + EXPECT_NE(request_id, 0l);
|
|
|
| // Ensure the start processing request stops before the completion callback.
|
| EnableOfflinerCallback(false);
|
| @@ -963,7 +964,7 @@ TEST_F(RequestCoordinatorTest, MarkRequestCompleted) {
|
| EXPECT_TRUE(coordinator()->StartProcessing(device_conditions, callback));
|
|
|
| // Call the method under test, making sure we send SUCCESS to the observer.
|
| - coordinator()->MarkRequestCompleted(kRequestId1);
|
| + coordinator()->MarkRequestCompleted(request_id);
|
| PumpLoop();
|
|
|
| // Our observer should have seen SUCCESS instead of REMOVED.
|
|
|