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 34f29f99bb5f57153ee7a4e718ccdd69e9b4e3b8..1bdc0fec2949202b371d59d996112af83fdc5a0b 100644 |
--- a/components/offline_pages/background/request_coordinator_unittest.cc |
+++ b/components/offline_pages/background/request_coordinator_unittest.cc |
@@ -357,6 +357,12 @@ TEST_F(RequestCoordinatorTest, OfflinerDoneRequestFailed) { |
EnableOfflinerCallback(true); |
SendOfflinerDoneCallback(request, |
Offliner::RequestStatus::PRERENDERING_FAILED); |
+ // There will be one request left in the queue after the prerender fails, stop |
+ // processing now so that it will remain in the queue for us to check. This |
+ // won't affect the offliner done callback other than preventing |
+ // TryNextRequest from doing anything. |
+ coordinator()->StopProcessing(); |
+ |
PumpLoop(); |
// Verify the request is not removed from the queue, and wait for callbacks. |
@@ -367,7 +373,9 @@ TEST_F(RequestCoordinatorTest, OfflinerDoneRequestFailed) { |
// Still one request in the queue. |
EXPECT_EQ(1UL, last_requests().size()); |
- // TODO(dougarnett): Verify retry count gets incremented. |
+ // Verify retry count was incremented. |
+ const SavePageRequest& found_request = last_requests().front(); |
+ EXPECT_EQ(1L, found_request.attempt_count()); |
} |
// This tests a StopProcessing call before we have actually started the |