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

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

Issue 1266243003: Tweaks to the precache triggering code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 4 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/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 9a9957a0a031656e1f8ed1d47c8a94769814f15b..97765b16047631fe4cfc972f110787cd395fe2fc 100644
--- a/components/precache/content/precache_manager_unittest.cc
+++ b/components/precache/content/precache_manager_unittest.cc
@@ -121,6 +121,15 @@ class TestPrecacheCompletionCallback {
bool was_on_done_called_;
};
+class PrecacheManagerUnderTest : public PrecacheManager {
+ public:
+ PrecacheManagerUnderTest(content::BrowserContext* browser_context,
+ const sync_driver::SyncService* const sync_service)
+ : PrecacheManager(browser_context, sync_service) {}
+ bool ShouldRun() const override { return true; }
+ bool WouldRun() const override { return true; }
+};
+
class PrecacheManagerTest : public testing::Test {
public:
PrecacheManagerTest()
@@ -147,7 +156,7 @@ class PrecacheManagerTest : public testing::Test {
content::TestBrowserThreadBundle test_browser_thread_bundle_;
content::TestBrowserContext browser_context_;
- PrecacheManager precache_manager_;
+ PrecacheManagerUnderTest precache_manager_;
TestURLFetcherCallback url_callback_;
net::FakeURLFetcherFactory factory_;
TestPrecacheCompletionCallback precache_callback_;

Powered by Google App Engine
This is Rietveld 408576698