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

Unified Diff: components/browser_watcher/stability_report_extractor_unittest.cc

Issue 2966563004: StabilityReport proto changes for multi-process support (Closed)
Patch Set: Merge Created 3 years, 4 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 | « components/browser_watcher/stability_report_extractor.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/browser_watcher/stability_report_extractor_unittest.cc
diff --git a/components/browser_watcher/stability_report_extractor_unittest.cc b/components/browser_watcher/stability_report_extractor_unittest.cc
index d5f50b631b88ec3ea3a2b18ceab55df454dc4d1a..1c3b5298779c463f91a5bc0f698629d8b0e05f24 100644
--- a/components/browser_watcher/stability_report_extractor_unittest.cc
+++ b/components/browser_watcher/stability_report_extractor_unittest.cc
@@ -341,8 +341,11 @@ TEST_F(StabilityReportExtractorTest, ProcessUserDataCollection) {
StabilityReport report;
ASSERT_EQ(SUCCESS, Extract(debug_file_path(), &report));
- // Validate the report's user data.
- const auto& collected_data = report.global_data();
+ // We expect a single process.
+ ASSERT_EQ(1, report.process_states_size());
+
+ // Validate the report contains the process' data.
+ const auto& collected_data = report.process_states(0).data();
ASSERT_EQ(kInternalProcessDatums + 8U, collected_data.size());
ASSERT_TRUE(base::ContainsKey(collected_data, "raw"));
@@ -396,6 +399,7 @@ TEST_F(StabilityReportExtractorTest, FieldTrialCollection) {
// Collect the stability report.
StabilityReport report;
ASSERT_EQ(SUCCESS, Extract(debug_file_path(), &report));
+ ASSERT_EQ(1, report.process_states_size());
// Validate the report's experiment and global data.
ASSERT_EQ(2, report.field_trials_size());
@@ -406,7 +410,7 @@ TEST_F(StabilityReportExtractorTest, FieldTrialCollection) {
report.field_trials(1).group_id());
// Expect 1 key/value pair.
- const auto& collected_data = report.global_data();
+ const auto& collected_data = report.process_states(0).data();
EXPECT_EQ(kInternalProcessDatums + 1U, collected_data.size());
EXPECT_TRUE(base::ContainsKey(collected_data, "string"));
}
« no previous file with comments | « components/browser_watcher/stability_report_extractor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698