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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 RequestGlobalDumpAndWait(true /* from_renderer_thread */, | 295 RequestGlobalDumpAndWait(true /* from_renderer_thread */, |
296 MemoryDumpType::PERIODIC_INTERVAL, | 296 MemoryDumpType::PERIODIC_INTERVAL, |
297 MemoryDumpLevelOfDetail::LIGHT); | 297 MemoryDumpLevelOfDetail::LIGHT); |
298 | 298 |
299 DisableTracing(); | 299 DisableTracing(); |
300 } | 300 } |
301 | 301 |
302 #endif // !defined(GOOGLE_CHROME_BUILD) | 302 #endif // !defined(GOOGLE_CHROME_BUILD) |
303 | 303 |
304 // Non-deterministic races under TSan. crbug.com/529678 | 304 // Non-deterministic races under TSan. crbug.com/529678 |
305 #if defined(THREAD_SANITIZER) | 305 // Flaky on Linux. crbug.com/709524 |
| 306 #if defined(THREAD_SANITIZER) || defined(OS_LINUX) |
306 #define MAYBE_BrowserInitiatedDump DISABLED_BrowserInitiatedDump | 307 #define MAYBE_BrowserInitiatedDump DISABLED_BrowserInitiatedDump |
307 #else | 308 #else |
308 #define MAYBE_BrowserInitiatedDump BrowserInitiatedDump | 309 #define MAYBE_BrowserInitiatedDump BrowserInitiatedDump |
309 #endif | 310 #endif |
310 // Checks that a memory dump initiated from a the main browser thread ends up in | 311 // Checks that a memory dump initiated from a the main browser thread ends up in |
311 // a successful dump. | 312 // a successful dump. |
312 IN_PROC_BROWSER_TEST_F(MemoryTracingTest, MAYBE_BrowserInitiatedDump) { | 313 IN_PROC_BROWSER_TEST_F(MemoryTracingTest, MAYBE_BrowserInitiatedDump) { |
313 Navigate(shell()); | 314 Navigate(shell()); |
314 | 315 |
315 EXPECT_CALL(*mock_dump_provider_, OnMemoryDump(_,_)).WillOnce(Return(true)); | 316 EXPECT_CALL(*mock_dump_provider_, OnMemoryDump(_,_)).WillOnce(Return(true)); |
316 EXPECT_CALL(*this, OnMemoryDumpDone(_, true /* success */)); | 317 EXPECT_CALL(*this, OnMemoryDumpDone(_, true /* success */)); |
317 | 318 |
318 EnableMemoryTracing(); | 319 EnableMemoryTracing(); |
319 RequestGlobalDumpAndWait(false /* from_renderer_thread */, | 320 RequestGlobalDumpAndWait(false /* from_renderer_thread */, |
320 MemoryDumpType::EXPLICITLY_TRIGGERED, | 321 MemoryDumpType::EXPLICITLY_TRIGGERED, |
321 MemoryDumpLevelOfDetail::DETAILED); | 322 MemoryDumpLevelOfDetail::DETAILED); |
322 DisableTracing(); | 323 DisableTracing(); |
323 } | 324 } |
324 | 325 |
325 } // namespace content | 326 } // namespace content |
OLD | NEW |