Commit 32d2479d authored by danakj's avatar danakj Committed by Commit Bot

Move mojoms for web tests into the web_test/ directory.

Rename the target to web_test_common_mojom target and make it a public
dependency of web_test_common, in order to treat them as one big build
target.

The power_monitor_test mojom is for browsertests so separate it into
content_browsertests_mojom, and depend on it from content shell (which
makes the impl) and from content_browsertests (which calls it).

TBR=thakis

Bug: 866140
Change-Id: Ibb40798e1afa94a3f8e983f921f9a5ce64d5882b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134622Reviewed-by: default avatardanakj <danakj@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756102}
parent 2cd6c134
......@@ -1036,7 +1036,7 @@ if (!is_ios) {
":layout_test_data_mojo_bindings",
":layout_test_data_mojo_bindings_lite",
"//content/shell:content_shell",
"//content/shell:mojo_bindings_js_data_deps",
"//content/shell:web_test_common_mojom_js_data_deps",
"//content/test:mojo_web_test_bindings_js_data_deps",
"//device/bluetooth/public/mojom:fake_bluetooth_interfaces_js_data_deps",
"//device/vr/public/mojom:mojom_js_data_deps",
......
......@@ -45,6 +45,24 @@ source_set("android_shell_descriptors") {
public_deps = [ "//content/public/common:content_descriptors" ]
}
mojom("web_test_common_mojom") {
sources = [
"common/web_test/blink_test.mojom",
"common/web_test/fake_bluetooth_chooser.mojom",
"common/web_test/web_test.mojom",
"common/web_test/web_test_bluetooth_fake_adapter_setter.mojom",
]
public_deps = [
"//content/public/common:web_preferences_mojom",
"//mojo/public/mojom/base",
"//skia/public/mojom",
"//ui/accessibility:ax_enums_mojo",
"//ui/gfx/geometry/mojom",
"//url/mojom:url_mojom_gurl",
"//url/mojom:url_mojom_origin",
]
}
source_set("web_test_common") {
testonly = true
sources = [
......@@ -54,6 +72,13 @@ source_set("web_test_common") {
"common/web_test/web_test_switches.cc",
"common/web_test/web_test_switches.h",
]
public_deps = [
# #include'ed by renderer/web_test/blink_test_runner.h
":web_test_common_mojom",
# The generated mojom JS bindings are used by web tests.
":web_test_common_mojom_js",
]
deps = [
"//base",
"//third_party/blink/public:blink_headers",
......@@ -257,13 +282,7 @@ static_library("content_shell_lib") {
public_deps = [
":android_shell_descriptors",
# #include'ed by renderer/web_test/blink_test_runner.h
":mojo_bindings",
# The generated mojom JS bindings are used by web tests.
":mojo_bindings_js",
# This exposes all public content APIs.
# content_shell_lib also exposes all public content APIs.
"//content/public/app:both",
"//content/public/browser",
"//content/public/child",
......@@ -275,6 +294,7 @@ static_library("content_shell_lib") {
]
deps = [
":client_hints_util",
":content_browsertests_mojom",
":resources",
":web_test_common",
"//base",
......@@ -899,23 +919,8 @@ if (is_mac) {
}
}
mojom("mojo_bindings") {
sources = [
"common/blink_test.mojom",
"common/power_monitor_test.mojom",
"common/web_test.mojom",
"common/web_test/fake_bluetooth_chooser.mojom",
"common/web_test/web_test_bluetooth_fake_adapter_setter.mojom",
]
public_deps = [
"//content/public/common:web_preferences_mojom",
"//mojo/public/mojom/base",
"//skia/public/mojom",
"//ui/accessibility:ax_enums_mojo",
"//ui/gfx/geometry/mojom",
"//url/mojom:url_mojom_gurl",
"//url/mojom:url_mojom_origin",
]
mojom("content_browsertests_mojom") {
sources = [ "common/power_monitor_test.mojom" ]
}
group("content_shell_crash_test") {
......
......@@ -33,8 +33,8 @@
#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/web_preferences.h"
#include "content/shell/browser/web_test/leak_detector.h"
#include "content/shell/common/blink_test.mojom.h"
#include "content/shell/common/web_test.mojom.h"
#include "content/shell/common/web_test/blink_test.mojom.h"
#include "content/shell/common/web_test/web_test.mojom.h"
#include "mojo/public/cpp/bindings/associated_receiver_set.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "ui/gfx/geometry/size.h"
......
......@@ -8,7 +8,7 @@
#include <vector>
#include "base/macros.h"
#include "content/shell/common/web_test.mojom.h"
#include "content/shell/common/web_test/web_test.mojom.h"
#include "mojo/public/cpp/bindings/pending_associated_receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/network/public/mojom/cookie_manager.mojom.h"
......
......@@ -40,7 +40,7 @@
#include "content/shell/browser/web_test/web_test_permission_manager.h"
#include "content/shell/browser/web_test/web_test_tts_controller_delegate.h"
#include "content/shell/browser/web_test/web_test_tts_platform.h"
#include "content/shell/common/blink_test.mojom.h"
#include "content/shell/common/web_test/blink_test.mojom.h"
#include "content/shell/common/web_test/web_test_bluetooth_fake_adapter_setter.mojom.h"
#include "content/shell/common/web_test/web_test_switches.h"
#include "content/test/data/mojo_web_test_helper_test.mojom.h"
......
......@@ -12,9 +12,9 @@
#include "build/build_config.h"
#include "content/public/common/client_hints.mojom.h"
#include "content/shell/browser/shell_content_browser_client.h"
#include "content/shell/common/blink_test.mojom-forward.h"
#include "content/shell/common/web_test.mojom-forward.h"
#include "content/shell/common/web_test/blink_test.mojom-forward.h"
#include "content/shell/common/web_test/fake_bluetooth_chooser.mojom-forward.h"
#include "content/shell/common/web_test/web_test.mojom-forward.h"
#include "mojo/public/cpp/bindings/pending_associated_receiver.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "services/service_manager/public/cpp/binder_map.h"
......
......@@ -7,7 +7,6 @@
#include <memory>
#include <utility>
#include "content/shell/common/power_monitor_test.mojom.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
......
......@@ -5,7 +5,6 @@
#include "content/shell/gpu/shell_content_gpu_client.h"
#include "base/bind.h"
#include "content/shell/common/power_monitor_test.mojom.h"
#include "content/shell/common/power_monitor_test_impl.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
......
......@@ -14,7 +14,6 @@
#include "components/cdm/renderer/external_clear_key_key_system_properties.h"
#include "components/web_cache/renderer/web_cache_impl.h"
#include "content/public/test/test_service.mojom.h"
#include "content/shell/common/power_monitor_test.mojom.h"
#include "content/shell/common/power_monitor_test_impl.h"
#include "content/shell/common/shell_switches.h"
#include "content/shell/renderer/shell_render_view_observer.h"
......
......@@ -17,8 +17,8 @@
#include "content/public/common/page_state.h"
#include "content/public/renderer/render_view_observer.h"
#include "content/public/renderer/render_view_observer_tracker.h"
#include "content/shell/common/blink_test.mojom.h"
#include "content/shell/common/web_test.mojom.h"
#include "content/shell/common/web_test/blink_test.mojom.h"
#include "content/shell/common/web_test/web_test.mojom.h"
#include "content/shell/common/web_test/web_test_bluetooth_fake_adapter_setter.mojom.h"
#include "content/shell/test_runner/test_preferences.h"
#include "content/shell/test_runner/web_test_delegate.h"
......
......@@ -7,7 +7,7 @@
#include "base/macros.h"
#include "content/public/renderer/render_frame_observer.h"
#include "content/shell/common/blink_test.mojom.h"
#include "content/shell/common/web_test/blink_test.mojom.h"
#include "mojo/public/cpp/bindings/associated_receiver.h"
#include "mojo/public/cpp/bindings/pending_associated_receiver.h"
......
......@@ -9,7 +9,7 @@
#include "base/macros.h"
#include "content/public/renderer/render_thread_observer.h"
#include "content/shell/common/web_test.mojom.h"
#include "content/shell/common/web_test/web_test.mojom.h"
#include "mojo/public/cpp/bindings/associated_receiver.h"
#include "mojo/public/cpp/bindings/pending_associated_receiver.h"
......
......@@ -25,7 +25,6 @@
#include "content/public/test/test_service.h"
#include "content/public/test/test_service.mojom.h"
#include "content/public/utility/utility_thread.h"
#include "content/shell/common/power_monitor_test.mojom.h"
#include "content/shell/common/power_monitor_test_impl.h"
#include "mojo/public/cpp/bindings/binder_map.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
......
......@@ -770,13 +770,14 @@ static_library("web_test_support") {
"//ui/gfx/geometry",
"//v8",
# This is required to ensure content/shell/common/blink_test.mojom.h is
# generated before attempting to build this target. The file is included
# This is required to ensure
# content/shell/common/web_test/blink_test.mojom.h
# is generated before attempting to build this target. The file is included
# through content/shell/renderer/web_test/blink_test_runner.h. However
# adding a dependency on //content/shell:content_shell_lib as that would
# cause a circular dependency. Instead add this dependency directly to
# fix a flaky build (see https://crbug.com/971978 for more details).
"//content/shell:mojo_bindings",
"//content/shell:web_test_common_mojom",
]
}
......@@ -1163,8 +1164,8 @@ test("content_browsertests") {
"//content/public/gpu",
"//content/public/renderer",
"//content/renderer:for_content_tests",
"//content/shell:content_browsertests_mojom",
"//content/shell:content_shell_lib",
"//content/shell:mojo_bindings",
"//content/shell:pak",
"//content/test:mojo_web_test_bindings",
"//content/test:test_support",
......
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