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

Unified Diff: third_party/crashpad/crashpad/minidump/minidump_module_writer_test.cc

Issue 2773813002: Update Crashpad to 8e37886d418dd042c3c7bfadac99214739ee4d98 (Closed)
Patch Set: Update Crashpad to 8e37886d418dd042c3c7bfadac99214739ee4d98 Created 3 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
Index: third_party/crashpad/crashpad/minidump/minidump_module_writer_test.cc
diff --git a/third_party/crashpad/crashpad/minidump/minidump_module_writer_test.cc b/third_party/crashpad/crashpad/minidump/minidump_module_writer_test.cc
index 7c9dcdaad9ee21772d455c7064257b5aeaced59f..6a0464cf57899ef3b943a25a5ffa1c239f70d55d 100644
--- a/third_party/crashpad/crashpad/minidump/minidump_module_writer_test.cc
+++ b/third_party/crashpad/crashpad/minidump/minidump_module_writer_test.cc
@@ -14,6 +14,7 @@
#include "minidump/minidump_module_writer.h"
+#include <stddef.h>
#include <string.h>
#include <utility>
@@ -67,7 +68,7 @@ TEST(MinidumpModuleWriter, EmptyModuleList) {
MinidumpFileWriter minidump_file_writer;
auto module_list_writer = base::WrapUnique(new MinidumpModuleListWriter());
- minidump_file_writer.AddStream(std::move(module_list_writer));
+ ASSERT_TRUE(minidump_file_writer.AddStream(std::move(module_list_writer)));
StringFile string_file;
ASSERT_TRUE(minidump_file_writer.WriteEverything(&string_file));
@@ -276,7 +277,7 @@ TEST(MinidumpModuleWriter, EmptyModule) {
module_writer->SetName(kModuleName);
module_list_writer->AddModule(std::move(module_writer));
- minidump_file_writer.AddStream(std::move(module_list_writer));
+ ASSERT_TRUE(minidump_file_writer.AddStream(std::move(module_list_writer)));
StringFile string_file;
ASSERT_TRUE(minidump_file_writer.WriteEverything(&string_file));
@@ -367,7 +368,7 @@ TEST(MinidumpModuleWriter, OneModule) {
module_writer->SetMiscDebugRecord(std::move(misc_debug_writer));
module_list_writer->AddModule(std::move(module_writer));
- minidump_file_writer.AddStream(std::move(module_list_writer));
+ ASSERT_TRUE(minidump_file_writer.AddStream(std::move(module_list_writer)));
StringFile string_file;
ASSERT_TRUE(minidump_file_writer.WriteEverything(&string_file));
@@ -442,7 +443,7 @@ TEST(MinidumpModuleWriter, OneModule_CodeViewUsesPDB20_MiscUsesUTF16) {
module_writer->SetMiscDebugRecord(std::move(misc_debug_writer));
module_list_writer->AddModule(std::move(module_writer));
- minidump_file_writer.AddStream(std::move(module_list_writer));
+ ASSERT_TRUE(minidump_file_writer.AddStream(std::move(module_list_writer)));
StringFile string_file;
ASSERT_TRUE(minidump_file_writer.WriteEverything(&string_file));
@@ -534,7 +535,7 @@ TEST(MinidumpModuleWriter, ThreeModules) {
module_list_writer->AddModule(std::move(module_writer_2));
- minidump_file_writer.AddStream(std::move(module_list_writer));
+ ASSERT_TRUE(minidump_file_writer.AddStream(std::move(module_list_writer)));
StringFile string_file;
ASSERT_TRUE(minidump_file_writer.WriteEverything(&string_file));
@@ -653,7 +654,6 @@ void InitializeTestModuleSnapshotFromMinidumpModule(
TEST(MinidumpModuleWriter, InitializeFromSnapshot) {
MINIDUMP_MODULE expect_modules[3] = {};
const char* module_paths[arraysize(expect_modules)] = {};
- const char* module_names[arraysize(expect_modules)] = {};
const char* module_pdbs[arraysize(expect_modules)] = {};
UUID uuids[arraysize(expect_modules)] = {};
uint32_t ages[arraysize(expect_modules)] = {};
@@ -667,7 +667,6 @@ TEST(MinidumpModuleWriter, InitializeFromSnapshot) {
expect_modules[0].VersionInfo.dwProductVersionLS = 0x00070008;
expect_modules[0].VersionInfo.dwFileType = VFT_APP;
module_paths[0] = "/usr/bin/true";
- module_names[0] = "true";
module_pdbs[0] = "true";
const uint8_t kUUIDBytes0[16] =
{0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
@@ -684,7 +683,6 @@ TEST(MinidumpModuleWriter, InitializeFromSnapshot) {
expect_modules[1].VersionInfo.dwProductVersionLS = 0x000f0000;
expect_modules[1].VersionInfo.dwFileType = VFT_DLL;
module_paths[1] = "/usr/lib/libSystem.B.dylib";
- module_names[1] = "libSystem.B.dylib";
module_pdbs[1] = "libSystem.B.dylib.pdb";
const uint8_t kUUIDBytes1[16] =
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
@@ -701,7 +699,6 @@ TEST(MinidumpModuleWriter, InitializeFromSnapshot) {
expect_modules[2].VersionInfo.dwProductVersionLS = 0xbbbbcccc;
expect_modules[2].VersionInfo.dwFileType = VFT_UNKNOWN;
module_paths[2] = "/usr/lib/dyld";
- module_names[2] = "dyld";
module_pdbs[2] = "/usr/lib/dyld.pdb";
const uint8_t kUUIDBytes2[16] =
{0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8,
@@ -727,7 +724,7 @@ TEST(MinidumpModuleWriter, InitializeFromSnapshot) {
module_list_writer->InitializeFromSnapshot(module_snapshots);
MinidumpFileWriter minidump_file_writer;
- minidump_file_writer.AddStream(std::move(module_list_writer));
+ ASSERT_TRUE(minidump_file_writer.AddStream(std::move(module_list_writer)));
StringFile string_file;
ASSERT_TRUE(minidump_file_writer.WriteEverything(&string_file));
@@ -759,7 +756,7 @@ TEST(MinidumpModuleWriterDeathTest, NoModuleName) {
auto module_list_writer = base::WrapUnique(new MinidumpModuleListWriter());
auto module_writer = base::WrapUnique(new MinidumpModuleWriter());
module_list_writer->AddModule(std::move(module_writer));
- minidump_file_writer.AddStream(std::move(module_list_writer));
+ ASSERT_TRUE(minidump_file_writer.AddStream(std::move(module_list_writer)));
StringFile string_file;
ASSERT_DEATH_CHECK(minidump_file_writer.WriteEverything(&string_file),

Powered by Google App Engine
This is Rietveld 408576698