Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Side by Side Diff: content/shell/renderer/layout_test/layout_test_content_renderer_client.cc

Issue 2036873002: Making EventSender talk to the right WebWidget (for OOPIF support). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use RenderWidget::viewRect() [rather than windowRect()] in TransformScreenToWidgetCoordinates. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/shell/renderer/layout_test/blink_test_runner.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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/shell/renderer/layout_test/layout_test_content_renderer_client .h" 5 #include "content/shell/renderer/layout_test/layout_test_content_renderer_client .h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/debugger.h" 9 #include "base/debug/debugger.h"
10 #include "components/test_runner/mock_credential_manager_client.h" 10 #include "components/test_runner/mock_credential_manager_client.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 75
76 proxy->set_delegate(test_runner); 76 proxy->set_delegate(test_runner);
77 proxy->set_view_test_client(LayoutTestRenderThreadObserver::GetInstance() 77 proxy->set_view_test_client(LayoutTestRenderThreadObserver::GetInstance()
78 ->test_interfaces() 78 ->test_interfaces()
79 ->CreateWebViewTestClient(proxy)); 79 ->CreateWebViewTestClient(proxy));
80 std::unique_ptr<test_runner::WebWidgetTestClient> widget_test_client = 80 std::unique_ptr<test_runner::WebWidgetTestClient> widget_test_client =
81 LayoutTestRenderThreadObserver::GetInstance() 81 LayoutTestRenderThreadObserver::GetInstance()
82 ->test_interfaces() 82 ->test_interfaces()
83 ->CreateWebWidgetTestClient(proxy); 83 ->CreateWebWidgetTestClient(proxy);
84 widget_test_client->set_web_view_test_proxy_base(proxy);
85 proxy->set_widget_test_client(std::move(widget_test_client)); 84 proxy->set_widget_test_client(std::move(widget_test_client));
86 proxy->SetInterfaces(interfaces); 85 proxy->SetInterfaces(interfaces);
87 } 86 }
88 87
89 void WebWidgetTestProxyCreated(blink::WebWidget* web_widget, 88 void WebWidgetTestProxyCreated(blink::WebWidget* web_widget,
90 test_runner::WebWidgetTestProxyBase* proxy) { 89 test_runner::WebWidgetTestProxyBase* proxy) {
91 CHECK(web_widget->isWebFrameWidget()); 90 CHECK(web_widget->isWebFrameWidget());
92 proxy->set_web_widget(web_widget); 91 proxy->set_web_widget(web_widget);
93 blink::WebFrameWidget* web_frame_widget = 92 blink::WebFrameWidget* web_frame_widget =
94 static_cast<blink::WebFrameWidget*>(web_widget); 93 static_cast<blink::WebFrameWidget*>(web_widget);
95 blink::WebView* web_view = web_frame_widget->localRoot()->view(); 94 blink::WebView* web_view = web_frame_widget->localRoot()->view();
96 RenderView* render_view = RenderView::FromWebView(web_view); 95 RenderView* render_view = RenderView::FromWebView(web_view);
97 test_runner::WebViewTestProxyBase* view_proxy = 96 test_runner::WebViewTestProxyBase* view_proxy =
98 GetWebViewTestProxyBase(render_view); 97 GetWebViewTestProxyBase(render_view);
99 std::unique_ptr<test_runner::WebWidgetTestClient> widget_test_client = 98 std::unique_ptr<test_runner::WebWidgetTestClient> widget_test_client =
100 LayoutTestRenderThreadObserver::GetInstance() 99 LayoutTestRenderThreadObserver::GetInstance()
101 ->test_interfaces() 100 ->test_interfaces()
102 ->CreateWebWidgetTestClient(proxy); 101 ->CreateWebWidgetTestClient(proxy);
103 widget_test_client->set_web_view_test_proxy_base(view_proxy); 102 proxy->set_web_view_test_proxy_base(view_proxy);
104 proxy->set_widget_test_client(std::move(widget_test_client)); 103 proxy->set_widget_test_client(std::move(widget_test_client));
105 } 104 }
106 105
107 void WebFrameTestProxyCreated(RenderFrame* render_frame, 106 void WebFrameTestProxyCreated(RenderFrame* render_frame,
108 test_runner::WebFrameTestProxyBase* proxy) { 107 test_runner::WebFrameTestProxyBase* proxy) {
109 test_runner::WebViewTestProxyBase* web_view_test_proxy_base = 108 test_runner::WebViewTestProxyBase* web_view_test_proxy_base =
110 GetWebViewTestProxyBase(render_frame->GetRenderView()); 109 GetWebViewTestProxyBase(render_frame->GetRenderView());
111 proxy->set_test_client( 110 proxy->set_test_client(
112 LayoutTestRenderThreadObserver::GetInstance() 111 LayoutTestRenderThreadObserver::GetInstance()
113 ->test_interfaces() 112 ->test_interfaces()
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 switches::kEnableFontAntialiasing)) { 262 switches::kEnableFontAntialiasing)) {
264 blink::setFontAntialiasingEnabledForTest(true); 263 blink::setFontAntialiasingEnabledForTest(true);
265 } 264 }
266 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 265 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
267 switches::kAlwaysUseComplexText)) { 266 switches::kAlwaysUseComplexText)) {
268 blink::setAlwaysUseComplexTextForTest(true); 267 blink::setAlwaysUseComplexTextForTest(true);
269 } 268 }
270 } 269 }
271 270
272 } // namespace content 271 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/renderer/layout_test/blink_test_runner.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698