OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <objbase.h> | 8 #include <objbase.h> |
9 #include <windows.h> | 9 #include <windows.h> |
10 #endif | 10 #endif |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 RunRendererTests run_security_tests = | 142 RunRendererTests run_security_tests = |
143 reinterpret_cast<RunPluginTests>(GetProcAddress(sandbox_test_module, | 143 reinterpret_cast<RunPluginTests>(GetProcAddress(sandbox_test_module, |
144 kPluginTestCall)); | 144 kPluginTestCall)); |
145 DCHECK(run_security_tests); | 145 DCHECK(run_security_tests); |
146 if (run_security_tests) { | 146 if (run_security_tests) { |
147 int test_count = 0; | 147 int test_count = 0; |
148 DVLOG(1) << "Running plugin security tests"; | 148 DVLOG(1) << "Running plugin security tests"; |
149 BOOL result = run_security_tests(&test_count); | 149 BOOL result = run_security_tests(&test_count); |
150 DCHECK(result) << "Test number " << test_count << " has failed."; | 150 DCHECK(result) << "Test number " << test_count << " has failed."; |
151 // If we are in release mode, crash or debug the process. | 151 // If we are in release mode, crash or debug the process. |
152 if (!result) | 152 if (!result) { |
153 __debugbreak(); | 153 __debugbreak(); |
| 154 _exit(1); |
| 155 } |
154 } | 156 } |
155 | 157 |
156 FreeLibrary(sandbox_test_module); | 158 FreeLibrary(sandbox_test_module); |
157 } | 159 } |
158 #endif | 160 #endif |
159 | 161 |
160 chrome::RegisterInternalDefaultPlugin(); | 162 chrome::RegisterInternalDefaultPlugin(); |
161 chrome::RegisterInternalGPUPlugin(); | 163 chrome::RegisterInternalGPUPlugin(); |
162 | 164 |
163 MessageLoop::current()->Run(); | 165 MessageLoop::current()->Run(); |
164 } | 166 } |
165 | 167 |
166 #if defined(OS_WIN) | 168 #if defined(OS_WIN) |
167 CoUninitialize(); | 169 CoUninitialize(); |
168 #endif | 170 #endif |
169 | 171 |
170 return 0; | 172 return 0; |
171 } | 173 } |
OLD | NEW |