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

Side by Side Diff: components/browser_watcher/postmortem_minidump_writer_win_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_minidump_writer.h" 5 #include "components/browser_watcher/postmortem_minidump_writer.h"
6 6
7 #include <windows.h> // NOLINT 7 #include <windows.h> // NOLINT
8 #include <dbghelp.h> 8 #include <dbghelp.h>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 15 matching lines...) Expand all
26 const char kExpectedProductName[] = "some-product_Postmortem"; 26 const char kExpectedProductName[] = "some-product_Postmortem";
27 const char kVersion[] = "51.0.2704.106"; 27 const char kVersion[] = "51.0.2704.106";
28 const char kChannel[] = "some-channel"; 28 const char kChannel[] = "some-channel";
29 const char kPlatform[] = "some-platform"; 29 const char kPlatform[] = "some-platform";
30 30
31 class WritePostmortemDumpTest : public testing::Test { 31 class WritePostmortemDumpTest : public testing::Test {
32 public: 32 public:
33 void SetUp() override { 33 void SetUp() override {
34 testing::Test::SetUp(); 34 testing::Test::SetUp();
35 35
36 expected_client_id_ = UUID(UUID::InitializeWithNewTag{}); 36 expected_client_id_.InitializeWithNew();
37 expected_report_id_ = UUID(UUID::InitializeWithNewTag{}); 37 expected_report_id_.InitializeWithNew();
38 38
39 // Create a stability report. 39 // Create a stability report.
40 // TODO(manzagop): flesh out the report once proto is more detailed. 40 // TODO(manzagop): flesh out the report once proto is more detailed.
41 ProcessState* process_state = expected_report_.add_process_states(); 41 ProcessState* process_state = expected_report_.add_process_states();
42 CodeModule* module = process_state->add_modules(); 42 CodeModule* module = process_state->add_modules();
43 module->set_base_address(1024); 43 module->set_base_address(1024);
44 module->set_code_file("some_code_file.dll"); 44 module->set_code_file("some_code_file.dll");
45 45
46 // Write the minidump. 46 // Write the minidump.
47 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 47 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 it = parameters.find("channel"); 151 it = parameters.find("channel");
152 ASSERT_NE(parameters.end(), it); 152 ASSERT_NE(parameters.end(), it);
153 ASSERT_EQ(kChannel, it->second); 153 ASSERT_EQ(kChannel, it->second);
154 154
155 it = parameters.find("plat"); 155 it = parameters.find("plat");
156 ASSERT_NE(parameters.end(), it); 156 ASSERT_NE(parameters.end(), it);
157 ASSERT_EQ(kPlatform, it->second); 157 ASSERT_EQ(kPlatform, it->second);
158 } 158 }
159 159
160 } // namespace browser_watcher 160 } // namespace browser_watcher
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698