| Index: content/test/layouttest_support.cc
|
| diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc
|
| index 8c8a328be7621279da8796d60410116a54397331..3604374e9ac519ef2ee4d4a767cfb83aca0a3b5f 100644
|
| --- a/content/test/layouttest_support.cc
|
| +++ b/content/test/layouttest_support.cc
|
| @@ -12,6 +12,7 @@
|
| #include "content/renderer/render_view_impl.h"
|
| #include "content/renderer/renderer_webkitplatformsupport_impl.h"
|
| #include "third_party/WebKit/public/platform/WebGamepads.h"
|
| +#include "third_party/WebKit/public/testing/WebFrameTestProxy.h"
|
| #include "third_party/WebKit/public/testing/WebTestProxy.h"
|
|
|
| #if defined(OS_WIN) && !defined(USE_AURA)
|
| @@ -25,6 +26,7 @@
|
| using WebKit::WebGamepads;
|
| using WebKit::WebRect;
|
| using WebKit::WebSize;
|
| +using WebTestRunner::WebFrameTestProxy;
|
| using WebTestRunner::WebTestProxy;
|
| using WebTestRunner::WebTestProxyBase;
|
|
|
| @@ -46,6 +48,20 @@ RenderViewImpl* CreateWebTestProxy(RenderViewImplParams* params) {
|
| return render_view_proxy;
|
| }
|
|
|
| +RenderFrameImpl* CreateWebFrameTestProxy(
|
| + RenderViewImpl* render_view,
|
| + int32 routing_id) {
|
| + typedef WebTestProxy<RenderViewImpl, RenderViewImplParams*> ViewProxy;
|
| + typedef WebFrameTestProxy<RenderFrameImpl, RenderViewImpl*, int32> FrameProxy;
|
| +
|
| + ViewProxy* render_view_proxy = static_cast<ViewProxy*>(render_view);
|
| + WebTestProxyBase* base = static_cast<WebTestProxyBase*>(render_view_proxy);
|
| + FrameProxy* render_frame_proxy = new FrameProxy(render_view, routing_id);
|
| + render_frame_proxy->setBaseProxy(base);
|
| +
|
| + return render_frame_proxy;
|
| +}
|
| +
|
| } // namespace
|
|
|
|
|
| @@ -53,6 +69,7 @@ void EnableWebTestProxyCreation(
|
| const base::Callback<void(RenderView*, WebTestProxyBase*)>& callback) {
|
| g_callback.Get() = callback;
|
| RenderViewImpl::InstallCreateHook(CreateWebTestProxy);
|
| + RenderFrameImpl::InstallCreateHook(CreateWebFrameTestProxy);
|
| }
|
|
|
| void SetMockGamepads(const WebGamepads& pads) {
|
|
|