summaryrefslogtreecommitdiffstats
path: root/content/shell/app/shell_main_delegate.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/shell/app/shell_main_delegate.cc')
-rw-r--r--content/shell/app/shell_main_delegate.cc14
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);