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

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

Issue 2202023002: Precache should cancel when there is user traffic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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/precache/content/precache_manager.cc ('k') | no next file » | 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 27b167f31548ca8d25aba396be7d9e3e356e1944..d075231b4b0aa96e5f9110b285b9d80f426f5d69 100644
--- a/components/precache/content/precache_manager_unittest.cc
+++ b/components/precache/content/precache_manager_unittest.cc
@@ -147,6 +147,8 @@ class PrecacheManagerUnderTest : public PrecacheManager {
bool control_group_;
};
+} // namespace
+
class PrecacheManagerTest : public testing::Test {
public:
PrecacheManagerTest()
@@ -342,6 +344,8 @@ TEST_F(PrecacheManagerTest, StartAndCancelPrecachingAfterURLsReceived) {
EXPECT_EQ(expected_requested_urls, url_callback_.requested_urls());
}
+// TODO(rajendrant): Add unittests for
+// PrecacheUtil::UpdatePrecacheMetricsAndState() for more test coverage.
TEST_F(PrecacheManagerTest, RecordStatsForFetchWithSizeZero) {
// Fetches with size 0 should be ignored.
precache_manager_->RecordStatsForFetch(GURL("http://url.com"), GURL(),
@@ -523,6 +527,4 @@ TEST_F(PrecacheManagerTest, DeleteExpiredPrecacheHistory) {
ContainerEq(expected_histogram_count_map));
}
-} // namespace
-
} // namespace precache
« no previous file with comments | « components/precache/content/precache_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698