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/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "base/perftimer.h" | 6 #include "base/perftimer.h" |
| 7 #include "base/process_util.h" |
7 #include "chrome/common/chrome_paths.cc" | 8 #include "chrome/common/chrome_paths.cc" |
8 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
9 | 10 |
10 // TODO(darin): share code with base/run_all_perftests.cc | 11 // TODO(darin): share code with base/run_all_perftests.cc |
11 | 12 |
12 int main(int argc, char **argv) { | 13 int main(int argc, char **argv) { |
| 14 process_util::EnableTerminationOnHeapCorruption(); |
13 chrome::RegisterPathProvider(); | 15 chrome::RegisterPathProvider(); |
14 MessageLoop main_message_loop; | 16 MessageLoop main_message_loop; |
15 | 17 |
16 testing::InitGoogleTest(&argc, argv); | 18 testing::InitGoogleTest(&argc, argv); |
17 | 19 |
18 const char log_file_switch[] = "-o"; | 20 const char log_file_switch[] = "-o"; |
19 const char* log_filename = NULL; | 21 const char* log_filename = NULL; |
20 for (int i = 1; i < argc; i++) { | 22 for (int i = 1; i < argc; i++) { |
21 if (strcmp(argv[i], log_file_switch) == 0) { | 23 if (strcmp(argv[i], log_file_switch) == 0) { |
22 // found the switch for the log file, use the next arg | 24 // found the switch for the log file, use the next arg |
(...skipping 21 matching lines...) Expand all Loading... |
44 if (!IsDebuggerPresent()) { | 46 if (!IsDebuggerPresent()) { |
45 SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS); | 47 SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS); |
46 } | 48 } |
47 | 49 |
48 int result = RUN_ALL_TESTS(); | 50 int result = RUN_ALL_TESTS(); |
49 | 51 |
50 FinalizePerfLog(); | 52 FinalizePerfLog(); |
51 return result; | 53 return result; |
52 } | 54 } |
53 | 55 |
OLD | NEW |