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

Unified Diff: components/precache/content/precache_manager_unittest.cc

Issue 2628513002: Add Precache.CacheStatus.Prefetch UMA. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | components/precache/core/precache_database.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/precache/content/precache_manager_unittest.cc
diff --git a/components/precache/content/precache_manager_unittest.cc b/components/precache/content/precache_manager_unittest.cc
index a93a2ca8caab07e55e83696db23b33d688e84c9a..10c8cb6ff2983e3b21808712b329c5fc4bad7029 100644
--- a/components/precache/content/precache_manager_unittest.cc
+++ b/components/precache/content/precache_manager_unittest.cc
@@ -495,7 +495,8 @@ TEST_F(PrecacheManagerTest, RecordStatsForFetchDuringPrecaching) {
base::RunLoop().RunUntilIdle();
EXPECT_THAT(
histograms_.GetTotalCountsForPrefix("Precache."),
- UnorderedElementsAre(Pair("Precache.CacheSize.AllEntries", 1),
+ UnorderedElementsAre(Pair("Precache.CacheStatus.Prefetch", 1),
+ Pair("Precache.CacheSize.AllEntries", 1),
Pair("Precache.DownloadedPrecacheMotivated", 1),
Pair("Precache.Fetch.PercentCompleted", 1),
Pair("Precache.Fetch.ResponseBytes.Network", 1),
@@ -576,6 +577,7 @@ TEST_F(PrecacheManagerTest, DeleteExpiredPrecacheHistory) {
RecordStatsForPrecacheFetch(
GURL("http://yesterday-fetch.com"), std::string(), base::TimeDelta(),
kCurrentTime - base::TimeDelta::FromDays(1), info_, 1000);
+ expected_histogram_count_map["Precache.CacheStatus.Prefetch"] += 3;
expected_histogram_count_map["Precache.CacheSize.AllEntries"]++;
expected_histogram_count_map["Precache.DownloadedPrecacheMotivated"] += 3;
expected_histogram_count_map["Precache.Fetch.PercentCompleted"]++;
« no previous file with comments | « no previous file | components/precache/core/precache_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698