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

Side by Side Diff: content/public/test/navigation_simulator.h

Issue 2691423006: Introduce the ThrottleManager (Closed)
Patch Set: engedy review Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_TEST_NAVIGATION_SIMULATOR_H_ 5 #ifndef CONTENT_PUBLIC_TEST_NAVIGATION_SIMULATOR_H_
6 #define CONTENT_PUBLIC_TEST_NAVIGATION_SIMULATOR_H_ 6 #define CONTENT_PUBLIC_TEST_NAVIGATION_SIMULATOR_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // Simulates the navigation failing with the error code |error_code|. 113 // Simulates the navigation failing with the error code |error_code|.
114 virtual void Fail(int error_code); 114 virtual void Fail(int error_code);
115 115
116 // Simulates the commit of an error page following a navigation failure. 116 // Simulates the commit of an error page following a navigation failure.
117 virtual void CommitErrorPage(); 117 virtual void CommitErrorPage();
118 118
119 // Simulates the commit of a same-document navigation, ie fragment navigations 119 // Simulates the commit of a same-document navigation, ie fragment navigations
120 // or pushState/popState navigations. 120 // or pushState/popState navigations.
121 virtual void CommitSameDocument(); 121 virtual void CommitSameDocument();
122 122
123 // Must be called after the simulated navigation or an error page has
124 // committed. Returns the RenderFrameHost the navigation committed in.
125 virtual RenderFrameHost* GetFinalRenderFrameHost();
126
123 // -------------------------------------------------------------------------- 127 // --------------------------------------------------------------------------
124 128
125 // The following functions are used to specify the parameters of the 129 // The following functions are used to specify the parameters of the
126 // navigation. Changes should be made before calling |Start|, unless they are 130 // navigation. Changes should be made before calling |Start|, unless they are
127 // meant to apply to a redirect. In that case, they should be made before 131 // meant to apply to a redirect. In that case, they should be made before
128 // calling |Redirect|. 132 // calling |Redirect|.
129 133
130 // The following parameters are constant during the navigation and may only be 134 // The following parameters are constant during the navigation and may only be
131 // specified before calling |Start|. 135 // specified before calling |Start|.
132 virtual void SetTransition(ui::PageTransition transition); 136 virtual void SetTransition(ui::PageTransition transition);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 204
201 // Closure that is set when WaitForThrottleChecksComplete is called. 205 // Closure that is set when WaitForThrottleChecksComplete is called.
202 base::Closure throttle_checks_wait_closure_; 206 base::Closure throttle_checks_wait_closure_;
203 207
204 base::WeakPtrFactory<NavigationSimulator> weak_factory_; 208 base::WeakPtrFactory<NavigationSimulator> weak_factory_;
205 }; 209 };
206 210
207 } // namespace content 211 } // namespace content
208 212
209 #endif // CONTENT_PUBLIC_TEST_NAVIGATION_SIMULATOR_H_ 213 #endif // CONTENT_PUBLIC_TEST_NAVIGATION_SIMULATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698