diff options
author | paulmeyer <paulmeyer@chromium.org> | 2015-02-11 13:51:59 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-11 21:52:43 +0000 |
commit | bcc6ad206157d40f39a8023eb1d19e0dc443cb0d (patch) | |
tree | e63719e74bb197b1756c56748cabfe6a964f74fb /content/shell/app | |
parent | 04de1b4d91ee03a315814a1afc3d3893f220c47c (diff) | |
download | chromium_src-bcc6ad206157d40f39a8023eb1d19e0dc443cb0d.zip chromium_src-bcc6ad206157d40f39a8023eb1d19e0dc443cb0d.tar.gz chromium_src-bcc6ad206157d40f39a8023eb1d19e0dc443cb0d.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".
This patch was originally uploaded here and then reverted: https://codereview.chromium.org/899103002/ . This patch introduces fixes for the issues that led to the original being reverted.
BUG=453252
Review URL: https://codereview.chromium.org/891903006
Cr-Commit-Position: refs/heads/master@{#315840}
Diffstat (limited to 'content/shell/app')
-rw-r--r-- | content/shell/app/shell_main_delegate.cc | 17 | ||||
-rw-r--r-- | content/shell/app/shell_main_delegate_mac.mm | 2 |
2 files changed, 13 insertions, 6 deletions
diff --git a/content/shell/app/shell_main_delegate.cc b/content/shell/app/shell_main_delegate.cc index de0b758..1ef486c 100644 --- a/content/shell/app/shell_main_delegate.cc +++ b/content/shell/app/shell_main_delegate.cc @@ -114,6 +114,14 @@ ShellMainDelegate::~ShellMainDelegate() { } bool ShellMainDelegate::BasicStartupComplete(int* exit_code) { + base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); + + // "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 defined(OS_WIN) // Enable trace control and transport through event tracing for Windows. logging::LogEventProvider::Initialize(kContentShellProviderName); @@ -129,7 +137,6 @@ bool ShellMainDelegate::BasicStartupComplete(int* exit_code) { #endif // OS_MACOSX InitLogging(); - base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); if (command_line.HasSwitch(switches::kCheckLayoutTestSysDeps)) { // If CheckLayoutSystemDeps succeeds, we don't exit early. Instead we // continue and try to load the fonts in BlinkTestPlatformInitialize @@ -141,7 +148,7 @@ bool ShellMainDelegate::BasicStartupComplete(int* exit_code) { } } - if (command_line.HasSwitch(switches::kDumpRenderTree)) { + if (command_line.HasSwitch(switches::kRunLayoutTest)) { EnableBrowserLayoutTestMode(); command_line.AppendSwitch(switches::kProcessPerTab); @@ -262,7 +269,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 +325,7 @@ void ShellMainDelegate::InitializeResourceBundle() { ContentBrowserClient* ShellMainDelegate::CreateContentBrowserClient() { browser_client_.reset(base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kDumpRenderTree) + switches::kRunLayoutTest) ? new LayoutTestContentBrowserClient : new ShellContentBrowserClient); @@ -327,7 +334,7 @@ ContentBrowserClient* ShellMainDelegate::CreateContentBrowserClient() { ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { renderer_client_.reset(base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kDumpRenderTree) + switches::kRunLayoutTest) ? new LayoutTestContentRendererClient : new ShellContentRendererClient); diff --git a/content/shell/app/shell_main_delegate_mac.mm b/content/shell/app/shell_main_delegate_mac.mm index 319171f..bba20a1 100644 --- a/content/shell/app/shell_main_delegate_mac.mm +++ b/content/shell/app/shell_main_delegate_mac.mm @@ -29,7 +29,7 @@ void EnsureCorrectResolutionSettings() { initWithContentsOfFile:base::mac::FilePathToNSString(info_plist)]); bool running_layout_tests = base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kDumpRenderTree); + switches::kRunLayoutTest); bool not_high_resolution_capable = [info_dict objectForKey:kHighResolutionCapable] && [[info_dict objectForKey:kHighResolutionCapable] isEqualToNumber:@(NO)]; |