Index: content/shell/renderer/layout_test/layout_test_content_renderer_client.cc |
diff --git a/content/shell/renderer/layout_test/layout_test_content_renderer_client.cc b/content/shell/renderer/layout_test/layout_test_content_renderer_client.cc |
index 489339fd7130f600e3da2232beba5c8fc12c6451..00b883944dede79950263eff11e26a9e0158cae6 100644 |
--- a/content/shell/renderer/layout_test/layout_test_content_renderer_client.cc |
+++ b/content/shell/renderer/layout_test/layout_test_content_renderer_client.cc |
@@ -8,7 +8,6 @@ |
#include "base/command_line.h" |
#include "base/debug/debugger.h" |
#include "components/test_runner/mock_credential_manager_client.h" |
-#include "components/test_runner/web_frame_test_proxy.h" |
#include "components/test_runner/web_test_interfaces.h" |
#include "components/test_runner/web_test_proxy.h" |
#include "components/web_cache/renderer/web_cache_render_process_observer.h" |
@@ -46,34 +45,10 @@ |
namespace content { |
-namespace { |
- |
-void WebTestProxyCreated(RenderView* render_view, |
- test_runner::WebTestProxyBase* proxy) { |
- BlinkTestRunner* test_runner = new BlinkTestRunner(render_view); |
- test_runner->set_proxy(proxy); |
- if (!LayoutTestRenderProcessObserver::GetInstance()->test_delegate()) { |
- LayoutTestRenderProcessObserver::GetInstance()->SetTestDelegate( |
- test_runner); |
- } |
- proxy->SetInterfaces( |
- LayoutTestRenderProcessObserver::GetInstance()->test_interfaces()); |
- test_runner->proxy()->SetDelegate( |
- LayoutTestRenderProcessObserver::GetInstance()->test_delegate()); |
-} |
- |
-void WebFrameTestProxyCreated(RenderFrame* render_frame, |
- test_runner::WebFrameTestProxyBase* proxy) { |
- proxy->set_test_client(LayoutTestRenderProcessObserver::GetInstance() |
- ->test_interfaces() |
- ->GetWebFrameTestClient()); |
-} |
- |
-} // namespace |
- |
LayoutTestContentRendererClient::LayoutTestContentRendererClient() { |
- EnableWebTestProxyCreation(base::Bind(&WebTestProxyCreated), |
- base::Bind(&WebFrameTestProxyCreated)); |
+ EnableWebTestProxyCreation( |
+ base::Bind(&LayoutTestContentRendererClient::WebTestProxyCreated, |
+ base::Unretained(this))); |
} |
LayoutTestContentRendererClient::~LayoutTestContentRendererClient() { |
@@ -176,4 +151,19 @@ |
#endif |
} |
+void LayoutTestContentRendererClient::WebTestProxyCreated( |
+ RenderView* render_view, |
+ test_runner::WebTestProxyBase* proxy) { |
+ BlinkTestRunner* test_runner = new BlinkTestRunner(render_view); |
+ test_runner->set_proxy(proxy); |
+ if (!LayoutTestRenderProcessObserver::GetInstance()->test_delegate()) { |
+ LayoutTestRenderProcessObserver::GetInstance()->SetTestDelegate( |
+ test_runner); |
+ } |
+ proxy->SetInterfaces( |
+ LayoutTestRenderProcessObserver::GetInstance()->test_interfaces()); |
+ test_runner->proxy()->SetDelegate( |
+ LayoutTestRenderProcessObserver::GetInstance()->test_delegate()); |
+} |
+ |
} // namespace content |