| Index: chrome/browser/chromeos/oom_priority_manager_browsertest.cc
|
| diff --git a/chrome/browser/chromeos/oom_priority_manager_browsertest.cc b/chrome/browser/chromeos/oom_priority_manager_browsertest.cc
|
| index 93a776f4e3064ebef7009f38be913657a0f800f4..de5edf611ca0f112dcc5186206c7abcc22ec92df 100644
|
| --- a/chrome/browser/chromeos/oom_priority_manager_browsertest.cc
|
| +++ b/chrome/browser/chromeos/oom_priority_manager_browsertest.cc
|
| @@ -92,14 +92,18 @@ IN_PROC_BROWSER_TEST_F(OomPriorityManagerTest, OomPriorityManagerBasics) {
|
| EXPECT_TRUE(browser()->tab_strip_model()->IsTabDiscarded(1));
|
| EXPECT_FALSE(browser()->tab_strip_model()->IsTabDiscarded(2));
|
|
|
| - // Kill the third tab
|
| + // Kill the third tab. This tab is not marked becuase it will be reloaded.
|
| EXPECT_TRUE(g_browser_process->oom_priority_manager()->DiscardTab());
|
| EXPECT_TRUE(browser()->tab_strip_model()->IsTabDiscarded(0));
|
| EXPECT_TRUE(browser()->tab_strip_model()->IsTabDiscarded(1));
|
| - EXPECT_TRUE(browser()->tab_strip_model()->IsTabDiscarded(2));
|
| + EXPECT_FALSE(browser()->tab_strip_model()->IsTabDiscarded(2));
|
| + EXPECT_EQ(2, browser()->active_index());
|
|
|
| - // Running when all tabs are discarded should do nothing.
|
| - EXPECT_FALSE(g_browser_process->oom_priority_manager()->DiscardTab());
|
| + // Kill the third tab again, make sure last tab can be killed and be reloaded
|
| + // again.
|
| + EXPECT_TRUE(g_browser_process->oom_priority_manager()->DiscardTab());
|
| + EXPECT_FALSE(browser()->tab_strip_model()->IsTabDiscarded(2));
|
| + EXPECT_EQ(2, browser()->active_index());
|
|
|
| // Force creation of the FindBarController.
|
| browser()->GetFindBarController();
|
| @@ -116,7 +120,7 @@ IN_PROC_BROWSER_TEST_F(OomPriorityManagerTest, OomPriorityManagerBasics) {
|
| EXPECT_EQ(0, browser()->active_index());
|
| EXPECT_FALSE(browser()->tab_strip_model()->IsTabDiscarded(0));
|
| EXPECT_TRUE(browser()->tab_strip_model()->IsTabDiscarded(1));
|
| - EXPECT_TRUE(browser()->tab_strip_model()->IsTabDiscarded(2));
|
| + EXPECT_FALSE(browser()->tab_strip_model()->IsTabDiscarded(2));
|
|
|
| // Select the third tab. It should reload.
|
| WindowedNotificationObserver reload2(
|
|
|