diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-13 09:56:31 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-13 09:56:31 +0000 |
commit | 4c2c724abfe391f9fd00e7cd8935270dca7ec010 (patch) | |
tree | 2e4488c1dc48fdf9d7337f7c790269291b1b88ec /content/test/layouttest_support.cc | |
parent | 6ac35466f019e01d0171fea205c00409254297cb (diff) | |
download | chromium_src-4c2c724abfe391f9fd00e7cd8935270dca7ec010.zip chromium_src-4c2c724abfe391f9fd00e7cd8935270dca7ec010.tar.gz chromium_src-4c2c724abfe391f9fd00e7cd8935270dca7ec010.tar.bz2 |
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
Diffstat (limited to 'content/test/layouttest_support.cc')
-rw-r--r-- | content/test/layouttest_support.cc | 40 |
1 files changed, 0 insertions, 40 deletions
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<base::Callback<void(WebTestProxyBase*)> >::Leaky g_callback; - -RenderViewImpl* CreateWebTestProxy(RenderViewImplParams* params) { - typedef WebTestProxy<RenderViewImpl, RenderViewImplParams*> ProxyType; - ProxyType* render_view_proxy = new ProxyType( - reinterpret_cast<RenderViewImplParams*>(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<void(WebTestProxyBase*)>& callback) { - g_callback.Get() = callback; - RenderViewImpl::InstallCreateHook(CreateWebTestProxy); -} - -} // namespace content |