Chromium Code Reviews| 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 8d24007711824aa7893cae747e6413999e58238c..49124bdda922308b5a00d5801c6cf06f2a94c626 100644 |
| --- a/components/precache/content/precache_manager_unittest.cc |
| +++ b/components/precache/content/precache_manager_unittest.cc |
| @@ -216,6 +216,8 @@ TEST_F(PrecacheManagerTest, StartAndFinishPrecaching) { |
| EXPECT_CALL(history_service_, TopHosts(NumTopHosts(), _)) |
| .WillOnce(SaveArg<1>(&top_hosts_callback)); |
| + factory_.SetFakeResponse(GURL(kConfigURL), "", net::HTTP_OK, |
| + net::URLRequestStatus::SUCCESS); |
| factory_.SetFakeResponse(GURL(kGoodManifestURL), "", net::HTTP_OK, |
| net::URLRequestStatus::SUCCESS); |
| @@ -244,6 +246,8 @@ TEST_F(PrecacheManagerTest, StartAndFinishPrecachingWithUnfinishedHosts) { |
| EXPECT_FALSE(precache_manager_->IsPrecaching()); |
| + factory_.SetFakeResponse(GURL(kConfigURL), "", net::HTTP_OK, |
| + net::URLRequestStatus::SUCCESS); |
| factory_.SetFakeResponse( |
| GURL(kEvilManifestURL), "", |
| net::HTTP_OK, net::URLRequestStatus::SUCCESS); |
| @@ -403,9 +407,9 @@ 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), |
| - Pair("Precache.Freshness.Prefetch", 1))); |
| + Pair("Precache.Fetch.TimeToComplete", |
| + 1))); // Pair("Precache.Latency.Prefetch", 1), |
|
bengr
2016/08/11 18:49:14
Please remove the dead code.
Why are these no lon
Raj
2016/08/12 19:04:20
Fixed test.
|
| + // Pair("Precache.Freshness.Prefetch", 1))); |
| } |
| TEST_F(PrecacheManagerTest, RecordStatsForFetchHTTP) { |
| @@ -484,8 +488,8 @@ TEST_F(PrecacheManagerTest, DeleteExpiredPrecacheHistory) { |
| 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; |
| - expected_histogram_count_map["Precache.Freshness.Prefetch"] += 3; |
| + // expected_histogram_count_map["Precache.Latency.Prefetch"] += 3; |
|
bengr
2016/08/11 18:49:14
Please remove the dead code.
Why are these no lon
Raj
2016/08/12 19:04:20
Fixed test.
|
| + // expected_histogram_count_map["Precache.Freshness.Prefetch"] += 3; |
| base::RunLoop().RunUntilIdle(); |
| precache_manager_->CancelPrecaching(); |