OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "webkit/support/webkit_support.h" | 5 #include "webkit/support/webkit_support.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 } | 109 } |
110 #endif | 110 #endif |
111 | 111 |
112 #if defined(OS_ANDROID) | 112 #if defined(OS_ANDROID) |
113 // On Android we expect the log to appear in logcat. | 113 // On Android we expect the log to appear in logcat. |
114 base::InitAndroidTestLogging(); | 114 base::InitAndroidTestLogging(); |
115 #else | 115 #else |
116 base::FilePath log_filename; | 116 base::FilePath log_filename; |
117 PathService::Get(base::DIR_EXE, &log_filename); | 117 PathService::Get(base::DIR_EXE, &log_filename); |
118 log_filename = log_filename.AppendASCII("DumpRenderTree.log"); | 118 log_filename = log_filename.AppendASCII("DumpRenderTree.log"); |
119 logging::InitLogging( | 119 logging::LoggingSettings settings; |
120 log_filename.value().c_str(), | 120 // Only log to a file. This prevents debugging output from disrupting |
121 // Only log to a file. This prevents debugging output from disrupting | 121 // whether or not we pass. |
122 // whether or not we pass. | 122 settings.logging_dest = logging::LOG_TO_FILE; |
123 logging::LOG_ONLY_TO_FILE, | 123 settings.log_file = log_filename.value().c_str(); |
124 // We might have multiple DumpRenderTree processes going at once. | 124 settings.delete_old = logging::DELETE_OLD_LOG_FILE; |
125 logging::LOCK_LOG_FILE, | 125 logging::InitLogging(settings); |
126 logging::DELETE_OLD_LOG_FILE, | |
127 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); | |
128 | 126 |
129 // We want process and thread IDs because we may have multiple processes. | 127 // We want process and thread IDs because we may have multiple processes. |
130 const bool kProcessId = true; | 128 const bool kProcessId = true; |
131 const bool kThreadId = true; | 129 const bool kThreadId = true; |
132 const bool kTimestamp = true; | 130 const bool kTimestamp = true; |
133 const bool kTickcount = true; | 131 const bool kTickcount = true; |
134 logging::SetLogItems(kProcessId, kThreadId, !kTimestamp, kTickcount); | 132 logging::SetLogItems(kProcessId, kThreadId, !kTimestamp, kTickcount); |
135 #endif // else defined(OS_ANDROID) | 133 #endif // else defined(OS_ANDROID) |
136 } | 134 } |
137 | 135 |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 // Logging | 738 // Logging |
741 void EnableWebCoreLogChannels(const std::string& channels) { | 739 void EnableWebCoreLogChannels(const std::string& channels) { |
742 webkit_glue::EnableWebCoreLogChannels(channels); | 740 webkit_glue::EnableWebCoreLogChannels(channels); |
743 } | 741 } |
744 | 742 |
745 void SetGamepadData(const WebKit::WebGamepads& pads) { | 743 void SetGamepadData(const WebKit::WebGamepads& pads) { |
746 test_environment->webkit_platform_support()->setGamepadData(pads); | 744 test_environment->webkit_platform_support()->setGamepadData(pads); |
747 } | 745 } |
748 | 746 |
749 } // namespace webkit_support | 747 } // namespace webkit_support |
OLD | NEW |