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

Unified Diff: chrome/browser/prerender/prerender_test_utils.h

Issue 2434813004: Prerender: remove possible race in browser tests to improve flakiness. (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | chrome/browser/prerender/prerender_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_test_utils.h
diff --git a/chrome/browser/prerender/prerender_test_utils.h b/chrome/browser/prerender/prerender_test_utils.h
index b731c19bb6110e51f28caf022401a2262b1b354e..6da2995350d8e33b6fbb730aad402ced7d318621 100644
--- a/chrome/browser/prerender/prerender_test_utils.h
+++ b/chrome/browser/prerender/prerender_test_utils.h
@@ -153,9 +153,9 @@ class TestPrerender : public PrerenderContents::Observer,
TestPrerenderContents* contents() const { return contents_; }
int number_of_loads() const { return number_of_loads_; }
- void WaitForCreate() { create_loop_.Run(); }
- void WaitForStart() { start_loop_.Run(); }
- void WaitForStop() { stop_loop_.Run(); }
+ void WaitForCreate();
+ void WaitForStart();
+ void WaitForStop();
// Waits for |number_of_loads()| to be at least |expected_number_of_loads| OR
// for the prerender to stop running (just to avoid a timeout if the prerender
@@ -179,6 +179,9 @@ class TestPrerender : public PrerenderContents::Observer,
int expected_number_of_loads_;
std::unique_ptr<base::RunLoop> load_waiter_;
+ bool started_;
+ bool stopped_;
+
base::RunLoop create_loop_;
base::RunLoop start_loop_;
base::RunLoop stop_loop_;
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698