0

Remove more Lacros leftovers from content/

- Remove IS_CHROMEOS_LACROS code
- Replace IS_CHROMEOS_ASH with the equivalent IS_CHROMEOS
- Similarly for is_chromeos_lacros/is_chromeos_ash.
- Drop obsolete includes/build dependencies.
- Drop lacros-chrome browser tag from gpu tests
- Drop obsolete skip directives from gpu tests

No change in behavior.

Bug: b:365742770 , b:365741912
AX-Relnotes: n/a.
Change-Id: I594d3677a9855d0649deba3ad836a1b3804440f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6097832
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398368}
This commit is contained in:
Georg Neis
2024-12-18 18:25:18 -08:00
committed by Chromium LUCI CQ
parent 042a179230
commit 88d05ae28b
28 changed files with 90 additions and 196 deletions

@ -96,7 +96,7 @@ grit("content_resources") {
"content_resources.pak",
]
if (is_chromeos_ash) {
if (is_chromeos) {
deps = [
"//mojo/public/mojom/base:base_js__generator",
"//ui/base/mojom:mojom_js__generator",

@ -25,7 +25,7 @@ Other resources that belong in this file:
<include name="IDR_DEVTOOLS_PINCH_CURSOR_ICON_2X" file="browser/resources/devtools/devtools_pinch_cursor_2x.png" type="BINDATA" />
<include name="IDR_DEVTOOLS_TOUCH_CURSOR_ICON" file="browser/resources/devtools/devtools_touch_cursor.png" type="BINDATA" />
<include name="IDR_DEVTOOLS_TOUCH_CURSOR_ICON_2X" file="browser/resources/devtools/devtools_touch_cursor_2x.png" type="BINDATA" />
<if expr="chromeos_ash">
<if expr="is_chromeos">
<include name="IDR_UNGUESSABLE_TOKEN_MOJO_JS" file="${root_gen_dir}/mojo/public/mojom/base/unguessable_token.mojom-lite.js" resource_path="mojo/mojo/public/mojom/base/unguessable_token.mojom-lite.js" use_base_dir="false" type="BINDATA" />
<include name="IDR_URL_MOJO_JS" file="${root_gen_dir}/url/mojom/url.mojom-lite.js" resource_path="mojo/url/mojom/url.mojom-lite.js" use_base_dir="false" type="BINDATA" />
</if>

@ -43,7 +43,6 @@ source_set("ppapi_plugin_sources") {
deps = [
"//base",
"//build:chromeos_buildflags",
"//components/discardable_memory/client",
"//content:export",
"//content/child",

@ -241,7 +241,6 @@ target(link_target_type, "renderer") {
"//base",
"//base:i18n",
"//build:chromecast_buildflags",
"//build:chromeos_buildflags",
"//cc",
"//cc/animation",
"//cc/mojo_embedder",
@ -566,10 +565,10 @@ target(link_target_type, "renderer") {
}
if (is_chromeos) {
deps += [ "//chromeos/system:system" ]
}
if (is_chromeos_ash) {
deps += [ "//chromeos:chromeos_export" ]
deps += [
"//chromeos:chromeos_export",
"//chromeos/system",
]
if (target_cpu == "x64") {
deps += [ "//chromeos/ash/components/memory/userspace_swap" ]
}

@ -12,7 +12,6 @@
#include "base/memory/raw_ptr_exclusion.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "build/chromeos_buildflags.h"
#include "content/common/content_export.h"
#include "content/public/renderer/render_accessibility.h"
#include "content/public/renderer/render_frame.h"

@ -17,7 +17,6 @@
#include "base/test/bind.h"
#include "base/threading/thread_restrictions.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_switches.h"
@ -510,17 +509,9 @@ IN_PROC_BROWSER_TEST_F(
}));
}
// TODO(crbug.com/40681859): Flaky on linux-lacros-tester-rel.
#if BUILDFLAG(IS_CHROMEOS_LACROS)
#define MAYBE_SerializeHTMLDOMWithEntitiesInText \
DISABLED_SerializeHTMLDOMWithEntitiesInText
#else
#define MAYBE_SerializeHTMLDOMWithEntitiesInText \
SerializeHTMLDOMWithEntitiesInText
#endif // BUILDFLAG(IS_CHROMEOS_LACROS)
// Test situation of html entities in text when serializing HTML DOM.
IN_PROC_BROWSER_TEST_F(MAYBE_DomSerializerTests,
MAYBE_SerializeHTMLDOMWithEntitiesInText) {
SerializeHTMLDOMWithEntitiesInText) {
// Need to spin up the renderer and also navigate to a file url so that the
// renderer code doesn't attempt a fork when it sees a load to file scheme
// from non-file scheme.

@ -18,7 +18,6 @@
#include "base/task/sequenced_task_runner.h"
#include "base/unguessable_token.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "content/public/common/content_features.h"
#include "content/renderer/media/codec_factory.h"
#include "content/renderer/render_thread_impl.h"
@ -307,7 +306,7 @@ GpuVideoAcceleratorFactoriesImpl::VideoFrameOutputFormatImpl(
if (CheckContextLost()) {
return media::GpuVideoAcceleratorFactories::OutputFormat::UNDEFINED;
}
#if BUILDFLAG(IS_CHROMEOS_ASH) && BUILDFLAG(IS_OZONE)
#if BUILDFLAG(IS_CHROMEOS) && BUILDFLAG(IS_OZONE)
// TODO(sugoi): This configuration is currently used only for testing ChromeOS
// on Linux and doesn't support hardware acceleration. OSMesa did not support
// any hardware acceleration here, so this was never an issue, but SwiftShader

@ -55,7 +55,6 @@
#include "base/uuid.h"
#include "base/values.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "cc/base/switches.h"
#include "content/common/associated_interfaces.mojom.h"
#include "content/common/content_navigation_policy.h"
@ -2484,7 +2483,7 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
return new PepperWebPluginImpl(pepper_module.get(), params, this);
}
}
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
LOG(WARNING) << "Pepper module/plugin creation failed.";
#endif
#endif // BUILDFLAG(ENABLE_PPAPI)

@ -61,7 +61,6 @@
#include "base/trace_event/trace_event.h"
#include "base/values.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "cc/base/histograms.h"
#include "cc/base/switches.h"
#include "cc/mojo_embedder/async_layer_tree_frame_sink.h"

@ -29,7 +29,6 @@
#include "base/timer/hi_res_timer_manager.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "content/common/content_constants_internal.h"
#include "content/common/content_switches_internal.h"
#include "content/common/features.h"
@ -71,11 +70,9 @@
#include "third_party/blink/public/web/web_view.h"
#endif // BUILDFLAG(IS_MAC)
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if defined(ARCH_CPU_X86_64)
#if BUILDFLAG(IS_CHROMEOS) && defined(ARCH_CPU_X86_64)
#include "chromeos/ash/components/memory/userspace_swap/userspace_swap_renderer_initialization_impl.h"
#endif // defined(X86_64)
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
#endif // BUILDFLAG(IS_CHROMEOS) && defined(ARCH_CPU_X86_64)
#if BUILDFLAG(IS_CHROMEOS)
#include "chromeos/system/core_scheduling.h"
@ -165,7 +162,7 @@ int RendererMain(MainFunctionParams parameters) {
base::apple::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool;
#endif // BUILDFLAG(IS_MAC)
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
// As the Zygote process starts up earlier than the browser process, it gets
// its own locale (at login time for Chrome OS). So we have to set the ICU
// default locale for the renderer process here.
@ -175,15 +172,11 @@ int RendererMain(MainFunctionParams parameters) {
command_line.GetSwitchValueASCII(switches::kLang);
base::i18n::SetICUDefaultLocale(locale);
}
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
// When we start the renderer on ChromeOS if the system has core scheduling
// available we want to turn it on.
chromeos::system::EnableCoreSchedulingIfAvailable();
#endif // BUILDFLAG(IS_CHROMEOS)
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if defined(ARCH_CPU_X86_64)
using UserspaceSwapInit =
ash::memory::userspace_swap::UserspaceSwapRendererInitializationImpl;
@ -195,7 +188,7 @@ int RendererMain(MainFunctionParams parameters) {
<< "Unable to complete presandbox userspace swap initialization";
}
#endif // defined(ARCH_CPU_X86_64)
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
#endif // BUILDFLAG(IS_CHROMEOS)
InitializeSkia();
@ -289,7 +282,7 @@ int RendererMain(MainFunctionParams parameters) {
new RenderThreadImpl(run_loop.QuitClosure(),
std::move(main_thread_scheduler));
#if BUILDFLAG(IS_CHROMEOS_ASH) && defined(ARCH_CPU_X86_64)
#if BUILDFLAG(IS_CHROMEOS) && defined(ARCH_CPU_X86_64)
// Once the sandbox has been entered and initialization of render threads
// complete we will transfer FDs to the browser, or close them on failure.
// This should always be called because it will also transfer the errno that

@ -311,7 +311,6 @@ static_library("content_shell_lib") {
":shell_controller_mojom",
"//base",
"//base:base_static",
"//build:chromeos_buildflags",
"//cc/base",
"//components/cdm/renderer",
"//components/custom_handlers",
@ -469,17 +468,10 @@ static_library("content_shell_lib") {
]
}
if (is_chromeos_ash) {
if (is_chromeos) {
deps += [ "//chromeos/ash/components/dbus" ]
}
if (is_chromeos_lacros) {
deps += [
"//chromeos/dbus/constants",
"//chromeos/lacros/dbus",
]
}
if (is_linux || is_chromeos) {
deps += [ "//build/config/freetype" ]
}

@ -1,6 +1,5 @@
include_rules = [
"+chromeos/ash/components/dbus",
"+chromeos/lacros",
"+components/keyed_service/content",
"+components/metrics",
"+components/network_hints/browser",

@ -19,7 +19,6 @@
#include "base/threading/thread.h"
#include "base/threading/thread_restrictions.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "cc/base/switches.h"
#include "components/performance_manager/embedder/graph_features.h"
#include "components/performance_manager/embedder/performance_manager_lifetime.h"
@ -51,7 +50,7 @@
#include "net/base/network_change_notifier.h"
#endif
#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
#if BUILDFLAG(IS_LINUX) && defined(USE_AURA)
#include "ui/base/ime/init/input_method_initializer.h"
#endif
@ -60,15 +59,10 @@
#include "device/bluetooth/dbus/bluez_dbus_manager.h"
#include "device/bluetooth/floss/floss_dbus_manager.h"
#include "device/bluetooth/floss/floss_features.h"
#elif BUILDFLAG(IS_LINUX)
#include "device/bluetooth/dbus/dbus_bluez_manager_wrapper_linux.h"
#endif
#if BUILDFLAG(IS_CHROMEOS_LACROS)
#include "chromeos/lacros/dbus/lacros_dbus_thread_manager.h"
#endif
#if BUILDFLAG(IS_LINUX)
#include "device/bluetooth/dbus/dbus_bluez_manager_wrapper_linux.h"
#include "ui/linux/linux_ui.h" // nogncheck
#include "ui/linux/linux_ui_factory.h" // nogncheck
#endif
@ -121,13 +115,8 @@ ShellBrowserMainParts::ShellBrowserMainParts() = default;
ShellBrowserMainParts::~ShellBrowserMainParts() = default;
void ShellBrowserMainParts::PostCreateMainMessageLoop() {
#if BUILDFLAG(IS_CHROMEOS_ASH)
ash::DBusThreadManager::Initialize();
#elif BUILDFLAG(IS_CHROMEOS_LACROS)
chromeos::LacrosDBusThreadManager::Initialize();
#endif
#if BUILDFLAG(IS_CHROMEOS)
ash::DBusThreadManager::Initialize();
if (floss::features::IsFlossEnabled()) {
floss::FlossDBusManager::InitializeFake();
} else {
@ -139,10 +128,9 @@ void ShellBrowserMainParts::PostCreateMainMessageLoop() {
}
int ShellBrowserMainParts::PreEarlyInitialization() {
#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
#if BUILDFLAG(IS_LINUX) && defined(USE_AURA)
ui::InitializeInputMethodForTesting();
#endif
#if BUILDFLAG(IS_ANDROID)
#elif BUILDFLAG(IS_ANDROID)
net::NetworkChangeNotifier::SetFactory(
new net::NetworkChangeNotifierFactoryAndroid());
#endif
@ -232,16 +220,11 @@ void ShellBrowserMainParts::PostDestroyThreads() {
} else {
bluez::BluezDBusManager::Shutdown();
}
ash::DBusThreadManager::Shutdown();
#elif BUILDFLAG(IS_LINUX)
device::BluetoothAdapterFactory::Shutdown();
bluez::DBusBluezManagerWrapperLinux::Shutdown();
#endif
#if BUILDFLAG(IS_CHROMEOS_ASH)
ash::DBusThreadManager::Shutdown();
#elif BUILDFLAG(IS_CHROMEOS_LACROS)
chromeos::LacrosDBusThreadManager::Shutdown();
#endif
}
std::unique_ptr<ShellPlatformDelegate>

@ -29,7 +29,6 @@
#include "base/strings/utf_string_conversions.h"
#include "base/threading/sequence_local_storage_slot.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "cc/base/switches.h"
#include "components/custom_handlers/protocol_handler_registry.h"
#include "components/custom_handlers/protocol_handler_throttle.h"

@ -18,7 +18,6 @@
#include "base/memory/raw_ptr.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "content/public/browser/context_factory.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
@ -48,9 +47,9 @@
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_delegate.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
#include "ui/wm/test/wm_test_helper.h"
#else // !BUILDFLAG(IS_CHROMEOS_ASH)
#else // !BUILDFLAG(IS_CHROMEOS)
#include "ui/display/screen.h"
#include "ui/views/widget/desktop_aura/desktop_screen.h"
#include "ui/wm/core/wm_state.h"
@ -70,7 +69,7 @@ struct ShellPlatformDelegate::ShellData {
};
struct ShellPlatformDelegate::PlatformData {
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
std::unique_ptr<wm::WMTestHelper> wm_test_helper;
#else
std::unique_ptr<wm::WMState> wm_state;
@ -126,7 +125,7 @@ class ShellView : public views::BoxLayoutView,
// Resizing a widget on chromeos doesn't automatically resize the root, need
// to explicitly do that.
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
GetWidget()->GetNativeWindow()->GetHost()->SetBoundsInPixels(bounds);
#endif
}
@ -334,7 +333,7 @@ void ShellPlatformDelegate::Initialize(const gfx::Size& default_window_size) {
platform_ = std::make_unique<PlatformData>();
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
platform_->wm_test_helper =
std::make_unique<wm::WMTestHelper>(default_window_size);
#else
@ -363,7 +362,7 @@ void ShellPlatformDelegate::CreatePlatformWindow(
delegate->SetHasWindowSizeControls(true);
delegate->SetOwnedByWidget(true);
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
shell_data.window_widget = views::Widget::CreateWindowWithContext(
std::move(delegate),
platform_->wm_test_helper->GetDefaultParent(nullptr, gfx::Rect(),

@ -541,7 +541,6 @@ static_library("test_support") {
deps = [
":content_test_mojo_bindings",
":web_ui_mojo_test_resources",
"//build:chromeos_buildflags",
"//cc:test_support",
"//components/attribution_reporting:data_host_mojom",
"//components/attribution_reporting:mojom",
@ -686,7 +685,7 @@ static_library("test_support") {
}
}
if (is_chromeos_ash) {
if (is_chromeos) {
deps += [ ":web_ui_test_mojo_bindings" ]
}
@ -822,17 +821,6 @@ static_library("test_support") {
]
}
if (is_chromeos_lacros) {
deps += [
"//chromeos/crosapi/cpp",
"//chromeos/crosapi/cpp:crosapi_constants",
"//chromeos/lacros",
"//chromeos/lacros:test_support",
"//chromeos/startup",
"//chromeos/startup:constants",
]
}
if (is_linux || is_chromeos) {
sources += [
"sandbox_status_service.cc",
@ -1113,10 +1101,6 @@ static_library("browsertest_support") {
deps += [ "//ui/base/mojom" ]
}
if (is_chromeos_lacros) {
deps += [ "//chromeos/lacros:lacros" ]
}
configs += [ "//v8:external_startup_data" ]
}
@ -1135,7 +1119,7 @@ mojom("content_test_mojo_bindings") {
# Testing JS bindings only on Ash, since they are primarily used there and
# because this test relies on the URL WebUI mojo bindings, which are
# TypeScript only on other platforms.
if (is_chromeos_ash) {
if (is_chromeos) {
mojom("web_ui_test_mojo_bindings") {
testonly = true
sources = [
@ -1160,7 +1144,7 @@ mojom("web_ui_managed_interface_tests_bindings") {
# Closure compilation is only used on Ash. See below for TypeScript targets
# which are used across platforms.
if (is_chromeos_ash) {
if (is_chromeos) {
js_library("web_ui_mojo_test_js") {
sources = [ "data/web_ui_mojo_test.js" ]
deps = [ ":web_ui_test_mojo_bindings_webui_js" ]
@ -1822,7 +1806,6 @@ test("content_browsertests") {
"//base/test:proto_test_support",
"//base/test:test_support",
"//build:chromecast_buildflags",
"//build:chromeos_buildflags",
"//cc/slim",
"//components/attribution_reporting:mojom",
"//components/cbor",
@ -1955,7 +1938,7 @@ test("content_browsertests") {
"//ui/webui:test_support",
]
if (!(is_chromeos_ash && target_cpu == "arm64" && current_cpu == "arm")) {
if (!(is_chromeos && target_cpu == "arm64" && current_cpu == "arm")) {
deps += [ "//components/variations" ]
}
@ -1990,7 +1973,7 @@ test("content_browsertests") {
]
}
if (is_chromeos_ash) {
if (is_chromeos) {
deps += [ ":web_ui_test_mojo_bindings" ]
}
@ -2064,7 +2047,7 @@ test("content_browsertests") {
sources += [ "../browser/media/capture/aura_window_video_capture_device_browsertest.cc" ]
}
if (is_chromeos_ash) {
if (is_chromeos) {
deps += [ "//ui/wm" ]
}
}
@ -2078,7 +2061,7 @@ test("content_browsertests") {
]
}
if (!is_chromeos_ash) {
if (!is_chromeos) {
sources +=
[ "../browser/media/media_keys_listener_manager_impl_browsertest.cc" ]
}
@ -2146,7 +2129,7 @@ test("content_browsertests") {
}
}
if (is_chromeos_ash) {
if (is_chromeos) {
deps += [
":web_ui_mojo_test_js_type_check",
"//chromeos/ash/components/assistant:buildflags",
@ -2223,8 +2206,8 @@ test("content_browsertests") {
[ "../browser/compute_pressure/pressure_service_browsertest.cc" ]
}
if (is_chromeos_ash) {
deps += [ "//ash/constants:constants" ]
if (is_chromeos) {
deps += [ "//ash/constants" ]
}
if (!is_ios) {
@ -2283,7 +2266,7 @@ test("content_browsertests") {
bundle_deps += [ ":content_shell_pak_bundle_data" ]
}
if (is_chromeos_ash) {
if (is_chromeos) {
deps += [
"//chromeos/ash/components/audio",
"//chromeos/ash/components/dbus/audio",
@ -2393,7 +2376,7 @@ test("content_browsertests") {
deps += [ "//ui/ozone" ]
}
if (is_chromeos_ash) {
if (is_chromeos) {
deps += [ "//chromeos/dbus/constants" ]
}
@ -2422,7 +2405,7 @@ grit("web_ui_mojo_test_resources") {
]
deps = [ ":web_ui_mojo_test_build_ts" ]
if (is_chromeos_ash) {
if (is_chromeos) {
deps += [ ":web_ui_test_mojo_bindings_js__generator" ]
}
}
@ -3095,7 +3078,6 @@ test("content_unittests") {
"//build:android_buildflags",
"//build:buildflag_header_h",
"//build:chromecast_buildflags",
"//build:chromeos_buildflags",
"//cc",
"//cc:test_support",
"//cc/mojom",
@ -3272,13 +3254,6 @@ test("content_unittests") {
deps += [ "../browser/attribution_reporting:sqlite_test_utils" ]
}
if (is_chromeos_lacros) {
deps += [
"//chromeos/crosapi/mojom",
"//chromeos/lacros:test_support",
]
}
if (is_mac) {
data_deps += [ "//device/fido/strings:fido_test_strings" ]
}
@ -3411,22 +3386,14 @@ test("content_unittests") {
]
weak_frameworks = [ "ScreenCaptureKit.framework" ] # macOS 12.3
}
if (is_chromeos_ash) {
if (is_chromeos) {
sources += [ "../browser/handwriting/handwriting_recognition_service_impl_cros_unittest.cc" ]
deps += [
"//ash/constants:constants",
"//ash/constants",
"//chromeos/ash/components/audio",
"//chromeos/ash/components/dbus/audio",
"//chromeos/services/machine_learning/public/cpp:stub",
"//chromeos/services/machine_learning/public/mojom",
"//chromeos/services/machine_learning/public/mojom",
]
}
if (is_chromeos_lacros) {
sources += [ "../browser/screenlock_monitor/screenlock_monitor_device_source_lacros_unittest.cc" ]
deps += [
"//chromeos/crosapi/mojom",
"//chromeos/lacros:test_support",
]
}
if (is_android) {
@ -3498,10 +3465,6 @@ test("content_unittests") {
"//content/test:test_support",
"//media/mojo/mojom:speech_recognition",
]
if (is_chromeos_ash) {
deps += [ "//ash/constants:constants" ]
}
}
}

@ -82,7 +82,7 @@ Supported platforms are:
* `auralinux-xenial` -- expected Linux ATK output (Version Specific Expected File)
* `blink` -- representation of internal accessibility tree
* `blink-cros` -- representation of internal accessibility tree
(Version Specific Expected File for Chrome OS and Lacros)
(Version Specific Expected File for Chrome OS)
* `mac` -- expected Mac NSAccessibility output
* `win` -- expected Win IAccessible/IAccessible2 output
* `uia-win` -- expected Win UIA output
@ -131,12 +131,12 @@ needed. However, if the `foo.html` test passes on the Linux release build
At the present time there is no version-specific support for Bionic Beaver,
which is the current version run on "linux-rel".
The need for a version-specific expectations file on Chrome OS / Lacros is
extremely rare. However, there can be occasional differences in the internal
accessibility tree. For instance, the SVG `g` element is always included
in order to support select-to-speak functionality. If `foo.html` has a
`foo-expected-blink.txt` file which works on all platforms except the Chrome OS
and Lacros bots, create `foo-expected-blink-cros.txt`.
The need for a version-specific expectations file on Chrome OS is extremely
rare. However, there can be occasional differences in the internal accessibility
tree. For instance, the SVG `g` element is always included in order to support
select-to-speak functionality. If `foo.html` has a `foo-expected-blink.txt` file
which works on all platforms except the Chrome OS bots, create
`foo-expected-blink-cros.txt`.
## Directives

@ -355,7 +355,7 @@ mojolpm_fuzzer_test("media_stream_dispatcher_host_mojolpm_fuzzer") {
# Fuzzer only supports linux. As we use a `V4L2CaptureDevice`, which is only
# usable on linux through `VideoCaptureDeviceFactoryV4L2`.
if (is_linux || is_chromeos_lacros) {
if (is_linux) {
mojolpm_fuzzer_test("video_capture_host_mojolpm_fuzzer") {
sources = [ "video_capture_host_mojolpm_fuzzer.cc" ]

@ -3,7 +3,6 @@
// found in the LICENSE file.
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "content/public/test/browser_test.h"
#include "content/test/ppapi/ppapi_test.h"
#include "ppapi/shared_impl/test_utils.h"
@ -39,7 +38,7 @@ namespace {
}
// Doesn't work in CrOS builds, http://crbug.com/619765
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
#define MAYBE_BrowserFont DISABLED_BrowserFont
#else
#define MAYBE_BrowserFont BrowserFont

@ -12,7 +12,6 @@
#include "base/strings/stringprintf.h"
#include "base/threading/thread_restrictions.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/ppapi_test_utils.h"
@ -22,7 +21,7 @@
#include "ppapi/shared_impl/ppapi_switches.h"
#include "third_party/blink/public/common/switches.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
#include "chromeos/ash/components/audio/cras_audio_handler.h"
#include "chromeos/ash/components/dbus/audio/cras_audio_client.h"
#endif
@ -148,7 +147,7 @@ OutOfProcessPPAPITest::OutOfProcessPPAPITest() {
}
void OutOfProcessPPAPITest::SetUp() {
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
ash::CrasAudioClient::InitializeFake();
ash::CrasAudioHandler::InitializeForTesting();
#endif
@ -157,7 +156,7 @@ void OutOfProcessPPAPITest::SetUp() {
void OutOfProcessPPAPITest::TearDown() {
ContentBrowserTest::TearDown();
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
ash::CrasAudioHandler::Shutdown();
ash::CrasAudioClient::Shutdown();
#endif

@ -17,7 +17,7 @@ This file specifies resources for content_browsertests.
<include name="IDR_WEB_UI_MANAGED_INTERFACE_TEST_HTML" file="data/web_ui_managed_interface_test.html" type="BINDATA" resource_path="web_ui_managed_interface_test.html" />
<include name="IDR_WEB_UI_MANAGED_INTERFACE_TEST_JS" file="${root_gen_dir}/content/test/data/tsc/web_ui_managed_interface_test.js" use_base_dir="false" type="BINDATA" resource_path="web_ui_managed_interface_test.js" />
<include name="IDR_WEB_UI_MANAGED_INTERFACE_TEST_TEST_MOJOM_WEBUI_JS" file="${root_gen_dir}/content/test/data/tsc/web_ui_managed_interface_test.test-mojom-webui.js" use_base_dir="false" type="BINDATA" resource_path="web_ui_managed_interface_test.test-mojom-webui.js" />
<if expr="chromeos_ash">
<if expr="is_chromeos">
<include name="IDR_WEB_UI_MOJO_HTML" file="data/web_ui_mojo_test.html" type="BINDATA" />
<include name="IDR_WEB_UI_MOJO_JS" file="data/web_ui_mojo_test.js" type="BINDATA" resource_path="web_ui_mojo_test.js" />
</if>
@ -25,7 +25,7 @@ This file specifies resources for content_browsertests.
<include name="IDR_WEB_UI_MOJO_TS_JS" file="${root_gen_dir}/content/test/data/tsc/web_ui_mojo_ts_test.js" use_base_dir="false" type="BINDATA" resource_path="web_ui_mojo_ts_test.js" />
<include name="IDR_WEB_UI_MOJO_NATIVE_HTML" file="data/web_ui_mojo_native.html" type="BINDATA" resource_path="web_ui_mojo_native.html" />
<include name="IDR_WEB_UI_MOJO_NATIVE_JS" file="data/web_ui_mojo_native.js" type="BINDATA" resource_path="web_ui_mojo_native.js" />
<if expr="chromeos_ash">
<if expr="is_chromeos">
<include name="IDR_WEB_UI_TEST_MOJOM_JS" file="${root_gen_dir}/mojom-webui/content/test/data/web_ui_test.test-mojom-webui.js" use_base_dir="false" type="BINDATA" resource_path="content/test/data/web_ui_test.test-mojom-webui.js" />
<include name="IDR_WEB_UI_TEST_TYPES_MOJOM_JS" file="${root_gen_dir}/mojom-webui/content/test/data/web_ui_test_types.test-mojom-webui.js" use_base_dir="false" type="BINDATA" resource_path="content/test/data/web_ui_test_types.test-mojom-webui.js" />
</if>

@ -42,7 +42,6 @@ source_set("utility") {
deps = [
"//base",
"//build:branding_buildflags",
"//build:chromeos_buildflags",
"//components/optimization_guide/core:features",
"//components/services/on_device_translation/buildflags",
"//components/services/storage",
@ -99,7 +98,7 @@ source_set("utility") {
]
}
if (is_chromeos_ash) {
if (is_chromeos) {
deps += [
"//chromeos/ash/components/assistant:buildflags",
"//chromeos/ash/services/ime:sandbox_hook",
@ -112,21 +111,26 @@ source_set("utility") {
if (is_linux || is_chromeos) {
deps += [
"//content/utility/speech:speech_recognition_sandbox_hook",
"//gpu/config",
"//media/gpu/sandbox",
"//media/mojo/services",
"//services/network:network_sandbox_hook",
"//third_party/angle:angle_gpu_info_util",
]
if (enable_oop_printing) {
deps += [ "//printing:printing_sandbox_hook" ]
}
}
if (is_chromeos_ash && is_chrome_branded) {
if (is_chromeos && is_chrome_branded) {
deps += [
"//services/shape_detection:lib",
"//services/shape_detection/public/mojom",
]
}
if (is_chromeos_ash && enable_cros_libassistant) {
if (is_chromeos && enable_cros_libassistant) {
deps += [
"//chromeos/ash/services/libassistant:sandbox_hook",
"//chromeos/assistant/internal:libassistant",
@ -138,16 +142,6 @@ source_set("utility") {
deps += [ "//services/proxy_resolver:lib" ]
}
if (is_linux || is_chromeos) {
deps += [
"//content/utility/speech:speech_recognition_sandbox_hook",
"//services/network:network_sandbox_hook",
]
if (enable_oop_printing) {
deps += [ "//printing:printing_sandbox_hook" ]
}
}
if (enable_screen_ai_service && (is_linux || is_chromeos)) {
deps += [ "//services/screen_ai:screen_ai_sandbox_hook" ]
}

@ -12,7 +12,6 @@
#include "base/task/single_thread_task_runner.h"
#include "build/branding_buildflags.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "components/optimization_guide/core/optimization_guide_features.h"
#include "components/services/storage/public/mojom/storage_service.mojom.h"
#include "components/services/storage/storage_service_impl.h"
@ -84,7 +83,7 @@ extern sandbox::TargetServices* g_utility_target_services;
#if BUILDFLAG(GOOGLE_CHROME_BRANDING) && BUILDFLAG(IS_CHROMEOS)
#include "services/shape_detection/public/mojom/shape_detection_service.mojom.h" // nogncheck
#include "services/shape_detection/shape_detection_service.h" // nogncheck
#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) && BUILDFLAG(IS_CHROMEOS_ASH)
#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) && BUILDFLAG(IS_CHROMEOS)
#if BUILDFLAG(IS_WIN)
#include "media/mojo/mojom/media_foundation_service.mojom.h" // nogncheck
@ -96,17 +95,17 @@ extern sandbox::TargetServices* g_utility_target_services;
#include "media/mojo/services/mediadrm_support_service.h" // nogncheck
#endif // BUILDFLAG(IS_ANDROID)
#if BUILDFLAG(IS_CHROMEOS_ASH) && \
#if BUILDFLAG(IS_CHROMEOS) && \
(BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
#include "ash/components/arc/video_accelerator/oop_arc_video_accelerator_factory.h"
#endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) ||
#endif // BUILDFLAG(IS_CHROMEOS) && (BUILDFLAG(USE_VAAPI) ||
// BUILDFLAG(USE_V4L2_CODEC))
#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \
#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \
(BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
#include "content/common/features.h"
#include "media/mojo/services/stable_video_decoder_factory_process_service.h" // nogncheck
#endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) &&
#endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) &&
// (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
#if BUILDFLAG(ENABLE_ACCESSIBILITY_SERVICE)
@ -325,13 +324,13 @@ auto RunTracing(
auto RunVideoCapture(
mojo::PendingReceiver<video_capture::mojom::VideoCaptureService> receiver) {
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
auto service_manager_receiver =
GetContentClient()->utility()->InitMojoServiceManager();
if (service_manager_receiver.is_valid()) {
UtilityThread::Get()->BindHostReceiver(std::move(service_manager_receiver));
}
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
#endif // BUILDFLAG(IS_CHROMEOS)
auto service = std::make_unique<UtilityThreadVideoCaptureServiceImpl>(
std::move(receiver), base::SingleThreadTaskRunner::GetCurrentDefault());
#if BUILDFLAG(ENABLE_GPU_CHANNEL_MEDIA_CAPTURE)
@ -372,17 +371,17 @@ auto RunXrDeviceService(
}
#endif
#if BUILDFLAG(IS_CHROMEOS_ASH) && \
#if BUILDFLAG(IS_CHROMEOS) && \
(BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
auto RunOOPArcVideoAcceleratorFactoryService(
mojo::PendingReceiver<arc::mojom::VideoAcceleratorFactory> receiver) {
return std::make_unique<arc::OOPArcVideoAcceleratorFactory>(
std::move(receiver));
}
#endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) ||
// BUILDFLAG(USE_V4L2_CODEC))
#endif // BUILDFLAG(IS_CHROMEOS) && \
// (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \
#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \
(BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
auto RunStableVideoDecoderFactoryProcessService(
mojo::PendingReceiver<
@ -390,7 +389,7 @@ auto RunStableVideoDecoderFactoryProcessService(
return std::make_unique<media::StableVideoDecoderFactoryProcessService>(
std::move(receiver));
}
#endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) &&
#endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) &&
// (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
@ -416,10 +415,10 @@ void RegisterIOThreadServices(mojo::ServiceFactory& services) {
// loop of type IO that can get notified when pipes have data.
services.Add(RunNetworkService);
#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \
#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \
(BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
services.Add(RunStableVideoDecoderFactoryProcessService);
#endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) &&
#endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) &&
// (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
// Add new IO-thread services above this line.
@ -463,11 +462,11 @@ void RegisterMainThreadServices(mojo::ServiceFactory& services) {
services.Add(RunXrDeviceService);
#endif
#if BUILDFLAG(IS_CHROMEOS_ASH) && \
#if BUILDFLAG(IS_CHROMEOS) && \
(BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
services.Add(RunOOPArcVideoAcceleratorFactoryService);
#endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) ||
// BUILDFLAG(USE_V4L2_CODEC))
#endif // BUILDFLAG(IS_CHROMEOS) && \
// (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
services.Add(RunVideoEncodeAcceleratorProviderFactory);

@ -18,7 +18,6 @@
#include "base/time/time.h"
#include "base/timer/hi_res_timer_manager.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "components/services/on_device_translation/buildflags/buildflags.h"
#include "content/child/child_process.h"
#include "content/common/content_switches_internal.h"
@ -46,6 +45,7 @@
#include "content/public/common/content_descriptor_keys.h"
#include "content/utility/speech/speech_recognition_sandbox_hook_linux.h"
#include "gpu/config/gpu_info_collector.h"
#include "media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h"
#include "media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.h"
#include "sandbox/policy/linux/sandbox_linux.h"
#include "services/audio/audio_sandbox_hook_linux.h"
@ -66,15 +66,11 @@
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
#include "media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h"
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(ENABLE_VIDEO_EFFECTS) && BUILDFLAG(IS_LINUX)
#include "services/video_effects/video_effects_sandbox_hook_linux.h" // nogncheck
#endif // BUILDFLAG(ENABLE_VIDEO_EFFECTS) && BUILDFLAG(IS_LINUX)
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
#include "chromeos/ash/components/assistant/buildflags.h"
#include "chromeos/ash/services/ime/ime_sandbox_hook.h"
#include "chromeos/services/tts/tts_sandbox_hook.h"
@ -82,7 +78,7 @@
#if BUILDFLAG(ENABLE_CROS_LIBASSISTANT)
#include "chromeos/ash/services/libassistant/libassistant_sandbox_hook.h" // nogncheck
#endif // BUILDFLAG(ENABLE_CROS_LIBASSISTANT)
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
#endif // BUILDFLAG(IS_CHROMEOS)
#if BUILDFLAG(IS_MAC)
#include "base/message_loop/message_pump_apple.h"
@ -142,9 +138,7 @@ std::vector<std::string> GetNetworkContextsParentDirectories() {
bool ShouldUseAmdGpuPolicy(sandbox::mojom::Sandbox sandbox_type) {
const bool obtain_gpu_info =
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
sandbox_type == sandbox::mojom::Sandbox::kHardwareVideoDecoding ||
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
sandbox_type == sandbox::mojom::Sandbox::kHardwareVideoEncoding;
if (obtain_gpu_info) {
@ -315,17 +309,17 @@ int UtilityMain(MainFunctionParams parameters) {
base::BindOnce(&video_effects::VideoEffectsPreSandboxHook);
break;
#endif // BUILDFLAG(IS_LINUX)
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
case sandbox::mojom::Sandbox::kHardwareVideoDecoding:
pre_sandbox_hook =
base::BindOnce(&media::HardwareVideoDecodingPreSandboxHook);
break;
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
case sandbox::mojom::Sandbox::kHardwareVideoEncoding:
pre_sandbox_hook =
base::BindOnce(&media::HardwareVideoEncodingPreSandboxHook);
break;
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
case sandbox::mojom::Sandbox::kIme:
pre_sandbox_hook = base::BindOnce(&ash::ime::ImePreSandboxHook);
break;
@ -338,7 +332,7 @@ int UtilityMain(MainFunctionParams parameters) {
base::BindOnce(&ash::libassistant::LibassistantPreSandboxHook);
break;
#endif // BUILDFLAG(ENABLE_CROS_LIBASSISTANT)
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
#endif // BUILDFLAG(IS_CHROMEOS)
default:
break;
}

@ -184,7 +184,6 @@ static_library("web_test_browser") {
deps = [
":web_test_common",
"//base",
"//build:chromeos_buildflags",
"//cc/base",
"//cc/paint",
"//components/custom_handlers:custom_handlers",

@ -13,7 +13,6 @@
#include "base/threading/thread.h"
#include "base/threading/thread_restrictions.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/common/content_switches.h"
@ -37,7 +36,7 @@
#include "content/shell/browser/shell_plugin_service_filter.h"
#endif
#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
#if BUILDFLAG(IS_LINUX) && defined(USE_AURA)
#include "ui/base/ime/init/input_method_initializer.h"
#endif

@ -17,7 +17,6 @@ if (is_linux || is_chromeos) {
deps = [
"//base",
"//base:i18n",
"//build:chromeos_buildflags",
"//content/common:sandbox_support_linux",
"//content/public/common:common_sources",
"//ipc",

@ -44,7 +44,6 @@
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "content/common/zygote/zygote_commands_linux.h"
#include "content/public/common/content_descriptors.h"
#include "content/public/common/content_switches.h"
@ -134,7 +133,7 @@ bool Zygote::ProcessRequests() {
bool r = base::UnixDomainSocket::SendMsg(
kZygoteSocketPairFd, kZygoteHelloMessage, sizeof(kZygoteHelloMessage),
std::vector<int>());
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
LOG_IF(WARNING, !r) << "Sending zygote magic failed";
// Exit normally on chromeos because session manager may send SIGTERM
// right after the process starts and it may fail to send zygote magic