Chromium Code Reviews| 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 af0ad232e6c97d91e9f16297d243a5072ac2581a..a82f71fc2019b7adce0aeca93814d70d301b2801 100644 |
| --- a/components/offline_pages/background/request_coordinator_unittest.cc |
| +++ b/components/offline_pages/background/request_coordinator_unittest.cc |
| @@ -1071,6 +1071,10 @@ TEST_F(RequestCoordinatorTest, WatchdogTimeoutForScheduledProcessing) { |
| // Build a request to use with the pre-renderer, and put it on the queue. |
| offline_pages::SavePageRequest request( |
| kRequestId1, kUrl1, kClientId1, base::Time::Now(), kUserRequested); |
| + // Set request to allow one more completed attempt. |
| + int max_tries = coordinator()->policy()->GetMaxCompletedTries(); |
| + while (request.completed_attempt_count() < max_tries - 1) |
| + request.MarkAttemptCompleted(); |
|
Pete Williamson
2016/11/11 00:24:04
Instead of calling MarkAttemptCompleted, why not j
dougarnett
2016/11/11 16:36:45
Done.
|
| coordinator()->queue()->AddRequest( |
| request, |
| base::Bind(&RequestCoordinatorTest::AddRequestDone, |
| @@ -1107,6 +1111,7 @@ TEST_F(RequestCoordinatorTest, WatchdogTimeoutForScheduledProcessing) { |
| PumpLoop(); |
| EXPECT_FALSE(is_starting()); |
| + EXPECT_FALSE(coordinator()->is_busy()); |
| EXPECT_TRUE(OfflinerWasCanceled()); |
| } |