OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/test/base/tracing.h" | 5 #include "chrome/test/base/tracing.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 std::string json_events; | 94 std::string json_events; |
95 ASSERT_TRUE(EndTracing(&json_events)); | 95 ASSERT_TRUE(EndTracing(&json_events)); |
96 | 96 |
97 // Expect the basic memory dumps to be present in the trace. | 97 // Expect the basic memory dumps to be present in the trace. |
98 EXPECT_NE(std::string::npos, json_events.find("process_totals")); | 98 EXPECT_NE(std::string::npos, json_events.find("process_totals")); |
99 EXPECT_NE(std::string::npos, json_events.find("v8")); | 99 EXPECT_NE(std::string::npos, json_events.find("v8")); |
100 EXPECT_NE(std::string::npos, json_events.find("blink_gc")); | 100 EXPECT_NE(std::string::npos, json_events.find("blink_gc")); |
101 } | 101 } |
102 }; | 102 }; |
103 | 103 |
104 IN_PROC_BROWSER_TEST_F(TracingBrowserTest, TestMemoryInfra) { | 104 // crbug.com/708487. |
| 105 #if defined(OS_MACOSX) && defined(ADDRESS_SANITIZER) |
| 106 #define MAYBE_TestMemoryInfra DISABLED_TestMemoryInfra |
| 107 #else |
| 108 #define MAYBE_TestMemoryInfra TestMemoryInfra |
| 109 #endif // defined(OS_MACOSX) && defined(ADDRESS_SANITIZER) |
| 110 IN_PROC_BROWSER_TEST_F(TracingBrowserTest, MAYBE_TestMemoryInfra) { |
105 PerformDumpMemoryTestActions( | 111 PerformDumpMemoryTestActions( |
106 base::trace_event::TraceConfig( | 112 base::trace_event::TraceConfig( |
107 base::trace_event::TraceConfigMemoryTestUtil:: | 113 base::trace_event::TraceConfigMemoryTestUtil:: |
108 GetTraceConfig_EmptyTriggers()), | 114 GetTraceConfig_EmptyTriggers()), |
109 base::trace_event::MemoryDumpLevelOfDetail::DETAILED); | 115 base::trace_event::MemoryDumpLevelOfDetail::DETAILED); |
110 } | 116 } |
111 | 117 |
112 // crbug.com/708487. | 118 // crbug.com/708487. |
113 #if defined(OS_MACOSX) && defined(ADDRESS_SANITIZER) | 119 #if defined(OS_MACOSX) && defined(ADDRESS_SANITIZER) |
114 #define MAYBE_TestBackgroundMemoryInfra DISABLED_TestBackgroundMemoryInfra | 120 #define MAYBE_TestBackgroundMemoryInfra DISABLED_TestBackgroundMemoryInfra |
115 #else | 121 #else |
116 #define MAYBE_TestBackgroundMemoryInfra TestBackgroundMemoryInfra | 122 #define MAYBE_TestBackgroundMemoryInfra TestBackgroundMemoryInfra |
117 #endif // defined(OS_MACOSX) && defined(ADDRESS_SANITIZER) | 123 #endif // defined(OS_MACOSX) && defined(ADDRESS_SANITIZER) |
118 IN_PROC_BROWSER_TEST_F(TracingBrowserTest, MAYBE_TestBackgroundMemoryInfra) { | 124 IN_PROC_BROWSER_TEST_F(TracingBrowserTest, MAYBE_TestBackgroundMemoryInfra) { |
119 PerformDumpMemoryTestActions( | 125 PerformDumpMemoryTestActions( |
120 base::trace_event::TraceConfig( | 126 base::trace_event::TraceConfig( |
121 base::trace_event::TraceConfigMemoryTestUtil:: | 127 base::trace_event::TraceConfigMemoryTestUtil:: |
122 GetTraceConfig_BackgroundTrigger(200)), | 128 GetTraceConfig_BackgroundTrigger(200)), |
123 base::trace_event::MemoryDumpLevelOfDetail::BACKGROUND); | 129 base::trace_event::MemoryDumpLevelOfDetail::BACKGROUND); |
124 } | 130 } |
125 | 131 |
126 } // namespace | 132 } // namespace |
OLD | NEW |