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

Side by Side Diff: components/browser_watcher/postmortem_report_collector_unittest.cc

Issue 2555353002: Update Crashpad to 32981a3ee9d7c2769fb27afa038fe2e194cfa329 (Closed)
Patch Set: fix readme Created 4 years 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/browser_watcher/postmortem_report_collector.h" 5 #include "components/browser_watcher/postmortem_report_collector.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 EXPECT_CALL(collector_, CollectRaw(debug_file_)) 171 EXPECT_CALL(collector_, CollectRaw(debug_file_))
172 .Times(1) 172 .Times(1)
173 .WillOnce(Return(stability_report)); 173 .WillOnce(Return(stability_report));
174 174
175 // Expect the call to write the proto to a minidump. This involves 175 // Expect the call to write the proto to a minidump. This involves
176 // requesting a report from the crashpad database, writing the report, then 176 // requesting a report from the crashpad database, writing the report, then
177 // finalizing it with the database. 177 // finalizing it with the database.
178 base::FilePath minidump_path = temp_dir_.GetPath().AppendASCII("foo-1.dmp"); 178 base::FilePath minidump_path = temp_dir_.GetPath().AppendASCII("foo-1.dmp");
179 base::File minidump_file( 179 base::File minidump_file(
180 minidump_path, base::File::FLAG_CREATE | base::File::File::FLAG_WRITE); 180 minidump_path, base::File::FLAG_CREATE | base::File::File::FLAG_WRITE);
181 crashpad_report_ = {minidump_file.GetPlatformFile(), 181 crashpad::UUID new_report_uuid;
182 crashpad::UUID(UUID::InitializeWithNewTag{}), 182 new_report_uuid.InitializeWithNew();
183 crashpad_report_ = {minidump_file.GetPlatformFile(), new_report_uuid,
183 minidump_path}; 184 minidump_path};
184 EXPECT_CALL(database_, PrepareNewCrashReport(_)) 185 EXPECT_CALL(database_, PrepareNewCrashReport(_))
185 .Times(1) 186 .Times(1)
186 .WillOnce(DoAll(SetArgPointee<0>(&crashpad_report_), 187 .WillOnce(DoAll(SetArgPointee<0>(&crashpad_report_),
187 Return(CrashReportDatabase::kNoError))); 188 Return(CrashReportDatabase::kNoError)));
188 189
189 EXPECT_CALL(collector_, 190 EXPECT_CALL(collector_,
190 WriteReportToMinidump(EqualsProto(*stability_report), _, _, 191 WriteReportToMinidump(EqualsProto(*stability_report), _, _,
191 minidump_file.GetPlatformFile())) 192 minidump_file.GetPlatformFile()))
192 .Times(1) 193 .Times(1)
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 EXPECT_EQ(kThreadId, activity.thread_id()); 478 EXPECT_EQ(kThreadId, activity.thread_id());
478 } 479 }
479 { 480 {
480 const Activity& activity = thread_state.activities(4); 481 const Activity& activity = thread_state.activities(4);
481 EXPECT_EQ(Activity::ACT_PROCESS_WAIT, activity.type()); 482 EXPECT_EQ(Activity::ACT_PROCESS_WAIT, activity.type());
482 EXPECT_EQ(kProcessId, activity.process_id()); 483 EXPECT_EQ(kProcessId, activity.process_id());
483 } 484 }
484 } 485 }
485 486
486 } // namespace browser_watcher 487 } // namespace browser_watcher
OLDNEW
« no previous file with comments | « components/browser_watcher/postmortem_minidump_writer_win_unittest.cc ('k') | third_party/crashpad/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698