OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 // output from disrupting whether or not we pass. | 410 // output from disrupting whether or not we pass. |
411 logging::LoggingDestination destination = | 411 logging::LoggingDestination destination = |
412 logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG; | 412 logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG; |
413 if (layout_test_mode) | 413 if (layout_test_mode) |
414 destination = logging::LOG_ONLY_TO_FILE; | 414 destination = logging::LOG_ONLY_TO_FILE; |
415 | 415 |
416 // We might have multiple test_shell processes going at once | 416 // We might have multiple test_shell processes going at once |
417 FilePath log_filename; | 417 FilePath log_filename; |
418 PathService::Get(base::DIR_EXE, &log_filename); | 418 PathService::Get(base::DIR_EXE, &log_filename); |
419 log_filename = log_filename.AppendASCII("test_shell.log"); | 419 log_filename = log_filename.AppendASCII("test_shell.log"); |
420 logging::InitLogging( | 420 logging::InitLogging(log_filename.value().c_str(), |
421 log_filename.value().c_str(), | 421 destination, |
422 destination, | 422 logging::LOCK_LOG_FILE, |
423 logging::LOCK_LOG_FILE, | 423 logging::DELETE_OLD_LOG_FILE); |
424 logging::DELETE_OLD_LOG_FILE, | |
425 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); | |
426 | 424 |
427 // we want process and thread IDs because we may have multiple processes | 425 // we want process and thread IDs because we may have multiple processes |
428 logging::SetLogItems(true, true, false, true); | 426 logging::SetLogItems(true, true, false, true); |
429 | 427 |
430 // Turn on logging of notImplemented()s inside WebKit, but only if we're | 428 // Turn on logging of notImplemented()s inside WebKit, but only if we're |
431 // not running layout tests (because otherwise they'd corrupt the test | 429 // not running layout tests (because otherwise they'd corrupt the test |
432 // output). | 430 // output). |
433 if (!layout_test_mode) | 431 if (!layout_test_mode) |
434 webkit_glue::EnableWebCoreNotImplementedLogging(); | 432 webkit_glue::EnableWebCoreNotImplementedLogging(); |
435 } | 433 } |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { | 905 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { |
908 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { | 906 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { |
909 webkit::npapi::PluginList::Singleton()->DisablePlugin(plugin_info.path); | 907 webkit::npapi::PluginList::Singleton()->DisablePlugin(plugin_info.path); |
910 plugins->erase(plugins->begin() + i); | 908 plugins->erase(plugins->begin() + i); |
911 } | 909 } |
912 } | 910 } |
913 } | 911 } |
914 } | 912 } |
915 | 913 |
916 } // namespace webkit_glue | 914 } // namespace webkit_glue |
OLD | NEW |