From 4c2c724abfe391f9fd00e7cd8935270dca7ec010 Mon Sep 17 00:00:00 2001 From: "jochen@chromium.org" Date: Tue, 13 Nov 2012 09:56:31 +0000 Subject: Revert 167341 - Use the WebTestProxy for layout tests in content_shell - Add a hook to the content renderer client to allow embedders to override the creation of RenderViewImpls. To simplify this, I consolidate the parameters passed to RVI's constructor into a struct. - Add a content_layouttest_support library that provides a method for creating a modified RenderViewImpl suitable for running layout tests. - Use above library from the content_shell. BUG=111316 TEST=almost all accessibility tests pass. Review URL: https://codereview.chromium.org/11362161 TBR=jochen@chromium.org Review URL: https://codereview.chromium.org/11275276 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167345 0039d316-1c4b-4281-b951-d872f2087c98 --- content/test/layouttest_support.cc | 40 -------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 content/test/layouttest_support.cc (limited to 'content/test/layouttest_support.cc') diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc deleted file mode 100644 index ea70318..0000000 --- a/content/test/layouttest_support.cc +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "content/public/test/layouttest_support.h" - -#include "base/callback.h" -#include "base/lazy_instance.h" -#include "content/renderer/render_view_impl.h" -#include "third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h" - -using WebTestRunner::WebTestProxy; -using WebTestRunner::WebTestProxyBase; - -namespace content { - -namespace { - -base::LazyInstance >::Leaky g_callback; - -RenderViewImpl* CreateWebTestProxy(RenderViewImplParams* params) { - typedef WebTestProxy ProxyType; - ProxyType* render_view_proxy = new ProxyType( - reinterpret_cast(params)); - if (g_callback == 0) - return render_view_proxy; - g_callback.Get().Run(render_view_proxy); - return render_view_proxy; -} - -} // namespace - - -void EnableWebTestProxyCreation( - const base::Callback& callback) { - g_callback.Get() = callback; - RenderViewImpl::InstallCreateHook(CreateWebTestProxy); -} - -} // namespace content -- cgit v1.1