OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome_frame/crash_reporting/nt_loader.h" | 5 #include "chrome_frame/crash_reporting/nt_loader.h" |
6 | 6 |
7 #include <tlhelp32.h> | 7 #include <tlhelp32.h> |
8 #include <winnt.h> | 8 #include <winnt.h> |
9 | 9 |
10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
13 #include "base/environment.h" | 13 #include "base/environment.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
16 #include "base/string_util.h" | 16 #include "base/strings/string_util.h" |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "base/sys_info.h" | 18 #include "base/sys_info.h" |
19 #include "base/threading/thread.h" | 19 #include "base/threading/thread.h" |
20 #include "base/win/scoped_handle.h" | 20 #include "base/win/scoped_handle.h" |
21 #include "chrome_frame/crash_reporting/crash_dll.h" | 21 #include "chrome_frame/crash_reporting/crash_dll.h" |
22 #include "gtest/gtest.h" | 22 #include "gtest/gtest.h" |
23 | 23 |
24 namespace { | 24 namespace { |
25 void AssertIsCriticalSection(CRITICAL_SECTION* critsec) { | 25 void AssertIsCriticalSection(CRITICAL_SECTION* critsec) { |
26 // Assert on some of the internals of the debug info if it has one. | 26 // Assert on some of the internals of the debug info if it has one. |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 | 313 |
314 exceptions_handled = 0; | 314 exceptions_handled = 0; |
315 set_exception_function(OnCrashDuringUnloadLibrary); | 315 set_exception_function(OnCrashDuringUnloadLibrary); |
316 | 316 |
317 // We should crash during unload. | 317 // We should crash during unload. |
318 if (module != NULL) | 318 if (module != NULL) |
319 ::FreeLibrary(module); | 319 ::FreeLibrary(module); |
320 | 320 |
321 EXPECT_EQ(1, exceptions_handled); | 321 EXPECT_EQ(1, exceptions_handled); |
322 } | 322 } |
OLD | NEW |