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

Unified Diff: content/test/layouttest_support.cc

Issue 1840823002: Extract WebViewClient implementation out of WebTestProxyBase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@separate-pixel-dump-code
Patch Set: Expanding a comment + an IWYU fix. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/renderer/layout_test/layout_test_content_renderer_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/layouttest_support.cc
diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc
index 5157465a7c860c1ad7b338e098ef783308e72093..79e2b7ceb8938ad83ea86c369f7e761a9bc95f40 100644
--- a/content/test/layouttest_support.cc
+++ b/content/test/layouttest_support.cc
@@ -64,11 +64,14 @@ base::LazyInstance<ViewProxyCreationCallback>::Leaky
base::LazyInstance<FrameProxyCreationCallback>::Leaky
g_frame_test_proxy_callback = LAZY_INSTANCE_INITIALIZER;
+using WebTestProxyType = test_runner::WebTestProxy<RenderViewImpl,
+ CompositorDependencies*,
+ const ViewMsg_New_Params&>;
+
RenderViewImpl* CreateWebTestProxy(CompositorDependencies* compositor_deps,
const ViewMsg_New_Params& params) {
- typedef test_runner::WebTestProxy<RenderViewImpl, CompositorDependencies*,
- const ViewMsg_New_Params&> ProxyType;
- ProxyType* render_view_proxy = new ProxyType(compositor_deps, params);
+ WebTestProxyType* render_view_proxy =
+ new WebTestProxyType(compositor_deps, params);
if (g_view_test_proxy_callback == 0)
return render_view_proxy;
g_view_test_proxy_callback.Get().Run(render_view_proxy, render_view_proxy);
@@ -103,6 +106,12 @@ void RegisterSideloadedTypefaces(SkFontMgr* fontmgr) {
} // namespace
+test_runner::WebTestProxyBase* GetWebTestProxyBase(RenderView* render_view) {
+ WebTestProxyType* render_view_proxy =
+ static_cast<WebTestProxyType*>(render_view);
+ return static_cast<test_runner::WebTestProxyBase*>(render_view_proxy);
+}
+
void EnableWebTestProxyCreation(
const ViewProxyCreationCallback& view_proxy_creation_callback,
const FrameProxyCreationCallback& frame_proxy_creation_callback) {
« no previous file with comments | « content/shell/renderer/layout_test/layout_test_content_renderer_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698