| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #undef LOG | 5 #undef LOG |
| 6 | 6 |
| 7 #include "webkit/tools/test_shell/test_shell.h" | 7 #include "webkit/tools/test_shell/test_shell.h" |
| 8 | 8 |
| 9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 // output from disrupting whether or not we pass. | 417 // output from disrupting whether or not we pass. |
| 418 logging::LoggingDestination destination = | 418 logging::LoggingDestination destination = |
| 419 logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG; | 419 logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG; |
| 420 if (layout_test_mode) | 420 if (layout_test_mode) |
| 421 destination = logging::LOG_ONLY_TO_FILE; | 421 destination = logging::LOG_ONLY_TO_FILE; |
| 422 | 422 |
| 423 // We might have multiple test_shell processes going at once | 423 // We might have multiple test_shell processes going at once |
| 424 FilePath log_filename; | 424 FilePath log_filename; |
| 425 PathService::Get(base::DIR_EXE, &log_filename); | 425 PathService::Get(base::DIR_EXE, &log_filename); |
| 426 log_filename = log_filename.AppendASCII("test_shell.log"); | 426 log_filename = log_filename.AppendASCII("test_shell.log"); |
| 427 logging::InitLogging(log_filename.value().c_str(), | 427 logging::InitLogging( |
| 428 destination, | 428 log_filename.value().c_str(), |
| 429 logging::LOCK_LOG_FILE, | 429 destination, |
| 430 logging::DELETE_OLD_LOG_FILE); | 430 logging::LOCK_LOG_FILE, |
| 431 logging::DELETE_OLD_LOG_FILE, |
| 432 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); |
| 431 | 433 |
| 432 // we want process and thread IDs because we may have multiple processes | 434 // we want process and thread IDs because we may have multiple processes |
| 433 logging::SetLogItems(true, true, false, true); | 435 logging::SetLogItems(true, true, false, true); |
| 434 | 436 |
| 435 // Turn on logging of notImplemented()s inside WebKit, but only if we're | 437 // Turn on logging of notImplemented()s inside WebKit, but only if we're |
| 436 // not running layout tests (because otherwise they'd corrupt the test | 438 // not running layout tests (because otherwise they'd corrupt the test |
| 437 // output). | 439 // output). |
| 438 if (!layout_test_mode) | 440 if (!layout_test_mode) |
| 439 webkit_glue::EnableWebCoreNotImplementedLogging(); | 441 webkit_glue::EnableWebCoreNotImplementedLogging(); |
| 440 } | 442 } |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { | 918 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { |
| 917 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { | 919 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { |
| 918 webkit::npapi::PluginList::Singleton()->DisablePlugin(plugin_info.path); | 920 webkit::npapi::PluginList::Singleton()->DisablePlugin(plugin_info.path); |
| 919 plugins->erase(plugins->begin() + i); | 921 plugins->erase(plugins->begin() + i); |
| 920 } | 922 } |
| 921 } | 923 } |
| 922 } | 924 } |
| 923 } | 925 } |
| 924 | 926 |
| 925 } // namespace webkit_glue | 927 } // namespace webkit_glue |
| OLD | NEW |