| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cctype> | 9 #include <cctype> |
| 10 | 10 |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 RequestNavigationParams()); | 520 RequestNavigationParams()); |
| 521 FrameLoadWaiter(frame).Wait(); | 521 FrameLoadWaiter(frame).Wait(); |
| 522 view_->GetWebView()->updateAllLifecyclePhases(); | 522 view_->GetWebView()->updateAllLifecyclePhases(); |
| 523 } | 523 } |
| 524 | 524 |
| 525 uint32_t RenderViewTest::GetNavigationIPCType() { | 525 uint32_t RenderViewTest::GetNavigationIPCType() { |
| 526 return FrameHostMsg_DidCommitProvisionalLoad::ID; | 526 return FrameHostMsg_DidCommitProvisionalLoad::ID; |
| 527 } | 527 } |
| 528 | 528 |
| 529 void RenderViewTest::Resize(gfx::Size new_size, | 529 void RenderViewTest::Resize(gfx::Size new_size, |
| 530 gfx::Rect resizer_rect, | |
| 531 bool is_fullscreen_granted) { | 530 bool is_fullscreen_granted) { |
| 532 ResizeParams params; | 531 ResizeParams params; |
| 533 params.screen_info = ScreenInfo(); | 532 params.screen_info = ScreenInfo(); |
| 534 params.new_size = new_size; | 533 params.new_size = new_size; |
| 535 params.physical_backing_size = new_size; | 534 params.physical_backing_size = new_size; |
| 536 params.top_controls_height = 0.f; | 535 params.top_controls_height = 0.f; |
| 537 params.top_controls_shrink_blink_size = false; | 536 params.top_controls_shrink_blink_size = false; |
| 538 params.resizer_rect = resizer_rect; | |
| 539 params.is_fullscreen_granted = is_fullscreen_granted; | 537 params.is_fullscreen_granted = is_fullscreen_granted; |
| 540 params.display_mode = blink::WebDisplayModeBrowser; | 538 params.display_mode = blink::WebDisplayModeBrowser; |
| 541 std::unique_ptr<IPC::Message> resize_message(new ViewMsg_Resize(0, params)); | 539 std::unique_ptr<IPC::Message> resize_message(new ViewMsg_Resize(0, params)); |
| 542 OnMessageReceived(*resize_message); | 540 OnMessageReceived(*resize_message); |
| 543 } | 541 } |
| 544 | 542 |
| 545 void RenderViewTest::SimulateUserTypingASCIICharacter(char ascii_character, | 543 void RenderViewTest::SimulateUserTypingASCIICharacter(char ascii_character, |
| 546 bool flush_message_loop) { | 544 bool flush_message_loop) { |
| 547 blink::WebKeyboardEvent event; | 545 blink::WebKeyboardEvent event; |
| 548 event.text[0] = ascii_character; | 546 event.text[0] = ascii_character; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); | 660 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); |
| 663 frame->Navigate(common_params, StartNavigationParams(), request_params); | 661 frame->Navigate(common_params, StartNavigationParams(), request_params); |
| 664 | 662 |
| 665 // The load actually happens asynchronously, so we pump messages to process | 663 // The load actually happens asynchronously, so we pump messages to process |
| 666 // the pending continuation. | 664 // the pending continuation. |
| 667 FrameLoadWaiter(frame).Wait(); | 665 FrameLoadWaiter(frame).Wait(); |
| 668 view_->GetWebView()->updateAllLifecyclePhases(); | 666 view_->GetWebView()->updateAllLifecyclePhases(); |
| 669 } | 667 } |
| 670 | 668 |
| 671 } // namespace content | 669 } // namespace content |
| OLD | NEW |