Commit b27b58f5 authored by Gyuyoung Kim's avatar Gyuyoung Kim Committed by Commit Bot

Revert "Convert WebTestHostMsg_InitiateCaptureDump to Mojo"

This reverts commit ec6127ba.

Reason for revert: Caused flaky test failure on WebKit Linux Leak.

Original change's description:
> Convert WebTestHostMsg_InitiateCaptureDump to Mojo
> 
> This CL migrates the legacy InitiateCaptureDump IPC message
> to the new Mojo defined in WebTestClient interface.
> 
> Bug: 1039247
> Change-Id: Idd38ecf67d10593f3bfc6f3c48d9832514cec595
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032634
> Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
> Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
> Reviewed-by: Mike West <mkwst@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#739222}

TBR=dtapuska@chromium.org,mkwst@chromium.org,gyuyoung@igalia.com

Change-Id: Ie0bc76b7d3c8dd67481d67d0ee22b0338d87334f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1039247
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2043531Reviewed-by: default avatarGyuyoung Kim <gyuyoung@igalia.com>
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Cr-Commit-Position: refs/heads/master@{#739357}
parent d3bc5ec2
...@@ -101,13 +101,4 @@ void WebTestClientImpl::ResetPermissions() { ...@@ -101,13 +101,4 @@ void WebTestClientImpl::ResetPermissions() {
->ResetPermissions(); ->ResetPermissions();
} }
void WebTestClientImpl::InitiateCaptureDump(bool capture_navigation_history,
bool capture_pixels) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (BlinkTestController::Get()) {
BlinkTestController::Get()->OnInitiateCaptureDump(
capture_navigation_history, capture_pixels);
}
}
} // namespace content } // namespace content
...@@ -34,8 +34,6 @@ class WebTestClientImpl : public mojom::WebTestClient { ...@@ -34,8 +34,6 @@ class WebTestClientImpl : public mojom::WebTestClient {
void SimulateWebContentIndexDelete(const std::string& id) override; void SimulateWebContentIndexDelete(const std::string& id) override;
void BlockThirdPartyCookies(bool block) override; void BlockThirdPartyCookies(bool block) override;
void ResetPermissions() override; void ResetPermissions() override;
void InitiateCaptureDump(bool capture_navigation_history,
bool capture_pixels) override;
}; };
} // namespace content } // namespace content
......
...@@ -78,6 +78,7 @@ WebTestMessageFilter::OverrideTaskRunnerForMessage( ...@@ -78,6 +78,7 @@ WebTestMessageFilter::OverrideTaskRunnerForMessage(
case WebTestHostMsg_SimulateWebNotificationClick::ID: case WebTestHostMsg_SimulateWebNotificationClick::ID:
case WebTestHostMsg_SetPermission::ID: case WebTestHostMsg_SetPermission::ID:
case WebTestHostMsg_WebTestRuntimeFlagsChanged::ID: case WebTestHostMsg_WebTestRuntimeFlagsChanged::ID:
case WebTestHostMsg_InitiateCaptureDump::ID:
case WebTestHostMsg_DeleteAllCookies::ID: case WebTestHostMsg_DeleteAllCookies::ID:
case WebTestHostMsg_GetWritableDirectory::ID: case WebTestHostMsg_GetWritableDirectory::ID:
case WebTestHostMsg_SetFilePathForMockFileDialog::ID: case WebTestHostMsg_SetFilePathForMockFileDialog::ID:
...@@ -100,6 +101,8 @@ bool WebTestMessageFilter::OnMessageReceived(const IPC::Message& message) { ...@@ -100,6 +101,8 @@ bool WebTestMessageFilter::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(WebTestHostMsg_SetPermission, OnSetPermission) IPC_MESSAGE_HANDLER(WebTestHostMsg_SetPermission, OnSetPermission)
IPC_MESSAGE_HANDLER(WebTestHostMsg_WebTestRuntimeFlagsChanged, IPC_MESSAGE_HANDLER(WebTestHostMsg_WebTestRuntimeFlagsChanged,
OnWebTestRuntimeFlagsChanged) OnWebTestRuntimeFlagsChanged)
IPC_MESSAGE_HANDLER(WebTestHostMsg_InitiateCaptureDump,
OnInitiateCaptureDump)
IPC_MESSAGE_HANDLER(WebTestHostMsg_GetWritableDirectory, IPC_MESSAGE_HANDLER(WebTestHostMsg_GetWritableDirectory,
OnGetWritableDirectory) OnGetWritableDirectory)
IPC_MESSAGE_HANDLER(WebTestHostMsg_SetFilePathForMockFileDialog, IPC_MESSAGE_HANDLER(WebTestHostMsg_SetFilePathForMockFileDialog,
......
...@@ -28,7 +28,4 @@ interface WebTestClient { ...@@ -28,7 +28,4 @@ interface WebTestClient {
// Reset all permissions of WebTestPermissionManager. // Reset all permissions of WebTestPermissionManager.
ResetPermissions(); ResetPermissions();
// Initialize to dump the main frame with a navigation history or pixels.
InitiateCaptureDump(bool capture_navigation_history, bool capture_pixels);
}; };
...@@ -38,6 +38,9 @@ IPC_MESSAGE_ROUTED4(WebTestHostMsg_SetPermission, ...@@ -38,6 +38,9 @@ IPC_MESSAGE_ROUTED4(WebTestHostMsg_SetPermission,
blink::mojom::PermissionStatus /* status */, blink::mojom::PermissionStatus /* status */,
GURL /* origin */, GURL /* origin */,
GURL /* embedding_origin */) GURL /* embedding_origin */)
IPC_MESSAGE_ROUTED2(WebTestHostMsg_InitiateCaptureDump,
bool /* should dump navigation history */,
bool /* should dump pixels */)
IPC_SYNC_MESSAGE_ROUTED0_1(WebTestHostMsg_GetWritableDirectory, IPC_SYNC_MESSAGE_ROUTED0_1(WebTestHostMsg_GetWritableDirectory,
base::FilePath /* local_path */) base::FilePath /* local_path */)
......
...@@ -464,9 +464,9 @@ void BlinkTestRunner::TestFinished() { ...@@ -464,9 +464,9 @@ void BlinkTestRunner::TestFinished() {
if (interfaces->TestRunner()->ShouldDumpAsAudio()) { if (interfaces->TestRunner()->ShouldDumpAsAudio()) {
CaptureLocalAudioDump(); CaptureLocalAudioDump();
GetWebTestClientRemote().InitiateCaptureDump( Send(new WebTestHostMsg_InitiateCaptureDump(
browser_should_dump_back_forward_list, routing_id(), browser_should_dump_back_forward_list,
/*browser_should_capture_pixels=*/false); /*browser_should_capture_pixels=*/false));
return; return;
} }
...@@ -477,9 +477,9 @@ void BlinkTestRunner::TestFinished() { ...@@ -477,9 +477,9 @@ void BlinkTestRunner::TestFinished() {
CaptureLocalLayoutDump(); CaptureLocalLayoutDump();
if (!interfaces->TestRunner()->ShouldGeneratePixelResults()) { if (!interfaces->TestRunner()->ShouldGeneratePixelResults()) {
GetWebTestClientRemote().InitiateCaptureDump( Send(new WebTestHostMsg_InitiateCaptureDump(
browser_should_dump_back_forward_list, routing_id(), browser_should_dump_back_forward_list,
/*browser_should_capture_pixels=*/false); /*browser_should_capture_pixels=*/false));
return; return;
} }
...@@ -497,9 +497,9 @@ void BlinkTestRunner::TestFinished() { ...@@ -497,9 +497,9 @@ void BlinkTestRunner::TestFinished() {
web_frame->GetSelectionBoundsRectForTesting(); web_frame->GetSelectionBoundsRectForTesting();
} }
} }
GetWebTestClientRemote().InitiateCaptureDump( Send(new WebTestHostMsg_InitiateCaptureDump(
browser_should_dump_back_forward_list, routing_id(), browser_should_dump_back_forward_list,
!interfaces->TestRunner()->CanDumpPixelsFromRenderer()); !interfaces->TestRunner()->CanDumpPixelsFromRenderer()));
} }
void BlinkTestRunner::CaptureLocalAudioDump() { void BlinkTestRunner::CaptureLocalAudioDump() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment