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

Unified Diff: content/public/test/browser_test_utils.h

Issue 2383773002: Prevent RFH from attempting to transfer after it's been swapped out (Closed)
Patch Set: Addressed comments 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 | « content/browser/site_per_process_browsertest.cc ('k') | content/public/test/browser_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/browser_test_utils.h
diff --git a/content/public/test/browser_test_utils.h b/content/public/test/browser_test_utils.h
index 96e5791db23ffa2612bb2a19662a285647173c32..4d02c44c9e6dae39b4f98780befcbc0443ea7688 100644
--- a/content/public/test/browser_test_utils.h
+++ b/content/public/test/browser_test_utils.h
@@ -614,6 +614,10 @@ class TestNavigationManager : public WebContentsObserver {
// stack. Returns false if the request was aborted before starting.
WARN_UNUSED_RESULT bool WaitForWillStartRequest();
+ // Waits until the navigation response has been sent received. Returns false
+ // if the request was aborted before getting a response.
+ WARN_UNUSED_RESULT bool WaitForWillProcessResponse();
+
// Waits until the navigation has been finished. Will automatically resume
// navigations paused before this point.
void WaitForNavigationFinished();
@@ -632,14 +636,20 @@ class TestNavigationManager : public WebContentsObserver {
// WillStartRequest.
void OnWillStartRequest();
+ // Called when the NavigationThrottle pauses the navigation in
+ // WillProcessResponse.
+ void OnWillProcessResponse();
+
// Resumes the navigation.
void ResumeNavigation();
const GURL url_;
- bool navigation_paused_;
+ bool navigation_paused_in_will_start_;
+ bool navigation_paused_in_will_process_response_;
NavigationHandle* handle_;
bool handled_navigation_;
scoped_refptr<MessageLoopRunner> will_start_loop_runner_;
+ scoped_refptr<MessageLoopRunner> will_process_response_loop_runner_;
scoped_refptr<MessageLoopRunner> did_finish_loop_runner_;
base::WeakPtrFactory<TestNavigationManager> weak_factory_;
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | content/public/test/browser_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698