Commit 7422c976 authored by sadrul@chromium.org's avatar sadrul@chromium.org

Fix a few browser tests for touchui: Count the renderer for the keyboard and update expectations.

BUG=none
TEST=RenderProcessHostTest.* tests pass on touchui

Review URL: http://codereview.chromium.org/6990022

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86204 0039d316-1c4b-4281-b951-d872f2087c98
parent 412e1174
...@@ -70,6 +70,10 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessPerTab) { ...@@ -70,6 +70,10 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessPerTab) {
int tab_count = 1; int tab_count = 1;
int host_count = 1; int host_count = 1;
#if defined(TOUCH_UI)
++host_count; // For the touch keyboard.
#endif
// Change the first tab to be the new tab page (TYPE_WEBUI). // Change the first tab to be the new tab page (TYPE_WEBUI).
GURL newtab(chrome::kChromeUINewTabURL); GURL newtab(chrome::kChromeUINewTabURL);
ui_test_utils::NavigateToURL(browser(), newtab); ui_test_utils::NavigateToURL(browser(), newtab);
...@@ -121,6 +125,10 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, DevToolsOnSelfInOwnProcessPPT) { ...@@ -121,6 +125,10 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, DevToolsOnSelfInOwnProcessPPT) {
int tab_count = 1; int tab_count = 1;
int host_count = 1; int host_count = 1;
#if defined(TOUCH_UI)
++host_count; // For the touch keyboard.
#endif
GURL page1("data:text/html,hello world1"); GURL page1("data:text/html,hello world1");
browser()->ShowSingletonTab(page1); browser()->ShowSingletonTab(page1);
if (browser()->tab_count() == tab_count) if (browser()->tab_count() == tab_count)
...@@ -153,6 +161,10 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, DevToolsOnSelfInOwnProcess) { ...@@ -153,6 +161,10 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, DevToolsOnSelfInOwnProcess) {
int tab_count = 1; int tab_count = 1;
int host_count = 1; int host_count = 1;
#if defined(TOUCH_UI)
++host_count; // For the touch keyboard.
#endif
GURL page1("data:text/html,hello world1"); GURL page1("data:text/html,hello world1");
browser()->ShowSingletonTab(page1); browser()->ShowSingletonTab(page1);
if (browser()->tab_count() == tab_count) if (browser()->tab_count() == tab_count)
...@@ -195,6 +207,10 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessOverflow) { ...@@ -195,6 +207,10 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessOverflow) {
RenderProcessHost* rph2 = NULL; RenderProcessHost* rph2 = NULL;
RenderProcessHost* rph3 = NULL; RenderProcessHost* rph3 = NULL;
#if defined(TOUCH_UI)
++host_count; // For the touch keyboard.
#endif
// Change the first tab to be the new tab page (TYPE_WEBUI). // Change the first tab to be the new tab page (TYPE_WEBUI).
GURL newtab(chrome::kChromeUINewTabURL); GURL newtab(chrome::kChromeUINewTabURL);
ui_test_utils::NavigateToURL(browser(), newtab); ui_test_utils::NavigateToURL(browser(), newtab);
...@@ -252,7 +268,11 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessOverflow) { ...@@ -252,7 +268,11 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessOverflow) {
if (browser()->tab_count() == tab_count) if (browser()->tab_count() == tab_count)
ui_test_utils::WaitForNewTab(browser()); ui_test_utils::WaitForNewTab(browser());
tab_count++; tab_count++;
#if !defined(TOUCH_UI)
// The keyboard in touchui already creates an extension process. So this
// should not increase the process count.
host_count++; host_count++;
#endif
EXPECT_EQ(tab_count, browser()->tab_count()); EXPECT_EQ(tab_count, browser()->tab_count());
tab1 = browser()->GetTabContentsAt(tab_count - 1); tab1 = browser()->GetTabContentsAt(tab_count - 1);
rph3 = tab1->GetRenderProcessHost(); rph3 = tab1->GetRenderProcessHost();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment