diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-29 22:22:03 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-29 22:22:03 +0000 |
commit | 52877dbc6c22a02dc7d1dd6f22de2c2b3e7eac17 (patch) | |
tree | f39b0d32959778625fdeb00f178061a6411213c3 /chrome/browser/chromeos/oom_priority_manager_browsertest.cc | |
parent | 78ce87fbedda14f033aaaf474b94c4966e8bf3d0 (diff) | |
download | chromium_src-52877dbc6c22a02dc7d1dd6f22de2c2b3e7eac17.zip chromium_src-52877dbc6c22a02dc7d1dd6f22de2c2b3e7eac17.tar.gz chromium_src-52877dbc6c22a02dc7d1dd6f22de2c2b3e7eac17.tar.bz2 |
Move tab functions off Browser into browser_tabstrip and browser_tabrestore.
http://crbug.com/133576
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10702029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145015 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/oom_priority_manager_browsertest.cc')
-rw-r--r-- | chrome/browser/chromeos/oom_priority_manager_browsertest.cc | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/chrome/browser/chromeos/oom_priority_manager_browsertest.cc b/chrome/browser/chromeos/oom_priority_manager_browsertest.cc index a0abb6f..4d85eec 100644 --- a/chrome/browser/chromeos/oom_priority_manager_browsertest.cc +++ b/chrome/browser/chromeos/oom_priority_manager_browsertest.cc @@ -6,7 +6,9 @@ #include "chrome/browser/chromeos/oom_priority_manager.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_commands.h" +#include "chrome/browser/ui/browser_tabstrip.h" #include "chrome/browser/ui/find_bar/find_bar_controller.h" +#include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/common/url_constants.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" @@ -79,22 +81,22 @@ IN_PROC_BROWSER_TEST_F(OomPriorityManagerTest, OomPriorityManagerBasics) { // and was not selected. EXPECT_TRUE(g_browser_process->oom_priority_manager()->DiscardTab()); EXPECT_EQ(3, browser()->tab_count()); - EXPECT_TRUE(browser()->IsTabDiscarded(0)); - EXPECT_FALSE(browser()->IsTabDiscarded(1)); - EXPECT_FALSE(browser()->IsTabDiscarded(2)); + EXPECT_TRUE(browser()->tab_strip_model()->IsTabDiscarded(0)); + EXPECT_FALSE(browser()->tab_strip_model()->IsTabDiscarded(1)); + EXPECT_FALSE(browser()->tab_strip_model()->IsTabDiscarded(2)); // Run discard again, make sure it kills the second tab. g_browser_process->oom_priority_manager()->DiscardTab(); EXPECT_EQ(3, browser()->tab_count()); - EXPECT_TRUE(browser()->IsTabDiscarded(0)); - EXPECT_TRUE(browser()->IsTabDiscarded(1)); - EXPECT_FALSE(browser()->IsTabDiscarded(2)); + EXPECT_TRUE(browser()->tab_strip_model()->IsTabDiscarded(0)); + EXPECT_TRUE(browser()->tab_strip_model()->IsTabDiscarded(1)); + EXPECT_FALSE(browser()->tab_strip_model()->IsTabDiscarded(2)); // Kill the third tab EXPECT_TRUE(g_browser_process->oom_priority_manager()->DiscardTab()); - EXPECT_TRUE(browser()->IsTabDiscarded(0)); - EXPECT_TRUE(browser()->IsTabDiscarded(1)); - EXPECT_TRUE(browser()->IsTabDiscarded(2)); + EXPECT_TRUE(browser()->tab_strip_model()->IsTabDiscarded(0)); + EXPECT_TRUE(browser()->tab_strip_model()->IsTabDiscarded(1)); + EXPECT_TRUE(browser()->tab_strip_model()->IsTabDiscarded(2)); // Running when all tabs are discarded should do nothing. EXPECT_FALSE(g_browser_process->oom_priority_manager()->DiscardTab()); @@ -110,11 +112,11 @@ IN_PROC_BROWSER_TEST_F(OomPriorityManagerTest, OomPriorityManagerBasics) { reload1.Wait(); // Make sure the FindBarController gets the right TabContents. EXPECT_EQ(browser()->GetFindBarController()->tab_contents(), - browser()->GetActiveTabContents()); + chrome::GetActiveTabContents(browser())); EXPECT_EQ(0, browser()->active_index()); - EXPECT_FALSE(browser()->IsTabDiscarded(0)); - EXPECT_TRUE(browser()->IsTabDiscarded(1)); - EXPECT_TRUE(browser()->IsTabDiscarded(2)); + EXPECT_FALSE(browser()->tab_strip_model()->IsTabDiscarded(0)); + EXPECT_TRUE(browser()->tab_strip_model()->IsTabDiscarded(1)); + EXPECT_TRUE(browser()->tab_strip_model()->IsTabDiscarded(2)); // Select the third tab. It should reload. WindowedNotificationObserver reload2( @@ -123,9 +125,9 @@ IN_PROC_BROWSER_TEST_F(OomPriorityManagerTest, OomPriorityManagerBasics) { chrome::SelectNumberedTab(browser(), 2); reload2.Wait(); EXPECT_EQ(2, browser()->active_index()); - EXPECT_FALSE(browser()->IsTabDiscarded(0)); - EXPECT_TRUE(browser()->IsTabDiscarded(1)); - EXPECT_FALSE(browser()->IsTabDiscarded(2)); + EXPECT_FALSE(browser()->tab_strip_model()->IsTabDiscarded(0)); + EXPECT_TRUE(browser()->tab_strip_model()->IsTabDiscarded(1)); + EXPECT_FALSE(browser()->tab_strip_model()->IsTabDiscarded(2)); // Navigate the third tab back twice. We used to crash here due to // crbug.com/121373. |