diff options
author | paulmeyer <paulmeyer@chromium.org> | 2015-02-04 14:43:29 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-04 22:44:23 +0000 |
commit | 7066b52aa7103b402dea27c64ec17d45c373a838 (patch) | |
tree | 21cbbe3954d88395255a5bb47a727b767571933e /content/shell/app/shell_main_delegate.cc | |
parent | 44036d053dc7731deb8fdf5d20603bbb8b1c19a5 (diff) | |
download | chromium_src-7066b52aa7103b402dea27c64ec17d45c373a838.zip chromium_src-7066b52aa7103b402dea27c64ec17d45c373a838.tar.gz chromium_src-7066b52aa7103b402dea27c64ec17d45c373a838.tar.bz2 |
Chromium-side patch to rename "--dump-render-tree" to "--run-layout-test".
At this point, "--run-layout-test" is the flag that is actually functional, and using "--dump-render-tree" simply causes the "--run-layout-test" to be appended to the command line.
A subsequent Blink patch will change the scripts in Blink to use "--run-layout-test" instead of "--dump-render-tree".
BUG=453252
Review URL: https://codereview.chromium.org/899103002
Cr-Commit-Position: refs/heads/master@{#314664}
Diffstat (limited to 'content/shell/app/shell_main_delegate.cc')
-rw-r--r-- | content/shell/app/shell_main_delegate.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/content/shell/app/shell_main_delegate.cc b/content/shell/app/shell_main_delegate.cc index de0b758..5c10679 100644 --- a/content/shell/app/shell_main_delegate.cc +++ b/content/shell/app/shell_main_delegate.cc @@ -141,7 +141,13 @@ bool ShellMainDelegate::BasicStartupComplete(int* exit_code) { } } - if (command_line.HasSwitch(switches::kDumpRenderTree)) { + // "dump-render-tree" has been renamed to "run-layout-test", but the old + // flag name is still used in some places, so this check will remain until + // it is phased out entirely. + if (command_line.HasSwitch(switches::kDumpRenderTree)) + command_line.AppendSwitch(switches::kRunLayoutTest); + + if (command_line.HasSwitch(switches::kRunLayoutTest)) { EnableBrowserLayoutTestMode(); command_line.AppendSwitch(switches::kProcessPerTab); @@ -262,7 +268,7 @@ int ShellMainDelegate::RunProcess( browser_runner_.reset(BrowserMainRunner::Create()); base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); - return command_line.HasSwitch(switches::kDumpRenderTree) || + return command_line.HasSwitch(switches::kRunLayoutTest) || command_line.HasSwitch(switches::kCheckLayoutTestSysDeps) ? LayoutTestBrowserMain(main_function_params, browser_runner_) : ShellBrowserMain(main_function_params, browser_runner_); @@ -318,7 +324,7 @@ void ShellMainDelegate::InitializeResourceBundle() { ContentBrowserClient* ShellMainDelegate::CreateContentBrowserClient() { browser_client_.reset(base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kDumpRenderTree) + switches::kRunLayoutTest) ? new LayoutTestContentBrowserClient : new ShellContentBrowserClient); @@ -327,7 +333,7 @@ ContentBrowserClient* ShellMainDelegate::CreateContentBrowserClient() { ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { renderer_client_.reset(base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kDumpRenderTree) + switches::kRunLayoutTest) ? new LayoutTestContentRendererClient : new ShellContentRendererClient); |