Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(881)

Unified Diff: content/renderer/devtools/v8_sampling_profiler_browsertest.cc

Issue 1032633002: Unflake V8 sampling profiler tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/devtools/v8_sampling_profiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 @@ class V8SamplingProfilerTest : public RenderViewTest {
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 @@ class V8SamplingProfilerTest : public RenderViewTest {
#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(V8SamplingEventFired)) {
}
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();
« no previous file with comments | « content/renderer/devtools/v8_sampling_profiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698