diff options
author | inferno@chromium.org <inferno@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-01 01:08:59 +0000 |
---|---|---|
committer | inferno@chromium.org <inferno@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-01 01:08:59 +0000 |
commit | c8a655cdab8e4ed0b0cc5c784f20649105bf7456 (patch) | |
tree | e8b608cd6eb52a73c7d3998d7d8cfc5041ce3bcb | |
parent | f5c722b9e89c91e0844afeb29d841f02ed5c472f (diff) | |
download | chromium_src-c8a655cdab8e4ed0b0cc5c784f20649105bf7456.zip chromium_src-c8a655cdab8e4ed0b0cc5c784f20649105bf7456.tar.gz chromium_src-c8a655cdab8e4ed0b0cc5c784f20649105bf7456.tar.bz2 |
Revert 76329 Broke compile - Change the behavior of ignore_path in BrowserNavigator.
use an enum instead. The enum controls whether to replace the path or leave it alone when bringing an already-open tab to the front.
BUG=71472
TEST=included
Review URL: http://codereview.chromium.org/6579047
TBR=estade@chromium.org
Review URL: http://codereview.chromium.org/6588072
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76332 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/app_controller_mac.mm | 2 | ||||
-rw-r--r-- | chrome/browser/ui/browser.cc | 35 | ||||
-rw-r--r-- | chrome/browser/ui/browser.h | 15 | ||||
-rw-r--r-- | chrome/browser/ui/browser_navigator.cc | 12 | ||||
-rw-r--r-- | chrome/browser/ui/browser_navigator.h | 14 | ||||
-rw-r--r-- | chrome/browser/ui/browser_navigator_browsertest.cc | 55 | ||||
-rw-r--r-- | chrome/browser/ui/toolbar/back_forward_menu_model.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ui/webui/bug_report_ui.cc | 2 | ||||
-rw-r--r-- | chrome/common/url_constants.h | 1 | ||||
-rw-r--r-- | content/browser/renderer_host/render_process_host_browsertest.cc | 16 |
10 files changed, 53 insertions, 101 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm index 18a9b34..3d894b6 100644 --- a/chrome/browser/app_controller_mac.mm +++ b/chrome/browser/app_controller_mac.mm @@ -1135,7 +1135,7 @@ void RecordLastRunAppBundlePath() { if (!parsed_command_line.HasSwitch(switches::kDisableTabbedOptions)) { if (Browser* browser = ActivateBrowser([self defaultProfile])) { // Show options tab in the active browser window. - browser->OpenOptionsDialog(); + browser->ShowOptionsTab(chrome::kDefaultOptionsSubPage); } else { // No browser window, so create one for the options tab. Browser::OpenOptionsWindow([self defaultProfile]); diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index 6d60411..66c99a2 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -66,6 +66,7 @@ #include "chrome/browser/sync/sync_ui_util.h" #include "chrome/browser/tab_closeable_state_watcher.h" #include "chrome/browser/tabs/tab_strip_model.h" +#include "chrome/browser/ui/browser_navigator.h" #include "chrome/browser/ui/find_bar/find_bar.h" #include "chrome/browser/ui/find_bar/find_bar_controller.h" #include "chrome/browser/ui/find_bar/find_tab_helper.h" @@ -693,7 +694,7 @@ void Browser::OpenHelpWindow(Profile* profile) { // static void Browser::OpenOptionsWindow(Profile* profile) { Browser* browser = Browser::Create(profile); - browser->OpenOptionsDialog(); + browser->ShowOptionsTab(chrome::kDefaultOptionsSubPage); browser->window()->Show(); } @@ -1092,16 +1093,11 @@ bool Browser::NavigateToIndexWithDisposition(int index, return true; } -browser::NavigateParams Browser::GetSingletonTabNavigateParams( - const GURL& url) { +void Browser::ShowSingletonTab(const GURL& url, bool ignore_path) { browser::NavigateParams params(this, url, PageTransition::AUTO_BOOKMARK); params.disposition = SINGLETON_TAB; params.show_window = true; - return params; -} - -void Browser::ShowSingletonTab(const GURL& url) { - browser::NavigateParams params(GetSingletonTabNavigateParams(url)); + params.ignore_path = ignore_path; browser::Navigate(¶ms); } @@ -1808,27 +1804,27 @@ void Browser::ShowAppMenu() { void Browser::ShowBookmarkManagerTab() { UserMetrics::RecordAction(UserMetricsAction("ShowBookmarks"), profile_); - ShowSingletonTab(GURL(chrome::kChromeUIBookmarksURL)); + ShowSingletonTab(GURL(chrome::kChromeUIBookmarksURL), false); } void Browser::ShowHistoryTab() { UserMetrics::RecordAction(UserMetricsAction("ShowHistory"), profile_); - ShowSingletonTab(GURL(chrome::kChromeUIHistoryURL)); + ShowSingletonTab(GURL(chrome::kChromeUIHistoryURL), false); } void Browser::ShowDownloadsTab() { UserMetrics::RecordAction(UserMetricsAction("ShowDownloads"), profile_); - ShowSingletonTab(GURL(chrome::kChromeUIDownloadsURL)); + ShowSingletonTab(GURL(chrome::kChromeUIDownloadsURL), false); } void Browser::ShowExtensionsTab() { UserMetrics::RecordAction(UserMetricsAction("ShowExtensions"), profile_); - ShowSingletonTab(GURL(chrome::kChromeUIExtensionsURL)); + ShowSingletonTab(GURL(chrome::kChromeUIExtensionsURL), false); } void Browser::ShowAboutConflictsTab() { UserMetrics::RecordAction(UserMetricsAction("AboutConflicts"), profile_); - ShowSingletonTab(GURL(chrome::kChromeUIConflictsURL)); + ShowSingletonTab(GURL(chrome::kChromeUIConflictsURL), false); } void Browser::ShowBrokenPageTab(TabContents* contents) { @@ -1843,14 +1839,12 @@ void Browser::ShowBrokenPageTab(TabContents* contents) { subst.push_back(page_url); std::string report_page_url = ReplaceStringPlaceholders(kBrokenPageUrl, subst, NULL); - ShowSingletonTab(GURL(report_page_url)); + ShowSingletonTab(GURL(report_page_url), false); } void Browser::ShowOptionsTab(const std::string& sub_page) { GURL url(chrome::kChromeUISettingsURL + sub_page); - browser::NavigateParams params(GetSingletonTabNavigateParams(url)); - params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; - browser::Navigate(¶ms); + ShowSingletonTab(url, true); } void Browser::OpenClearBrowsingDataDialog() { @@ -1868,10 +1862,7 @@ void Browser::OpenOptionsDialog() { UserMetrics::RecordAction(UserMetricsAction("ShowOptions"), profile_); if (!CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableTabbedOptions)) { - GURL url(chrome::kChromeUISettingsURL); - browser::NavigateParams params(GetSingletonTabNavigateParams(url)); - params.path_behavior = browser::NavigateParams::IGNORE_AND_STAY_PUT; - browser::Navigate(¶ms); + ShowOptionsTab(chrome::kDefaultOptionsSubPage); } else { ShowOptionsWindow(OPTIONS_PAGE_DEFAULT, OPTIONS_GROUP_NONE, profile_); } @@ -1909,7 +1900,7 @@ void Browser::OpenSyncMyBookmarksDialog() { void Browser::OpenAboutChromeDialog() { UserMetrics::RecordAction(UserMetricsAction("AboutChrome"), profile_); #if defined(OS_CHROMEOS) - ShowSingletonTab(GURL(chrome::kChromeUIAboutURL)); + ShowSingletonTab(GURL(chrome::kChromeUIAboutURL), false); #else window_->ShowAboutChromeDialog(); #endif diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h index 1430cce..e7df332 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h @@ -25,11 +25,10 @@ #include "chrome/browser/sessions/tab_restore_service_observer.h" #include "chrome/browser/sync/profile_sync_service_observer.h" #include "chrome/browser/tabs/tab_handler.h" -#include "chrome/browser/tabs/tab_strip_model_delegate.h" // TODO(beng): remove -#include "chrome/browser/tabs/tab_strip_model_observer.h" // TODO(beng): remove +#include "chrome/browser/tabs/tab_strip_model_delegate.h" // TODO(beng): remove +#include "chrome/browser/tabs/tab_strip_model_observer.h" // TODO(beng): remove #include "chrome/browser/tab_contents/page_navigator.h" #include "chrome/browser/tab_contents/tab_contents_delegate.h" -#include "chrome/browser/ui/browser_navigator.h" #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h" #include "chrome/browser/ui/shell_dialogs.h" #include "chrome/browser/ui/tab_contents/tab_contents_wrapper_delegate.h" @@ -426,8 +425,9 @@ class Browser : public TabHandlerDelegate, // Show a given a URL. If a tab with the same URL (ignoring the ref) is // already visible in this browser, it becomes selected. Otherwise a new tab - // is created. - void ShowSingletonTab(const GURL& url); + // is created. If |ignore_path| is true, the paths of the URLs are ignored + // when locating the singleton tab. + void ShowSingletonTab(const GURL& url, bool ignore_path); // Update commands whose state depends on whether the window is in fullscreen // mode. This is a public function because on Linux, fullscreen mode is an @@ -490,7 +490,7 @@ class Browser : public TabHandlerDelegate, // in |SupportsWindowFeature| for details on this. bool CanSupportWindowFeature(WindowFeature feature) const; - // TODO(port): port these, and re-merge the two function declaration lists. +// TODO(port): port these, and re-merge the two function declaration lists. // Page-related commands. void Print(); void EmailPageLocation(); @@ -1006,9 +1006,6 @@ class Browser : public TabHandlerDelegate, // Opens view-source tab for given tab contents. void ViewSource(TabContentsWrapper* tab); - // Creates a NavigateParams struct for a singleton tab navigation. - browser::NavigateParams GetSingletonTabNavigateParams(const GURL& url); - // Data members ///////////////////////////////////////////////////////////// NotificationRegistrar registrar_; diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc index 8750ec7..16ee1fd 100644 --- a/chrome/browser/ui/browser_navigator.cc +++ b/chrome/browser/ui/browser_navigator.cc @@ -103,8 +103,7 @@ int GetIndexOfSingletonTab(browser::NavigateParams* params) { url_canon::Replacements<char> replacements; replacements.ClearRef(); - if (params->path_behavior == browser::NavigateParams::IGNORE_AND_NAVIGATE || - params->path_behavior == browser::NavigateParams::IGNORE_AND_STAY_PUT) { + if (params->ignore_path) { replacements.ClearPath(); replacements.ClearQuery(); } @@ -341,7 +340,7 @@ NavigateParams::NavigateParams( tabstrip_index(-1), tabstrip_add_types(TabStripModel::ADD_SELECTED), show_window(false), - path_behavior(RESPECT), + ignore_path(false), browser(a_browser), profile(NULL) { } @@ -355,7 +354,7 @@ NavigateParams::NavigateParams(Browser* a_browser, tabstrip_index(-1), tabstrip_add_types(TabStripModel::ADD_SELECTED), show_window(false), - path_behavior(RESPECT), + ignore_path(false), browser(a_browser), profile(NULL) { } @@ -479,8 +478,9 @@ void Navigate(NavigateParams* params) { if (singleton_index >= 0) { TabContents* target = params->browser->GetTabContentsAt(singleton_index); - if (params->path_behavior == NavigateParams::IGNORE_AND_NAVIGATE && - target->GetURL() != params->url) { + // Load the URL if the target contents URL doesn't match. This can happen + // if the URL path is ignored when locating the singleton tab. + if (target->GetURL() != params->url) { target->controller().LoadURL( params->url, params->referrer, params->transition); } diff --git a/chrome/browser/ui/browser_navigator.h b/chrome/browser/ui/browser_navigator.h index c3f066a..2b726d0 100644 --- a/chrome/browser/ui/browser_navigator.h +++ b/chrome/browser/ui/browser_navigator.h @@ -122,17 +122,9 @@ struct NavigateParams { // automatically. bool show_window; - // What to do with the path component of the URL for singleton navigations. - enum PathBehavior { - // Two URLs with differing paths are different. - RESPECT, - // Ignore path when finding existing tab, navigate to new URL. - IGNORE_AND_NAVIGATE, - // Ignore path when finding existing tab, don't navigate tab. - IGNORE_AND_STAY_PUT, - }; - // Default is RESPECT. - PathBehavior path_behavior; + // True if the paths of the target content's URL and |url| should be ignored + // when locating a singleton tab. + bool ignore_path; // [in] Specifies a Browser object where the navigation could occur or the // tab could be added. Navigate() is not obliged to use this Browser if diff --git a/chrome/browser/ui/browser_navigator_browsertest.cc b/chrome/browser/ui/browser_navigator_browsertest.cc index a65c1f4..a9d153c 100644 --- a/chrome/browser/ui/browser_navigator_browsertest.cc +++ b/chrome/browser/ui/browser_navigator_browsertest.cc @@ -555,7 +555,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, NullBrowser_NewWindow) { } // This test verifies that constructing params with disposition = SINGLETON_TAB -// and IGNORE_AND_NAVIGATE opens a new tab navigated to the specified URL if +// and |ignore_path| = true opens a new tab navigated to the specified URL if // no previous tab with that URL (minus the path) exists. IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Disposition_SingletonTabNew_IgnorePath) { @@ -572,7 +572,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, p.disposition = SINGLETON_TAB; p.url = GURL("chrome://settings/advanced"); p.show_window = true; - p.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; + p.ignore_path = true; browser::Navigate(&p); // The last tab should now be selected and navigated to the sub-page of the @@ -585,7 +585,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, } // This test verifies that constructing params with disposition = SINGLETON_TAB -// and IGNORE_AND_NAVIGATE opens an existing tab with the matching URL (minus +// and |ignore_path| = true opens an existing tab with the matching URL (minus // the path) which is navigated to the specified URL. IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Disposition_SingletonTabExisting_IgnorePath) { @@ -604,7 +604,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, p.disposition = SINGLETON_TAB; p.url = GURL("chrome://settings/advanced"); p.show_window = true; - p.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; + p.ignore_path = true; browser::Navigate(&p); // The middle tab should now be selected and navigated to the sub-page of the @@ -617,7 +617,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, } // This test verifies that constructing params with disposition = SINGLETON_TAB -// and IGNORE_AND_NAVIGATE opens an existing tab with the matching URL (minus +// and |ignore_path| = true opens an existing tab with the matching URL (minus // the path) which is navigated to the specified URL. IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Disposition_SingletonTabExistingSubPath_IgnorePath) { @@ -636,7 +636,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, p.disposition = SINGLETON_TAB; p.url = GURL("chrome://settings/personal"); p.show_window = true; - p.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; + p.ignore_path = true; browser::Navigate(&p); // The middle tab should now be selected and navigated to the sub-page of the @@ -649,38 +649,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, } // This test verifies that constructing params with disposition = SINGLETON_TAB -// and IGNORE_AND_STAY_PUT opens an existing tab with the matching URL (minus -// the path). -IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, - Disposition_SingletonTabExistingSubPath_IgnorePath2) { - GURL singleton_url1("chrome://settings/advanced"); - GURL url("http://www.google.com/"); - browser()->AddSelectedTabWithURL(singleton_url1, PageTransition::LINK); - browser()->AddSelectedTabWithURL(url, PageTransition::LINK); - - // We should have one browser with 3 tabs, the 3rd selected. - EXPECT_EQ(1u, BrowserList::size()); - EXPECT_EQ(3, browser()->tab_count()); - EXPECT_EQ(2, browser()->selected_index()); - - // Navigate to singleton_url1. - browser::NavigateParams p(MakeNavigateParams()); - p.disposition = SINGLETON_TAB; - p.url = GURL("chrome://settings/personal"); - p.show_window = true; - p.path_behavior = browser::NavigateParams::IGNORE_AND_STAY_PUT; - browser::Navigate(&p); - - // The middle tab should now be selected. - EXPECT_EQ(browser(), p.browser); - EXPECT_EQ(3, browser()->tab_count()); - EXPECT_EQ(1, browser()->selected_index()); - EXPECT_EQ(singleton_url1, - browser()->GetSelectedTabContents()->GetURL()); -} - -// This test verifies that constructing params with disposition = SINGLETON_TAB -// and IGNORE_AND_NAVIGATE will update the current tab's URL if the currently +// and |ignore_path| = true will update the current tab's URL if the currently // selected tab is a match but has a different path. IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Disposition_SingletonTabFocused_IgnorePath) { @@ -699,7 +668,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, p.disposition = SINGLETON_TAB; p.url = singleton_url_target; p.show_window = true; - p.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; + p.ignore_path = true; browser::Navigate(&p); // The second tab should still be selected, but navigated to the new path. @@ -711,8 +680,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, } // This test verifies that constructing params with disposition = SINGLETON_TAB -// and IGNORE_AND_NAVIGATE will open an existing matching tab with a different -// query. +// and |ignore_path| = true will open an existing matching tab +// with a different query. IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Disposition_SingletonTabExisting_IgnoreQuery) { int initial_tab_count = browser()->tab_count(); @@ -730,7 +699,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, p.disposition = SINGLETON_TAB; p.url = singleton_url_target; p.show_window = true; - p.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; + p.ignore_path = true; browser::Navigate(&p); // Last tab should still be selected. @@ -754,6 +723,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, p.disposition = SINGLETON_TAB; p.url = GURL("chrome://settings"); p.show_window = true; + p.ignore_path = true; browser::Navigate(&p); // The settings page should be opened in browser() window. @@ -779,6 +749,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, p.disposition = SINGLETON_TAB; p.url = GURL("chrome://bookmarks"); p.show_window = true; + p.ignore_path = true; browser::Navigate(&p); // The bookmarks page should be opened in browser() window. diff --git a/chrome/browser/ui/toolbar/back_forward_menu_model.cc b/chrome/browser/ui/toolbar/back_forward_menu_model.cc index 593478e..67943d9 100644 --- a/chrome/browser/ui/toolbar/back_forward_menu_model.cc +++ b/chrome/browser/ui/toolbar/back_forward_menu_model.cc @@ -155,7 +155,7 @@ void BackForwardMenuModel::ActivatedAtWithDisposition( if (index == GetItemCount() - 1) { UserMetrics::RecordComputedAction(BuildActionName("ShowFullHistory", -1), profile); - browser_->ShowSingletonTab(GURL(chrome::kChromeUIHistoryURL)); + browser_->ShowSingletonTab(GURL(chrome::kChromeUIHistoryURL), false); return; } diff --git a/chrome/browser/ui/webui/bug_report_ui.cc b/chrome/browser/ui/webui/bug_report_ui.cc index f02258e..700c5cc 100644 --- a/chrome/browser/ui/webui/bug_report_ui.cc +++ b/chrome/browser/ui/webui/bug_report_ui.cc @@ -157,7 +157,7 @@ void ShowHtmlBugReportView(Browser* browser) { RefreshLastScreenshot(browser); std::string bug_report_url = std::string(chrome::kChromeUIBugReportURL) + "#" + base::IntToString(browser->selected_index()); - browser->ShowSingletonTab(GURL(bug_report_url)); + browser->ShowSingletonTab(GURL(bug_report_url), false); } } // namespace browser diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h index 85d4731..8f2d3aa 100644 --- a/chrome/common/url_constants.h +++ b/chrome/common/url_constants.h @@ -182,6 +182,7 @@ extern const char kBrowserOptionsSubPage[]; extern const char kClearBrowserDataSubPage[]; extern const char kContentSettingsSubPage[]; extern const char kContentSettingsExceptionsSubPage[]; +extern const char kDefaultOptionsSubPage[]; extern const char kImportDataSubPage[]; extern const char kPersonalOptionsSubPage[]; extern const char kSearchEnginesOptionsSubPage[]; diff --git a/content/browser/renderer_host/render_process_host_browsertest.cc b/content/browser/renderer_host/render_process_host_browsertest.cc index 62c05b5..afe829c 100644 --- a/content/browser/renderer_host/render_process_host_browsertest.cc +++ b/content/browser/renderer_host/render_process_host_browsertest.cc @@ -78,7 +78,7 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessPerTab) { // Create a new TYPE_NORMAL tab. It should be in its own process. GURL page1("data:text/html,hello world1"); - browser()->ShowSingletonTab(page1); + browser()->ShowSingletonTab(page1, false); if (browser()->tab_count() == tab_count) ui_test_utils::WaitForNewTab(browser()); tab_count++; @@ -88,7 +88,7 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessPerTab) { // Create another TYPE_NORMAL tab. It should share the previous process. GURL page2("data:text/html,hello world2"); - browser()->ShowSingletonTab(page2); + browser()->ShowSingletonTab(page2, false); if (browser()->tab_count() == tab_count) ui_test_utils::WaitForNewTab(browser()); tab_count++; @@ -122,7 +122,7 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, DevToolsOnSelfInOwnProcessPPT) { int host_count = 1; GURL page1("data:text/html,hello world1"); - browser()->ShowSingletonTab(page1); + browser()->ShowSingletonTab(page1, false); if (browser()->tab_count() == tab_count) ui_test_utils::WaitForNewTab(browser()); tab_count++; @@ -154,7 +154,7 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, DevToolsOnSelfInOwnProcess) { int host_count = 1; GURL page1("data:text/html,hello world1"); - browser()->ShowSingletonTab(page1); + browser()->ShowSingletonTab(page1, false); if (browser()->tab_count() == tab_count) ui_test_utils::WaitForNewTab(browser()); tab_count++; @@ -206,7 +206,7 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessOverflow) { // Create a new TYPE_NORMAL tab. It should be in its own process. GURL page1("data:text/html,hello world1"); - browser()->ShowSingletonTab(page1); + browser()->ShowSingletonTab(page1, false); if (browser()->tab_count() == tab_count) ui_test_utils::WaitForNewTab(browser()); tab_count++; @@ -220,7 +220,7 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessOverflow) { // Create another TYPE_NORMAL tab. It should share the previous process. GURL page2("data:text/html,hello world2"); - browser()->ShowSingletonTab(page2); + browser()->ShowSingletonTab(page2, false); if (browser()->tab_count() == tab_count) ui_test_utils::WaitForNewTab(browser()); tab_count++; @@ -235,7 +235,7 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessOverflow) { // bug 43448 where extension and WebUI tabs could get combined into normal // renderers. GURL history(chrome::kChromeUIHistoryURL); - browser()->ShowSingletonTab(history); + browser()->ShowSingletonTab(history, false); if (browser()->tab_count() == tab_count) ui_test_utils::WaitForNewTab(browser()); tab_count++; @@ -248,7 +248,7 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessOverflow) { // Create a TYPE_EXTENSION tab. It should be in its own process. // (the bookmark manager is implemented as an extension) GURL bookmarks(chrome::kChromeUIBookmarksURL); - browser()->ShowSingletonTab(bookmarks); + browser()->ShowSingletonTab(bookmarks, false); if (browser()->tab_count() == tab_count) ui_test_utils::WaitForNewTab(browser()); tab_count++; |