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

Unified Diff: minidump/minidump_crashpad_info_writer_test.cc

Issue 978463003: minidump: Reorganize MinidumpModuleCrashpadInfo to improve linking between structures (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Minor update Created 5 years, 10 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 | « minidump/minidump.gyp ('k') | minidump/minidump_extensions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_crashpad_info_writer_test.cc
diff --git a/minidump/minidump_crashpad_info_writer_test.cc b/minidump/minidump_crashpad_info_writer_test.cc
index 28254a99d8277f56e75e0deaa11b86e54770b95d..557fc30222d7aefd035bccaa7d6328cfe99ed54d 100644
--- a/minidump/minidump_crashpad_info_writer_test.cc
+++ b/minidump/minidump_crashpad_info_writer_test.cc
@@ -140,8 +140,7 @@ TEST(MinidumpCrashpadInfoWriter, CrashpadModuleList) {
auto module_list_writer =
make_scoped_ptr(new MinidumpModuleCrashpadInfoListWriter());
auto module_writer = make_scoped_ptr(new MinidumpModuleCrashpadInfoWriter());
- module_writer->SetMinidumpModuleListIndex(kMinidumpModuleListIndex);
- module_list_writer->AddModule(module_writer.Pass());
+ module_list_writer->AddModule(module_writer.Pass(), kMinidumpModuleListIndex);
crashpad_info_writer->SetModuleList(module_list_writer.Pass());
EXPECT_TRUE(crashpad_info_writer->IsUseful());
@@ -164,13 +163,14 @@ TEST(MinidumpCrashpadInfoWriter, CrashpadModuleList) {
ASSERT_TRUE(module_list);
ASSERT_EQ(1u, module_list->count);
+ EXPECT_EQ(kMinidumpModuleListIndex,
+ module_list->modules[0].minidump_module_list_index);
const MinidumpModuleCrashpadInfo* module =
MinidumpWritableAtLocationDescriptor<MinidumpModuleCrashpadInfo>(
- string_file.string(), module_list->children[0]);
+ string_file.string(), module_list->modules[0].location);
ASSERT_TRUE(module);
EXPECT_EQ(MinidumpModuleCrashpadInfo::kVersion, module->version);
- EXPECT_EQ(kMinidumpModuleListIndex, module->minidump_module_list_index);
EXPECT_EQ(0u, module->list_annotations.DataSize);
EXPECT_EQ(0u, module->list_annotations.Rva);
EXPECT_EQ(0u, module->simple_annotations.DataSize);
@@ -235,13 +235,13 @@ TEST(MinidumpCrashpadInfoWriter, InitializeFromSnapshot) {
ASSERT_TRUE(module_list);
ASSERT_EQ(1u, module_list->count);
+ EXPECT_EQ(0u, module_list->modules[0].minidump_module_list_index);
const MinidumpModuleCrashpadInfo* module =
MinidumpWritableAtLocationDescriptor<MinidumpModuleCrashpadInfo>(
- string_file.string(), module_list->children[0]);
+ string_file.string(), module_list->modules[0].location);
ASSERT_TRUE(module);
EXPECT_EQ(MinidumpModuleCrashpadInfo::kVersion, module->version);
- EXPECT_EQ(0u, module->minidump_module_list_index);
const MinidumpRVAList* list_annotations =
MinidumpWritableAtLocationDescriptor<MinidumpRVAList>(
« no previous file with comments | « minidump/minidump.gyp ('k') | minidump/minidump_extensions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698