OLD | NEW |
---|---|
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 Loading... | |
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-page navigation, ie fragment navigations or | 119 // Simulates the commit of a same-page navigation, ie fragment navigations or |
120 // pushState/popState navigations. | 120 // pushState/popState navigations. |
121 virtual void CommitSamePage(); | 121 virtual void CommitSamePage(); |
122 | 122 |
123 // Must be called after the simulated navigation commits. Returns the render | |
clamy
2017/03/20 15:50:10
I would rephrase that as "Must be called after the
Charlie Harrison
2017/03/20 16:34:04
Done.
| |
124 // frame host the navigation commit 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 Loading... | |
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_ |
OLD | NEW |