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

Unified Diff: content/test/layouttest_support.cc

Issue 11416177: [content shell] change how the main render view is picked for layout tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing Created 8 years, 1 month 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/webkit_test_runner_host.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 ea7031841f4cd1fc87fc5bf1b9a9313d26012f33..2cc383c161a6b99212a70499b78d1d1faa84db2d 100644
--- a/content/test/layouttest_support.cc
+++ b/content/test/layouttest_support.cc
@@ -16,7 +16,8 @@ namespace content {
namespace {
-base::LazyInstance<base::Callback<void(WebTestProxyBase*)> >::Leaky g_callback;
+base::LazyInstance<base::Callback<void(RenderView*, WebTestProxyBase*)> >::Leaky
+ g_callback;
RenderViewImpl* CreateWebTestProxy(RenderViewImplParams* params) {
typedef WebTestProxy<RenderViewImpl, RenderViewImplParams*> ProxyType;
@@ -24,7 +25,8 @@ RenderViewImpl* CreateWebTestProxy(RenderViewImplParams* params) {
reinterpret_cast<RenderViewImplParams*>(params));
if (g_callback == 0)
return render_view_proxy;
- g_callback.Get().Run(render_view_proxy);
+ g_callback.Get().Run(
+ static_cast<RenderView*>(render_view_proxy), render_view_proxy);
return render_view_proxy;
}
@@ -32,7 +34,7 @@ RenderViewImpl* CreateWebTestProxy(RenderViewImplParams* params) {
void EnableWebTestProxyCreation(
- const base::Callback<void(WebTestProxyBase*)>& callback) {
+ const base::Callback<void(RenderView*, WebTestProxyBase*)>& callback) {
g_callback.Get() = callback;
RenderViewImpl::InstallCreateHook(CreateWebTestProxy);
}
« no previous file with comments | « content/shell/webkit_test_runner_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698