| 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/at_exit.h" | 7 #include "base/at_exit.h" |
| 8 #include "base/base64.h" | 8 #include "base/base64.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 } | 120 } |
| 121 #endif | 121 #endif |
| 122 | 122 |
| 123 #if defined(OS_ANDROID) | 123 #if defined(OS_ANDROID) |
| 124 // On Android we expect the log to appear in logcat. | 124 // On Android we expect the log to appear in logcat. |
| 125 base::InitAndroidTestLogging(); | 125 base::InitAndroidTestLogging(); |
| 126 #else | 126 #else |
| 127 base::FilePath log_filename; | 127 base::FilePath log_filename; |
| 128 PathService::Get(base::DIR_EXE, &log_filename); | 128 PathService::Get(base::DIR_EXE, &log_filename); |
| 129 log_filename = log_filename.AppendASCII("DumpRenderTree.log"); | 129 log_filename = log_filename.AppendASCII("DumpRenderTree.log"); |
| 130 logging::InitLogging( | 130 logging::LoggingSettings settings; |
| 131 log_filename.value().c_str(), | 131 // Only log to a file. This prevents debugging output from disrupting |
| 132 // Only log to a file. This prevents debugging output from disrupting | 132 // whether or not we pass. |
| 133 // whether or not we pass. | 133 settings.logging_dest = logging::LOG_TO_FILE; |
| 134 logging::LOG_ONLY_TO_FILE, | 134 settings.log_file = log_filename.value().c_str(); |
| 135 // We might have multiple DumpRenderTree processes going at once. | 135 settings.delete_old = logging::DELETE_OLD_LOG_FILE; |
| 136 logging::LOCK_LOG_FILE, | 136 logging::InitLogging(settings); |
| 137 logging::DELETE_OLD_LOG_FILE, | |
| 138 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); | |
| 139 | 137 |
| 140 // We want process and thread IDs because we may have multiple processes. | 138 // We want process and thread IDs because we may have multiple processes. |
| 141 const bool kProcessId = true; | 139 const bool kProcessId = true; |
| 142 const bool kThreadId = true; | 140 const bool kThreadId = true; |
| 143 const bool kTimestamp = true; | 141 const bool kTimestamp = true; |
| 144 const bool kTickcount = true; | 142 const bool kTickcount = true; |
| 145 logging::SetLogItems(kProcessId, kThreadId, !kTimestamp, kTickcount); | 143 logging::SetLogItems(kProcessId, kThreadId, !kTimestamp, kTickcount); |
| 146 #endif // else defined(OS_ANDROID) | 144 #endif // else defined(OS_ANDROID) |
| 147 } | 145 } |
| 148 | 146 |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 // Logging | 850 // Logging |
| 853 void EnableWebCoreLogChannels(const std::string& channels) { | 851 void EnableWebCoreLogChannels(const std::string& channels) { |
| 854 webkit_glue::EnableWebCoreLogChannels(channels); | 852 webkit_glue::EnableWebCoreLogChannels(channels); |
| 855 } | 853 } |
| 856 | 854 |
| 857 void SetGamepadData(const WebKit::WebGamepads& pads) { | 855 void SetGamepadData(const WebKit::WebGamepads& pads) { |
| 858 test_environment->webkit_platform_support()->setGamepadData(pads); | 856 test_environment->webkit_platform_support()->setGamepadData(pads); |
| 859 } | 857 } |
| 860 | 858 |
| 861 } // namespace webkit_support | 859 } // namespace webkit_support |
| OLD | NEW |