summaryrefslogtreecommitdiff
path: root/chromium/content/shell
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/shell')
-rw-r--r--chromium/content/shell/BUILD.gn22
-rw-r--r--chromium/content/shell/android/BUILD.gn1
-rw-r--r--chromium/content/shell/common/shell_controller.test-mojom27
-rw-r--r--chromium/content/shell/common/web_test/web_test.mojom12
4 files changed, 49 insertions, 13 deletions
diff --git a/chromium/content/shell/BUILD.gn b/chromium/content/shell/BUILD.gn
index 5a50a2d4145..73009ebba2f 100644
--- a/chromium/content/shell/BUILD.gn
+++ b/chromium/content/shell/BUILD.gn
@@ -136,8 +136,6 @@ static_library("web_test_renderer") {
"renderer/web_test/test_preferences.h",
"renderer/web_test/test_runner.cc",
"renderer/web_test/test_runner.h",
- "renderer/web_test/test_runner_for_specific_view.cc",
- "renderer/web_test/test_runner_for_specific_view.h",
"renderer/web_test/test_websocket_handshake_throttle_provider.cc",
"renderer/web_test/test_websocket_handshake_throttle_provider.h",
"renderer/web_test/text_input_controller.cc",
@@ -179,6 +177,7 @@ static_library("web_test_renderer") {
"//gpu/command_buffer/client:gles2_interface",
"//media/capture",
"//printing",
+ "//printing/mojom",
"//services/device/public/mojom",
"//skia",
"//skia:test_fonts",
@@ -295,16 +294,12 @@ static_library("content_shell_lib") {
"browser/web_test/fake_bluetooth_chooser_factory.h",
"browser/web_test/fake_bluetooth_delegate.cc",
"browser/web_test/fake_bluetooth_delegate.h",
- "browser/web_test/fake_bluetooth_scanning_prompt.cc",
- "browser/web_test/fake_bluetooth_scanning_prompt.h",
"browser/web_test/leak_detector.cc",
"browser/web_test/leak_detector.h",
"browser/web_test/mock_client_hints_controller_delegate.cc",
"browser/web_test/mock_client_hints_controller_delegate.h",
"browser/web_test/mojo_web_test_helper.cc",
"browser/web_test/mojo_web_test_helper.h",
- "browser/web_test/secondary_test_window_observer.cc",
- "browser/web_test/secondary_test_window_observer.h",
"browser/web_test/test_info_extractor.cc",
"browser/web_test/test_info_extractor.h",
"browser/web_test/web_test_background_fetch_delegate.cc",
@@ -348,8 +343,6 @@ static_library("content_shell_lib") {
"browser/web_test/web_test_shell_platform_delegate.cc",
"browser/web_test/web_test_shell_platform_delegate.h",
"browser/web_test/web_test_shell_platform_delegate_mac.mm",
- "browser/web_test/web_test_tts_controller_delegate.cc",
- "browser/web_test/web_test_tts_controller_delegate.h",
"browser/web_test/web_test_tts_platform.cc",
"browser/web_test/web_test_tts_platform.h",
"common/power_monitor_test_impl.cc",
@@ -407,6 +400,7 @@ static_library("content_shell_lib") {
":client_hints_util",
":content_browsertests_mojom",
":resources",
+ ":shell_controller_mojom",
":web_test_common",
"//base",
"//base:base_static",
@@ -675,6 +669,7 @@ repack("pak") {
"$root_gen_dir/net/net_resources.pak",
"$root_gen_dir/third_party/blink/public/resources/blink_resources.pak",
"$root_gen_dir/third_party/blink/public/resources/blink_scaled_resources_100_percent.pak",
+ "$root_gen_dir/third_party/blink/public/resources/inspector_overlay_resources.pak",
"$root_gen_dir/third_party/blink/public/strings/blink_strings_en-US.pak",
"$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
"$root_gen_dir/ui/resources/webui_resources.pak",
@@ -692,6 +687,7 @@ repack("pak") {
"//content/browser/webrtc/resources",
"//mojo/public/js:resources",
"//net:net_resources",
+ "//third_party/blink/public:devtools_inspector_resources",
"//third_party/blink/public:resources",
"//third_party/blink/public:scaled_resources_100_percent",
"//third_party/blink/public/strings",
@@ -704,10 +700,10 @@ repack("pak") {
sources +=
[ "$root_gen_dir/ui/views/resources/views_resources_100_percent.pak" ]
}
- if (!is_android) {
+ if (!is_android && !is_fuchsia) {
sources +=
[ "$root_gen_dir/content/browser/devtools/devtools_resources.pak" ]
- deps += [ "//content/browser/devtools:resources" ]
+ deps += [ "//content/browser/devtools:devtools_resources" ]
}
output = "$root_out_dir/content_shell.pak"
}
@@ -1087,3 +1083,9 @@ group("content_shell_crash_test") {
]
}
}
+
+mojom("shell_controller_mojom") {
+ testonly = true
+ sources = [ "common/shell_controller.test-mojom" ]
+ public_deps = [ "//mojo/public/mojom/base" ]
+}
diff --git a/chromium/content/shell/android/BUILD.gn b/chromium/content/shell/android/BUILD.gn
index ab9633d6bb0..3902a89e35c 100644
--- a/chromium/content/shell/android/BUILD.gn
+++ b/chromium/content/shell/android/BUILD.gn
@@ -248,6 +248,7 @@ android_library("content_shell_test_java") {
"//mojo/public/java/system:test_support_java",
"//third_party/android_support_test_runner:rules_java",
"//third_party/android_support_test_runner:runner_java",
+ "//third_party/hamcrest:hamcrest_java",
"//third_party/junit:junit",
"//ui/android:ui_java",
]
diff --git a/chromium/content/shell/common/shell_controller.test-mojom b/chromium/content/shell/common/shell_controller.test-mojom
new file mode 100644
index 00000000000..cf17bb82ee7
--- /dev/null
+++ b/chromium/content/shell/common/shell_controller.test-mojom
@@ -0,0 +1,27 @@
+// Copyright 2020 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.
+
+module content.mojom;
+
+import "mojo/public/mojom/base/string16.mojom";
+import "mojo/public/mojom/base/values.mojom";
+
+// A control interface which can be accessed by clients launching Content Shell
+// with a Mojo invitation on the command line. This is used by
+// LaunchAsMojoClientBrowserTest to exercise that mode of execution.
+interface ShellController {
+ // Requests the (ASCII) value of a command line argument present in the
+ // running Content Shell process which receives this message.
+ GetSwitchValue(string name) => (string? value);
+
+ // Asks the shell to execute the JavaScript code in |script| within the first
+ // available window, and returns the resulting value.
+ ExecuteJavaScript(mojo_base.mojom.String16 script)
+ => (mojo_base.mojom.Value value);
+
+ // Tells Content Shell to close all windows and shut down. After sending this
+ // message, the Content Shell browser process should be expected to terminate
+ // soon.
+ ShutDown();
+};
diff --git a/chromium/content/shell/common/web_test/web_test.mojom b/chromium/content/shell/common/web_test/web_test.mojom
index 6193f47dbaf..dedbfad90b4 100644
--- a/chromium/content/shell/common/web_test/web_test.mojom
+++ b/chromium/content/shell/common/web_test/web_test.mojom
@@ -66,7 +66,7 @@ interface WebTestRenderFrame {
// Performs the complete set of document lifecycle phases, including updates
// to the compositor state and rasterization, then calling the given callback.
- CompositeWithRaster() => ();
+ SynchronouslyCompositeAfterTest() => ();
// Dumps the frame's contents into a string.
DumpFrameLayout() => (string frame_layout_dump);
@@ -143,8 +143,14 @@ interface WebTestControlHost {
// Trigger a reload navigation on the main WebView.
Reload();
- // Invoked when the embedder should close all but the main WebView.
- CloseRemainingWindows();
+ // If the test will be closing its windows explicitly, and wants to look for
+ // leaks due to those windows closing incorrectly, it can specify this to
+ // avoid having them closed at the end of the test before the leak checker.
+ CheckForLeakedWindows();
+
+ // Show or hide the window. This mimics the user switching tabs in a
+ // multi-tab window, or occluding the window.
+ SetMainWindowHidden(bool hidden);
// Trigger a GoToOffset navigation on the main WebView.
GoToOffset(int32 offset);