| Index: content/shell/browser/layout_test/blink_test_controller.cc
|
| diff --git a/content/shell/browser/layout_test/blink_test_controller.cc b/content/shell/browser/layout_test/blink_test_controller.cc
|
| index f9a1684625c748edcedab04bcfbd153a6649b0e5..e318bf9d1b81e132496a79a3770ba2057b29b142 100644
|
| --- a/content/shell/browser/layout_test/blink_test_controller.cc
|
| +++ b/content/shell/browser/layout_test/blink_test_controller.cc
|
| @@ -38,7 +38,6 @@
|
| #include "content/public/browser/service_worker_context.h"
|
| #include "content/public/browser/storage_partition.h"
|
| #include "content/public/browser/web_contents.h"
|
| -#include "content/public/common/associated_interface_provider.h"
|
| #include "content/public/common/bindings_policy.h"
|
| #include "content/public/common/content_switches.h"
|
| #include "content/public/common/url_constants.h"
|
| @@ -281,7 +280,6 @@
|
| all_observed_render_process_hosts_.clear();
|
| main_window_render_process_hosts_.clear();
|
| accumulated_layout_test_runtime_flags_changes_.Clear();
|
| - layout_test_control_map_.clear();
|
| ShellBrowserContext* browser_context =
|
| ShellContentBrowserClient::Get()->browser_context();
|
| is_compositing_test_ =
|
| @@ -608,26 +606,24 @@
|
|
|
| // Make sure the new renderer process has a test configuration shared with
|
| // other renderers.
|
| - mojom::ShellTestConfigurationPtr params =
|
| - mojom::ShellTestConfiguration::New();
|
| - params->enable_pixel_dumping = true;
|
| - params->allow_external_pages = false;
|
| - params->current_working_directory = current_working_directory_;
|
| - params->temp_path = temp_path_;
|
| - params->test_url = test_url_;
|
| - params->enable_pixel_dumping = enable_pixel_dumping_;
|
| - params->allow_external_pages =
|
| + ShellTestConfiguration params;
|
| + params.current_working_directory = current_working_directory_;
|
| + params.temp_path = temp_path_;
|
| + params.test_url = test_url_;
|
| + params.enable_pixel_dumping = enable_pixel_dumping_;
|
| + params.allow_external_pages =
|
| base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| switches::kAllowExternalPages);
|
| - params->expected_pixel_hash = expected_pixel_hash_;
|
| - params->initial_size = initial_size_;
|
| + params.expected_pixel_hash = expected_pixel_hash_;
|
| + params.initial_size = initial_size_;
|
|
|
| if (did_send_initial_test_configuration_) {
|
| - GetLayoutTestControlPtr(frame)->ReplicateTestConfiguration(
|
| - std::move(params));
|
| + frame->Send(new ShellViewMsg_ReplicateTestConfiguration(
|
| + frame->GetRoutingID(), params));
|
| } else {
|
| did_send_initial_test_configuration_ = true;
|
| - GetLayoutTestControlPtr(frame)->SetTestConfiguration(std::move(params));
|
| + frame->Send(
|
| + new ShellViewMsg_SetTestConfiguration(frame->GetRoutingID(), params));
|
| }
|
| }
|
|
|
| @@ -637,7 +633,8 @@
|
| all_observed_render_process_hosts_.insert(process);
|
|
|
| if (!main_window) {
|
| - GetLayoutTestControlPtr(frame)->SetupSecondaryRenderer();
|
| + frame->Send(
|
| + new ShellViewMsg_SetupSecondaryRenderer(frame->GetRoutingID()));
|
| }
|
|
|
| process->Send(new LayoutTestMsg_ReplicateLayoutTestRuntimeFlagsChanges(
|
| @@ -708,16 +705,8 @@
|
| }
|
|
|
| void BlinkTestController::OnInitiateLayoutDump() {
|
| - int number_of_messages = 0;
|
| - for (RenderFrameHost* rfh : main_window_->web_contents()->GetAllFrames()) {
|
| - if (!rfh->IsRenderFrameLive())
|
| - continue;
|
| -
|
| - ++number_of_messages;
|
| - GetLayoutTestControlPtr(rfh)->LayoutDumpRequest();
|
| - }
|
| -
|
| - pending_layout_dumps_ = number_of_messages;
|
| + pending_layout_dumps_ = main_window_->web_contents()->SendToAllFrames(
|
| + new ShellViewMsg_LayoutDumpRequest(MSG_ROUTING_NONE));
|
| }
|
|
|
| void BlinkTestController::OnLayoutTestRuntimeFlagsChanged(
|
| @@ -965,14 +954,4 @@
|
| bluetooth_chooser_factory_->SendEvent(event, argument);
|
| }
|
|
|
| -mojom::LayoutTestControl* BlinkTestController::GetLayoutTestControlPtr(
|
| - RenderFrameHost* frame) {
|
| - if (layout_test_control_map_.find(frame) == layout_test_control_map_.end()) {
|
| - frame->GetRemoteAssociatedInterfaces()->GetInterface(
|
| - &layout_test_control_map_[frame]);
|
| - }
|
| - DCHECK(layout_test_control_map_[frame].get());
|
| - return layout_test_control_map_[frame].get();
|
| -}
|
| -
|
| } // namespace content
|
|
|