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

Side by Side Diff: content/test/test_render_frame_host.h

Issue 1721813002: Adding DRP specfic UMA for FirstContentfulPaint (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing nits Created 4 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 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
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 // If set, navigations will appear to have been proxied through the
118 // data reduction proxy.
119 void set_simulate_used_data_reduction_proxy(bool enabled) {
120 simulate_fetch_via_data_reduction_proxy_ = enabled;
121 }
122
117 // Advances the RenderFrameHost (and through it the RenderFrameHostManager) to 123 // Advances the RenderFrameHost (and through it the RenderFrameHostManager) to
118 // a state where a new navigation can be committed by a renderer. Currently, 124 // a state where a new navigation can be committed by a renderer. Currently,
119 // this simulates a BeforeUnload ACK from the renderer. 125 // this simulates a BeforeUnload ACK from the renderer.
120 // PlzNavigate: this simulates a BeforeUnload ACK from the renderer, and the 126 // 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. 127 // interaction with the IO thread up until the response is ready to commit.
122 void PrepareForCommit(); 128 void PrepareForCommit();
123 129
124 // This method does the same as PrepareForCommit. 130 // This method does the same as PrepareForCommit.
125 // PlzNavigate: Beyond doing the same as PrepareForCommit, this method will 131 // 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 132 // also simulate a server redirect to |redirect_url|. If the URL is empty the
(...skipping 15 matching lines...) Expand all
142 148
143 // Computes the page ID for a pending navigation in this RenderFrameHost; 149 // Computes the page ID for a pending navigation in this RenderFrameHost;
144 int32_t ComputeNextPageID(); 150 int32_t ComputeNextPageID();
145 151
146 TestRenderFrameHostCreationObserver child_creation_observer_; 152 TestRenderFrameHostCreationObserver child_creation_observer_;
147 153
148 std::string contents_mime_type_; 154 std::string contents_mime_type_;
149 155
150 // See set_simulate_history_list_was_cleared() above. 156 // See set_simulate_history_list_was_cleared() above.
151 bool simulate_history_list_was_cleared_; 157 bool simulate_history_list_was_cleared_;
152 158 bool simulate_fetch_via_data_reduction_proxy_;
153 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); 159 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost);
tbansal1 2016/03/08 22:14:44 Line break before this macro.
RyanSturm 2016/03/10 00:37:58 Done.
154 }; 160 };
155 161
156 } // namespace content 162 } // namespace content
157 163
158 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ 164 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698