diff --git a/src/BUILD.gn b/src/BUILD.gn index 8f1e1fdf..72622e7a 100644 --- a/src/BUILD.gn +++ b/src/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright 2022 The Chromium Authors and Alex313031 +# Copyright 2023 The Chromium Authors and Alex313031 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -179,7 +179,7 @@ group("gn_all") { if (!is_ios) { deps += [ - ":chromedriver", + ":chromedriver_group", "//cc:cc_unittests", "//components:components_browsertests", "//components/policy:policy_templates", @@ -416,15 +416,6 @@ group("gn_all") { } } - # NOTE: The following should really be 'is_android', but the fuzzing build - # seems currently broken for this platform at the moment, and the - # corresponding code build and works on Linux unmodified. - # See instructions in the corresponding BUILD.gn. - if (is_linux || is_chromeos) { - deps += - [ "//third_party/android_crazy_linker:android_crazy_linker_zip_fuzzer" ] - } - if (is_linux || is_chromeos) { # This is only used by ChromeOS, but we want maximal fuzzer coverage, so # run it under linux too. @@ -633,10 +624,6 @@ group("gn_all") { } } - if (ozone_platform_x11 && !is_castos && target_cpu != "arm") { - deps += [ "//gpu/tools/compositor_model_bench" ] - } - if (is_mac) { deps += [ "//third_party/breakpad:crash_inspector", @@ -859,9 +846,6 @@ group("gn_all") { "//mojo/public/rust", "//mojo/public/rust:mojo_rust_tests", - # TODO(https://crbug.com/1380857): reenable test coverage. - # "//third_party/rust/autocxx/chromium_integration/tests", - # TODO(crbug.com/1291994): Determine whether it makes sense to build/run # this even on Android. If not, remove this and figure out how to run it # only on desktop testers. @@ -880,11 +864,6 @@ group("rust_build_tests") { deps = [ "//build/rust/tests" ] } -group("rust_autocxx_tests") { - testonly = true - deps = [ "//third_party/rust/autocxx/chromium_integration/tests" ] -} - # TODO(https://crbug.com/1112776): ensure remoting is functional on Linux builds with # other than X11 Ozone backends. if (enable_remoting && ((is_linux && ozone_platform_x11) || @@ -958,6 +937,7 @@ if (is_win) { "//chrome/updater/win:updater_zip", "//components/policy:pack_policy_templates", "//components/zucchini", + "//components/zucchini:zucchini64", "//courgette", "//third_party/hyphenation-patterns", "//tools/metrics:metrics_metadata", @@ -1059,7 +1039,6 @@ group("gn_visibility") { ] if (!is_ios) { - deps += [ "//v8:postmortem-metadata" ] if (!v8_use_external_startup_data) { deps += [ "//v8:v8_snapshot" ] } @@ -1067,7 +1046,7 @@ group("gn_visibility") { } if (!is_ios) { - group("chromedriver") { + group("chromedriver_group") { testonly = true if (is_fuchsia || is_android) { @@ -1275,9 +1254,19 @@ if (!is_ios) { _common_web_test_script = "//testing/scripts/run_isolated_script_test.py" - _common_web_test_args = [ "@WrappedPath(" + rebase_path( - "//third_party/blink/tools/run_web_tests.py", - root_build_dir) + ")" ] + if (is_fuchsia) { + _common_web_test_args = [ + "@WrappedPath(" + + rebase_path("//build/fuchsia/test/run_test.py", root_build_dir) + ")", + "blink", + "--out-dir", + "@WrappedPath(.)", + ] + } else { + _common_web_test_args = [ "@WrappedPath(" + rebase_path( + "//third_party/blink/tools/run_web_tests.py", + root_build_dir) + ")" ] + } if (is_debug) { _common_web_test_args += [ "--debug" ] } else { @@ -1294,6 +1283,15 @@ if (!is_ios) { ] } + if (is_fuchsia) { + _common_web_test_args += [ + "--platform", + "fuchsia", + "--jobs", + "1", + ] + } + _common_web_test_args += [ "--seed", "4", @@ -1423,7 +1421,10 @@ if (!is_ios) { data += [ "//third_party/blink/web_tests/platform/linux/" ] } if (is_fuchsia) { - data += [ "//third_party/blink/web_tests/platform/fuchsia/" ] + data += [ + "//third_party/blink/web_tests/platform/fuchsia/", + "$root_gen_dir/package_metadata/content_shell.meta", + ] } } else if (is_mac) { data += [ @@ -1491,7 +1492,10 @@ if (!is_ios) { data += [ "//third_party/blink/web_tests/platform/linux/" ] } if (is_fuchsia) { - data += [ "//third_party/blink/web_tests/platform/fuchsia/" ] + data += [ + "//third_party/blink/web_tests/platform/fuchsia/", + "$root_gen_dir/package_metadata/content_shell.meta", + ] } } else if (is_mac) { data += [ @@ -1751,23 +1755,23 @@ if (is_android) { if (enable_js_type_check) { group("webui_closure_compile") { testonly = true - data_deps = [ - "components/neterror/resources:closure_compile", - "components/security_interstitials:closure_compile", - "mojo/public/tools/bindings/generators/js_templates/lite/test:closure_compile", - "ui/webui/resources:closure_compile", - ] - if (is_chromeos_ash) { - data_deps += [ + if (is_ios) { + data_deps = [ "ui/webui/resources/js/ios:closure_compile" ] + } else if (is_chromeos_ash) { + data_deps = [ "ash/webui:closure_compile", + "chrome/browser/resources:closure_compile", + "chrome/test/data:closure_compile", + "mojo/public/tools/bindings/generators/js_templates/lite/test:closure_compile", "ui/file_manager:closure_compile", ] - } - if (!is_castos) { - data_deps += [ + } else if (is_chromeos || is_android) { + data_deps = [ "chrome/browser/resources:closure_compile", - "chrome/test:closure_compile", + "chrome/test/data:closure_compile", ] + } else if (!is_castos) { + data_deps = [ "chrome/test/data:closure_compile" ] } } } diff --git a/src/build/vs_toolchain.py b/src/build/vs_toolchain.py index 24a558d5..c1b94fd8 100755 --- a/src/build/vs_toolchain.py +++ b/src/build/vs_toolchain.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright 2022 The Chromium Authors, Alex313031 and gz83. +# Copyright 2023 The Chromium Authors, Alex313031 and gz83 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/src/chrome/browser/ui/webui/about_ui.cc b/src/chrome/browser/ui/webui/about_ui.cc index cd22d123..60e8e5f3 100644 --- a/src/chrome/browser/ui/webui/about_ui.cc +++ b/src/chrome/browser/ui/webui/about_ui.cc @@ -1,4 +1,4 @@ -// Copyright 2023 The Chromium Authors and Alex313031. +// Copyright 2023 The Chromium Authors and Alex313031 // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -75,7 +75,7 @@ #include "chrome/browser/component_updater/cros_component_manager.h" #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" #include "chrome/common/webui_url_constants.h" -#include "chromeos/system/statistics_provider.h" +#include "chromeos/ash/components/system/statistics_provider.h" #include "components/language/core/common/locale_util.h" #include "third_party/cros_system_api/dbus/service_constants.h" #endif @@ -149,12 +149,12 @@ std::string ReadDeviceRegionFromVpd() { std::string region = "us"; chromeos::system::StatisticsProvider* provider = chromeos::system::StatisticsProvider::GetInstance(); - bool region_found = - provider->GetMachineStatistic(chromeos::system::kRegionKey, ®ion); - if (region_found) { + if (const absl::optional region_statistic = + provider->GetMachineStatistic(chromeos::system::kRegionKey)) { // We only need the first part of the complex region codes like ca.ansi. - std::vector region_pieces = base::SplitString( - region, ".", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY); + std::vector region_pieces = + base::SplitString(region_statistic.value(), ".", base::TRIM_WHITESPACE, + base::SPLIT_WANT_NONEMPTY); if (!region_pieces.empty()) region = region_pieces[0]; } else { diff --git a/src/chrome/installer/mini_installer/BUILD.gn b/src/chrome/installer/mini_installer/BUILD.gn index d2e97ce9..81fdf824 100644 --- a/src/chrome/installer/mini_installer/BUILD.gn +++ b/src/chrome/installer/mini_installer/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright 2022 The Chromium Authors and Alex313031. All rights reserved. +# Copyright 2023 The Chromium Authors and Alex313031 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -54,7 +54,10 @@ source_set("lib") { "regkey.h", ] - deps = [ "//build:branding_buildflags" ] + deps = [ + "//build:branding_buildflags", + "//chrome/browser/chrome_for_testing:buildflags", + ] if (skip_archive_compression) { defines = [ "SKIP_ARCHIVE_COMPRESSION" ] diff --git a/src/chrome/installer/util/util_constants.cc b/src/chrome/installer/util/util_constants.cc index 25a50991..49981935 100644 --- a/src/chrome/installer/util/util_constants.cc +++ b/src/chrome/installer/util/util_constants.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2022 The Chromium Authors and Alex313031. All rights reserved. +// Copyright 2023 The Chromium Authors and Alex313031 // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -223,6 +223,8 @@ const wchar_t kChromeOldExe[] = L"old_thorium.exe"; const wchar_t kChromeProxyExe[] = L"chrome_proxy.exe"; const wchar_t kChromeProxyNewExe[] = L"new_chrome_proxy.exe"; const wchar_t kChromeProxyOldExe[] = L"old_chrome_proxy.exe"; +const wchar_t kCmdAlternateRenameChromeExe[] = L"rename-chrome-exe"; +const wchar_t kCmdRenameChromeExe[] = L"cmd"; const wchar_t kCmdOnOsUpgrade[] = L"on-os-upgrade"; const wchar_t kCmdRotateDeviceTrustKey[] = L"rotate-dtkey"; const wchar_t kCmdStoreDMToken[] = L"store-dmtoken"; diff --git a/src/components/flags_ui/resources/flags.css b/src/components/flags_ui/resources/flags.css index bb09efa1..739096a0 100644 --- a/src/components/flags_ui/resources/flags.css +++ b/src/components/flags_ui/resources/flags.css @@ -1,4 +1,4 @@ -/* Copyright 2012 The Chromium Authors +/* Copyright 2023 The Chromium Authors and Alex313031 * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ @@ -20,7 +20,8 @@ html { --google-blue-400: rgb(102, 157, 246); --google-blue-500-rgb: 66, 133, 244; --google-blue-500: rgb(var(--google-blue-500-rgb)); - --google-blue-600: rgb(26, 115, 232); + --google-blue-600-rgb: 26, 115, 232; + --google-blue-600: rgb(var(--google-blue-600-rgb)); --google-blue-700: rgb(25, 103, 210); --google-grey-100: rgb(241, 243, 244); --google-grey-200-rgb: 232, 234, 237; @@ -40,8 +41,8 @@ html { --secondary-color: var(--google-grey-700); --warning-color: var(--google-red-700); + --focus-shadow-color: rgba(var(--google-blue-600-rgb), 0.4); --input-background: var(--google-grey-100); - --keyboard-focus-ring: rgba(var(--google-blue-500-rgb), 0.4); --link-color: var(--google-blue-700); --separator-color: rgba(0, 0, 0, .06); --toolbar-color: white; @@ -57,8 +58,8 @@ html { --secondary-color: var(--google-grey-500); --warning-color: var(--google-red-300); + --focus-shadow-color: rgba(var(--google-blue-300-rgb), 0.4); --input-background: rgba(0, 0, 0, .3); - --keyboard-focus-ring: rgba(var(--google-blue-300-rgb), 0.4); --link-color: var(--google-blue-300); --separator-color: rgba(255, 255, 255, .1); --toolbar-color: var(--google-grey-900-white-4-percent); @@ -127,6 +128,11 @@ button { padding: calc(60px + 1rem) var(--side-padding) 8px; } +:focus-visible { + box-shadow: 0 0 0 2px var(--focus-shadow-color); + outline: none; +} + @media (prefers-color-scheme: dark) { #flagsTemplate { background: rgba(255, 255, 255, .04); @@ -212,11 +218,6 @@ button { } } -#search:focus { - border-color: var(--interactive-color); - outline: 0; -} - .clear-search { -webkit-mask-image: url(chrome://resources/images/icon_cancel.svg); -webkit-mask-size: 20px; @@ -542,10 +543,6 @@ button.primary:-webkit-any(:active, :hover) { background: var(--google-blue-600); } -html.focus-outline-visible button.primary:focus { - box-shadow: 0 0 0 1px var(--keyboard-focus-ring); -} - #version { color: var(--secondary-color); text-align: right; /* csschecker-disable-line left-right */ diff --git a/src/content/shell/BUILD.gn b/src/content/shell/BUILD.gn index 52f734d0..79efdddf 100644 --- a/src/content/shell/BUILD.gn +++ b/src/content/shell/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright 2022 The Chromium Authors and Alex313031 +# Copyright 2023 The Chromium Authors and Alex313031 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -249,6 +249,8 @@ static_library("content_shell_lib") { "//components/network_hints/browser:browser", "//components/network_hints/renderer", "//components/network_session_configurator/common", + "//components/origin_trials:browser", + "//components/origin_trials:common", "//components/performance_manager", "//components/permissions", "//components/prefs", diff --git a/src/content/shell/app/shell_main_delegate.cc b/src/content/shell/app/shell_main_delegate.cc index b0a5b577..a46a2f48 100644 --- a/src/content/shell/app/shell_main_delegate.cc +++ b/src/content/shell/app/shell_main_delegate.cc @@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors and Alex313031 +// Copyright 2023 The Chromium Authors and Alex313031 // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -17,6 +17,7 @@ #include "base/lazy_instance.h" #include "base/logging.h" #include "base/path_service.h" +#include "base/process/current_process.h" #include "base/trace_event/trace_log.h" #include "build/build_config.h" #include "components/crash/core/common/crash_key.h" @@ -233,7 +234,8 @@ absl::variant ShellMainDelegate::RunProcess( if (!process_type.empty()) return std::move(main_function_params); - base::trace_event::TraceLog::GetInstance()->set_process_name("Browser"); + base::CurrentProcess::GetInstance().SetProcessType( + base::CurrentProcessType::PROCESS_BROWSER); base::trace_event::TraceLog::GetInstance()->SetProcessSortIndex( kTraceEventBrowserProcessSortIndex); diff --git a/src/content/shell/browser/shell_platform_delegate_views.cc b/src/content/shell/browser/shell_platform_delegate_views.cc index 4cdb30a5..c5c59da0 100644 --- a/src/content/shell/browser/shell_platform_delegate_views.cc +++ b/src/content/shell/browser/shell_platform_delegate_views.cc @@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors and Alex313031. All rights reserved. +// Copyright 2023 The Chromium Authors and Alex313031 // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -61,7 +61,7 @@ namespace content { struct ShellPlatformDelegate::ShellData { gfx::Size content_size; // Self-owned Widget, destroyed through CloseNow(). - views::Widget* window_widget = nullptr; + raw_ptr window_widget = nullptr; }; struct ShellPlatformDelegate::PlatformData { diff --git a/src/content/test/BUILD.gn b/src/content/test/BUILD.gn index 9d15b47f..07a77346 100644 --- a/src/content/test/BUILD.gn +++ b/src/content/test/BUILD.gn @@ -22,6 +22,8 @@ import("//third_party/blink/public/public_features.gni") import("//third_party/closure_compiler/closure_args.gni") import("//third_party/closure_compiler/compile_js.gni") import("//tools/grit/grit_rule.gni") +import("//tools/grit/preprocess_if_expr.gni") +import("//tools/typescript/ts_library.gni") import("//tools/v8_context_snapshot/v8_context_snapshot.gni") import("//v8/gni/v8.gni") @@ -194,6 +196,8 @@ static_library("test_support") { "../public/test/mock_client_hints_controller_delegate.h", "../public/test/mock_download_manager.cc", "../public/test/mock_download_manager.h", + "../public/test/mock_media_session.cc", + "../public/test/mock_media_session.h", "../public/test/mock_navigation_handle.cc", "../public/test/mock_navigation_handle.h", "../public/test/mock_notification_observer.cc", @@ -443,7 +447,6 @@ static_library("test_support") { configs += [ "//build/config:precompiled_headers", "//v8:external_startup_data", - "//tools/v8_context_snapshot:use_v8_context_snapshot", ] public_deps = [ @@ -477,7 +480,8 @@ static_library("test_support") { "//base/third_party/dynamic_annotations", "//build:chromeos_buildflags", "//cc:test_support", - "//components/attribution_reporting:source_registration_error_mojom", + "//components/aggregation_service:mojom", + "//components/attribution_reporting:mojom", "//components/breadcrumbs/core", "//components/browsing_topics/common:common", "//components/network_session_configurator/common:common", @@ -499,7 +503,6 @@ static_library("test_support") { "//content/public/browser:proto", "//content/public/child", "//content/public/common", - "//content/public/common:trust_tokens_mojo_bindings", "//content/public/renderer", "//content/public/utility", "//content/renderer:for_content_tests", @@ -545,6 +548,7 @@ static_library("test_support") { "//third_party/blink/public/strings:accessibility_strings", "//third_party/blink/public/strings:strings_grit", "//third_party/webrtc_overrides:webrtc_component", + "//tools/v8_context_snapshot:buildflags", "//ui/accessibility:ax_enums_mojo", "//ui/base", "//ui/base:test_support", @@ -747,6 +751,10 @@ static_library("test_support") { "sandbox_status_service.h", ] } + + if (is_fuchsia) { + public_deps += [ "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.mediacodec" ] + } } # Fuchsia performance tests on smart displays use web_engine and a browser @@ -915,6 +923,8 @@ static_library("browsertest_support") { "../browser/browsing_data/browsing_data_browsertest_utils.h", "../browser/browsing_data/shared_storage_clear_site_data_tester.cc", "../browser/browsing_data/shared_storage_clear_site_data_tester.h", + "../browser/browsing_data/storage_bucket_clear_site_data_tester.cc", + "../browser/browsing_data/storage_bucket_clear_site_data_tester.h", "../public/test/content_browser_test.cc", "../public/test/content_browser_test.h", "../public/test/content_browser_test_shell_main_delegate.cc", @@ -1003,16 +1013,52 @@ mojom("web_ui_test_mojo_bindings") { webui_module_path = "/content/test/data" } -js_library("web_ui_mojo_test_js") { - sources = [ "data/web_ui_mojo_test.js" ] - deps = [ ":web_ui_test_mojo_bindings_webui_js" ] +# Closure compilation is only used on Ash. See below for TypeScript targets +# which are used across platforms. +if (is_chromeos_ash) { + js_library("web_ui_mojo_test_js") { + sources = [ "data/web_ui_mojo_test.js" ] + deps = [ ":web_ui_test_mojo_bindings_webui_js" ] + } + + # NOTE: Building this target serves as a compile test for type-checking of + # WebUI JS that consumes generated Mojom JS bindings. + js_type_check("web_ui_mojo_test_js_type_check") { + deps = [ ":web_ui_mojo_test_js" ] + closure_flags = default_closure_args + mojom_js_args + } } -# NOTE: Building this target serves as a compile test for type-checking of -# WebUI JS that consumes generated Mojom JS bindings. -js_type_check("web_ui_mojo_test_js_type_check") { - deps = [ ":web_ui_mojo_test_js" ] - closure_flags = default_closure_args + mojom_js_args +mojom("web_ui_ts_test_mojo_bindings") { + testonly = true + sources = [ + "data/web_ui_ts_test.test-mojom", + "data/web_ui_ts_test_types.test-mojom", + ] + public_deps = [ "//url/mojom:url_mojom_gurl" ] + webui_module_path = "/content/test/data" + use_typescript_sources = true +} + +preprocess_if_expr("preprocess_mojo_webui_test") { + in_folder = "./data" + out_folder = "$target_gen_dir/data" + in_files = [ "web_ui_mojo_ts_test.ts" ] +} + +ts_library("web_ui_mojo_test_build_ts") { + root_dir = "$target_gen_dir/data" + out_dir = "$target_gen_dir/data/tsc" + in_files = [ + "web_ui_mojo_ts_test.ts", + "web_ui_ts_test.test-mojom-webui.ts", + "web_ui_ts_test_types.test-mojom-webui.ts", + ] + deps = [ "//ui/webui/resources/mojo:library" ] + extra_deps = [ + ":preprocess_mojo_webui_test", + ":web_ui_ts_test_mojo_bindings_ts__generator", + ] } mojom("mojo_web_test_bindings") { @@ -1151,6 +1197,7 @@ test("content_browsertests") { } sources = [ + "../app/content_main_runner_impl_browsertest.cc", "../app/mojo/mojo_browsertest.cc", "../app_shim_remote_cocoa/window_occlusion_browsertest_mac.mm", "../browser/accessibility/accessibility_action_browsertest.cc", @@ -1252,6 +1299,7 @@ test("content_browsertests") { "../browser/isolated_origin_browsertest.cc", "../browser/keyboard_lock_browsertest.cc", "../browser/keyboard_lock_browsertest.h", + "../browser/largest_contentful_paint_browsertests.cc", "../browser/loader/cors_file_origin_browsertest.cc", "../browser/loader/cors_origin_pattern_setter_browsertest.cc", "../browser/loader/cors_preflight_cache_browsertest.cc", @@ -1310,9 +1358,7 @@ test("content_browsertests") { "../browser/origin_trials/origin_trials_browsertest.cc", "../browser/payments/payment_app_browsertest.cc", "../browser/performance_memory_browsertest.cc", - "../browser/performance_timeline_back_forward_cache_restoration_browsertest.cc", - "../browser/performance_timeline_navigation_id_browsertest.cc", - "../browser/performance_timeline_prefetch_transfer_size_browsertest.cc", + "../browser/performance_timeline_browsertest.cc", "../browser/picture_in_picture/video_picture_in_picture_content_browsertest.cc", "../browser/pointer_lock_browsertest.cc", "../browser/pointer_lock_browsertest.h", @@ -1516,12 +1562,13 @@ test("content_browsertests") { ":browsertest_support", ":content_test_mojo_bindings", ":test_support", - ":web_ui_mojo_test_js_type_check", ":web_ui_test_mojo_bindings", + ":web_ui_ts_test_mojo_bindings", "//base/test:test_support", "//build:chromecast_buildflags", "//build:chromeos_buildflags", - "//components/attribution_reporting:source_registration_error_mojom", + "//components/aggregation_service:mojom", + "//components/attribution_reporting:mojom", "//components/discardable_memory/client", "//components/discardable_memory/common", "//components/discardable_memory/service", @@ -1790,7 +1837,10 @@ test("content_browsertests") { } if (is_chromeos_ash) { - deps += [ "//chromeos/ash/components/assistant:buildflags" ] + deps += [ + ":web_ui_mojo_test_js_type_check", + "//chromeos/ash/components/assistant:buildflags", + ] } if (is_android) { @@ -1905,7 +1955,7 @@ test("content_browsertests") { "//chromeos/ash/components/audio", "//chromeos/ash/components/dbus/audio", "//chromeos/ash/components/dbus/debug_daemon", - "//chromeos/system", + "//chromeos/ash/components/system", ] } @@ -2028,7 +2078,10 @@ grit("web_ui_mojo_test_resources") { "grit/web_ui_mojo_test_resources_map.h", "web_ui_mojo_test_resources.pak", ] - deps = [ ":web_ui_test_mojo_bindings_webui_js" ] + deps = [ + ":web_ui_mojo_test_build_ts", + ":web_ui_test_mojo_bindings_js__generator", + ] } static_library("run_all_unittests") { @@ -2128,6 +2181,7 @@ test("content_unittests") { "../browser/browsing_data/same_site_data_remover_impl_unittest.cc", "../browser/browsing_topics/browsing_topics_site_data_manager_impl_unittest.cc", "../browser/browsing_topics/browsing_topics_site_data_storage_unittest.cc", + "../browser/browsing_topics/browsing_topics_url_loader_service_unittest.cc", "../browser/browsing_topics/header_util_unittest.cc", "../browser/buckets/bucket_manager_host_unittest.cc", "../browser/buckets/bucket_utils_unittest.cc", @@ -2157,6 +2211,7 @@ test("content_unittests") { "../browser/download/save_package_unittest.cc", "../browser/fenced_frame/fenced_frame_unittest.cc", "../browser/fenced_frame/fenced_frame_url_mapping_unittest.cc", + "../browser/fenced_frame/redacted_fenced_frame_config_mojom_traits_unittest.cc", "../browser/file_system/browser_file_system_helper_unittest.cc", "../browser/file_system/file_system_operation_runner_unittest.cc", "../browser/file_system_access/file_system_access_capacity_allocation_host_impl_unittest.cc", @@ -2281,8 +2336,12 @@ test("content_unittests") { "../browser/payments/payment_app_provider_impl_unittest.cc", "../browser/payments/payment_manager_unittest.cc", "../browser/permissions/permission_controller_impl_unittest.cc", + "../browser/permissions/permission_service_context_unittest.cc", "../browser/permissions/permission_util_unittest.cc", "../browser/picture_in_picture/picture_in_picture_service_impl_unittest.cc", + "../browser/preloading/anchor_element_interaction_host_impl_unittest.cc", + "../browser/preloading/preconnector_unittest.cc", + "../browser/preloading/prefetch/no_vary_search_helper_unittest.cc", "../browser/preloading/prefetch/prefetch_canary_checker_unittest.cc", "../browser/preloading/prefetch/prefetch_container_unittest.cc", "../browser/preloading/prefetch/prefetch_cookie_listener_unittest.cc", @@ -2291,12 +2350,16 @@ test("content_unittests") { "../browser/preloading/prefetch/prefetch_params_unittest.cc", "../browser/preloading/prefetch/prefetch_proxy_configurator_unittest.cc", "../browser/preloading/prefetch/prefetch_service_unittest.cc", + "../browser/preloading/prefetch/prefetch_streaming_url_loader_unittest.cc", "../browser/preloading/prefetch/prefetch_type_unittest.cc", "../browser/preloading/prefetch/prefetch_url_loader_interceptor_unittest.cc", "../browser/preloading/prefetch/proxy_lookup_client_impl_unittest.cc", + "../browser/preloading/prefetcher_unittest.cc", + "../browser/preloading/preloading_decider_unittest.cc", "../browser/preloading/prerender/prerender_host_registry_unittest.cc", "../browser/preloading/prerender/prerender_host_unittest.cc", "../browser/preloading/prerender/prerender_metrics_unittest.cc", + "../browser/preloading/prerenderer_impl_unittest.cc", "../browser/preloading/speculation_rules/speculation_host_impl_unittest.cc", "../browser/presentation/presentation_service_impl_unittest.cc", "../browser/private_aggregation/private_aggregation_budget_key_unittest.cc", @@ -2315,7 +2378,6 @@ test("content_unittests") { "../browser/renderer_host/cursor_manager_unittest.cc", "../browser/renderer_host/document_service_unittest.cc", "../browser/renderer_host/embedded_frame_sink_provider_impl_unittest.cc", - "../browser/renderer_host/fenced_frame_tree_node_unittest.cc", "../browser/renderer_host/frame_token_message_queue_unittest.cc", "../browser/renderer_host/frame_tree_unittest.cc", "../browser/renderer_host/input/fling_controller_unittest.cc", @@ -2460,18 +2522,19 @@ test("content_unittests") { "../browser/web_package/web_bundle_reader_unittest.cc", "../browser/web_package/web_bundle_url_loader_factory_unittest.cc", "../browser/web_package/web_bundle_utils_unittest.cc", + "../browser/webid/federated_auth_request_impl_logout_unittest.cc", "../browser/webid/federated_auth_request_impl_unittest.cc", "../browser/webid/idp_network_request_manager_unittest.cc", - "../browser/webid/test/mock_active_session_permission_delegate.cc", - "../browser/webid/test/mock_active_session_permission_delegate.h", + "../browser/webid/test/delegated_idp_network_request_manager.cc", + "../browser/webid/test/delegated_idp_network_request_manager.h", "../browser/webid/test/mock_api_permission_delegate.cc", "../browser/webid/test/mock_api_permission_delegate.h", "../browser/webid/test/mock_identity_request_dialog_controller.cc", "../browser/webid/test/mock_identity_request_dialog_controller.h", "../browser/webid/test/mock_idp_network_request_manager.cc", "../browser/webid/test/mock_idp_network_request_manager.h", - "../browser/webid/test/mock_sharing_permission_delegate.cc", - "../browser/webid/test/mock_sharing_permission_delegate.h", + "../browser/webid/test/mock_permission_delegate.cc", + "../browser/webid/test/mock_permission_delegate.h", "../browser/webid/test/webid_test_content_browser_client.cc", "../browser/webid/test/webid_test_content_browser_client.h", "../browser/webrtc/webrtc_internals_message_handler_unittest.cc", @@ -2571,6 +2634,7 @@ test("content_unittests") { sources += [ "../browser/accessibility/browser_accessibility_fuchsia_unittest.cc", "../browser/accessibility/browser_accessibility_manager_fuchsia_unittest.cc", + "../browser/renderer_host/media/fuchsia_media_codec_provider_impl_unittest.cc", ] # TODO(https://crbug.com/1185811): Investigate removing the requirement for @@ -2581,6 +2645,7 @@ test("content_unittests") { "//build/config/fuchsia/test/fonts.shard.test-cml", "//build/config/fuchsia/test/mark_vmo_executable.shard.test-cml", "//build/config/fuchsia/test/network.shard.test-cml", + "//build/config/fuchsia/test/platform_video_codecs.shard.test-cml", "//third_party/fuchsia-sdk/sdk/pkg/vulkan/client.shard.cml", ] } @@ -2589,8 +2654,8 @@ test("content_unittests") { sources += [ "../browser/accessibility/browser_accessibility_android_unittest.cc", "../browser/android/nfc_host_unittest.cc", + "../browser/attribution_reporting/attribution_input_event_tracker_android_unittest.cc", "../browser/renderer_host/input/web_input_event_builders_android_unittest.cc", - "../browser/tracing/background_reached_code_tracing_observer_android_unittest.cc", "../browser/web_contents/color_chooser_unittest.cc", "../common/android/cpu_time_metrics_unittest.cc", "../common/android/gin_java_bridge_value_unittest.cc", @@ -2633,7 +2698,8 @@ test("content_unittests") { "//cc", "//cc:test_support", "//cc/mojom", - "//components/attribution_reporting:source_registration_error_mojom", + "//components/aggregation_service:mojom", + "//components/attribution_reporting:mojom", "//components/cbor", "//components/network_session_configurator/browser", "//components/network_session_configurator/common", @@ -2673,10 +2739,10 @@ test("content_unittests") { "//content/public/browser:proto", "//content/public/child", "//content/public/common", - "//content/public/common:trust_tokens_mojo_bindings", "//content/public/renderer", "//content/renderer:for_content_tests", "//content/services/auction_worklet:tests", + "//content/services/auction_worklet/public/mojom:for_content_tests", "//content/services/shared_storage_worklet:for_content_tests", "//crypto", "//device/bluetooth", @@ -2773,6 +2839,13 @@ test("content_unittests") { "//third_party/mesa_headers", ] + if (is_chromeos_lacros) { + deps += [ + "//chromeos/crosapi/mojom", + "//chromeos/lacros:test_support", + ] + } + if (is_mac) { data_deps += [ "//device/fido/strings:fido_test_strings" ] } @@ -2898,13 +2971,19 @@ test("content_unittests") { ] } if (is_chromeos_ash) { - sources += [ "../browser/handwriting/handwriting_recognition_service_impl_cros_unittest.cc" ] + sources += [ + "../browser/handwriting/handwriting_recognition_service_impl_cros_unittest.cc", + "../browser/ml/ml_service_impl_cros_unittest.cc", + "../browser/ml/ml_service_impl_unittest.cc", + ] deps += [ "//ash/constants: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", + "//components/ml/mojom", ] } if (is_chromeos_lacros) { @@ -2965,6 +3044,7 @@ test("content_unittests") { "../browser/speech/speech_recognizer_impl_unittest.cc", "../browser/tracing/tracing_ui_unittest.cc", ] + deps += [ "//components/speech:speech" ] } # HID support is not available without udev. diff --git a/src/tools/v8_context_snapshot/BUILD.gn b/src/tools/v8_context_snapshot/BUILD.gn index 1083d7db..f8ad98ef 100644 --- a/src/tools/v8_context_snapshot/BUILD.gn +++ b/src/tools/v8_context_snapshot/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright 2017 The Chromium Authors. All rights reserved. +# Copyright 2023 The Chromium Authors and Alex313031 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -9,6 +9,7 @@ import("//tools/v8_context_snapshot/v8_context_snapshot.gni") +import("//build/buildflag_header.gni") import("//build/config/c++/c++.gni") import("//build/config/compiler/compiler.gni") import("//v8/gni/snapshot_toolchain.gni") @@ -26,14 +27,12 @@ group("v8_context_snapshot") { } } -config("use_v8_context_snapshot") { - defines = [] - if (use_v8_context_snapshot) { - defines += [ - "USE_V8_CONTEXT_SNAPSHOT", - "V8_CONTEXT_SNAPSHOT_FILENAME=\"$v8_context_snapshot_filename\"", - ] - } +buildflag_header("buildflags") { + header = "buildflags.h" + flags = [ + "USE_V8_CONTEXT_SNAPSHOT=$use_v8_context_snapshot", + "V8_CONTEXT_SNAPSHOT_FILENAME=\"$v8_context_snapshot_filename\"", + ] } if (use_v8_context_snapshot) {