diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-27 03:11:56 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-27 03:11:56 +0000 |
commit | 80b050cf2b5f38f77c51000f65c111bcc6ded331 (patch) | |
tree | 5d7dec7da50501b0fe4219e40e5a0e1082e13784 /content/test/content_browser_test.cc | |
parent | 83afcbcc9bf7be3cdf91a4a6af573638c042a694 (diff) | |
download | chromium_src-80b050cf2b5f38f77c51000f65c111bcc6ded331.zip chromium_src-80b050cf2b5f38f77c51000f65c111bcc6ded331.tar.gz chromium_src-80b050cf2b5f38f77c51000f65c111bcc6ded331.tar.bz2 |
Convert speech and session history browser_tests to run under content_browsertests.
Also add support for single-process.
BUG=90448
Review URL: https://chromiumcodereview.appspot.com/10820043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148711 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/test/content_browser_test.cc')
-rw-r--r-- | content/test/content_browser_test.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/content/test/content_browser_test.cc b/content/test/content_browser_test.cc index 6ba8a3f..0fab44b 100644 --- a/content/test/content_browser_test.cc +++ b/content/test/content_browser_test.cc @@ -16,6 +16,7 @@ #include "content/shell/shell.h" #include "content/shell/shell_browser_context.h" #include "content/shell/shell_content_browser_client.h" +#include "content/shell/shell_content_renderer_client.h" #include "content/shell/shell_main_delegate.h" #include "content/shell/shell_switches.h" #include "content/test/test_content_client.h" @@ -56,6 +57,15 @@ void ContentBrowserTest::SetUp() { SetUpCommandLine(command_line); + // Single-process mode is not set in BrowserMain, so process it explicitly, + // and set up renderer. + if (command_line->HasSwitch(switches::kSingleProcess)) { + RenderProcessHost::set_run_renderer_in_process(true); + single_process_renderer_client_.reset(new ShellContentRendererClient); + content::GetContentClient()->set_renderer_for_testing( + single_process_renderer_client_.get()); + } + #if defined(OS_MACOSX) // See InProcessBrowserTest::PrepareTestCommandLine(). FilePath subprocess_path; |