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

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

Issue 1859023002: Fix PrecacheFetcher behavior when reaching max_bytes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Extract AppendManifestURLIfNew(). Created 4 years, 8 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_fetcher.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 68da1d9d39e4bdb2fc5bb806975ce2b61856e71d..5e0fde422c230cd8d9f0113461e91dcf8136c24b 100644
--- a/components/precache/content/precache_manager_unittest.cc
+++ b/components/precache/content/precache_manager_unittest.cc
@@ -308,6 +308,7 @@ TEST_F(PrecacheManagerTest, RecordStatsForFetchDuringPrecaching) {
Pair("Precache.Fetch.PercentCompleted", 1),
Pair("Precache.Fetch.ResponseBytes.Network", 1),
Pair("Precache.Fetch.ResponseBytes.Total", 1),
+ Pair("Precache.Fetch.TimeToComplete", 1),
Pair("Precache.Latency.Prefetch", 1)));
}
@@ -380,6 +381,7 @@ TEST_F(PrecacheManagerTest, DeleteExpiredPrecacheHistory) {
expected_histogram_count_map["Precache.Fetch.PercentCompleted"]++;
expected_histogram_count_map["Precache.Fetch.ResponseBytes.Network"]++;
expected_histogram_count_map["Precache.Fetch.ResponseBytes.Total"]++;
+ expected_histogram_count_map["Precache.Fetch.TimeToComplete"]++;
expected_histogram_count_map["Precache.Latency.Prefetch"] += 3;
precache_manager_.CancelPrecaching();
@@ -406,6 +408,7 @@ TEST_F(PrecacheManagerTest, DeleteExpiredPrecacheHistory) {
precache_manager_.RecordStatsForFetch(GURL("http://old-fetch.com"), GURL(),
base::TimeDelta(), kCurrentTime, 1000,
true);
+ expected_histogram_count_map["Precache.Fetch.TimeToComplete"]++;
expected_histogram_count_map["Precache.Latency.NonPrefetch"]++;
expected_histogram_count_map["Precache.Latency.NonPrefetch.NonTopHosts"]++;
« no previous file with comments | « no previous file | components/precache/core/precache_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698