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

Unified Diff: minidump/minidump_exception_writer_test.cc

Issue 664283002: Refactor minidump test utilities for MinidumpWritable, … (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 2 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_crashpad_info_writer_test.cc ('k') | minidump/minidump_file_writer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_exception_writer_test.cc
diff --git a/minidump/minidump_exception_writer_test.cc b/minidump/minidump_exception_writer_test.cc
index 16cff2481402bb957dc6a82d09d2db169e9b8b84..e1cad612f6120905bb49f9852933e9998eeb8137 100644
--- a/minidump/minidump_exception_writer_test.cc
+++ b/minidump/minidump_exception_writer_test.cc
@@ -44,15 +44,11 @@ void GetExceptionStream(const std::string& file_contents,
const size_t kFileSize = kContextOffset + sizeof(MinidumpContextX86);
ASSERT_EQ(file_contents.size(), kFileSize);
+ const MINIDUMP_DIRECTORY* directory;
const MINIDUMP_HEADER* header =
- reinterpret_cast<const MINIDUMP_HEADER*>(&file_contents[0]);
-
+ MinidumpHeaderAtStart(file_contents, &directory);
ASSERT_NO_FATAL_FAILURE(VerifyMinidumpHeader(header, 1, 0));
- const MINIDUMP_DIRECTORY* directory =
- reinterpret_cast<const MINIDUMP_DIRECTORY*>(
- &file_contents[kDirectoryOffset]);
-
ASSERT_EQ(kMinidumpStreamTypeException, directory[0].StreamType);
ASSERT_GE(directory[0].Location.DataSize, sizeof(MINIDUMP_EXCEPTION_STREAM));
ASSERT_EQ(kExceptionStreamOffset, directory[0].Location.Rva);
« no previous file with comments | « minidump/minidump_crashpad_info_writer_test.cc ('k') | minidump/minidump_file_writer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698