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

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

Issue 2619063003: Update viewport_meta setting on any navigation. (Closed)
Patch Set: Bring back pending_entry_ null check Created 3 years, 11 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 (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_TEST_TEST_RENDER_VIEW_HOST_H_ 5 #ifndef CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_
6 #define CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_ 6 #define CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 void TestOnUpdateStateWithFile(const base::FilePath& file_path); 198 void TestOnUpdateStateWithFile(const base::FilePath& file_path);
199 199
200 void TestOnStartDragging(const DropData& drop_data); 200 void TestOnStartDragging(const DropData& drop_data);
201 201
202 // If set, *delete_counter is incremented when this object destructs. 202 // If set, *delete_counter is incremented when this object destructs.
203 void set_delete_counter(int* delete_counter) { 203 void set_delete_counter(int* delete_counter) {
204 delete_counter_ = delete_counter; 204 delete_counter_ = delete_counter;
205 } 205 }
206 206
207 void set_webkit_preferences_changed_counter(int* counter) {
Charlie Reis 2017/01/12 19:37:54 nit: Please add comments similar to set_delete_cou
aelias_OOO_until_Jul13 2017/01/12 21:19:13 Done.
208 webkit_preferences_changed_counter_ = counter;
209 }
210
207 // The opener frame route id passed to CreateRenderView(). 211 // The opener frame route id passed to CreateRenderView().
208 int opener_frame_route_id() const { return opener_frame_route_id_; } 212 int opener_frame_route_id() const { return opener_frame_route_id_; }
209 213
210 // RenderWidgetHost overrides (same value, but in the Mock* type) 214 // RenderWidgetHost overrides (same value, but in the Mock* type)
211 MockRenderProcessHost* GetProcess() const override; 215 MockRenderProcessHost* GetProcess() const override;
212 216
213 bool CreateTestRenderView(const base::string16& frame_name, 217 bool CreateTestRenderView(const base::string16& frame_name,
214 int opener_frame_route_id, 218 int opener_frame_route_id,
215 int proxy_route_id, 219 int proxy_route_id,
216 bool window_was_created_with_opener) override; 220 bool window_was_created_with_opener) override;
217 221
218 // RenderViewHost overrides -------------------------------------------------- 222 // RenderViewHost overrides --------------------------------------------------
219 223
220 bool CreateRenderView(int opener_frame_route_id, 224 bool CreateRenderView(int opener_frame_route_id,
221 int proxy_route_id, 225 int proxy_route_id,
222 const FrameReplicationState& replicated_frame_state, 226 const FrameReplicationState& replicated_frame_state,
223 bool window_was_created_with_opener) override; 227 bool window_was_created_with_opener) override;
228 void OnWebkitPreferencesChanged() override;
224 229
225 private: 230 private:
226 FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, FilterNavigate); 231 FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, FilterNavigate);
227 232
228 void SendNavigateWithTransitionAndResponseCode(const GURL& url, 233 void SendNavigateWithTransitionAndResponseCode(const GURL& url,
229 ui::PageTransition transition, 234 ui::PageTransition transition,
230 int response_code); 235 int response_code);
231 236
232 // Calls OnNavigate on the RenderViewHost with the given information. 237 // Calls OnNavigate on the RenderViewHost with the given information.
233 // Sets the rest of the parameters in the message to the "typical" values. 238 // Sets the rest of the parameters in the message to the "typical" values.
234 // This is a helper function for simulating the most common types of loads. 239 // This is a helper function for simulating the most common types of loads.
235 void SendNavigateWithParameters( 240 void SendNavigateWithParameters(
236 const GURL& url, 241 const GURL& url,
237 ui::PageTransition transition, 242 ui::PageTransition transition,
238 const GURL& original_request_url, 243 const GURL& original_request_url,
239 int response_code, 244 int response_code,
240 const base::FilePath* file_path_for_history_item); 245 const base::FilePath* file_path_for_history_item);
241 246
242 // See set_delete_counter() above. May be NULL. 247 // See set_delete_counter() above. May be NULL.
243 int* delete_counter_; 248 int* delete_counter_;
244 249
250 int* webkit_preferences_changed_counter_;
251
245 // See opener_frame_route_id() above. 252 // See opener_frame_route_id() above.
246 int opener_frame_route_id_; 253 int opener_frame_route_id_;
247 254
248 DISALLOW_COPY_AND_ASSIGN(TestRenderViewHost); 255 DISALLOW_COPY_AND_ASSIGN(TestRenderViewHost);
249 }; 256 };
250 257
251 #if defined(COMPILER_MSVC) 258 #if defined(COMPILER_MSVC)
252 #pragma warning(pop) 259 #pragma warning(pop)
253 #endif 260 #endif
254 261
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 private: 301 private:
295 typedef std::unique_ptr<ui::test::ScopedSetSupportedScaleFactors> 302 typedef std::unique_ptr<ui::test::ScopedSetSupportedScaleFactors>
296 ScopedSetSupportedScaleFactors; 303 ScopedSetSupportedScaleFactors;
297 ScopedSetSupportedScaleFactors scoped_set_supported_scale_factors_; 304 ScopedSetSupportedScaleFactors scoped_set_supported_scale_factors_;
298 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImplTestHarness); 305 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImplTestHarness);
299 }; 306 };
300 307
301 } // namespace content 308 } // namespace content
302 309
303 #endif // CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_ 310 #endif // CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698