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

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

Issue 2245133002: set_minimum_protection_time_for_tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | 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_browsertest.cc
diff --git a/chrome/browser/memory/tab_manager_browsertest.cc b/chrome/browser/memory/tab_manager_browsertest.cc
index 8813ee2be3f4765826904073b5c0078a1e1dc6fb..97eb85a64d5c48679690e9f0dd56f81fad2d8b63 100644
--- a/chrome/browser/memory/tab_manager_browsertest.cc
+++ b/chrome/browser/memory/tab_manager_browsertest.cc
@@ -52,7 +52,8 @@ IN_PROC_BROWSER_TEST_F(TabManagerTest, TabManagerBasics) {
EXPECT_FALSE(tab_manager->recent_tab_discard());
// Disable the protection of recent tabs.
- tab_manager->minimum_protection_time_ = base::TimeDelta::FromMinutes(0);
+ tab_manager->set_minimum_protection_time_for_tests(
+ base::TimeDelta::FromMinutes(0));
// Get three tabs open.
WindowedNotificationObserver load1(
@@ -191,7 +192,8 @@ IN_PROC_BROWSER_TEST_F(TabManagerTest, OomPressureListener) {
ASSERT_TRUE(tab_manager);
// Disable the protection of recent tabs.
- tab_manager->minimum_protection_time_ = base::TimeDelta::FromMinutes(0);
+ tab_manager->set_minimum_protection_time_for_tests(
+ base::TimeDelta::FromMinutes(0));
// Get three tabs open.
content::WindowedNotificationObserver load1(
@@ -241,7 +243,8 @@ IN_PROC_BROWSER_TEST_F(TabManagerTest, InvalidOrEmptyURL) {
ASSERT_TRUE(tab_manager);
// Disable the protection of recent tabs.
- tab_manager->minimum_protection_time_ = base::TimeDelta::FromMinutes(0);
+ tab_manager->set_minimum_protection_time_for_tests(
+ base::TimeDelta::FromMinutes(0));
// Open two tabs. Wait for the foreground one to load but do not wait for the
// background one.
@@ -311,8 +314,8 @@ IN_PROC_BROWSER_TEST_F(TabManagerTest, ProtectRecentlyUsedTabs) {
auto* tsm = browser()->tab_strip_model();
// Set the minimum time of protection.
- tab_manager->minimum_protection_time_ =
- base::TimeDelta::FromMinutes(kProtectionTime);
+ tab_manager->set_minimum_protection_time_for_tests(
+ base::TimeDelta::FromMinutes(kProtectionTime));
// Open 2 tabs, the second one being in the background.
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIAboutURL));
@@ -360,7 +363,8 @@ IN_PROC_BROWSER_TEST_F(TabManagerTest, ProtectVideoTabs) {
ASSERT_TRUE(tab_manager);
// Disable the protection of recent tabs.
- tab_manager->minimum_protection_time_ = base::TimeDelta::FromMinutes(0);
+ tab_manager->set_minimum_protection_time_for_tests(
+ base::TimeDelta::FromMinutes(0));
// Open 2 tabs, the second one being in the background.
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIAboutURL));
@@ -398,7 +402,8 @@ IN_PROC_BROWSER_TEST_F(TabManagerTest, AutoDiscardable) {
TabManager* tab_manager = g_browser_process->GetTabManager();
// Disable the protection of recent tabs.
- tab_manager->minimum_protection_time_ = base::TimeDelta::FromMinutes(0);
+ tab_manager->set_minimum_protection_time_for_tests(
+ base::TimeDelta::FromMinutes(0));
// Get two tabs open.
WindowedNotificationObserver load1(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698