Move Shell messages to web_test and rename to BlinkTest.
These messages are only used by web_test/blink_test_{controller,runner}. So move them into common/web_test, to indicate they are for tests not content shell. Also give them their own target so that test_runner can be made to use them, since they are only for tests. I believe this would let us move BlinkTestRunner into test_runner, and remove WebTestDelegate interface out of content/shell/renderer. R=avi@chromium.org TBR=inferno Bug: 866140 Change-Id: I4e397f3bb2b3ae834f62f429761edc184d16151f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1525181 Commit-Queue: danakj <danakj@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Cr-Commit-Position: refs/heads/master@{#645319}
This commit is contained in:
content/shell
ipc
tools/ipc_fuzzer/message_tools
@ -46,6 +46,30 @@ source_set("android_shell_descriptors") {
|
||||
]
|
||||
}
|
||||
|
||||
source_set("web_test_messages") {
|
||||
testonly = true
|
||||
sources = [
|
||||
# Note that if this target becomes jumbofied, it should use
|
||||
# jumbo_excluded_sources to exclude the messages.cc files.
|
||||
# IPC uses multiple inclusions in different macro contexts to
|
||||
# generate the code. This is not compatible with jumbo
|
||||
# compilations since all other files need the "clean" version of
|
||||
# the message headers.
|
||||
"common/web_test/blink_test_messages.cc",
|
||||
"common/web_test/blink_test_messages.h",
|
||||
"common/web_test/web_test_messages.cc",
|
||||
"common/web_test/web_test_messages.h",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"//content/public/common",
|
||||
"//ipc",
|
||||
"//net",
|
||||
"//skia",
|
||||
"//url/ipc:url_ipc",
|
||||
]
|
||||
}
|
||||
|
||||
source_set("web_test_switches") {
|
||||
testonly = true
|
||||
sources = [
|
||||
@ -186,16 +210,12 @@ jumbo_static_library("content_shell_lib") {
|
||||
"common/power_monitor_test_impl.h",
|
||||
"common/shell_content_client.cc",
|
||||
"common/shell_content_client.h",
|
||||
"common/shell_messages.cc",
|
||||
"common/shell_messages.h",
|
||||
"common/shell_origin_trial_policy.cc",
|
||||
"common/shell_origin_trial_policy.h",
|
||||
"common/shell_switches.cc",
|
||||
"common/shell_switches.h",
|
||||
"common/web_test/web_test_content_client.cc",
|
||||
"common/web_test/web_test_content_client.h",
|
||||
"common/web_test/web_test_messages.cc",
|
||||
"common/web_test/web_test_messages.h",
|
||||
"gpu/shell_content_gpu_client.cc",
|
||||
"gpu/shell_content_gpu_client.h",
|
||||
"renderer/shell_content_renderer_client.cc",
|
||||
@ -222,15 +242,6 @@ jumbo_static_library("content_shell_lib") {
|
||||
"utility/shell_content_utility_client.h",
|
||||
]
|
||||
|
||||
jumbo_excluded_sources = [
|
||||
# IPC uses multiple inclusions in different macro contexts to
|
||||
# generate the code. This is not compatible with jumbo
|
||||
# compilations since all other files need the "clean" version of
|
||||
# the message headers.
|
||||
"common/web_test/web_test_messages.cc",
|
||||
"common/shell_messages.cc",
|
||||
]
|
||||
|
||||
configs += [
|
||||
":content_shell_lib_warnings",
|
||||
"//build/config:precompiled_headers",
|
||||
@ -258,11 +269,11 @@ jumbo_static_library("content_shell_lib") {
|
||||
"//content/public/gpu",
|
||||
"//content/public/renderer",
|
||||
"//content/public/utility",
|
||||
"//ipc",
|
||||
"//services/network:network_service",
|
||||
]
|
||||
deps = [
|
||||
":resources",
|
||||
":web_test_messages",
|
||||
":web_test_switches",
|
||||
":web_test_utils",
|
||||
"//base",
|
||||
|
@ -59,7 +59,6 @@
|
||||
#include "content/public/common/content_ipc_logging.h"
|
||||
#define IPC_LOG_TABLE_ADD_ENTRY(msg_id, logger) \
|
||||
content::RegisterIPCLogger(msg_id, logger)
|
||||
#include "content/shell/common/shell_messages.h"
|
||||
#endif
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
|
@ -40,7 +40,6 @@
|
||||
#include "content/shell/browser/web_test/web_test_bluetooth_chooser_factory.h"
|
||||
#include "content/shell/browser/web_test/web_test_devtools_bindings.h"
|
||||
#include "content/shell/browser/web_test/web_test_javascript_dialog_manager.h"
|
||||
#include "content/shell/common/shell_messages.h"
|
||||
#include "content/shell/common/shell_switches.h"
|
||||
#include "content/shell/common/web_test/web_test_switches.h"
|
||||
#include "media/media_buildflags.h"
|
||||
|
@ -41,7 +41,6 @@
|
||||
#include "content/shell/browser/shell_url_request_context_getter.h"
|
||||
#include "content/shell/browser/shell_web_contents_view_delegate_creator.h"
|
||||
#include "content/shell/common/power_monitor_test.mojom.h"
|
||||
#include "content/shell/common/shell_messages.h"
|
||||
#include "content/shell/common/shell_switches.h"
|
||||
#include "content/shell/common/web_test.mojom.h"
|
||||
#include "content/shell/common/web_test/fake_bluetooth_chooser.mojom.h"
|
||||
|
@ -54,6 +54,7 @@
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "content/public/common/bindings_policy.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "content/public/common/page_state.h"
|
||||
#include "content/public/common/url_constants.h"
|
||||
#include "content/public/test/web_test_support.h"
|
||||
#include "content/shell/browser/shell.h"
|
||||
@ -68,7 +69,7 @@
|
||||
#include "content/shell/browser/web_test/web_test_content_browser_client.h"
|
||||
#include "content/shell/browser/web_test/web_test_devtools_bindings.h"
|
||||
#include "content/shell/browser/web_test/web_test_first_device_bluetooth_chooser.h"
|
||||
#include "content/shell/common/shell_messages.h"
|
||||
#include "content/shell/common/web_test/blink_test_messages.h"
|
||||
#include "content/shell/common/web_test/web_test_messages.h"
|
||||
#include "content/shell/common/web_test/web_test_switches.h"
|
||||
#include "content/shell/common/web_test/web_test_utils.h"
|
||||
@ -588,7 +589,7 @@ void BlinkTestController::OpenURL(const GURL& url) {
|
||||
void BlinkTestController::OnTestFinishedInSecondaryRenderer() {
|
||||
RenderViewHost* main_render_view_host =
|
||||
main_window_->web_contents()->GetRenderViewHost();
|
||||
main_render_view_host->Send(new ShellViewMsg_TestFinishedInSecondaryRenderer(
|
||||
main_render_view_host->Send(new BlinkTestMsg_TestFinishedInSecondaryRenderer(
|
||||
main_render_view_host->GetRoutingID()));
|
||||
}
|
||||
|
||||
@ -809,28 +810,28 @@ bool BlinkTestController::OnMessageReceived(const IPC::Message& message) {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
bool handled = true;
|
||||
IPC_BEGIN_MESSAGE_MAP(BlinkTestController, message)
|
||||
IPC_MESSAGE_HANDLER(ShellViewHostMsg_PrintMessage, OnPrintMessage)
|
||||
IPC_MESSAGE_HANDLER(ShellViewHostMsg_PrintMessageToStderr,
|
||||
IPC_MESSAGE_HANDLER(BlinkTestHostMsg_PrintMessage, OnPrintMessage)
|
||||
IPC_MESSAGE_HANDLER(BlinkTestHostMsg_PrintMessageToStderr,
|
||||
OnPrintMessageToStderr)
|
||||
IPC_MESSAGE_HANDLER(ShellViewHostMsg_InitiateLayoutDump,
|
||||
IPC_MESSAGE_HANDLER(BlinkTestHostMsg_InitiateLayoutDump,
|
||||
OnInitiateLayoutDump)
|
||||
IPC_MESSAGE_HANDLER(ShellViewHostMsg_OverridePreferences,
|
||||
IPC_MESSAGE_HANDLER(BlinkTestHostMsg_OverridePreferences,
|
||||
OnOverridePreferences)
|
||||
IPC_MESSAGE_HANDLER(ShellViewHostMsg_SetPopupBlockingEnabled,
|
||||
IPC_MESSAGE_HANDLER(BlinkTestHostMsg_SetPopupBlockingEnabled,
|
||||
OnSetPopupBlockingEnabled)
|
||||
IPC_MESSAGE_HANDLER(ShellViewHostMsg_NavigateSecondaryWindow,
|
||||
IPC_MESSAGE_HANDLER(BlinkTestHostMsg_NavigateSecondaryWindow,
|
||||
OnNavigateSecondaryWindow)
|
||||
IPC_MESSAGE_HANDLER(ShellViewHostMsg_GoToOffset, OnGoToOffset)
|
||||
IPC_MESSAGE_HANDLER(ShellViewHostMsg_Reload, OnReload)
|
||||
IPC_MESSAGE_HANDLER(ShellViewHostMsg_LoadURLForFrame, OnLoadURLForFrame)
|
||||
IPC_MESSAGE_HANDLER(ShellViewHostMsg_CloseRemainingWindows,
|
||||
IPC_MESSAGE_HANDLER(BlinkTestHostMsg_GoToOffset, OnGoToOffset)
|
||||
IPC_MESSAGE_HANDLER(BlinkTestHostMsg_Reload, OnReload)
|
||||
IPC_MESSAGE_HANDLER(BlinkTestHostMsg_LoadURLForFrame, OnLoadURLForFrame)
|
||||
IPC_MESSAGE_HANDLER(BlinkTestHostMsg_CloseRemainingWindows,
|
||||
OnCloseRemainingWindows)
|
||||
IPC_MESSAGE_HANDLER(ShellViewHostMsg_ResetDone, OnResetDone)
|
||||
IPC_MESSAGE_HANDLER(ShellViewHostMsg_SetBluetoothManualChooser,
|
||||
IPC_MESSAGE_HANDLER(BlinkTestHostMsg_ResetDone, OnResetDone)
|
||||
IPC_MESSAGE_HANDLER(BlinkTestHostMsg_SetBluetoothManualChooser,
|
||||
OnSetBluetoothManualChooser)
|
||||
IPC_MESSAGE_HANDLER(ShellViewHostMsg_GetBluetoothManualChooserEvents,
|
||||
IPC_MESSAGE_HANDLER(BlinkTestHostMsg_GetBluetoothManualChooserEvents,
|
||||
OnGetBluetoothManualChooserEvents)
|
||||
IPC_MESSAGE_HANDLER(ShellViewHostMsg_SendBluetoothManualChooserEvent,
|
||||
IPC_MESSAGE_HANDLER(BlinkTestHostMsg_SendBluetoothManualChooserEvent,
|
||||
OnSendBluetoothManualChooserEvent)
|
||||
IPC_MESSAGE_HANDLER(WebTestHostMsg_BlockThirdPartyCookies,
|
||||
OnBlockThirdPartyCookies)
|
||||
@ -1056,13 +1057,13 @@ void BlinkTestController::OnCleanupFinished() {
|
||||
if (main_window_) {
|
||||
main_window_->web_contents()->Stop();
|
||||
RenderViewHost* rvh = main_window_->web_contents()->GetRenderViewHost();
|
||||
rvh->Send(new ShellViewMsg_Reset(rvh->GetRoutingID()));
|
||||
rvh->Send(new BlinkTestMsg_Reset(rvh->GetRoutingID()));
|
||||
}
|
||||
if (secondary_window_) {
|
||||
secondary_window_->web_contents()->Stop();
|
||||
RenderViewHost* rvh =
|
||||
secondary_window_->web_contents()->GetRenderViewHost();
|
||||
rvh->Send(new ShellViewMsg_Reset(rvh->GetRoutingID()));
|
||||
rvh->Send(new BlinkTestMsg_Reset(rvh->GetRoutingID()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1239,7 +1240,7 @@ void BlinkTestController::OnDumpFrameLayoutResponse(int frame_tree_node_id,
|
||||
// Continue finishing the test.
|
||||
RenderViewHost* render_view_host =
|
||||
main_window_->web_contents()->GetRenderViewHost();
|
||||
render_view_host->Send(new ShellViewMsg_LayoutDumpCompleted(
|
||||
render_view_host->Send(new BlinkTestMsg_LayoutDumpCompleted(
|
||||
render_view_host->GetRoutingID(), stitched_layout_dump));
|
||||
}
|
||||
|
||||
@ -1348,7 +1349,7 @@ void BlinkTestController::OnGetBluetoothManualChooserEvents() {
|
||||
return;
|
||||
}
|
||||
RenderViewHost* rvh = main_window_->web_contents()->GetRenderViewHost();
|
||||
rvh->Send(new ShellViewMsg_ReplyBluetoothManualChooserEvents(
|
||||
rvh->Send(new BlinkTestMsg_ReplyBluetoothManualChooserEvents(
|
||||
rvh->GetRoutingID(), bluetooth_chooser_factory_->GetAndResetEvents()));
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
#include "content/public/browser/render_frame_host.h"
|
||||
#include "content/shell/browser/web_test/blink_test_controller.h"
|
||||
#include "content/shell/common/shell_messages.h"
|
||||
|
||||
namespace content {
|
||||
|
||||
|
@ -33,7 +33,6 @@
|
||||
#include "content/shell/browser/web_test/web_test_browser_context.h"
|
||||
#include "content/shell/browser/web_test/web_test_browser_main_parts.h"
|
||||
#include "content/shell/browser/web_test/web_test_message_filter.h"
|
||||
#include "content/shell/common/shell_messages.h"
|
||||
#include "content/shell/common/web_test/web_test_switches.h"
|
||||
#include "content/shell/renderer/web_test/blink_test_helpers.h"
|
||||
#include "content/test/mock_clipboard_host.h"
|
||||
|
@ -1,76 +0,0 @@
|
||||
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef CONTENT_SHELL_COMMON_SHELL_MESSAGES_H_
|
||||
#define CONTENT_SHELL_COMMON_SHELL_MESSAGES_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/values.h"
|
||||
#include "content/public/common/common_param_traits.h"
|
||||
#include "content/public/common/page_state.h"
|
||||
#include "ipc/ipc_message_macros.h"
|
||||
#include "ipc/ipc_platform_file.h"
|
||||
#include "third_party/skia/include/core/SkBitmap.h"
|
||||
#include "ui/gfx/ipc/gfx_param_traits.h"
|
||||
#include "ui/gfx/ipc/skia/gfx_skia_param_traits.h"
|
||||
|
||||
#define IPC_MESSAGE_START ShellMsgStart
|
||||
|
||||
// Tells the renderer to reset all test runners.
|
||||
IPC_MESSAGE_ROUTED0(ShellViewMsg_Reset)
|
||||
|
||||
// Tells the main window that a secondary renderer in a different process asked
|
||||
// to finish the test.
|
||||
IPC_MESSAGE_ROUTED0(ShellViewMsg_TestFinishedInSecondaryRenderer)
|
||||
|
||||
// Notifies BlinkTestRunner that the layout dump has completed
|
||||
// (and that it can proceed with finishing up the test).
|
||||
IPC_MESSAGE_ROUTED1(ShellViewMsg_LayoutDumpCompleted,
|
||||
std::string /* completed/stitched layout dump */)
|
||||
|
||||
// Asks the browser process to perform a layout dump spanning all the
|
||||
// (potentially cross-process) frames. This goes through multiple
|
||||
// WebTestControl.DumpFrameLayout calls and ends with sending of
|
||||
// ShellViewMsg_LayoutDumpCompleted.
|
||||
IPC_MESSAGE_ROUTED0(ShellViewHostMsg_InitiateLayoutDump)
|
||||
|
||||
IPC_MESSAGE_ROUTED0(ShellViewHostMsg_ResetDone)
|
||||
|
||||
// WebTestDelegate related.
|
||||
IPC_MESSAGE_ROUTED1(ShellViewHostMsg_OverridePreferences,
|
||||
content::WebPreferences /* preferences */)
|
||||
IPC_MESSAGE_ROUTED1(ShellViewHostMsg_PrintMessage,
|
||||
std::string /* message */)
|
||||
IPC_MESSAGE_ROUTED1(ShellViewHostMsg_PrintMessageToStderr,
|
||||
std::string /* message */)
|
||||
IPC_MESSAGE_ROUTED1(ShellViewHostMsg_NavigateSecondaryWindow, GURL /* url */)
|
||||
IPC_MESSAGE_ROUTED2(ShellViewHostMsg_ShowDevTools,
|
||||
std::string /* settings */,
|
||||
std::string /* frontend_url */)
|
||||
IPC_MESSAGE_ROUTED2(ShellViewHostMsg_EvaluateInDevTools,
|
||||
int /* call_id */,
|
||||
std::string /* script */)
|
||||
IPC_MESSAGE_ROUTED0(ShellViewHostMsg_CloseDevTools)
|
||||
IPC_MESSAGE_ROUTED1(ShellViewHostMsg_GoToOffset,
|
||||
int /* offset */)
|
||||
IPC_MESSAGE_ROUTED0(ShellViewHostMsg_Reload)
|
||||
IPC_MESSAGE_ROUTED2(ShellViewHostMsg_LoadURLForFrame,
|
||||
GURL /* url */,
|
||||
std::string /* frame_name */)
|
||||
IPC_MESSAGE_ROUTED0(ShellViewHostMsg_CloseRemainingWindows)
|
||||
|
||||
IPC_MESSAGE_ROUTED1(ShellViewHostMsg_SetBluetoothManualChooser,
|
||||
bool /* enable */)
|
||||
IPC_MESSAGE_ROUTED0(ShellViewHostMsg_GetBluetoothManualChooserEvents)
|
||||
IPC_MESSAGE_ROUTED1(ShellViewMsg_ReplyBluetoothManualChooserEvents,
|
||||
std::vector<std::string> /* events */)
|
||||
IPC_MESSAGE_ROUTED2(ShellViewHostMsg_SendBluetoothManualChooserEvent,
|
||||
std::string /* event */,
|
||||
std::string /* argument */)
|
||||
IPC_MESSAGE_ROUTED1(ShellViewHostMsg_SetPopupBlockingEnabled,
|
||||
bool /* block_popups */)
|
||||
|
||||
#endif // CONTENT_SHELL_COMMON_SHELL_MESSAGES_H_
|
@ -4,31 +4,31 @@
|
||||
|
||||
// Get basic type definitions.
|
||||
#define IPC_MESSAGE_IMPL
|
||||
#undef CONTENT_SHELL_COMMON_SHELL_MESSAGES_H_
|
||||
#include "content/shell/common/shell_messages.h"
|
||||
#undef CONTENT_SHELL_COMMON_WEB_TEST_BLINK_TEST_MESSAGES_H_
|
||||
#include "content/shell/common/web_test/blink_test_messages.h"
|
||||
|
||||
// Generate constructors.
|
||||
#include "ipc/struct_constructor_macros.h"
|
||||
#undef CONTENT_SHELL_COMMON_SHELL_MESSAGES_H_
|
||||
#include "content/shell/common/shell_messages.h"
|
||||
#undef CONTENT_SHELL_COMMON_WEB_TEST_BLINK_TEST_MESSAGES_H_
|
||||
#include "content/shell/common/web_test/blink_test_messages.h"
|
||||
|
||||
// Generate param traits write methods.
|
||||
#include "ipc/param_traits_write_macros.h"
|
||||
namespace IPC {
|
||||
#undef CONTENT_SHELL_COMMON_SHELL_MESSAGES_H_
|
||||
#include "content/shell/common/shell_messages.h"
|
||||
#undef CONTENT_SHELL_COMMON_WEB_TEST_BLINK_TEST_MESSAGES_H_
|
||||
#include "content/shell/common/web_test/blink_test_messages.h"
|
||||
} // namespace IPC
|
||||
|
||||
// Generate param traits read methods.
|
||||
#include "ipc/param_traits_read_macros.h"
|
||||
namespace IPC {
|
||||
#undef CONTENT_SHELL_COMMON_SHELL_MESSAGES_H_
|
||||
#include "content/shell/common/shell_messages.h"
|
||||
#undef CONTENT_SHELL_COMMON_WEB_TEST_BLINK_TEST_MESSAGES_H_
|
||||
#include "content/shell/common/web_test/blink_test_messages.h"
|
||||
} // namespace IPC
|
||||
|
||||
// Generate param traits log methods.
|
||||
#include "ipc/param_traits_log_macros.h"
|
||||
namespace IPC {
|
||||
#undef CONTENT_SHELL_COMMON_SHELL_MESSAGES_H_
|
||||
#include "content/shell/common/shell_messages.h"
|
||||
#undef CONTENT_SHELL_COMMON_WEB_TEST_BLINK_TEST_MESSAGES_H_
|
||||
#include "content/shell/common/web_test/blink_test_messages.h"
|
||||
} // namespace IPC
|
64
content/shell/common/web_test/blink_test_messages.h
Normal file
64
content/shell/common/web_test/blink_test_messages.h
Normal file
@ -0,0 +1,64 @@
|
||||
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef CONTENT_SHELL_COMMON_WEB_TEST_BLINK_TEST_MESSAGES_H_
|
||||
#define CONTENT_SHELL_COMMON_WEB_TEST_BLINK_TEST_MESSAGES_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/values.h"
|
||||
#include "content/public/common/common_param_traits.h"
|
||||
#include "ipc/ipc_message_macros.h"
|
||||
#include "ipc/ipc_platform_file.h"
|
||||
|
||||
#define IPC_MESSAGE_START BlinkTestMsgStart
|
||||
|
||||
// Tells the renderer to reset all test runners.
|
||||
IPC_MESSAGE_ROUTED0(BlinkTestMsg_Reset)
|
||||
|
||||
// Tells the main window that a secondary renderer in a different process asked
|
||||
// to finish the test.
|
||||
IPC_MESSAGE_ROUTED0(BlinkTestMsg_TestFinishedInSecondaryRenderer)
|
||||
|
||||
// Notifies BlinkTestRunner that the layout dump has completed
|
||||
// (and that it can proceed with finishing up the test).
|
||||
IPC_MESSAGE_ROUTED1(BlinkTestMsg_LayoutDumpCompleted,
|
||||
std::string /* completed/stitched layout dump */)
|
||||
|
||||
IPC_MESSAGE_ROUTED1(BlinkTestMsg_ReplyBluetoothManualChooserEvents,
|
||||
std::vector<std::string> /* events */)
|
||||
|
||||
// Asks the browser process to perform a layout dump spanning all the
|
||||
// (potentially cross-process) frames. This goes through multiple
|
||||
// WebTestControl.DumpFrameLayout calls and ends with sending of
|
||||
// BlinkTestMsg_LayoutDumpCompleted.
|
||||
IPC_MESSAGE_ROUTED0(BlinkTestHostMsg_InitiateLayoutDump)
|
||||
|
||||
IPC_MESSAGE_ROUTED0(BlinkTestHostMsg_ResetDone)
|
||||
|
||||
// WebTestDelegate related.
|
||||
IPC_MESSAGE_ROUTED1(BlinkTestHostMsg_OverridePreferences,
|
||||
content::WebPreferences /* preferences */)
|
||||
IPC_MESSAGE_ROUTED1(BlinkTestHostMsg_PrintMessage, std::string /* message */)
|
||||
IPC_MESSAGE_ROUTED1(BlinkTestHostMsg_PrintMessageToStderr,
|
||||
std::string /* message */)
|
||||
IPC_MESSAGE_ROUTED1(BlinkTestHostMsg_NavigateSecondaryWindow, GURL /* url */)
|
||||
IPC_MESSAGE_ROUTED1(BlinkTestHostMsg_GoToOffset, int /* offset */)
|
||||
IPC_MESSAGE_ROUTED0(BlinkTestHostMsg_Reload)
|
||||
IPC_MESSAGE_ROUTED2(BlinkTestHostMsg_LoadURLForFrame,
|
||||
GURL /* url */,
|
||||
std::string /* frame_name */)
|
||||
IPC_MESSAGE_ROUTED0(BlinkTestHostMsg_CloseRemainingWindows)
|
||||
|
||||
IPC_MESSAGE_ROUTED1(BlinkTestHostMsg_SetBluetoothManualChooser,
|
||||
bool /* enable */)
|
||||
IPC_MESSAGE_ROUTED0(BlinkTestHostMsg_GetBluetoothManualChooserEvents)
|
||||
IPC_MESSAGE_ROUTED2(BlinkTestHostMsg_SendBluetoothManualChooserEvent,
|
||||
std::string /* event */,
|
||||
std::string /* argument */)
|
||||
IPC_MESSAGE_ROUTED1(BlinkTestHostMsg_SetPopupBlockingEnabled,
|
||||
bool /* block_popups */)
|
||||
|
||||
#endif // CONTENT_SHELL_COMMON_WEB_TEST_BLINK_TEST_MESSAGES_H_
|
@ -4,14 +4,14 @@
|
||||
|
||||
#include "content/shell/common/web_test/web_test_content_client.h"
|
||||
|
||||
#include "content/shell/common/shell_messages.h"
|
||||
#include "content/shell/common/web_test/blink_test_messages.h"
|
||||
|
||||
namespace content {
|
||||
|
||||
bool WebTestContentClient::CanSendWhileSwappedOut(const IPC::Message* message) {
|
||||
switch (message->type()) {
|
||||
// Used in web tests; handled in BlinkTestController.
|
||||
case ShellViewHostMsg_PrintMessage::ID:
|
||||
case BlinkTestHostMsg_PrintMessage::ID:
|
||||
return true;
|
||||
|
||||
default:
|
||||
|
@ -42,8 +42,8 @@
|
||||
#include "content/public/renderer/render_view.h"
|
||||
#include "content/public/renderer/render_view_visitor.h"
|
||||
#include "content/public/test/web_test_support.h"
|
||||
#include "content/shell/common/shell_messages.h"
|
||||
#include "content/shell/common/shell_switches.h"
|
||||
#include "content/shell/common/web_test/blink_test_messages.h"
|
||||
#include "content/shell/common/web_test/web_test_messages.h"
|
||||
#include "content/shell/renderer/web_test/blink_test_helpers.h"
|
||||
#include "content/shell/renderer/web_test/web_test_render_thread_observer.h"
|
||||
@ -187,11 +187,11 @@ void BlinkTestRunner::SetEditCommand(const std::string& name,
|
||||
}
|
||||
|
||||
void BlinkTestRunner::PrintMessageToStderr(const std::string& message) {
|
||||
Send(new ShellViewHostMsg_PrintMessageToStderr(routing_id(), message));
|
||||
Send(new BlinkTestHostMsg_PrintMessageToStderr(routing_id(), message));
|
||||
}
|
||||
|
||||
void BlinkTestRunner::PrintMessage(const std::string& message) {
|
||||
Send(new ShellViewHostMsg_PrintMessage(routing_id(), message));
|
||||
Send(new BlinkTestHostMsg_PrintMessage(routing_id(), message));
|
||||
}
|
||||
|
||||
void BlinkTestRunner::PostTask(base::OnceClosure task) {
|
||||
@ -261,12 +261,12 @@ void BlinkTestRunner::ApplyPreferences() {
|
||||
WebPreferences prefs = render_view()->GetWebkitPreferences();
|
||||
ExportWebTestSpecificPreferences(prefs_, &prefs);
|
||||
render_view()->SetWebkitPreferences(prefs);
|
||||
Send(new ShellViewHostMsg_OverridePreferences(routing_id(), prefs));
|
||||
Send(new BlinkTestHostMsg_OverridePreferences(routing_id(), prefs));
|
||||
}
|
||||
|
||||
void BlinkTestRunner::SetPopupBlockingEnabled(bool block_popups) {
|
||||
Send(
|
||||
new ShellViewHostMsg_SetPopupBlockingEnabled(routing_id(), block_popups));
|
||||
new BlinkTestHostMsg_SetPopupBlockingEnabled(routing_id(), block_popups));
|
||||
}
|
||||
|
||||
void BlinkTestRunner::UseUnfortunateSynchronousResizeMode(bool enable) {
|
||||
@ -286,7 +286,7 @@ void BlinkTestRunner::DisableAutoResizeMode(const WebSize& new_size) {
|
||||
}
|
||||
|
||||
void BlinkTestRunner::NavigateSecondaryWindow(const GURL& url) {
|
||||
Send(new ShellViewHostMsg_NavigateSecondaryWindow(routing_id(), url));
|
||||
Send(new BlinkTestHostMsg_NavigateSecondaryWindow(routing_id(), url));
|
||||
}
|
||||
|
||||
void BlinkTestRunner::InspectSecondaryWindow() {
|
||||
@ -355,19 +355,19 @@ void BlinkTestRunner::SetBluetoothFakeAdapter(const std::string& adapter_name,
|
||||
}
|
||||
|
||||
void BlinkTestRunner::SetBluetoothManualChooser(bool enable) {
|
||||
Send(new ShellViewHostMsg_SetBluetoothManualChooser(routing_id(), enable));
|
||||
Send(new BlinkTestHostMsg_SetBluetoothManualChooser(routing_id(), enable));
|
||||
}
|
||||
|
||||
void BlinkTestRunner::GetBluetoothManualChooserEvents(
|
||||
base::OnceCallback<void(const std::vector<std::string>&)> callback) {
|
||||
get_bluetooth_events_callbacks_.push_back(std::move(callback));
|
||||
Send(new ShellViewHostMsg_GetBluetoothManualChooserEvents(routing_id()));
|
||||
Send(new BlinkTestHostMsg_GetBluetoothManualChooserEvents(routing_id()));
|
||||
}
|
||||
|
||||
void BlinkTestRunner::SendBluetoothManualChooserEvent(
|
||||
const std::string& event,
|
||||
const std::string& argument) {
|
||||
Send(new ShellViewHostMsg_SendBluetoothManualChooserEvent(routing_id(), event,
|
||||
Send(new BlinkTestHostMsg_SendBluetoothManualChooserEvent(routing_id(), event,
|
||||
argument));
|
||||
}
|
||||
|
||||
@ -506,7 +506,7 @@ void BlinkTestRunner::CaptureLocalLayoutDump() {
|
||||
// TODO(vmpstr): Since CaptureDump is called from the browser, we can be
|
||||
// smart and move this logic directly to the browser.
|
||||
waiting_for_layout_dump_results_ = true;
|
||||
Send(new ShellViewHostMsg_InitiateLayoutDump(routing_id()));
|
||||
Send(new BlinkTestHostMsg_InitiateLayoutDump(routing_id()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -577,7 +577,7 @@ void BlinkTestRunner::CaptureDumpComplete() {
|
||||
}
|
||||
|
||||
void BlinkTestRunner::CloseRemainingWindows() {
|
||||
Send(new ShellViewHostMsg_CloseRemainingWindows(routing_id()));
|
||||
Send(new BlinkTestHostMsg_CloseRemainingWindows(routing_id()));
|
||||
}
|
||||
|
||||
void BlinkTestRunner::DeleteAllCookies() {
|
||||
@ -589,16 +589,16 @@ int BlinkTestRunner::NavigationEntryCount() {
|
||||
}
|
||||
|
||||
void BlinkTestRunner::GoToOffset(int offset) {
|
||||
Send(new ShellViewHostMsg_GoToOffset(routing_id(), offset));
|
||||
Send(new BlinkTestHostMsg_GoToOffset(routing_id(), offset));
|
||||
}
|
||||
|
||||
void BlinkTestRunner::Reload() {
|
||||
Send(new ShellViewHostMsg_Reload(routing_id()));
|
||||
Send(new BlinkTestHostMsg_Reload(routing_id()));
|
||||
}
|
||||
|
||||
void BlinkTestRunner::LoadURLForFrame(const WebURL& url,
|
||||
const std::string& frame_name) {
|
||||
Send(new ShellViewHostMsg_LoadURLForFrame(routing_id(), url, frame_name));
|
||||
Send(new BlinkTestHostMsg_LoadURLForFrame(routing_id(), url, frame_name));
|
||||
}
|
||||
|
||||
bool BlinkTestRunner::AllowExternalPages() {
|
||||
@ -686,12 +686,12 @@ void BlinkTestRunner::DidClearWindowObject(WebLocalFrame* frame) {
|
||||
bool BlinkTestRunner::OnMessageReceived(const IPC::Message& message) {
|
||||
bool handled = true;
|
||||
IPC_BEGIN_MESSAGE_MAP(BlinkTestRunner, message)
|
||||
IPC_MESSAGE_HANDLER(ShellViewMsg_Reset, OnReset)
|
||||
IPC_MESSAGE_HANDLER(ShellViewMsg_TestFinishedInSecondaryRenderer,
|
||||
IPC_MESSAGE_HANDLER(BlinkTestMsg_Reset, OnReset)
|
||||
IPC_MESSAGE_HANDLER(BlinkTestMsg_TestFinishedInSecondaryRenderer,
|
||||
OnTestFinishedInSecondaryRenderer)
|
||||
IPC_MESSAGE_HANDLER(ShellViewMsg_ReplyBluetoothManualChooserEvents,
|
||||
IPC_MESSAGE_HANDLER(BlinkTestMsg_ReplyBluetoothManualChooserEvents,
|
||||
OnReplyBluetoothManualChooserEvents)
|
||||
IPC_MESSAGE_HANDLER(ShellViewMsg_LayoutDumpCompleted, OnLayoutDumpCompleted)
|
||||
IPC_MESSAGE_HANDLER(BlinkTestMsg_LayoutDumpCompleted, OnLayoutDumpCompleted)
|
||||
IPC_MESSAGE_UNHANDLED(handled = false)
|
||||
IPC_END_MESSAGE_MAP()
|
||||
|
||||
@ -707,7 +707,7 @@ void BlinkTestRunner::DidCommitProvisionalLoad(WebLocalFrame* frame,
|
||||
if (waiting_for_reset_ && frame == render_view()->GetWebView()->MainFrame() &&
|
||||
GURL(frame->GetDocumentLoader()->GetUrl()).IsAboutBlank()) {
|
||||
waiting_for_reset_ = false;
|
||||
Send(new ShellViewHostMsg_ResetDone(routing_id()));
|
||||
Send(new BlinkTestHostMsg_ResetDone(routing_id()));
|
||||
}
|
||||
if (!focus_on_next_commit_)
|
||||
return;
|
||||
@ -817,7 +817,7 @@ void BlinkTestRunner::OnSetTestConfiguration(
|
||||
}
|
||||
|
||||
void BlinkTestRunner::OnReset() {
|
||||
// ShellViewMsg_Reset should always be sent to the *current* view.
|
||||
// BlinkTestMsg_Reset should always be sent to the *current* view.
|
||||
DCHECK(render_view()->GetWebView()->MainFrame()->IsWebLocalFrame());
|
||||
WebLocalFrame* main_frame =
|
||||
render_view()->GetWebView()->MainFrame()->ToWebLocalFrame();
|
||||
|
@ -7,7 +7,6 @@
|
||||
#include "content/public/common/content_client.h"
|
||||
#include "content/public/renderer/render_thread.h"
|
||||
#include "content/public/test/web_test_support.h"
|
||||
#include "content/shell/common/shell_messages.h"
|
||||
#include "content/shell/common/web_test/web_test_messages.h"
|
||||
#include "content/shell/common/web_test/web_test_switches.h"
|
||||
#include "content/shell/test_runner/test_interfaces.h"
|
||||
|
@ -34,7 +34,7 @@ enum IPCMessageStart {
|
||||
ExtensionMsgStart,
|
||||
TextInputClientMsgStart,
|
||||
JavaBridgeMsgStart,
|
||||
ShellMsgStart,
|
||||
BlinkTestMsgStart,
|
||||
AccessibilityMsgStart,
|
||||
PrerenderMsgStart,
|
||||
ChromotingMsgStart,
|
||||
|
@ -47,7 +47,7 @@ static bool check_msgtable() {
|
||||
// Exclude test and other non-browser files from consideration. Do not
|
||||
// include message files used inside the actual chrome browser in this list.
|
||||
exemptions.push_back(TestMsgStart);
|
||||
exemptions.push_back(ShellMsgStart);
|
||||
exemptions.push_back(BlinkTestMsgStart);
|
||||
exemptions.push_back(WebTestMsgStart);
|
||||
exemptions.push_back(CastCryptoMsgStart); // Reserved for chromecast.
|
||||
exemptions.push_back(CastChannelMsgStart); // Reserved for chromecast.
|
||||
|
Reference in New Issue
Block a user