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 18 matching lines...) Expand all Loading... |
29 #include "content/renderer/history_controller.h" | 29 #include "content/renderer/history_controller.h" |
30 #include "content/renderer/history_serialization.h" | 30 #include "content/renderer/history_serialization.h" |
31 #include "content/renderer/render_thread_impl.h" | 31 #include "content/renderer/render_thread_impl.h" |
32 #include "content/renderer/render_view_impl.h" | 32 #include "content/renderer/render_view_impl.h" |
33 #include "content/renderer/renderer_blink_platform_impl.h" | 33 #include "content/renderer/renderer_blink_platform_impl.h" |
34 #include "content/renderer/renderer_main_platform_delegate.h" | 34 #include "content/renderer/renderer_main_platform_delegate.h" |
35 #include "content/test/fake_compositor_dependencies.h" | 35 #include "content/test/fake_compositor_dependencies.h" |
36 #include "content/test/mock_render_process.h" | 36 #include "content/test/mock_render_process.h" |
37 #include "content/test/test_content_client.h" | 37 #include "content/test/test_content_client.h" |
38 #include "content/test/test_render_frame.h" | 38 #include "content/test/test_render_frame.h" |
39 #include "third_party/WebKit/public/platform/WebScreenInfo.h" | |
40 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" | 39 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" |
41 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 40 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
42 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul
er.h" | 41 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul
er.h" |
43 #include "third_party/WebKit/public/web/WebDocument.h" | 42 #include "third_party/WebKit/public/web/WebDocument.h" |
44 #include "third_party/WebKit/public/web/WebHistoryItem.h" | 43 #include "third_party/WebKit/public/web/WebHistoryItem.h" |
45 #include "third_party/WebKit/public/web/WebInputElement.h" | 44 #include "third_party/WebKit/public/web/WebInputElement.h" |
46 #include "third_party/WebKit/public/web/WebInputEvent.h" | 45 #include "third_party/WebKit/public/web/WebInputEvent.h" |
47 #include "third_party/WebKit/public/web/WebKit.h" | 46 #include "third_party/WebKit/public/web/WebKit.h" |
48 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 47 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
49 #include "third_party/WebKit/public/web/WebScriptSource.h" | 48 #include "third_party/WebKit/public/web/WebScriptSource.h" |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 } | 522 } |
524 | 523 |
525 uint32_t RenderViewTest::GetNavigationIPCType() { | 524 uint32_t RenderViewTest::GetNavigationIPCType() { |
526 return FrameHostMsg_DidCommitProvisionalLoad::ID; | 525 return FrameHostMsg_DidCommitProvisionalLoad::ID; |
527 } | 526 } |
528 | 527 |
529 void RenderViewTest::Resize(gfx::Size new_size, | 528 void RenderViewTest::Resize(gfx::Size new_size, |
530 gfx::Rect resizer_rect, | 529 gfx::Rect resizer_rect, |
531 bool is_fullscreen_granted) { | 530 bool is_fullscreen_granted) { |
532 ResizeParams params; | 531 ResizeParams params; |
533 params.screen_info = blink::WebScreenInfo(); | 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; | 537 params.resizer_rect = resizer_rect; |
539 params.is_fullscreen_granted = is_fullscreen_granted; | 538 params.is_fullscreen_granted = is_fullscreen_granted; |
540 params.display_mode = blink::WebDisplayModeBrowser; | 539 params.display_mode = blink::WebDisplayModeBrowser; |
541 std::unique_ptr<IPC::Message> resize_message(new ViewMsg_Resize(0, params)); | 540 std::unique_ptr<IPC::Message> resize_message(new ViewMsg_Resize(0, params)); |
542 OnMessageReceived(*resize_message); | 541 OnMessageReceived(*resize_message); |
543 } | 542 } |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); | 662 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); |
664 frame->Navigate(common_params, StartNavigationParams(), request_params); | 663 frame->Navigate(common_params, StartNavigationParams(), request_params); |
665 | 664 |
666 // The load actually happens asynchronously, so we pump messages to process | 665 // The load actually happens asynchronously, so we pump messages to process |
667 // the pending continuation. | 666 // the pending continuation. |
668 FrameLoadWaiter(frame).Wait(); | 667 FrameLoadWaiter(frame).Wait(); |
669 view_->GetWebView()->updateAllLifecyclePhases(); | 668 view_->GetWebView()->updateAllLifecyclePhases(); |
670 } | 669 } |
671 | 670 |
672 } // namespace content | 671 } // namespace content |
OLD | NEW |