OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "base/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/basictypes.h" | 6 #include "base/basictypes.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/event_recorder.h" | 8 #include "base/event_recorder.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 #include "webkit/tools/test_shell/test_shell_switches.h" | 38 #include "webkit/tools/test_shell/test_shell_switches.h" |
39 #include "webkit/tools/test_shell/test_shell_webkit_init.h" | 39 #include "webkit/tools/test_shell/test_shell_webkit_init.h" |
40 | 40 |
41 static const size_t kPathBufSize = 2048; | 41 static const size_t kPathBufSize = 2048; |
42 | 42 |
43 using WebKit::WebScriptController; | 43 using WebKit::WebScriptController; |
44 | 44 |
45 namespace { | 45 namespace { |
46 | 46 |
47 // StatsTable initialization parameters. | 47 // StatsTable initialization parameters. |
48 static const char* kStatsFilePrefix = "testshell_"; | 48 const char* const kStatsFilePrefix = "testshell_"; |
49 static int kStatsFileThreads = 20; | 49 int kStatsFileThreads = 20; |
50 static int kStatsFileCounters = 200; | 50 int kStatsFileCounters = 200; |
51 | 51 |
52 } // namespace | 52 } // namespace |
53 | 53 |
54 int main(int argc, char* argv[]) { | 54 int main(int argc, char* argv[]) { |
| 55 base::EnableInProcessStackDumping(); |
55 base::EnableTerminationOnHeapCorruption(); | 56 base::EnableTerminationOnHeapCorruption(); |
56 | 57 |
57 // Some tests may use base::Singleton<>, thus we need to instanciate | 58 // Some tests may use base::Singleton<>, thus we need to instanciate |
58 // the AtExitManager or else we will leak objects. | 59 // the AtExitManager or else we will leak objects. |
59 base::AtExitManager at_exit_manager; | 60 base::AtExitManager at_exit_manager; |
60 | 61 |
61 TestShellPlatformDelegate::PreflightArgs(&argc, &argv); | 62 TestShellPlatformDelegate::PreflightArgs(&argc, &argv); |
62 CommandLine::Init(argc, argv); | 63 CommandLine::Init(argc, argv); |
63 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); | 64 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); |
64 | 65 |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 | 360 |
360 TestShell::ShutdownTestShell(); | 361 TestShell::ShutdownTestShell(); |
361 TestShell::CleanupLogging(); | 362 TestShell::CleanupLogging(); |
362 | 363 |
363 // Tear down shared StatsTable; prevents unit_tests from leaking it. | 364 // Tear down shared StatsTable; prevents unit_tests from leaking it. |
364 StatsTable::set_current(NULL); | 365 StatsTable::set_current(NULL); |
365 delete table; | 366 delete table; |
366 | 367 |
367 return 0; | 368 return 0; |
368 } | 369 } |
OLD | NEW |