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

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

Issue 1885993002: Use correct WebTestDelegate from WebViewTestClient and WebTestProxyBase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Extracted focused view tracking to https://crrev.com/1886013002 Created 4 years, 8 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 | « components/test_runner/web_view_test_client.cc ('k') | no next file » | 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 using blink::WebThemeEngine; 46 using blink::WebThemeEngine;
47 47
48 namespace content { 48 namespace content {
49 49
50 namespace { 50 namespace {
51 51
52 void WebTestProxyCreated(RenderView* render_view, 52 void WebTestProxyCreated(RenderView* render_view,
53 test_runner::WebTestProxyBase* proxy) { 53 test_runner::WebTestProxyBase* proxy) {
54 BlinkTestRunner* test_runner = new BlinkTestRunner(render_view); 54 BlinkTestRunner* test_runner = new BlinkTestRunner(render_view);
55 test_runner->set_proxy(proxy); 55 test_runner->set_proxy(proxy);
56 proxy->set_delegate(test_runner);
57
56 if (!LayoutTestRenderProcessObserver::GetInstance()->test_delegate()) { 58 if (!LayoutTestRenderProcessObserver::GetInstance()->test_delegate()) {
57 LayoutTestRenderProcessObserver::GetInstance()->SetTestDelegate( 59 LayoutTestRenderProcessObserver::GetInstance()->SetTestDelegate(
58 test_runner); 60 test_runner);
59 } 61 }
60 proxy->set_view_test_client(LayoutTestRenderProcessObserver::GetInstance() 62 proxy->set_view_test_client(LayoutTestRenderProcessObserver::GetInstance()
61 ->test_interfaces() 63 ->test_interfaces()
62 ->CreateWebViewTestClient(proxy)); 64 ->CreateWebViewTestClient(proxy));
63 proxy->SetInterfaces( 65 proxy->SetInterfaces(
64 LayoutTestRenderProcessObserver::GetInstance()->test_interfaces()); 66 LayoutTestRenderProcessObserver::GetInstance()->test_interfaces());
65 test_runner->proxy()->SetDelegate(
66 LayoutTestRenderProcessObserver::GetInstance()->test_delegate());
67 } 67 }
68 68
69 void WebFrameTestProxyCreated(RenderFrame* render_frame, 69 void WebFrameTestProxyCreated(RenderFrame* render_frame,
70 test_runner::WebFrameTestProxyBase* proxy) { 70 test_runner::WebFrameTestProxyBase* proxy) {
71 proxy->set_test_client(LayoutTestRenderProcessObserver::GetInstance() 71 proxy->set_test_client(LayoutTestRenderProcessObserver::GetInstance()
72 ->test_interfaces() 72 ->test_interfaces()
73 ->CreateWebFrameTestClient()); 73 ->CreateWebFrameTestClient());
74 } 74 }
75 75
76 } // namespace 76 } // namespace
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 LayoutTestContentRendererClient::CreateMediaStreamRendererFactory() { 179 LayoutTestContentRendererClient::CreateMediaStreamRendererFactory() {
180 #if defined(ENABLE_WEBRTC) 180 #if defined(ENABLE_WEBRTC)
181 return std::unique_ptr<MediaStreamRendererFactory>( 181 return std::unique_ptr<MediaStreamRendererFactory>(
182 new TestMediaStreamRendererFactory()); 182 new TestMediaStreamRendererFactory());
183 #else 183 #else
184 return nullptr; 184 return nullptr;
185 #endif 185 #endif
186 } 186 }
187 187
188 } // namespace content 188 } // namespace content
OLDNEW
« no previous file with comments | « components/test_runner/web_view_test_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698