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

Unified Diff: base/debug/activity_analyzer_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 | « base/debug/activity_analyzer.cc ('k') | chrome/browser/chrome_browser_field_trials_desktop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/activity_analyzer_unittest.cc
diff --git a/base/debug/activity_analyzer_unittest.cc b/base/debug/activity_analyzer_unittest.cc
index aa1cf4c0547e72463f5ec68423003674a0cabf4f..9525ed7a4eae565eb379b504abc38ee73b41b995 100644
--- a/base/debug/activity_analyzer_unittest.cc
+++ b/base/debug/activity_analyzer_unittest.cc
@@ -370,9 +370,9 @@ TEST_F(ActivityAnalyzerTest, GlobalUserDataTest) {
TEST_F(ActivityAnalyzerTest, GlobalModulesTest) {
GlobalActivityTracker::CreateWithLocalMemory(kMemorySize, 0, "", 3, 0);
+ GlobalActivityTracker* global = GlobalActivityTracker::Get();
- PersistentMemoryAllocator* allocator =
- GlobalActivityTracker::Get()->allocator();
+ PersistentMemoryAllocator* allocator = global->allocator();
GlobalActivityAnalyzer global_analyzer(
std::make_unique<PersistentMemoryAllocator>(
const_cast<void*>(allocator->data()), allocator->size(), 0, 0, "",
@@ -389,9 +389,9 @@ TEST_F(ActivityAnalyzerTest, GlobalModulesTest) {
info1.file = "anything";
info1.debug_file = "elsewhere";
- GlobalActivityTracker::Get()->RecordModuleInfo(info1);
+ global->RecordModuleInfo(info1);
std::vector<GlobalActivityTracker::ModuleInfo> modules1;
- modules1 = global_analyzer.GetModules();
+ modules1 = global_analyzer.GetModules(global_analyzer.GetFirstProcess());
ASSERT_EQ(1U, modules1.size());
GlobalActivityTracker::ModuleInfo& stored1a = modules1[0];
EXPECT_EQ(info1.is_loaded, stored1a.is_loaded);
@@ -405,8 +405,8 @@ TEST_F(ActivityAnalyzerTest, GlobalModulesTest) {
EXPECT_EQ(info1.debug_file, stored1a.debug_file);
info1.is_loaded = false;
- GlobalActivityTracker::Get()->RecordModuleInfo(info1);
- modules1 = global_analyzer.GetModules();
+ global->RecordModuleInfo(info1);
+ modules1 = global_analyzer.GetModules(global_analyzer.GetFirstProcess());
ASSERT_EQ(1U, modules1.size());
GlobalActivityTracker::ModuleInfo& stored1b = modules1[0];
EXPECT_EQ(info1.is_loaded, stored1b.is_loaded);
@@ -430,9 +430,9 @@ TEST_F(ActivityAnalyzerTest, GlobalModulesTest) {
info2.file = "nothing";
info2.debug_file = "farewell";
- GlobalActivityTracker::Get()->RecordModuleInfo(info2);
+ global->RecordModuleInfo(info2);
std::vector<GlobalActivityTracker::ModuleInfo> modules2;
- modules2 = global_analyzer.GetModules();
+ modules2 = global_analyzer.GetModules(global_analyzer.GetFirstProcess());
ASSERT_EQ(2U, modules2.size());
GlobalActivityTracker::ModuleInfo& stored2 = modules2[1];
EXPECT_EQ(info2.is_loaded, stored2.is_loaded);
« no previous file with comments | « base/debug/activity_analyzer.cc ('k') | chrome/browser/chrome_browser_field_trials_desktop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698