| 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/frame_messages.h" |
| 10 #include "content/common/input_messages.h" | 10 #include "content/common/input_messages.h" |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 gfx::Rect resizer_rect, | 378 gfx::Rect resizer_rect, |
| 379 bool is_fullscreen) { | 379 bool is_fullscreen) { |
| 380 ViewMsg_Resize_Params params; | 380 ViewMsg_Resize_Params params; |
| 381 params.screen_info = blink::WebScreenInfo(); | 381 params.screen_info = blink::WebScreenInfo(); |
| 382 params.new_size = new_size; | 382 params.new_size = new_size; |
| 383 params.physical_backing_size = new_size; | 383 params.physical_backing_size = new_size; |
| 384 params.top_controls_height = 0.f; | 384 params.top_controls_height = 0.f; |
| 385 params.top_controls_shrink_blink_size = false; | 385 params.top_controls_shrink_blink_size = false; |
| 386 params.resizer_rect = resizer_rect; | 386 params.resizer_rect = resizer_rect; |
| 387 params.is_fullscreen = is_fullscreen; | 387 params.is_fullscreen = is_fullscreen; |
| 388 params.display_mode = blink::WebDisplayModeBrowser; |
| 388 scoped_ptr<IPC::Message> resize_message(new ViewMsg_Resize(0, params)); | 389 scoped_ptr<IPC::Message> resize_message(new ViewMsg_Resize(0, params)); |
| 389 OnMessageReceived(*resize_message); | 390 OnMessageReceived(*resize_message); |
| 390 } | 391 } |
| 391 | 392 |
| 392 bool RenderViewTest::OnMessageReceived(const IPC::Message& msg) { | 393 bool RenderViewTest::OnMessageReceived(const IPC::Message& msg) { |
| 393 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 394 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
| 394 return impl->OnMessageReceived(msg); | 395 return impl->OnMessageReceived(msg); |
| 395 } | 396 } |
| 396 | 397 |
| 397 void RenderViewTest::DidNavigateWithinPage(blink::WebLocalFrame* frame, | 398 void RenderViewTest::DidNavigateWithinPage(blink::WebLocalFrame* frame, |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 FrameMsg_Navigate navigate_message(impl->GetMainRenderFrame()->GetRoutingID(), | 455 FrameMsg_Navigate navigate_message(impl->GetMainRenderFrame()->GetRoutingID(), |
| 455 navigate_params); | 456 navigate_params); |
| 456 impl->GetMainRenderFrame()->OnMessageReceived(navigate_message); | 457 impl->GetMainRenderFrame()->OnMessageReceived(navigate_message); |
| 457 | 458 |
| 458 // The load actually happens asynchronously, so we pump messages to process | 459 // The load actually happens asynchronously, so we pump messages to process |
| 459 // the pending continuation. | 460 // the pending continuation. |
| 460 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait(); | 461 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait(); |
| 461 } | 462 } |
| 462 | 463 |
| 463 } // namespace content | 464 } // namespace content |
| OLD | NEW |