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 #include "content/public/test/render_view_test.h" | 5 #include "content/public/test/render_view_test.h" |
6 | 6 |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "content/common/dom_storage/dom_storage_types.h" | 8 #include "content/common/dom_storage/dom_storage_types.h" |
| 9 #include "content/common/frame_messages.h" |
9 #include "content/common/input_messages.h" | 10 #include "content/common/input_messages.h" |
10 #include "content/common/view_messages.h" | 11 #include "content/common/view_messages.h" |
11 #include "content/public/browser/native_web_keyboard_event.h" | 12 #include "content/public/browser/native_web_keyboard_event.h" |
12 #include "content/public/common/renderer_preferences.h" | 13 #include "content/public/common/renderer_preferences.h" |
13 #include "content/public/renderer/history_item_serialization.h" | 14 #include "content/public/renderer/history_item_serialization.h" |
14 #include "content/renderer/render_thread_impl.h" | 15 #include "content/renderer/render_thread_impl.h" |
15 #include "content/renderer/render_view_impl.h" | 16 #include "content/renderer/render_view_impl.h" |
16 #include "content/renderer/renderer_main_platform_delegate.h" | 17 #include "content/renderer/renderer_main_platform_delegate.h" |
17 #include "content/renderer/renderer_webkitplatformsupport_impl.h" | 18 #include "content/renderer/renderer_webkitplatformsupport_impl.h" |
18 #include "content/test/mock_render_process.h" | 19 #include "content/test/mock_render_process.h" |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 | 316 |
316 void RenderViewTest::Reload(const GURL& url) { | 317 void RenderViewTest::Reload(const GURL& url) { |
317 ViewMsg_Navigate_Params params; | 318 ViewMsg_Navigate_Params params; |
318 params.url = url; | 319 params.url = url; |
319 params.navigation_type = ViewMsg_Navigate_Type::RELOAD; | 320 params.navigation_type = ViewMsg_Navigate_Type::RELOAD; |
320 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 321 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
321 impl->OnNavigate(params); | 322 impl->OnNavigate(params); |
322 } | 323 } |
323 | 324 |
324 uint32 RenderViewTest::GetNavigationIPCType() { | 325 uint32 RenderViewTest::GetNavigationIPCType() { |
325 return ViewHostMsg_FrameNavigate::ID; | 326 return FrameHostMsg_DidCommitProvisionalLoad::ID; |
326 } | 327 } |
327 | 328 |
328 void RenderViewTest::Resize(gfx::Size new_size, | 329 void RenderViewTest::Resize(gfx::Size new_size, |
329 gfx::Rect resizer_rect, | 330 gfx::Rect resizer_rect, |
330 bool is_fullscreen) { | 331 bool is_fullscreen) { |
331 ViewMsg_Resize_Params params; | 332 ViewMsg_Resize_Params params; |
332 params.screen_info = blink::WebScreenInfo(); | 333 params.screen_info = blink::WebScreenInfo(); |
333 params.new_size = new_size; | 334 params.new_size = new_size; |
334 params.physical_backing_size = new_size; | 335 params.physical_backing_size = new_size; |
335 params.overdraw_bottom_height = 0.f; | 336 params.overdraw_bottom_height = 0.f; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 | 381 |
381 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params); | 382 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params); |
382 OnMessageReceived(navigate_message); | 383 OnMessageReceived(navigate_message); |
383 | 384 |
384 // The load actually happens asynchronously, so we pump messages to process | 385 // The load actually happens asynchronously, so we pump messages to process |
385 // the pending continuation. | 386 // the pending continuation. |
386 ProcessPendingMessages(); | 387 ProcessPendingMessages(); |
387 } | 388 } |
388 | 389 |
389 } // namespace content | 390 } // namespace content |
OLD | NEW |