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

Side by Side Diff: minidump/minidump_system_info_writer_test.cc

Issue 701783004: Add MinidumpMiscInfoWriter::InitializeFromSnapshot() and its test (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@minidump_init_from_snapshot_system_info
Patch Set: Rebase Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « minidump/minidump_misc_info_writer_test.cc ('k') | snapshot/snapshot.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 system_info_writer->InitializeFromSnapshot(&system_snapshot); 332 system_info_writer->InitializeFromSnapshot(&system_snapshot);
333 333
334 MinidumpFileWriter minidump_file_writer; 334 MinidumpFileWriter minidump_file_writer;
335 minidump_file_writer.AddStream(system_info_writer.Pass()); 335 minidump_file_writer.AddStream(system_info_writer.Pass());
336 336
337 StringFileWriter file_writer; 337 StringFileWriter file_writer;
338 ASSERT_TRUE(minidump_file_writer.WriteEverything(&file_writer)); 338 ASSERT_TRUE(minidump_file_writer.WriteEverything(&file_writer));
339 339
340 const MINIDUMP_SYSTEM_INFO* system_info; 340 const MINIDUMP_SYSTEM_INFO* system_info;
341 const MINIDUMP_STRING* csd_version; 341 const MINIDUMP_STRING* csd_version;
342
343 ASSERT_NO_FATAL_FAILURE(GetSystemInfoStream(file_writer.string(), 342 ASSERT_NO_FATAL_FAILURE(GetSystemInfoStream(file_writer.string(),
344 strlen(kOSVersionBuild), 343 strlen(kOSVersionBuild),
345 &system_info, 344 &system_info,
346 &csd_version)); 345 &csd_version));
347 346
348 EXPECT_EQ(expect_system_info.ProcessorArchitecture, 347 EXPECT_EQ(expect_system_info.ProcessorArchitecture,
349 system_info->ProcessorArchitecture); 348 system_info->ProcessorArchitecture);
350 EXPECT_EQ(expect_system_info.ProcessorLevel, system_info->ProcessorLevel); 349 EXPECT_EQ(expect_system_info.ProcessorLevel, system_info->ProcessorLevel);
351 EXPECT_EQ(expect_system_info.ProcessorRevision, 350 EXPECT_EQ(expect_system_info.ProcessorRevision,
352 system_info->ProcessorRevision); 351 system_info->ProcessorRevision);
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 minidump_file_writer.AddStream(system_info_writer.Pass()); 468 minidump_file_writer.AddStream(system_info_writer.Pass());
470 469
471 StringFileWriter file_writer; 470 StringFileWriter file_writer;
472 ASSERT_DEATH(minidump_file_writer.WriteEverything(&file_writer), 471 ASSERT_DEATH(minidump_file_writer.WriteEverything(&file_writer),
473 "csd_version_"); 472 "csd_version_");
474 } 473 }
475 474
476 } // namespace 475 } // namespace
477 } // namespace test 476 } // namespace test
478 } // namespace crashpad 477 } // namespace crashpad
OLDNEW
« no previous file with comments | « minidump/minidump_misc_info_writer_test.cc ('k') | snapshot/snapshot.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698