OLD | NEW |
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 Loading... |
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 |
OLD | NEW |