| Index: chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc
|
| diff --git a/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc b/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc
|
| index 47edba33690f6a978cef922076d1d175e3c32ce4..ee752da7496c4b65cfc6dd9031de784c5c0fa83c 100644
|
| --- a/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc
|
| +++ b/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc
|
| @@ -86,20 +86,20 @@ class ChromeRenderProcessHostTest : public InProcessBrowserTest {
|
| // in a process of that type, even if that means creating a new process.
|
| void TestProcessOverflow() {
|
| int tab_count = 1;
|
| - int host_count = 1;
|
| + int host_count = 2;
|
| WebContents* tab1 = NULL;
|
| WebContents* tab2 = NULL;
|
| content::RenderProcessHost* rph1 = NULL;
|
| content::RenderProcessHost* rph2 = NULL;
|
| content::RenderProcessHost* rph3 = NULL;
|
|
|
| - // Change the first tab to be the new tab page (TYPE_WEBUI).
|
| - GURL newtab(chrome::kChromeUINewTabURL);
|
| - ui_test_utils::NavigateToURL(browser(), newtab);
|
| + // Change the first tab to be the omnibox page (TYPE_WEBUI).
|
| + GURL omnibox_url(chrome::kChromeUIOmniboxURL);
|
| + ui_test_utils::NavigateToURL(browser(), omnibox_url);
|
| EXPECT_EQ(tab_count, browser()->tab_strip_model()->count());
|
| tab1 = browser()->tab_strip_model()->GetWebContentsAt(tab_count - 1);
|
| rph1 = tab1->GetRenderProcessHost();
|
| - EXPECT_TRUE(chrome::IsNTPURL(tab1->GetURL(), browser()->profile()));
|
| + EXPECT_EQ(omnibox_url, tab1->GetURL());
|
| EXPECT_EQ(host_count, RenderProcessHostCount());
|
|
|
| // Create a new TYPE_TABBED tab. It should be in its own process.
|
| @@ -132,7 +132,7 @@ class ChromeRenderProcessHostTest : public InProcessBrowserTest {
|
| EXPECT_EQ(host_count, RenderProcessHostCount());
|
| EXPECT_EQ(tab2->GetRenderProcessHost(), rph2);
|
|
|
| - // Create another TYPE_WEBUI tab. It should share the process with newtab.
|
| + // Create another TYPE_WEBUI tab. It should share the process with omnibox.
|
| // Note: intentionally create this tab after the TYPE_TABBED tabs to
|
| // exercise bug 43448 where extension and WebUI tabs could get combined into
|
| // normal renderers.
|
| @@ -184,11 +184,11 @@ IN_PROC_BROWSER_TEST_F(ChromeRenderProcessHostTest, ProcessPerTab) {
|
| parsed_command_line.AppendSwitch(switches::kProcessPerTab);
|
|
|
| int tab_count = 1;
|
| - int host_count = 1;
|
| + int host_count = 2;
|
|
|
| - // Change the first tab to be the new tab page (TYPE_WEBUI).
|
| - GURL newtab(chrome::kChromeUINewTabURL);
|
| - ui_test_utils::NavigateToURL(browser(), newtab);
|
| + // Change the first tab to be the omnibox page (TYPE_WEBUI).
|
| + GURL omnibox(chrome::kChromeUIOmniboxURL);
|
| + ui_test_utils::NavigateToURL(browser(), omnibox);
|
| EXPECT_EQ(tab_count, browser()->tab_strip_model()->count());
|
| EXPECT_EQ(host_count, RenderProcessHostCount());
|
|
|
| @@ -216,7 +216,9 @@ IN_PROC_BROWSER_TEST_F(ChromeRenderProcessHostTest, ProcessPerTab) {
|
| // Create another new tab. It should share the process with the other WebUI.
|
| ui_test_utils::WindowedTabAddedNotificationObserver observer3(
|
| content::NotificationService::AllSources());
|
| - chrome::NewTab(browser());
|
| + ui_test_utils::NavigateToURLWithDisposition(
|
| + browser(), omnibox, NEW_FOREGROUND_TAB,
|
| + ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
|
| observer3.Wait();
|
| tab_count++;
|
| EXPECT_EQ(tab_count, browser()->tab_strip_model()->count());
|
| @@ -225,7 +227,9 @@ IN_PROC_BROWSER_TEST_F(ChromeRenderProcessHostTest, ProcessPerTab) {
|
| // Create another new tab. It should share the process with the other WebUI.
|
| ui_test_utils::WindowedTabAddedNotificationObserver observer4(
|
| content::NotificationService::AllSources());
|
| - chrome::NewTab(browser());
|
| + ui_test_utils::NavigateToURLWithDisposition(
|
| + browser(), omnibox, NEW_FOREGROUND_TAB,
|
| + ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
|
| observer4.Wait();
|
| tab_count++;
|
| EXPECT_EQ(tab_count, browser()->tab_strip_model()->count());
|
| @@ -243,9 +247,9 @@ IN_PROC_BROWSER_TEST_F(ChromeRenderProcessHostTest, Backgrounding) {
|
| CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
|
| parsed_command_line.AppendSwitch(switches::kProcessPerTab);
|
|
|
| - // Change the first tab to be the new tab page (TYPE_WEBUI).
|
| - GURL newtab(chrome::kChromeUINewTabURL);
|
| - ui_test_utils::NavigateToURL(browser(), newtab);
|
| + // Change the first tab to be the omnibox page (TYPE_WEBUI).
|
| + GURL omnibox(chrome::kChromeUINewTabURL);
|
| + ui_test_utils::NavigateToURL(browser(), omnibox);
|
|
|
| // Create a new tab. It should be foreground.
|
| GURL page1("data:text/html,hello world1");
|
| @@ -302,7 +306,7 @@ IN_PROC_BROWSER_TEST_F(ChromeRenderProcessHostTest,
|
| parsed_command_line.AppendSwitch(switches::kProcessPerTab);
|
|
|
| int tab_count = 1;
|
| - int host_count = 1;
|
| + int host_count = 2;
|
|
|
| GURL page1("data:text/html,hello world1");
|
| ui_test_utils::WindowedTabAddedNotificationObserver observer1(
|
| @@ -342,7 +346,7 @@ IN_PROC_BROWSER_TEST_F(ChromeRenderProcessHostTest,
|
| #endif
|
|
|
| int tab_count = 1;
|
| - int host_count = 1;
|
| + int host_count = 2;
|
|
|
| GURL page1("data:text/html,hello world1");
|
| ui_test_utils::WindowedTabAddedNotificationObserver observer1(
|
| @@ -403,7 +407,7 @@ class WindowDestroyer : public content::WebContentsObserver {
|
| // access already freed objects. See http://crbug.com/255524.
|
| IN_PROC_BROWSER_TEST_F(ChromeRenderProcessHostTest,
|
| CloseAllTabsDuringProcessDied) {
|
| - GURL url(chrome::kChromeUINewTabURL);
|
| + GURL url(chrome::kChromeUIOmniboxURL);
|
|
|
| ui_test_utils::NavigateToURL(browser(), url);
|
| ui_test_utils::NavigateToURLWithDisposition(
|
|
|