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