Index: content/shell/app/shell_main_delegate.cc |
diff --git a/content/shell/app/shell_main_delegate.cc b/content/shell/app/shell_main_delegate.cc |
index d37ca0a03473597504e5f7d6a3d62e5f8a85ddcf..78a5250ccc4699d567a8fdf3e75c03c64d4cdd45 100644 |
--- a/content/shell/app/shell_main_delegate.cc |
+++ b/content/shell/app/shell_main_delegate.cc |
@@ -143,7 +143,14 @@ bool ShellMainDelegate::BasicStartupComplete(int* exit_code) { |
EnsureCorrectResolutionSettings(); |
#endif // OS_MACOSX |
- InitLogging(); |
+ // Log to stderr when run with --run-layout-tests |
+ // so the layout tests can capture and display any messages. |
+ if (command_line.HasSwitch(switches::kRunLayoutTest)) { |
+ logging::LoggingSettings settings; |
+ logging::InitLogging(settings); |
+ } else { |
+ InitLogging(); |
+ } |
Dirk Pranke
2016/12/08 22:09:21
Having a routine in this file called InitLogging()
|
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 |