Chromium Code Reviews| Index: content/browser/renderer_host/render_process_host_browsertest.cc |
| diff --git a/content/browser/renderer_host/render_process_host_browsertest.cc b/content/browser/renderer_host/render_process_host_browsertest.cc |
| index 4d4676d5d1a4e4441715175edce6d307fb830262..3535bec715e07bf40b493755e3dd4bc0410334bb 100644 |
| --- a/content/browser/renderer_host/render_process_host_browsertest.cc |
| +++ b/content/browser/renderer_host/render_process_host_browsertest.cc |
| @@ -57,7 +57,7 @@ base::ProcessHandle RenderProcessHostTest::ShowSingletonTab(const GURL& page) { |
| IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessPerTab) { |
| // Set max renderers to 1 to force running out of processes. |
| - content::RenderProcessHost::SetMaxRendererProcessCountForTest(1); |
| + content::RenderProcessHost::SetMaxRendererProcessCount(1); |
| CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); |
| parsed_command_line.AppendSwitch(switches::kProcessPerTab); |
| @@ -151,10 +151,7 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, Backgrounding) { |
| // sharing behaves correctly. In particular, this test is verifying that even |
| // when we hit the max process limit, that renderers of each type will wind up |
| // in a process of that type, even if that means creating a new process. |
| -IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessOverflow) { |
| - // Set max renderers to 1 to force running out of processes. |
| - content::RenderProcessHost::SetMaxRendererProcessCountForTest(1); |
| - |
| +void RenderProcessHostTest::TestProcessOverflow() { |
|
Charlie Reis
2012/02/07 19:29:20
Let's move this function near the top, above the a
nasko
2012/02/07 21:29:50
Done.
|
| int tab_count = 1; |
| int host_count = 1; |
| WebContents* tab1 = NULL; |
| @@ -237,3 +234,15 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessOverflow) { |
| EXPECT_NE(rph1, rph3); |
| EXPECT_NE(rph2, rph3); |
| } |
| + |
| +IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessOverflow) { |
| + // Set max renderers to 1 to force running out of processes. |
| + content::RenderProcessHost::SetMaxRendererProcessCount(1); |
| + TestProcessOverflow(); |
| +} |
| + |
| +// Variation of the ProcessOverflow test, which is driven through command line |
| +// parameter instead of direct function call into the class. |
| +IN_PROC_BROWSER_TEST_F(RenderProcessHostTestWithCommandLine, ProcessOverflow) { |
| + TestProcessOverflow(); |
| +} |