Remove flakiness from OOPHP renderer tests. Add tests back to android.
Previously, there was a race between starting profiling for a renderer process,
and acquiring a heap dump from the renderer process. This CL adds some logic to
wait for the renderer to start. This CL also re-adds the GPU test, as no
flakiness has been observed there.
Bug: 803696
Change-Id: I6ddc00dcf42e9d2c4292dcec50f77033de26ad7d
Reviewed-on: https://chromium-review.googlesource.com/876304
Reviewed-by: Maria Khomenko <[email protected]>
Commit-Queue: Erik Chen <[email protected]>
Cr-Commit-Position: refs/heads/master@{#530623}
diff --git a/chrome/browser/profiling_host/profiling_test_driver.h b/chrome/browser/profiling_host/profiling_test_driver.h
index 88478e6..7a082e2a 100644
--- a/chrome/browser/profiling_host/profiling_test_driver.h
+++ b/chrome/browser/profiling_host/profiling_test_driver.h
@@ -92,8 +92,17 @@
bool ValidateRendererAllocations(base::Value* dump_json);
bool ShouldProfileBrowser();
+ bool ShouldProfileRenderer();
bool HasPseudoFrames();
+ void WaitForProfilingToStartForAllRenderersUIThread();
+
+ // Android does not support nested RunLoops. Instead, it signals
+ // |wait_for_ui_thread_| when finished.
+ void WaitForProfilingToStartForAllRenderersUIThreadAndSignal();
+ void WaitForProfilingToStartForAllRenderersUIThreadCallback(
+ std::vector<base::ProcessId> results);
+
Options options_;
// Allocations made by this class. Intentionally leaked, since deallocating