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

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

Issue 2167843004: Discardable property support on TabManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change to auto-discardable 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
Index: chrome/browser/memory/tab_manager_unittest.cc
diff --git a/chrome/browser/memory/tab_manager_unittest.cc b/chrome/browser/memory/tab_manager_unittest.cc
index 794f62bf083bf184e52337e4f6b23547475deea9..9304b913203e9e9e27ea1bb0855e82ea2e9625d9 100644
--- a/chrome/browser/memory/tab_manager_unittest.cc
+++ b/chrome/browser/memory/tab_manager_unittest.cc
@@ -174,6 +174,7 @@ class TaskRunnerProxy : public base::TaskRunner {
enum TestIndicies {
kSelected,
+ kAutoDiscardable,
kPinned,
kApp,
kPlayingAudio,
@@ -277,6 +278,14 @@ TEST_F(TabManagerTest, Comparator) {
test_list.push_back(stats);
}
+ {
+ TabStats stats;
+ stats.last_active = now;
+ stats.is_auto_discardable = false;
+ stats.child_process_host_id = kAutoDiscardable;
+ test_list.push_back(stats);
+ }
+
// This entry sorts to the front, so by adding it last, it verifies that the
// array is being sorted.
{
@@ -291,6 +300,7 @@ TEST_F(TabManagerTest, Comparator) {
int index = 0;
EXPECT_EQ(kSelected, test_list[index++].child_process_host_id);
+ EXPECT_EQ(kAutoDiscardable, test_list[index++].child_process_host_id);
EXPECT_EQ(kFormEntry, test_list[index++].child_process_host_id);
EXPECT_EQ(kPlayingAudio, test_list[index++].child_process_host_id);
EXPECT_EQ(kPinned, test_list[index++].child_process_host_id);
« no previous file with comments | « chrome/browser/memory/tab_manager_observer_browsertest.cc ('k') | chrome/browser/memory/tab_manager_web_contents_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698