| Index: content/renderer/devtools/v8_sampling_profiler_browsertest.cc
|
| diff --git a/content/renderer/devtools/v8_sampling_profiler_browsertest.cc b/content/renderer/devtools/v8_sampling_profiler_browsertest.cc
|
| index ba1b0e56cfb46fc38a02cae5181870e4d8446773..1ccae8ca3652ddf0300138768e002bd93f320796 100644
|
| --- a/content/renderer/devtools/v8_sampling_profiler_browsertest.cc
|
| +++ b/content/renderer/devtools/v8_sampling_profiler_browsertest.cc
|
| @@ -77,9 +77,10 @@
|
| flush_complete_event->Signal();
|
| }
|
|
|
| - void CollectTrace() {
|
| + void CollectTrace(int code_added_events, int sample_events) {
|
| TraceLog* trace_log = TraceLog::GetInstance();
|
| - sampling_profiler_->EnableSamplingEventForTesting();
|
| + sampling_profiler_->EnableSamplingEventForTesting(code_added_events,
|
| + sample_events);
|
| trace_log->SetEnabled(
|
| CategoryFilter(TRACE_DISABLED_BY_DEFAULT("v8.cpu_profile")),
|
| TraceLog::RECORDING_MODE, TraceOptions());
|
| @@ -129,7 +130,7 @@
|
| #endif
|
|
|
| TEST_F(V8SamplingProfilerTest, MAYBE(V8SamplingEventFired)) {
|
| - sampling_profiler_->EnableSamplingEventForTesting();
|
| + sampling_profiler_->EnableSamplingEventForTesting(0, 0);
|
| TraceLog::GetInstance()->SetEnabled(
|
| CategoryFilter(TRACE_DISABLED_BY_DEFAULT("v8.cpu_profile")),
|
| TraceLog::RECORDING_MODE, TraceOptions());
|
| @@ -139,14 +140,14 @@
|
| }
|
|
|
| TEST_F(V8SamplingProfilerTest, MAYBE(V8SamplingJitCodeEventsCollected)) {
|
| - CollectTrace();
|
| + CollectTrace(1, 0);
|
| int jit_code_added_events_count = CountEvents("JitCodeAdded");
|
| CHECK_LT(0, jit_code_added_events_count);
|
| base::RunLoop().RunUntilIdle();
|
| }
|
|
|
| TEST_F(V8SamplingProfilerTest, MAYBE(V8SamplingSamplesCollected)) {
|
| - CollectTrace();
|
| + CollectTrace(0, 1);
|
| int sample_events_count = CountEvents("V8Sample");
|
| CHECK_LT(0, sample_events_count);
|
| base::RunLoop().RunUntilIdle();
|
|
|