Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(608)

Unified Diff: snapshot/mac/mach_o_image_reader_test.cc

Issue 997713002: Allow exception forwarding to the system’s native crash reporter to be disabled (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Remove unused function declaration Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « snapshot/mac/mach_o_image_reader.cc ('k') | snapshot/mac/module_snapshot_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: snapshot/mac/mach_o_image_reader_test.cc
diff --git a/snapshot/mac/mach_o_image_reader_test.cc b/snapshot/mac/mach_o_image_reader_test.cc
index 56650140a2a48db6b54246af05bf437f396fe2ba..afbf579844eb0dcd783b0289afa706b32c5236f8 100644
--- a/snapshot/mac/mach_o_image_reader_test.cc
+++ b/snapshot/mac/mach_o_image_reader_test.cc
@@ -26,6 +26,7 @@
#include "base/strings/stringprintf.h"
#include "build/build_config.h"
+#include "client/crashpad_info.h"
#include "gtest/gtest.h"
#include "snapshot/mac/mach_o_image_segment_reader.h"
#include "snapshot/mac/process_reader.h"
@@ -532,6 +533,8 @@ TEST(MachOImageReader, Self_DyldImages) {
uint32_t count = _dyld_image_count();
ASSERT_GE(count, 1u);
+ size_t modules_with_crashpad_info = 0;
+
for (uint32_t index = 0; index < count; ++index) {
const char* image_name = _dyld_get_image_name(index);
SCOPED_TRACE(base::StringPrintf("index %u, image %s", index, image_name));
@@ -560,8 +563,15 @@ TEST(MachOImageReader, Self_DyldImages) {
mach_header, image_address, image_slide, &image_reader, false));
ASSERT_NO_FATAL_FAILURE(ExpectSymbolTable(mach_header, &image_reader));
+
+ process_types::CrashpadInfo crashpad_info;
+ if (image_reader.GetCrashpadInfo(&crashpad_info)) {
+ ++modules_with_crashpad_info;
+ }
}
+ EXPECT_GE(modules_with_crashpad_info, 1u);
+
// Now that all of the modules have been verified, make sure that dyld itself
// can be read properly too.
const struct dyld_all_image_infos* dyld_image_infos =
« no previous file with comments | « snapshot/mac/mach_o_image_reader.cc ('k') | snapshot/mac/module_snapshot_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698