| Index: chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
|
| diff --git a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
|
| index 17d821f9641ef0919cdb3799d776d9c2ddbc3352..d08008a1e0bd0ff67cfa120ab9d2848ddabe602b 100644
|
| --- a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
|
| +++ b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
|
| @@ -86,8 +86,7 @@ namespace {
|
| // Check that there are two browsers. Find the one that is not |browser|.
|
| Browser* FindOneOtherBrowser(Browser* browser) {
|
| // There should only be one other browser.
|
| - EXPECT_EQ(2u, chrome::GetBrowserCount(browser->profile(),
|
| - browser->host_desktop_type()));
|
| + EXPECT_EQ(2u, chrome::GetBrowserCount(browser->profile()));
|
|
|
| // Find the new browser.
|
| Browser* other_browser = NULL;
|
| @@ -176,8 +175,7 @@ class StartupBrowserCreatorTest : public ExtensionBrowserTest {
|
| ASSERT_TRUE(*out_app_extension);
|
|
|
| // Code that opens a new browser assumes we start with exactly one.
|
| - ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile(),
|
| - browser()->host_desktop_type()));
|
| + ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile()));
|
| }
|
|
|
| void SetAppLaunchPref(const std::string& app_id,
|
| @@ -332,7 +330,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest,
|
| // time. Both the original browser created by the fixture and the one
|
| // created above have been closed, so the new browser is the only one
|
| // remaining.
|
| - new_browser = FindTabbedBrowser(profile, true, host_desktop_type);
|
| + new_browser = chrome::FindTabbedBrowser(profile, true);
|
| ASSERT_TRUE(new_browser);
|
| ASSERT_EQ(static_cast<int>(urls.size()),
|
| new_browser->tab_strip_model()->count());
|
| @@ -484,8 +482,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, OpenAppShortcutTabPref) {
|
|
|
| // When an app shortcut is open and the pref indicates a tab should
|
| // open, the tab is open in a new browser window. Expect a new window.
|
| - ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile(),
|
| - browser()->host_desktop_type()));
|
| + ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile()));
|
|
|
| Browser* new_browser = FindOneOtherBrowser(browser());
|
| ASSERT_TRUE(new_browser);
|
| @@ -799,8 +796,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, StartupURLsForTwoProfiles) {
|
| Browser* new_browser = NULL;
|
| // |browser()| is still around at this point, even though we've closed its
|
| // window. Thus the browser count for default_profile is 2.
|
| - ASSERT_EQ(2u, chrome::GetBrowserCount(default_profile,
|
| - browser()->host_desktop_type()));
|
| + ASSERT_EQ(2u, chrome::GetBrowserCount(default_profile));
|
| new_browser = FindOneOtherBrowserForProfile(default_profile, browser());
|
| ASSERT_TRUE(new_browser);
|
| TabStripModel* tab_strip = new_browser->tab_strip_model();
|
| @@ -816,8 +812,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, StartupURLsForTwoProfiles) {
|
| EXPECT_EQ(urls1[0], tab_strip->GetWebContentsAt(0)->GetURL());
|
| }
|
|
|
| - ASSERT_EQ(1u, chrome::GetBrowserCount(other_profile,
|
| - browser()->host_desktop_type()));
|
| + ASSERT_EQ(1u, chrome::GetBrowserCount(other_profile));
|
| new_browser = FindOneOtherBrowserForProfile(other_profile, NULL);
|
| ASSERT_TRUE(new_browser);
|
| tab_strip = new_browser->tab_strip_model();
|
| @@ -929,16 +924,14 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest,
|
| EXPECT_TRUE(profile2->restored_last_session());
|
|
|
| Browser* new_browser = NULL;
|
| - ASSERT_EQ(1u, chrome::GetBrowserCount(profile1,
|
| - browser()->host_desktop_type()));
|
| + ASSERT_EQ(1u, chrome::GetBrowserCount(profile1));
|
| new_browser = FindOneOtherBrowserForProfile(profile1, NULL);
|
| ASSERT_TRUE(new_browser);
|
| TabStripModel* tab_strip = new_browser->tab_strip_model();
|
| ASSERT_EQ(1, tab_strip->count());
|
| EXPECT_EQ("/empty.html", tab_strip->GetWebContentsAt(0)->GetURL().path());
|
|
|
| - ASSERT_EQ(1u, chrome::GetBrowserCount(profile2,
|
| - browser()->host_desktop_type()));
|
| + ASSERT_EQ(1u, chrome::GetBrowserCount(profile2));
|
| new_browser = FindOneOtherBrowserForProfile(profile2, NULL);
|
| ASSERT_TRUE(new_browser);
|
| tab_strip = new_browser->tab_strip_model();
|
| @@ -1007,8 +1000,6 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest,
|
| CloseBrowserAsynchronously(browser_last);
|
|
|
| // Close the main browser.
|
| - chrome::HostDesktopType original_desktop_type =
|
| - browser()->host_desktop_type();
|
| CloseBrowserAsynchronously(browser());
|
|
|
| // Do a simple non-process-startup browser launch.
|
| @@ -1034,7 +1025,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest,
|
| // The last open profile (the profile_home1 in this case) will always be
|
| // launched, even if it will open just the NTP (and the welcome page on
|
| // relevant platforms).
|
| - ASSERT_EQ(1u, chrome::GetBrowserCount(profile_home1, original_desktop_type));
|
| + ASSERT_EQ(1u, chrome::GetBrowserCount(profile_home1));
|
| new_browser = FindOneOtherBrowserForProfile(profile_home1, NULL);
|
| ASSERT_TRUE(new_browser);
|
| TabStripModel* tab_strip = new_browser->tab_strip_model();
|
| @@ -1053,7 +1044,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest,
|
| }
|
|
|
| // profile_urls opened the urls.
|
| - ASSERT_EQ(1u, chrome::GetBrowserCount(profile_urls, original_desktop_type));
|
| + ASSERT_EQ(1u, chrome::GetBrowserCount(profile_urls));
|
| new_browser = FindOneOtherBrowserForProfile(profile_urls, NULL);
|
| ASSERT_TRUE(new_browser);
|
| tab_strip = new_browser->tab_strip_model();
|
| @@ -1061,7 +1052,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest,
|
| EXPECT_EQ(urls[0], tab_strip->GetWebContentsAt(0)->GetURL());
|
|
|
| // profile_last opened the last open pages.
|
| - ASSERT_EQ(1u, chrome::GetBrowserCount(profile_last, original_desktop_type));
|
| + ASSERT_EQ(1u, chrome::GetBrowserCount(profile_last));
|
| new_browser = FindOneOtherBrowserForProfile(profile_last, NULL);
|
| ASSERT_TRUE(new_browser);
|
| tab_strip = new_browser->tab_strip_model();
|
| @@ -1069,7 +1060,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest,
|
| EXPECT_EQ("/empty.html", tab_strip->GetWebContentsAt(0)->GetURL().path());
|
|
|
| // profile_home2 was not launched since it would've only opened the home page.
|
| - ASSERT_EQ(0u, chrome::GetBrowserCount(profile_home2, original_desktop_type));
|
| + ASSERT_EQ(0u, chrome::GetBrowserCount(profile_home2));
|
| }
|
|
|
| IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, ProfilesLaunchedAfterCrash) {
|
| @@ -1157,8 +1148,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, ProfilesLaunchedAfterCrash) {
|
| // The profile which normally opens the home page displays the new tab page.
|
| // The welcome page is also shown for relevant platforms.
|
| Browser* new_browser = NULL;
|
| - ASSERT_EQ(1u, chrome::GetBrowserCount(profile_home,
|
| - browser()->host_desktop_type()));
|
| + ASSERT_EQ(1u, chrome::GetBrowserCount(profile_home));
|
| new_browser = FindOneOtherBrowserForProfile(profile_home, NULL);
|
| ASSERT_TRUE(new_browser);
|
| TabStripModel* tab_strip = new_browser->tab_strip_model();
|
| @@ -1178,8 +1168,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, ProfilesLaunchedAfterCrash) {
|
| EnsureRestoreUIWasShown(tab_strip->GetWebContentsAt(0));
|
|
|
| // The profile which normally opens last open pages displays the new tab page.
|
| - ASSERT_EQ(1u, chrome::GetBrowserCount(profile_last,
|
| - browser()->host_desktop_type()));
|
| + ASSERT_EQ(1u, chrome::GetBrowserCount(profile_last));
|
| new_browser = FindOneOtherBrowserForProfile(profile_last, NULL);
|
| ASSERT_TRUE(new_browser);
|
| tab_strip = new_browser->tab_strip_model();
|
| @@ -1189,8 +1178,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, ProfilesLaunchedAfterCrash) {
|
| EnsureRestoreUIWasShown(tab_strip->GetWebContentsAt(0));
|
|
|
| // The profile which normally opens URLs displays the new tab page.
|
| - ASSERT_EQ(1u, chrome::GetBrowserCount(profile_urls,
|
| - browser()->host_desktop_type()));
|
| + ASSERT_EQ(1u, chrome::GetBrowserCount(profile_urls));
|
| new_browser = FindOneOtherBrowserForProfile(profile_urls, NULL);
|
| ASSERT_TRUE(new_browser);
|
| tab_strip = new_browser->tab_strip_model();
|
|
|