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

Unified Diff: components/dom_distiller/core/task_tracker_unittest.cc

Issue 302163005: Change InMemoryContentStore to use MRUCache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated tests for expiry and fixed lint errors. Created 6 years, 7 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/dom_distiller/core/dom_distiller_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/core/task_tracker_unittest.cc
diff --git a/components/dom_distiller/core/task_tracker_unittest.cc b/components/dom_distiller/core/task_tracker_unittest.cc
index 83c214749253ee369e4d16a3d93a87b2621799d3..aeb1e95bb56e39de774db9b940ff05a7636865fc 100644
--- a/components/dom_distiller/core/task_tracker_unittest.cc
+++ b/components/dom_distiller/core/task_tracker_unittest.cc
@@ -28,8 +28,8 @@ class FakeViewRequestDelegate : public ViewRequestDelegate {
class MockContentStore : public DistilledContentStore {
public:
- MOCK_CONST_METHOD2(LoadContent,
- void(const ArticleEntry& entry, LoadCallback callback));
+ MOCK_METHOD2(LoadContent,
+ void(const ArticleEntry& entry, LoadCallback callback));
MOCK_METHOD3(SaveContent,
void(const ArticleEntry& entry,
const DistilledArticleProto& proto,
@@ -198,7 +198,7 @@ TEST_F(DomDistillerTaskTrackerTest, TestBlobFetcher) {
ArticleEntry entry_with_blob = GetDefaultEntry();
DistilledArticleProto stored_distilled_article =
CreateDistilledArticleForEntry(entry_with_blob);
- InMemoryContentStore content_store;
+ InMemoryContentStore content_store(kDefaultMaxNumCachedEntries);
content_store.InjectContent(entry_with_blob, stored_distilled_article);
TestCancelCallback cancel_callback;
@@ -232,7 +232,7 @@ TEST_F(DomDistillerTaskTrackerTest, TestBlobFetcherFinishesFirst) {
ArticleEntry entry_with_blob = GetDefaultEntry();
DistilledArticleProto stored_distilled_article =
CreateDistilledArticleForEntry(entry_with_blob);
- InMemoryContentStore content_store;
+ InMemoryContentStore content_store(kDefaultMaxNumCachedEntries);
content_store.InjectContent(entry_with_blob, stored_distilled_article);
TestCancelCallback cancel_callback;
TaskTracker task_tracker(
@@ -271,7 +271,7 @@ TEST_F(DomDistillerTaskTrackerTest, TestBlobFetcherWithoutBlob) {
.WillOnce(Return(distiller));
ArticleEntry entry(GetDefaultEntry());
- InMemoryContentStore content_store;
+ InMemoryContentStore content_store(kDefaultMaxNumCachedEntries);
scoped_ptr<DistilledArticleProto> distilled_article(
new DistilledArticleProto(CreateDistilledArticleForEntry(entry)));
« no previous file with comments | « components/dom_distiller/core/dom_distiller_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698