Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_TEST_TEST_RENDER_FRAME_HOST_H_ | 5 #ifndef CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
| 6 #define CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ | 6 #define CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 107 void DidEnforceStrictMixedContentChecking(); | 107 void DidEnforceStrictMixedContentChecking(); |
| 108 | 108 |
| 109 // If set, navigations will appear to have cleared the history list in the | 109 // If set, navigations will appear to have cleared the history list in the |
| 110 // RenderFrame | 110 // RenderFrame |
| 111 // (FrameHostMsg_DidCommitProvisionalLoad_Params::history_list_was_cleared). | 111 // (FrameHostMsg_DidCommitProvisionalLoad_Params::history_list_was_cleared). |
| 112 // False by default. | 112 // False by default. |
| 113 void set_simulate_history_list_was_cleared(bool cleared) { | 113 void set_simulate_history_list_was_cleared(bool cleared) { |
| 114 simulate_history_list_was_cleared_ = cleared; | 114 simulate_history_list_was_cleared_ = cleared; |
| 115 } | 115 } |
| 116 | 116 |
| 117 void set_simulate_fetch_via_data_reduction_proxy(bool enabled) { | |
|
bengr
2016/02/26 22:53:58
Add a comment.
RyanSturm
2016/03/01 19:36:04
Done.
| |
| 118 simulate_fetch_via_data_reduction_proxy_ = enabled; | |
| 119 } | |
| 120 | |
| 117 // Advances the RenderFrameHost (and through it the RenderFrameHostManager) to | 121 // Advances the RenderFrameHost (and through it the RenderFrameHostManager) to |
| 118 // a state where a new navigation can be committed by a renderer. Currently, | 122 // a state where a new navigation can be committed by a renderer. Currently, |
| 119 // this simulates a BeforeUnload ACK from the renderer. | 123 // this simulates a BeforeUnload ACK from the renderer. |
| 120 // PlzNavigate: this simulates a BeforeUnload ACK from the renderer, and the | 124 // PlzNavigate: this simulates a BeforeUnload ACK from the renderer, and the |
| 121 // interaction with the IO thread up until the response is ready to commit. | 125 // interaction with the IO thread up until the response is ready to commit. |
| 122 void PrepareForCommit(); | 126 void PrepareForCommit(); |
| 123 | 127 |
| 124 // This method does the same as PrepareForCommit. | 128 // This method does the same as PrepareForCommit. |
| 125 // PlzNavigate: Beyond doing the same as PrepareForCommit, this method will | 129 // PlzNavigate: Beyond doing the same as PrepareForCommit, this method will |
| 126 // also simulate a server redirect to |redirect_url|. If the URL is empty the | 130 // also simulate a server redirect to |redirect_url|. If the URL is empty the |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 142 | 146 |
| 143 // Computes the page ID for a pending navigation in this RenderFrameHost; | 147 // Computes the page ID for a pending navigation in this RenderFrameHost; |
| 144 int32_t ComputeNextPageID(); | 148 int32_t ComputeNextPageID(); |
| 145 | 149 |
| 146 TestRenderFrameHostCreationObserver child_creation_observer_; | 150 TestRenderFrameHostCreationObserver child_creation_observer_; |
| 147 | 151 |
| 148 std::string contents_mime_type_; | 152 std::string contents_mime_type_; |
| 149 | 153 |
| 150 // See set_simulate_history_list_was_cleared() above. | 154 // See set_simulate_history_list_was_cleared() above. |
| 151 bool simulate_history_list_was_cleared_; | 155 bool simulate_history_list_was_cleared_; |
| 152 | 156 bool simulate_fetch_via_data_reduction_proxy_; |
| 153 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); | 157 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); |
| 154 }; | 158 }; |
| 155 | 159 |
| 156 } // namespace content | 160 } // namespace content |
| 157 | 161 |
| 158 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ | 162 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
| OLD | NEW |