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

Unified Diff: base/trace_event/process_memory_dump_unittest.cc

Issue 2012883003: [tracing] Set whitelist values for dump provider supporting background mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@background_dump_names
Patch Set: Rebase on 2067543003. Created 4 years, 6 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/trace_event/memory_infra_background_whitelist.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/process_memory_dump_unittest.cc
diff --git a/base/trace_event/process_memory_dump_unittest.cc b/base/trace_event/process_memory_dump_unittest.cc
index e31aeaa2d6b7fd9c5ef7a9f21d53ca76c8719361..fd91f3b53245c641572c3c54d9cc11d0819d37b6 100644
--- a/base/trace_event/process_memory_dump_unittest.cc
+++ b/base/trace_event/process_memory_dump_unittest.cc
@@ -20,7 +20,9 @@ namespace trace_event {
namespace {
const MemoryDumpArgs kDetailedDumpArgs = {MemoryDumpLevelOfDetail::DETAILED};
-const char* const kTestDumpNameWhitelist[] = {"Whitelisted/TestName", nullptr};
+const char* const kTestDumpNameWhitelist[] = {
+ "Whitelisted/TestName", "Whitelisted/TestName_0x?",
+ "Whitelisted/0x?/TestName", nullptr};
TracedValue* GetHeapDump(const ProcessMemoryDump& pmd, const char* name) {
auto it = pmd.heap_dumps().find(name);
@@ -268,11 +270,9 @@ TEST(ProcessMemoryDumpTest, BackgroundModeTest) {
// Valid dump names.
EXPECT_NE(black_hole_mad, pmd->CreateAllocatorDump("Whitelisted/TestName"));
EXPECT_NE(black_hole_mad,
- pmd->CreateAllocatorDump("Whitelisted/TestName0xA1b2"));
+ pmd->CreateAllocatorDump("Whitelisted/TestName_0xA1b2"));
EXPECT_NE(black_hole_mad,
- pmd->CreateAllocatorDump("Whitelisted/TestName_123"));
- EXPECT_NE(black_hole_mad,
- pmd->CreateAllocatorDump("Whitelisted_12/0xaB/TestName"));
+ pmd->CreateAllocatorDump("Whitelisted/0xaB/TestName"));
// GetAllocatorDump is consistent.
EXPECT_EQ(black_hole_mad, pmd->GetAllocatorDump("NotWhitelisted/TestName"));
« no previous file with comments | « base/trace_event/memory_infra_background_whitelist.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698