| 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 // Creates an instance of the test_shell. | 5 // Creates an instance of the test_shell. |
| 6 | 6 |
| 7 #include <stdlib.h> // required by _set_abort_behavior | 7 #include <stdlib.h> // required by _set_abort_behavior |
| 8 | 8 |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #include <commctrl.h> | 10 #include <commctrl.h> |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 106 |
| 107 // May use the heap, but oh well. If this fails, we'll just have the | 107 // May use the heap, but oh well. If this fails, we'll just have the |
| 108 // original dump file lying around. | 108 // original dump file lying around. |
| 109 _wrename(origPath->c_str(), newPath->c_str()); | 109 _wrename(origPath->c_str(), newPath->c_str()); |
| 110 | 110 |
| 111 return false; | 111 return false; |
| 112 } | 112 } |
| 113 } // namespace | 113 } // namespace |
| 114 | 114 |
| 115 int main(int argc, char* argv[]) { | 115 int main(int argc, char* argv[]) { |
| 116 process_util::EnableTerminationOnHeapCorruption(); | 116 base::EnableTerminationOnHeapCorruption(); |
| 117 #ifdef _CRTDBG_MAP_ALLOC | 117 #ifdef _CRTDBG_MAP_ALLOC |
| 118 _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR); | 118 _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR); |
| 119 _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); | 119 _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); |
| 120 #endif | 120 #endif |
| 121 // Some tests may use base::Singleton<>, thus we need to instanciate | 121 // Some tests may use base::Singleton<>, thus we need to instanciate |
| 122 // the AtExitManager or else we will leak objects. | 122 // the AtExitManager or else we will leak objects. |
| 123 base::AtExitManager at_exit_manager; | 123 base::AtExitManager at_exit_manager; |
| 124 | 124 |
| 125 CommandLine parsed_command_line; | 125 CommandLine parsed_command_line; |
| 126 if (parsed_command_line.HasSwitch(test_shell::kStartupDialog)) | 126 if (parsed_command_line.HasSwitch(test_shell::kStartupDialog)) |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 | 359 |
| 360 // Tear down shared StatsTable; prevents unit_tests from leaking it. | 360 // Tear down shared StatsTable; prevents unit_tests from leaking it. |
| 361 StatsTable::set_current(NULL); | 361 StatsTable::set_current(NULL); |
| 362 delete table; | 362 delete table; |
| 363 | 363 |
| 364 #ifdef _CRTDBG_MAP_ALLOC | 364 #ifdef _CRTDBG_MAP_ALLOC |
| 365 _CrtDumpMemoryLeaks(); | 365 _CrtDumpMemoryLeaks(); |
| 366 #endif | 366 #endif |
| 367 return 0; | 367 return 0; |
| 368 } | 368 } |
| OLD | NEW |