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

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

Issue 1890223002: Explicitly initialize secondary renderers for layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self-review. Created 4 years, 8 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/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 526d2d95581f8bbc13a8c156045f924cc5a1a0f5..7f065455a025e694a64ed2c7952ebb1b8a667a30 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
@@ -111,8 +111,15 @@ void LayoutTestContentRendererClient::RenderViewCreated(
test_runner::WebTestDelegate* delegate =
LayoutTestRenderProcessObserver::GetInstance()->test_delegate();
- if (delegate == static_cast<test_runner::WebTestDelegate*>(test_runner))
- LayoutTestRenderProcessObserver::GetInstance()->SetMainWindow(render_view);
+ if (delegate == static_cast<test_runner::WebTestDelegate*>(test_runner)) {
+ // TODO(lukasza): Should this instead by done by BlinkTestRunner,
+ // when it gets notified by the browser that it is the main window?
Łukasz Anforowicz 2016/04/15 20:15:29 This "todo" should be a long-term goal, but doing
+
+ // Let test_runner layer know what is the main test window.
+ LayoutTestRenderProcessObserver::GetInstance()
+ ->test_interfaces()
+ ->SetWebView(render_view->GetWebView(), proxy);
Łukasz Anforowicz 2016/04/15 20:15:29 This just inlines what used to be in LayoutTestRen
+ }
}
WebMediaStreamCenter*

Powered by Google App Engine
This is Rietveld 408576698