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

Unified Diff: components/offline_pages/core/offline_page_storage_manager_unittest.cc

Issue 2700563005: [Offline Pages] Fix storage manager deleting persistent pages. (Closed)
Patch Set: Created 3 years, 10 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/offline_pages/core/offline_page_storage_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/core/offline_page_storage_manager_unittest.cc
diff --git a/components/offline_pages/core/offline_page_storage_manager_unittest.cc b/components/offline_pages/core/offline_page_storage_manager_unittest.cc
index bc613a0e3cbe1d3c7b196e977c52d1a8cc55924c..bc3208a2dcce6312ca77abb151faf1898e3f27a1 100644
--- a/components/offline_pages/core/offline_page_storage_manager_unittest.cc
+++ b/components/offline_pages/core/offline_page_storage_manager_unittest.cc
@@ -383,12 +383,12 @@ TEST_F(OfflinePageStorageManagerTest, TestClearMultipleTimes) {
// After more days, all pages should be deleted.
carlosk 2017/02/23 01:13:39 This comment should be updated.
romax 2017/02/23 01:31:01 yep should have updated them.. next time :(
clock()->Advance(base::TimeDelta::FromDays(30));
TryClearPages();
- EXPECT_EQ(0, model()->GetTotalSize());
+ EXPECT_EQ(40 * kTestFileSize, model()->GetTotalSize());
EXPECT_EQ(5, total_cleared_times());
EXPECT_EQ(ClearStorageResult::SUCCESS, last_clear_storage_result());
- // Number of removed pages should be all the pages initially created plus 400
- // more pages added above for bookmark namespace.
- EXPECT_EQ(171 + 400, static_cast<int>(model()->GetRemovedPages().size()));
+ // Number of removed pages should be all the temporary pages initially
+ // created plus 400 more pages added above for bookmark namespace.
+ EXPECT_EQ(131 + 400, static_cast<int>(model()->GetRemovedPages().size()));
carlosk 2017/02/23 01:13:39 And just making sure as it's unclear for me: are t
romax 2017/02/23 01:31:01 basically all the survived ones should be persiste
}
} // namespace offline_pages
« no previous file with comments | « components/offline_pages/core/offline_page_storage_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698