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

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

Issue 2751253004: [Offline Pages] Add UMA to record final offline request status and loading failed error code. (Closed)
Patch Set: fix unit test so DidFinishNavigation is only called once Created 3 years, 9 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
Index: components/offline_pages/core/background/request_coordinator_unittest.cc
diff --git a/components/offline_pages/core/background/request_coordinator_unittest.cc b/components/offline_pages/core/background/request_coordinator_unittest.cc
index 0c5030cb5ba73773293469ccff6193d02613a3c2..bf36ebc9be534f4797cb5fca127402cce60d3cb1 100644
--- a/components/offline_pages/core/background/request_coordinator_unittest.cc
+++ b/components/offline_pages/core/background/request_coordinator_unittest.cc
@@ -670,6 +670,9 @@ TEST_F(RequestCoordinatorTest, OfflinerDoneRequestSucceeded) {
// Check that the observer got the notification that we succeeded, and that
// the request got removed from the queue.
EXPECT_TRUE(observer().completed_called());
+ histograms().ExpectBucketCount(
+ "OfflinePages.Background.FinalSavePageResult.bookmark", 0 /* SUCCESS */,
+ 1);
EXPECT_EQ(RequestCoordinator::BackgroundSavePageResult::SUCCESS,
observer().last_status());
}
@@ -739,6 +742,9 @@ TEST_F(RequestCoordinatorTest, OfflinerDoneRequestFailed) {
// subsequent notification that the request was removed) since we exceeded
// retry count.
EXPECT_TRUE(observer().completed_called());
+ histograms().ExpectBucketCount(
+ "OfflinePages.Background.FinalSavePageResult.bookmark",
+ 6 /* RETRY_COUNT_EXCEEDED */, 1);
EXPECT_EQ(RequestCoordinator::BackgroundSavePageResult::RETRY_COUNT_EXCEEDED,
observer().last_status());
}

Powered by Google App Engine
This is Rietveld 408576698