summaryrefslogtreecommitdiffstats
path: root/content/test
diff options
context:
space:
mode:
authornasko@chromium.org <nasko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-02 18:38:47 +0000
committernasko@chromium.org <nasko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-02 18:38:47 +0000
commit2f61bdd9d0494e27d35eb336d3eef930f43d7740 (patch)
treeb99207c89f8945ba0095e36d930f1be5679d8af6 /content/test
parentb7fdae99276f825658262cc2fe44d84cf1b524da (diff)
downloadchromium_src-2f61bdd9d0494e27d35eb336d3eef930f43d7740.zip
chromium_src-2f61bdd9d0494e27d35eb336d3eef930f43d7740.tar.gz
chromium_src-2f61bdd9d0494e27d35eb336d3eef930f43d7740.tar.bz2
Implement WebFrameClient in RenderFrame and proxy all calls to RenderView (for now).
This is reland of https://codereview.chromium.org/17114006/, which was reverted due to bug in WebFrameTestProxy. I've fixed the issue in https://codereview.chromium.org/18031013/. BUG=245126 Review URL: https://chromiumcodereview.appspot.com/18178006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209733 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/test')
-rw-r--r--content/test/layouttest_support.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc
index 8c8a328..3604374e 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) {