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

Unified Diff: content/shell/renderer/layout_test/layout_test_content_renderer_client.cc

Issue 1962393002: Destroy WebWidgetTestClient when its WebWidget is destroyed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: keep the TODO Created 4 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c1c9c164ab5c3b36a01031e51ca95a4fb25fdccc..a9bbbbdcb2fdc9538829833e5d064883b452ce9a 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
@@ -109,15 +109,6 @@ void LayoutTestContentRendererClient::RenderFrameCreated(
GetWebFrameTestProxyBase(render_frame);
frame_proxy->set_web_frame(render_frame->GetWebFrame());
new LayoutTestRenderFrameObserver(render_frame);
-
- // TODO(lfg): We should fix the TestProxy to track the WebWidgets on every
- // local root in WebFrameTestProxy instead of having only the WebWidget for
- // the main frame in WebTestProxy.
- test_runner::WebTestProxyBase* proxy =
- GetWebTestProxyBase(render_frame->GetRenderView());
- WebLocalFrame* frame = render_frame->GetWebFrame();
- if (!frame->parent())
- proxy->set_web_widget(frame->frameWidget());
}
void LayoutTestContentRendererClient::RenderViewCreated(
@@ -126,6 +117,10 @@ void LayoutTestContentRendererClient::RenderViewCreated(
test_runner::WebTestProxyBase* proxy = GetWebTestProxyBase(render_view);
proxy->set_web_view(render_view->GetWebView());
+ // TODO(lfg): We should fix the TestProxy to track the WebWidgets on every
+ // local root in WebFrameTestProxy instead of having only the WebWidget for
+ // the main frame in WebTestProxy.
+ proxy->set_web_widget(render_view->GetWebView()->widget());
proxy->Reset();
proxy->SetSendWheelGestures(UseGestureBasedWheelScrolling());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698