| 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/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
| 9 #include "base/process_util.h" | 9 #include "base/process_util.h" |
| 10 #include "base/test/test_suite.h" | 10 #include "base/test/test_suite.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 int main(int argc, char **argv) { | 47 int main(int argc, char **argv) { |
| 48 base::win::ScopedCOMInitializer com_initializer; | 48 base::win::ScopedCOMInitializer com_initializer; |
| 49 ScopedChromeFrameRegistrar::RegisterAndExitProcessIfDirected(); | 49 ScopedChromeFrameRegistrar::RegisterAndExitProcessIfDirected(); |
| 50 base::EnableTerminationOnHeapCorruption(); | 50 base::EnableTerminationOnHeapCorruption(); |
| 51 base::PlatformThread::SetName("ChromeFrame tests"); | 51 base::PlatformThread::SetName("ChromeFrame tests"); |
| 52 | 52 |
| 53 _set_purecall_handler(PureCall); | 53 _set_purecall_handler(PureCall); |
| 54 | 54 |
| 55 // Set up a FieldTrialList to keep any field trials we have going in | 55 // Set up a FieldTrialList to keep any field trials we have going in |
| 56 // Chrome Frame happy. | 56 // Chrome Frame happy. |
| 57 base::FieldTrialList field_trial_list("42"); | 57 base::FieldTrialList field_trial_list(NULL); |
| 58 | 58 |
| 59 base::TestSuite test_suite(argc, argv); | 59 base::TestSuite test_suite(argc, argv); |
| 60 | 60 |
| 61 SetConfigBool(kChromeFrameHeadlessMode, true); | 61 SetConfigBool(kChromeFrameHeadlessMode, true); |
| 62 SetConfigBool(kChromeFrameAccessibleMode, true); | 62 SetConfigBool(kChromeFrameAccessibleMode, true); |
| 63 | 63 |
| 64 base::ProcessHandle crash_service = NULL; | 64 base::ProcessHandle crash_service = NULL; |
| 65 google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> breakpad; | 65 google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> breakpad; |
| 66 | 66 |
| 67 if (!CommandLine::ForCurrentProcess()->HasSwitch(kNoCrashService)) { | 67 if (!CommandLine::ForCurrentProcess()->HasSwitch(kNoCrashService)) { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 ret = test_suite.Run(); | 102 ret = test_suite.Run(); |
| 103 } | 103 } |
| 104 | 104 |
| 105 DeleteConfigValue(kChromeFrameHeadlessMode); | 105 DeleteConfigValue(kChromeFrameHeadlessMode); |
| 106 DeleteConfigValue(kChromeFrameAccessibleMode); | 106 DeleteConfigValue(kChromeFrameAccessibleMode); |
| 107 | 107 |
| 108 if (crash_service) | 108 if (crash_service) |
| 109 base::KillProcess(crash_service, 0, false); | 109 base::KillProcess(crash_service, 0, false); |
| 110 return ret; | 110 return ret; |
| 111 } | 111 } |
| OLD | NEW |