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 bb0e948ac1cce252682d7620207eb18ce8c53100..e28ddde58f93000d7e60e6e9a99e90f940eba042 100644 |
--- a/chrome/browser/memory/tab_manager_browsertest.cc |
+++ b/chrome/browser/memory/tab_manager_browsertest.cc |
@@ -95,42 +95,31 @@ IN_PROC_BROWSER_TEST_F(TabManagerTest, TabManagerBasics) { |
// and was not selected. |
EXPECT_TRUE(tab_manager->DiscardTab()); |
EXPECT_EQ(3, tsm->count()); |
- EXPECT_TRUE( |
- TabManager::WebContentsData::IsDiscarded(tsm->GetWebContentsAt(0))); |
- EXPECT_FALSE( |
- TabManager::WebContentsData::IsDiscarded(tsm->GetWebContentsAt(1))); |
- EXPECT_FALSE( |
- TabManager::WebContentsData::IsDiscarded(tsm->GetWebContentsAt(2))); |
+ EXPECT_TRUE(tab_manager->IsTabDiscarded(tsm->GetWebContentsAt(0))); |
+ EXPECT_FALSE(tab_manager->IsTabDiscarded(tsm->GetWebContentsAt(1))); |
+ EXPECT_FALSE(tab_manager->IsTabDiscarded(tsm->GetWebContentsAt(2))); |
EXPECT_TRUE(tab_manager->recent_tab_discard()); |
// Run discard again, make sure it kills the second tab. |
EXPECT_TRUE(tab_manager->DiscardTab()); |
EXPECT_EQ(3, tsm->count()); |
- EXPECT_TRUE( |
- TabManager::WebContentsData::IsDiscarded(tsm->GetWebContentsAt(0))); |
- EXPECT_TRUE( |
- TabManager::WebContentsData::IsDiscarded(tsm->GetWebContentsAt(1))); |
- EXPECT_FALSE( |
- TabManager::WebContentsData::IsDiscarded(tsm->GetWebContentsAt(2))); |
+ EXPECT_TRUE(tab_manager->IsTabDiscarded(tsm->GetWebContentsAt(0))); |
+ EXPECT_TRUE(tab_manager->IsTabDiscarded(tsm->GetWebContentsAt(1))); |
+ EXPECT_FALSE(tab_manager->IsTabDiscarded(tsm->GetWebContentsAt(2))); |
// Kill the third tab. It should not kill the last tab, since it is active |
// tab. |
EXPECT_FALSE(tab_manager->DiscardTab()); |
- EXPECT_TRUE( |
- TabManager::WebContentsData::IsDiscarded(tsm->GetWebContentsAt(0))); |
- EXPECT_TRUE( |
- TabManager::WebContentsData::IsDiscarded(tsm->GetWebContentsAt(1))); |
- EXPECT_FALSE( |
- TabManager::WebContentsData::IsDiscarded(tsm->GetWebContentsAt(2))); |
+ EXPECT_TRUE(tab_manager->IsTabDiscarded(tsm->GetWebContentsAt(0))); |
+ EXPECT_TRUE(tab_manager->IsTabDiscarded(tsm->GetWebContentsAt(1))); |
+ EXPECT_FALSE(tab_manager->IsTabDiscarded(tsm->GetWebContentsAt(2))); |
// Kill the third tab after making second tab active. |
tsm->ActivateTabAt(1, true); |
EXPECT_EQ(1, tsm->active_index()); |
- EXPECT_FALSE( |
- TabManager::WebContentsData::IsDiscarded(tsm->GetWebContentsAt(1))); |
+ EXPECT_FALSE(tab_manager->IsTabDiscarded(tsm->GetWebContentsAt(1))); |
tab_manager->DiscardWebContentsAt(2, tsm); |
- EXPECT_TRUE( |
- TabManager::WebContentsData::IsDiscarded(tsm->GetWebContentsAt(2))); |
+ EXPECT_TRUE(tab_manager->IsTabDiscarded(tsm->GetWebContentsAt(2))); |
// Force creation of the FindBarController. |
browser()->GetFindBarController(); |
@@ -145,12 +134,9 @@ IN_PROC_BROWSER_TEST_F(TabManagerTest, TabManagerBasics) { |
EXPECT_EQ(browser()->GetFindBarController()->web_contents(), |
tsm->GetActiveWebContents()); |
EXPECT_EQ(0, tsm->active_index()); |
- EXPECT_FALSE( |
- TabManager::WebContentsData::IsDiscarded(tsm->GetWebContentsAt(0))); |
- EXPECT_FALSE( |
- TabManager::WebContentsData::IsDiscarded(tsm->GetWebContentsAt(1))); |
- EXPECT_TRUE( |
- TabManager::WebContentsData::IsDiscarded(tsm->GetWebContentsAt(2))); |
+ EXPECT_FALSE(tab_manager->IsTabDiscarded(tsm->GetWebContentsAt(0))); |
+ EXPECT_FALSE(tab_manager->IsTabDiscarded(tsm->GetWebContentsAt(1))); |
+ EXPECT_TRUE(tab_manager->IsTabDiscarded(tsm->GetWebContentsAt(2))); |
// Select the third tab. It should reload. |
WindowedNotificationObserver reload2( |
@@ -159,12 +145,9 @@ IN_PROC_BROWSER_TEST_F(TabManagerTest, TabManagerBasics) { |
chrome::SelectNumberedTab(browser(), 2); |
reload2.Wait(); |
EXPECT_EQ(2, tsm->active_index()); |
- EXPECT_FALSE( |
- TabManager::WebContentsData::IsDiscarded(tsm->GetWebContentsAt(0))); |
- EXPECT_FALSE( |
- TabManager::WebContentsData::IsDiscarded(tsm->GetWebContentsAt(1))); |
- EXPECT_FALSE( |
- TabManager::WebContentsData::IsDiscarded(tsm->GetWebContentsAt(2))); |
+ EXPECT_FALSE(tab_manager->IsTabDiscarded(tsm->GetWebContentsAt(0))); |
+ EXPECT_FALSE(tab_manager->IsTabDiscarded(tsm->GetWebContentsAt(1))); |
+ EXPECT_FALSE(tab_manager->IsTabDiscarded(tsm->GetWebContentsAt(2))); |
// Navigate the third tab back twice. We used to crash here due to |
// crbug.com/121373. |