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

Unified Diff: content/test/layouttest_support.cc

Issue 17114006: Implement WebFrameClient in RenderFrame and proxy all calls to RenderView (for now). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and cleanup. Created 7 years, 6 months 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
Index: content/test/layouttest_support.cc
diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc
index 49931304de43c9ab33573b5636159d2f733d8e08..3cd491739d6be7dcddfd3936941a21312332197b 100644
--- a/content/test/layouttest_support.cc
+++ b/content/test/layouttest_support.cc
@@ -11,8 +11,9 @@
#include "content/renderer/render_thread_impl.h"
#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/Tools/DumpRenderTree/chromium/TestRunner/public/WebFrameTestProxy.h"
#include "third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h"
+#include "third_party/WebKit/public/platform/WebGamepads.h"
#if defined(OS_WIN) && !defined(USE_AURA)
#include "content/browser/web_contents/web_contents_drag_win.h"
@@ -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,18 @@ 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);
+ FrameProxy* render_frame_proxy = new FrameProxy(render_view, routing_id);
+ render_frame_proxy->setBaseProxy(render_view_proxy);
+ return render_frame_proxy;
+}
+
} // namespace
@@ -53,6 +67,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) {
« content/renderer/render_frame_impl.h ('K') | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698