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

Unified Diff: chrome/browser/memory/tab_manager_web_contents_data_unittest.cc

Issue 2711093002: Purge once random minutes(between 30min and 60min) after backgrounded. (Closed)
Patch Set: Fixed Created 3 years, 9 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 | « chrome/browser/memory/tab_manager_web_contents_data.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/memory/tab_manager_web_contents_data_unittest.cc
diff --git a/chrome/browser/memory/tab_manager_web_contents_data_unittest.cc b/chrome/browser/memory/tab_manager_web_contents_data_unittest.cc
index d98afa8c040ba8f22578bfbdcfe61c7a0af2a4da..e8adeefb150bd2955f29af1329cf014b6f2ae585 100644
--- a/chrome/browser/memory/tab_manager_web_contents_data_unittest.cc
+++ b/chrome/browser/memory/tab_manager_web_contents_data_unittest.cc
@@ -204,25 +204,4 @@ TEST_F(TabManagerWebContentsDataTest, HistogramsInactiveToReloadTime) {
histograms.ExpectBucketCount(kHistogramName, 12000, 1);
}
-TEST_F(TabManagerWebContentsDataTest, PurgeAndSuspendState) {
- EXPECT_EQ(TabManager::RUNNING, tab_data()->GetPurgeAndSuspendState());
- base::TimeTicks last_modified = tab_data()->LastPurgeAndSuspendModifiedTime();
- test_clock().Advance(base::TimeDelta::FromSeconds(5));
- tab_data()->SetPurgeAndSuspendState(TabManager::SUSPENDED);
- EXPECT_EQ(TabManager::SUSPENDED, tab_data()->GetPurgeAndSuspendState());
- EXPECT_GT(tab_data()->LastPurgeAndSuspendModifiedTime(), last_modified);
-
- last_modified = tab_data()->LastPurgeAndSuspendModifiedTime();
- test_clock().Advance(base::TimeDelta::FromSeconds(5));
- tab_data()->SetPurgeAndSuspendState(TabManager::RESUMED);
- EXPECT_EQ(TabManager::RESUMED, tab_data()->GetPurgeAndSuspendState());
- EXPECT_GT(tab_data()->LastPurgeAndSuspendModifiedTime(), last_modified);
-
- last_modified = tab_data()->LastPurgeAndSuspendModifiedTime();
- test_clock().Advance(base::TimeDelta::FromSeconds(5));
- tab_data()->SetPurgeAndSuspendState(TabManager::RUNNING);
- EXPECT_EQ(TabManager::RUNNING, tab_data()->GetPurgeAndSuspendState());
- EXPECT_GT(tab_data()->LastPurgeAndSuspendModifiedTime(), last_modified);
-}
-
} // namespace memory
« no previous file with comments | « chrome/browser/memory/tab_manager_web_contents_data.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698