| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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/memory/ref_counted_memory.h" |
| 8 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 9 #include "base/trace_event/trace_buffer.h" | 10 #include "base/trace_event/trace_buffer.h" |
| 10 #include "base/trace_event/trace_event.h" | 11 #include "base/trace_event/trace_event.h" |
| 11 #include "content/public/test/render_view_test.h" | 12 #include "content/public/test/render_view_test.h" |
| 12 #include "content/renderer/devtools/v8_sampling_profiler.h" | 13 #include "content/renderer/devtools/v8_sampling_profiler.h" |
| 13 | 14 |
| 14 using base::DictionaryValue; | 15 using base::DictionaryValue; |
| 15 using base::ListValue; | 16 using base::ListValue; |
| 16 using base::Value; | 17 using base::Value; |
| 17 using base::trace_event::TraceConfig; | 18 using base::trace_event::TraceConfig; |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 } | 141 } |
| 141 | 142 |
| 142 TEST_F(V8SamplingProfilerTest, V8SamplingSamplesCollected) { | 143 TEST_F(V8SamplingProfilerTest, V8SamplingSamplesCollected) { |
| 143 CollectTrace(0, 1); | 144 CollectTrace(0, 1); |
| 144 int sample_events_count = CountEvents("V8Sample"); | 145 int sample_events_count = CountEvents("V8Sample"); |
| 145 CHECK_LT(0, sample_events_count); | 146 CHECK_LT(0, sample_events_count); |
| 146 base::RunLoop().RunUntilIdle(); | 147 base::RunLoop().RunUntilIdle(); |
| 147 } | 148 } |
| 148 | 149 |
| 149 } // namespace content | 150 } // namespace content |
| OLD | NEW |