OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <atlbase.h> | 5 #include <atlbase.h> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/process_util.h" | 8 #include "base/process_util.h" |
9 #include "base/test/test_suite.h" | 9 #include "base/test/test_suite.h" |
10 #include "base/threading/platform_thread.h" | 10 #include "base/threading/platform_thread.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 ChromeFrameUnittestsModule _AtlModule; | 27 ChromeFrameUnittestsModule _AtlModule; |
28 | 28 |
29 const char kNoCrashService[] = "no-crash-service"; | 29 const char kNoCrashService[] = "no-crash-service"; |
30 const char kNoRegistrationSwitch[] = "no-registration"; | 30 const char kNoRegistrationSwitch[] = "no-registration"; |
31 | 31 |
32 void PureCall() { | 32 void PureCall() { |
33 __debugbreak(); | 33 __debugbreak(); |
34 } | 34 } |
35 | 35 |
36 int main(int argc, char **argv) { | 36 int main(int argc, char **argv) { |
| 37 ScopedChromeFrameRegistrar::RegisterAndExitProcessIfDirected(); |
37 base::EnableTerminationOnHeapCorruption(); | 38 base::EnableTerminationOnHeapCorruption(); |
38 base::PlatformThread::SetName("ChromeFrame tests"); | 39 base::PlatformThread::SetName("ChromeFrame tests"); |
39 | 40 |
40 _set_purecall_handler(PureCall); | 41 _set_purecall_handler(PureCall); |
41 | 42 |
42 base::TestSuite test_suite(argc, argv); | 43 base::TestSuite test_suite(argc, argv); |
43 | 44 |
44 SetConfigBool(kChromeFrameHeadlessMode, true); | 45 SetConfigBool(kChromeFrameHeadlessMode, true); |
45 SetConfigBool(kChromeFrameAccessibleMode, true); | 46 SetConfigBool(kChromeFrameAccessibleMode, true); |
46 | 47 |
(...skipping 27 matching lines...) Expand all Loading... |
74 ret = test_suite.Run(); | 75 ret = test_suite.Run(); |
75 } | 76 } |
76 | 77 |
77 DeleteConfigValue(kChromeFrameHeadlessMode); | 78 DeleteConfigValue(kChromeFrameHeadlessMode); |
78 DeleteConfigValue(kChromeFrameAccessibleMode); | 79 DeleteConfigValue(kChromeFrameAccessibleMode); |
79 | 80 |
80 if (crash_service) | 81 if (crash_service) |
81 base::KillProcess(crash_service, 0, false); | 82 base::KillProcess(crash_service, 0, false); |
82 return ret; | 83 return ret; |
83 } | 84 } |
OLD | NEW |