OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_TEST_RENDERER_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ |
6 #define CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ | 6 #define CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 | 89 |
90 // Simulates a navigation to |url| failing with the error code |error_code|. | 90 // Simulates a navigation to |url| failing with the error code |error_code|. |
91 virtual void SimulateNavigationError(const GURL& url, int error_code) = 0; | 91 virtual void SimulateNavigationError(const GURL& url, int error_code) = 0; |
92 | 92 |
93 // Simulates the commit of an error page following a navigation failure. | 93 // Simulates the commit of an error page following a navigation failure. |
94 virtual void SimulateNavigationErrorPageCommit() = 0; | 94 virtual void SimulateNavigationErrorPageCommit() = 0; |
95 | 95 |
96 // Simulates a navigation stopping in the RenderFrameHost. | 96 // Simulates a navigation stopping in the RenderFrameHost. |
97 virtual void SimulateNavigationStop() = 0; | 97 virtual void SimulateNavigationStop() = 0; |
98 | 98 |
99 // If we are doing a cross-site navigation, this simulates the current | |
100 // RenderFrameHost notifying that it has unloaded so the pending | |
clamy
2016/08/31 18:23:21
nit: s/it has unloaded/BeforeUnload has executed
scottmg
2016/08/31 19:01:47
Done.
| |
101 // RenderFrameHost is resumed and can navigate. Note that for some synchronous | |
clamy
2016/08/31 18:23:21
The Note... sentence seems to belong to the PlzNav
scottmg
2016/08/31 19:01:46
Done.
| |
102 // navigations (about:blank, javascript urls, etc.), no simulation of the | |
103 // network stack is required. | |
104 // PlzNavigate: This simulates a BeforeUnload ACK from the renderer, and the | |
105 // interaction with the IO thread up until the response is ready to commit. | |
106 virtual void PrepareForCommitIfNecessary() = 0; | |
107 | |
99 // Calls OnDidCommitProvisionalLoad on the RenderFrameHost with the given | 108 // Calls OnDidCommitProvisionalLoad on the RenderFrameHost with the given |
100 // information with various sets of parameters. These are helper functions for | 109 // information with various sets of parameters. These are helper functions for |
101 // simulating the most common types of loads. | 110 // simulating the most common types of loads. |
102 // | 111 // |
103 // Guidance for calling these: | 112 // Guidance for calling these: |
104 // - nav_entry_id should be 0 if simulating a renderer-initiated navigation; | 113 // - nav_entry_id should be 0 if simulating a renderer-initiated navigation; |
105 // if simulating a browser-initiated one, pass the GetUniqueID() value of | 114 // if simulating a browser-initiated one, pass the GetUniqueID() value of |
106 // the NavigationController's PendingEntry. | 115 // the NavigationController's PendingEntry. |
107 // - did_create_new_entry should be true if simulating a navigation that | 116 // - did_create_new_entry should be true if simulating a navigation that |
108 // created a new navigation entry; false for history navigations, reloads, | 117 // created a new navigation entry; false for history navigations, reloads, |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
282 std::unique_ptr<aura::test::AuraTestHelper> aura_test_helper_; | 291 std::unique_ptr<aura::test::AuraTestHelper> aura_test_helper_; |
283 #endif | 292 #endif |
284 RenderViewHostTestEnabler rvh_test_enabler_; | 293 RenderViewHostTestEnabler rvh_test_enabler_; |
285 | 294 |
286 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); | 295 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); |
287 }; | 296 }; |
288 | 297 |
289 } // namespace content | 298 } // namespace content |
290 | 299 |
291 #endif // CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ | 300 #endif // CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ |
OLD | NEW |