Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1515)

Unified Diff: components/offline_pages/background/request_coordinator_unittest.cc

Issue 2280713002: [OfflinePages] Clear busy flag in StopPrerendering() in Request Coordinator. (Closed)
Patch Set: Spelling fix Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/offline_pages/background/request_coordinator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d63409ed2d579cfba0a43c51ee3669b9ecf39f4f..2aa6565e846afcc1eba564126e96cb27ec1411ce 100644
--- a/components/offline_pages/background/request_coordinator_unittest.cc
+++ b/components/offline_pages/background/request_coordinator_unittest.cc
@@ -607,12 +607,17 @@ TEST_F(RequestCoordinatorTest, StartProcessingThenStopProcessingLater) {
// Let all the async parts of the start processing pipeline run to completion.
PumpLoop();
+ // Coordinator should now be busy.
+ EXPECT_TRUE(is_busy());
+
// Now we cancel it while the prerenderer is busy.
coordinator()->StopProcessing();
// Let the async callbacks in the cancel run.
PumpLoop();
+ EXPECT_FALSE(is_busy());
+
// OfflinerDoneCallback will not end up getting called with status SAVED,
// since we cancelled the event before the LoadAndSave completed.
EXPECT_EQ(Offliner::RequestStatus::REQUEST_COORDINATOR_CANCELED,
« no previous file with comments | « components/offline_pages/background/request_coordinator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698