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

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

Issue 1922653003: Send TestFinished as Process/Control-msg (not View-msg). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@only-one-top-loading-frame-in-all-renderers
Patch Set: Rebasing... 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/blink_test_runner.cc
diff --git a/content/shell/renderer/layout_test/blink_test_runner.cc b/content/shell/renderer/layout_test/blink_test_runner.cc
index e90df06ff122e9fae4c106f6586ce73609e9aa6f..81a61a3134effd307db630486b4f11228cf339b0 100644
--- a/content/shell/renderer/layout_test/blink_test_runner.cc
+++ b/content/shell/renderer/layout_test/blink_test_runner.cc
@@ -534,7 +534,8 @@ void BlinkTestRunner::OnLayoutTestRuntimeFlagsChanged(
void BlinkTestRunner::TestFinished() {
if (!is_main_window_ || !render_view()->GetMainRenderFrame()) {
- Send(new ShellViewHostMsg_TestFinishedInSecondaryRenderer(routing_id()));
+ RenderThread::Get()->Send(
+ new LayoutTestHostMsg_TestFinishedInSecondaryRenderer());
return;
}
test_runner::WebTestInterfaces* interfaces =
@@ -716,7 +717,8 @@ bool BlinkTestRunner::OnMessageReceived(const IPC::Message& message) {
IPC_BEGIN_MESSAGE_MAP(BlinkTestRunner, message)
IPC_MESSAGE_HANDLER(ShellViewMsg_SessionHistory, OnSessionHistory)
IPC_MESSAGE_HANDLER(ShellViewMsg_Reset, OnReset)
- IPC_MESSAGE_HANDLER(ShellViewMsg_NotifyDone, OnNotifyDone)
+ IPC_MESSAGE_HANDLER(ShellViewMsg_TestFinishedInSecondaryRenderer,
+ OnTestFinishedInSecondaryRenderer)
IPC_MESSAGE_HANDLER(ShellViewMsg_TryLeakDetection, OnTryLeakDetection)
IPC_MESSAGE_HANDLER(ShellViewMsg_ReplyBluetoothManualChooserEvents,
OnReplyBluetoothManualChooserEvents)
@@ -938,9 +940,9 @@ void BlinkTestRunner::OnReset() {
Send(new ShellViewHostMsg_ResetDone(routing_id()));
}
-void BlinkTestRunner::OnNotifyDone() {
- render_view()->GetWebView()->mainFrame()->executeScript(
- WebScriptSource(WebString::fromUTF8("testRunner.notifyDone();")));
+void BlinkTestRunner::OnTestFinishedInSecondaryRenderer() {
+ DCHECK(is_main_window_ && render_view()->GetMainRenderFrame());
+ TestFinished();
}
void BlinkTestRunner::OnTryLeakDetection() {

Powered by Google App Engine
This is Rietveld 408576698