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

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

Issue 2814043003: Update Crashpad to 1f28a123a4c9449e3d7ddad4ff00dacd366d5216 (Closed)
Patch Set: Add missing GN config to fix compile/link. Created 3 years, 8 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_user_stream_writer_test.cc
diff --git a/third_party/crashpad/crashpad/minidump/minidump_user_stream_writer_test.cc b/third_party/crashpad/crashpad/minidump/minidump_user_stream_writer_test.cc
index 45089cafdd4a235e370361eea869c0b66e4b11b6..e6627e625a72899908aaa9a6aba98edc3ee5c75b 100644
--- a/third_party/crashpad/crashpad/minidump/minidump_user_stream_writer_test.cc
+++ b/third_party/crashpad/crashpad/minidump/minidump_user_stream_writer_test.cc
@@ -21,6 +21,7 @@
#include "gtest/gtest.h"
#include "minidump/minidump_file_writer.h"
#include "minidump/test/minidump_file_writer_test_util.h"
+#include "minidump/test/minidump_user_extension_stream_util.h"
#include "minidump/test/minidump_writable_test_util.h"
#include "snapshot/test/test_memory_snapshot.h"
#include "util/file/string_file.h"
@@ -74,10 +75,12 @@ TEST(MinidumpUserStreamWriter, InitializeFromSnapshotNoData) {
string_file.string(), &user_stream_location, kTestStreamId, 0u));
}
-TEST(MinidumpUserStreamWriter, InitializeFromBufferNoData) {
+TEST(MinidumpUserStreamWriter, InitializeFromUserExtensionStreamNoData) {
MinidumpFileWriter minidump_file_writer;
+ auto data_source = base::WrapUnique(
+ new test::BufferExtensionStreamDataSource(kTestStreamId, nullptr, 0));
auto user_stream_writer = base::WrapUnique(new MinidumpUserStreamWriter());
- user_stream_writer->InitializeFromBuffer(kTestStreamId, nullptr, 0);
+ user_stream_writer->InitializeFromUserExtensionStream(std::move(data_source));
minidump_file_writer.AddStream(std::move(user_stream_writer));
StringFile string_file;
@@ -121,12 +124,13 @@ TEST(MinidumpUserStreamWriter, InitializeFromSnapshotOneStream) {
TEST(MinidumpUserStreamWriter, InitializeFromBufferOneStream) {
MinidumpFileWriter minidump_file_writer;
- auto user_stream_writer = base::WrapUnique(new MinidumpUserStreamWriter());
const size_t kStreamSize = 128;
std::vector<uint8_t> data(kStreamSize, 'c');
- user_stream_writer->InitializeFromBuffer(
- kTestStreamId, &data[0], data.size());
+ auto data_source = base::WrapUnique(new test::BufferExtensionStreamDataSource(
+ kTestStreamId, &data[0], data.size()));
+ auto user_stream_writer = base::WrapUnique(new MinidumpUserStreamWriter());
+ user_stream_writer->InitializeFromUserExtensionStream(std::move(data_source));
minidump_file_writer.AddStream(std::move(user_stream_writer));
StringFile string_file;

Powered by Google App Engine
This is Rietveld 408576698