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

Side by Side Diff: base/trace_event/trace_config_unittest.cc

Issue 2952693002: Revert of Change memory dumps to not use periodic dumps by default. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « base/trace_event/trace_config.cc ('k') | content/browser/tracing/tracing_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/trace_event/memory_dump_manager.h" 10 #include "base/trace_event/memory_dump_manager.h"
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 EXPECT_EQ( 690 EXPECT_EQ(
691 TraceConfig::MemoryDumpConfig::HeapProfiler :: 691 TraceConfig::MemoryDumpConfig::HeapProfiler ::
692 kDefaultBreakdownThresholdBytes, 692 kDefaultBreakdownThresholdBytes,
693 tc.memory_dump_config().heap_profiler_options.breakdown_threshold_bytes); 693 tc.memory_dump_config().heap_profiler_options.breakdown_threshold_bytes);
694 } 694 }
695 695
696 TEST(TraceConfigTest, LegacyStringToMemoryDumpConfig) { 696 TEST(TraceConfigTest, LegacyStringToMemoryDumpConfig) {
697 TraceConfig tc(MemoryDumpManager::kTraceCategory, ""); 697 TraceConfig tc(MemoryDumpManager::kTraceCategory, "");
698 EXPECT_TRUE(tc.IsCategoryGroupEnabled(MemoryDumpManager::kTraceCategory)); 698 EXPECT_TRUE(tc.IsCategoryGroupEnabled(MemoryDumpManager::kTraceCategory));
699 EXPECT_NE(std::string::npos, tc.ToString().find("memory_dump_config")); 699 EXPECT_NE(std::string::npos, tc.ToString().find("memory_dump_config"));
700 EXPECT_EQ(0u, tc.memory_dump_config().triggers.size()); 700 EXPECT_EQ(1u, tc.memory_dump_config().triggers.size());
701 EXPECT_EQ( 701 EXPECT_EQ(
702 TraceConfig::MemoryDumpConfig::HeapProfiler :: 702 TraceConfig::MemoryDumpConfig::HeapProfiler ::
703 kDefaultBreakdownThresholdBytes, 703 kDefaultBreakdownThresholdBytes,
704 tc.memory_dump_config().heap_profiler_options.breakdown_threshold_bytes); 704 tc.memory_dump_config().heap_profiler_options.breakdown_threshold_bytes);
705 } 705 }
706 706
707 } // namespace trace_event 707 } // namespace trace_event
708 } // namespace base 708 } // namespace base
OLDNEW
« no previous file with comments | « base/trace_event/trace_config.cc ('k') | content/browser/tracing/tracing_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698