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

Unified Diff: minidump/minidump_string_writer_test.cc

Issue 1419623003: Write MINIDUMP_HANDLE_DATA_STREAM to minidump (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: . Created 5 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_string_writer.h ('k') | minidump/minidump_test.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_string_writer_test.cc
diff --git a/minidump/minidump_string_writer_test.cc b/minidump/minidump_string_writer_test.cc
index aa8e48c6a3c77e3200713bc0be05f2da678c1ad7..c5bcc49c04f30f9a3483e7372061f80bd1718b29 100644
--- a/minidump/minidump_string_writer_test.cc
+++ b/minidump/minidump_string_writer_test.cc
@@ -53,6 +53,23 @@ TEST(MinidumpStringWriter, MinidumpUTF16StringWriter) {
MinidumpStringAtRVAAsString(string_file.string(), 0));
}
+ {
+ SCOPED_TRACE("no conversion");
+ string_file.Reset();
+ crashpad::internal::MinidumpUTF16StringWriter string_writer;
+ const base::string16 kString(L"oóöőo");
Mark Mentovai 2015/10/21 16:53:51 This was inspired by all of the different kinds of
+ string_writer.SetUTF16(kString);
+ EXPECT_TRUE(string_writer.WriteEverything(&string_file));
+ ASSERT_EQ(
+ sizeof(MINIDUMP_STRING) + (kString.size() + 1) * sizeof(kString[0]),
+ string_file.string().size());
+
+ const MINIDUMP_STRING* minidump_string =
+ MinidumpStringAtRVA(string_file.string(), 0);
+ EXPECT_TRUE(minidump_string);
+ EXPECT_EQ(kString, MinidumpStringAtRVAAsString(string_file.string(), 0));
+ }
+
const struct {
size_t input_length;
const char* input_string;
« no previous file with comments | « minidump/minidump_string_writer.h ('k') | minidump/minidump_test.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698