From 1bc4f4e1e9e04404dff17649007986ced0fb6b3c Mon Sep 17 00:00:00 2001 From: klzgrad Date: Sun, 16 May 2021 21:03:12 +0800 Subject: [PATCH] build: Remove tests and minimize --- src/BUILD.gn | 1689 +----------- src/base/BUILD.gn | 2392 +---------------- src/build/BUILD.gn | 10 - src/components/version_info/BUILD.gn | 18 - src/crypto/BUILD.gn | 73 - src/net/BUILD.gn | 2240 --------------- src/net/dns/BUILD.gn | 308 --- src/net/dns/public/BUILD.gn | 29 - src/net/third_party/quiche/BUILD.gn | 1115 -------- src/net/tools/huffman_trie/BUILD.gn | 16 - .../BUILD.gn | 17 - src/third_party/boringssl/BUILD.gn | 1 - src/third_party/brotli/BUILD.gn | 8 - src/url/BUILD.gn | 287 -- 14 files changed, 3 insertions(+), 8200 deletions(-) diff --git a/src/BUILD.gn b/src/BUILD.gn index e8c8a8450f..aba7412d7d 100644 --- a/src/BUILD.gn +++ b/src/BUILD.gn @@ -8,8 +8,6 @@ # you add a new build file, there must be some path of dependencies from this # file to your new one or GN won't know about it. -import("//build/config/chromecast_build.gni") -import("//build/config/chromeos/ui_mode.gni") import("//build/config/compiler/compiler.gni") import("//build/config/cronet/config.gni") import("//build/config/dcheck_always_on.gni") @@ -18,42 +16,11 @@ import("//build/config/rust.gni") import("//build/config/sanitizers/sanitizers.gni") import("//build/config/ui.gni") import("//build/gn_logs.gni") -import("//build/util/generate_wrapper.gni") -import("//chrome/browser/buildflags.gni") -import("//components/nacl/features.gni") -import("//device/vr/buildflags/buildflags.gni") -import("//extensions/buildflags/buildflags.gni") -import("//gpu/vulkan/features.gni") -import("//media/gpu/args.gni") -import("//media/media_options.gni") -import("//pdf/features.gni") -import("//ppapi/buildflags/buildflags.gni") -import("//printing/buildflags/buildflags.gni") -import("//remoting/remoting_enable.gni") -import("//third_party/closure_compiler/compile_js.gni") -import("//tools/ipc_fuzzer/ipc_fuzzer.gni") -import("//ui/base/ui_features.gni") -import("//ui/gl/features.gni") -import("//v8/gni/v8.gni") if (is_android) { import("//build/config/android/config.gni") } -if (is_fuchsia) { - import("//build/config/fuchsia/generate_runner_scripts.gni") - import("//third_party/fuchsia-sdk/sdk/build/component.gni") - import("//third_party/fuchsia-sdk/sdk/build/package.gni") -} - -if (is_linux) { - import("build/config/linux/gtk/gtk.gni") -} - -if (use_blink) { - import("//v8/gni/snapshot_toolchain.gni") -} - declare_args() { # A list of extra dependencies to add to the root target. This allows a # checkout to add additional targets without explicitly changing any checked- @@ -80,1647 +47,9 @@ if (is_official_build) { group("gn_all") { testonly = true - if (is_cronet_build) { - if (is_android) { - deps = [ "//components/cronet/android:cronet_package_android" ] - } else if (is_ios) { - deps = [ "//components/cronet/ios:cronet_package_ios" ] - } else { - deps = [] - } - } else { - deps = [ - "//base:base_perftests", - "//base:base_unittests", - "//codelabs", - "//components:components_unittests", - "//components/gwp_asan:gwp_asan_unittests", - "//infra/orchestrator:orchestrator_all", - "//net:net_unittests", - "//sandbox:sandbox_unittests", - "//services:services_unittests", - "//services/service_manager/public/cpp", - "//skia:skia_unittests", - "//sql:sql_unittests", - "//third_party/angle/src/tests:angle_end2end_tests", - "//third_party/angle/src/tests:angle_unittests", - "//third_party/angle/src/tests:angle_white_box_tests", - "//third_party/flatbuffers:flatbuffers_unittests", - "//third_party/liburlpattern:liburlpattern_unittests", - "//tools/binary_size:binary_size_trybot_py", - "//tools/ipc_fuzzer:ipc_fuzzer_all", - "//tools/metrics:metrics_metadata", - "//ui/base:ui_base_unittests", - "//ui/color:color_unittests", - "//ui/gfx:gfx_unittests", - "//url:url_unittests", - ] - - if (!is_component_build) { - deps += [ "//third_party/abseil-cpp:absl_tests" ] - } - - if (is_chromeos_ash && enable_js_type_check) { - deps += [ ":webui_closure_compile" ] - } - - if (!is_android && !is_castos) { - deps += [ - "//crypto:crypto_unittests", - "//google_apis/gcm:gcm_unit_tests", - ] - } - - if (!is_ios && !is_android && !is_castos) { - deps += [ - "//chrome", - "//chrome/browser/ui/actions:dump_actions", - "//chrome/browser/ui/color:dump_colors", - "//chrome/test:browser_tests", - "//components/subresource_filter/tools:subresource_filter_tools", - "//components/zucchini:zucchini", - "//gpu/gles2_conform_support:gles2_conform_test", - "//gpu/khronos_glcts_support:khronos_glcts_test", - "//net:hpack_example_generator", - "//third_party/vulkan-deps/spirv-tools/src:SPIRV-Tools", - "//tools/aggregation_service:aggregation_service_tool", - "//tools/perf/clear_system_cache", - "//tools/polymer:polymer_tools_python_unittests", - "//tools/privacy_budget:privacy_budget_tools", - "//ui/accessibility/extensions:extensions", - "//ui/actions:actions_unittests", - ] - } - - if (!is_castos) { - deps += [ "//chrome/installer" ] - } - - if (enable_updater) { - deps += [ "//chrome/updater" ] - } - - if (enable_ppapi) { - deps += [ - "//ppapi:ppapi_unittests", - "//ppapi/examples", - ] - } - - if (is_chromeos_lacros) { - deps += [ - "//chrome/test:lacros_chrome_browsertests", - "//chrome/test:lacros_chrome_unittests", - ] - } - - if (!is_ios && !is_castos) { - deps += [ - "//chrome/test:unit_tests", - "//ui/accessibility:accessibility_unittests", - ] - } - - if (use_blink) { - deps += [ - "//cc:cc_unittests", - "//components/policy:policy_templates", - "//components/url_formatter/tools:format_url", - "//components/viz:viz_perftests", - "//components/viz:viz_unittests", - "//content/shell:content_shell", - "//content/test:content_browsertests", - "//content/test:content_unittests", - "//device:device_unittests", - "//gpu:gpu_benchmark", - "//gpu:gpu_unittests", - "//media:media_unittests", - "//media/capture:capture_unittests", - "//media/cast:cast_unittests", - "//media/midi:midi_unittests", - "//media/mojo:media_mojo_unittests", - "//mojo", - "//mojo:mojo_unittests", - "//storage:storage_unittests", - "//third_party/blink/common:blink_common_unittests", - "//third_party/blink/renderer/controller:blink_unittests", - "//third_party/blink/renderer/platform:blink_platform_unittests", - "//third_party/blink/renderer/platform/heap:blink_heap_unittests", - "//third_party/blink/renderer/platform/wtf:wtf_unittests", - "//third_party/libjingle_xmpp:libjingle_xmpp_unittests", - "//tools/imagediff", - "//tools/memory:all", - "//ui/display:display_unittests", - "//ui/gl:gl_unittests", - "//ui/latency:latency_unittests", - "//ui/native_theme:native_theme_unittests", - "//ui/touch_selection:ui_touch_selection_unittests", - "//v8:gn_all", - ] - - if (!v8_use_external_startup_data) { - deps += [ "//v8:v8_snapshot" ] - } - } - - if (!is_ios) { - deps += [ - ":chromedriver_group", - "//components:components_browsertests", - "//ipc:ipc_tests", - "//net:net_perftests", - "//ui/events:events_unittests", - "//url/ipc:url_ipc_unittests", - ] - } - - if (!is_ios && !is_android) { - deps += [ "//components/viz/demo:viz_demo" ] - } - - if (!is_ios) { - deps += [ - "//google_apis/gcm:mcs_probe", - "//third_party/catapult/telemetry:bitmaptools($host_toolchain)", - ] - if (!is_android) { - if (!is_castos) { - deps += [ "//chrome/test:telemetry_perf_unittests" ] - } - } else { - import("//tools/perf/chrome_telemetry_build/android_browser_types.gni") - foreach(_target_suffix, telemetry_android_browser_target_suffixes) { - deps += [ "//chrome/test:telemetry_perf_unittests${_target_suffix}" ] - } - } - } else { - deps += [ - "//ios:all", - "//third_party/crashpad/crashpad:crashpad_tests", - ] - } - - if (is_fuchsia) { - # Add targets that only exist on Fuchsia. - deps += [ - ":d8_fuchsia", - "//build/fuchsia/cipd", - "//chrome/app:chrome_fuchsia", - "//fuchsia_web:gn_all", - "//tools/fuchsia/size_tests:fuchsia_sizes", - - # Ensure this target continues to build. - "//chromecast/bindings:bindings_manager_fuchsia", - ] - } - - deps += root_extra_deps - - if (enable_printing || enable_printing_unittests) { - deps += [ "//printing:printing_unittests" ] - } - - if (enable_extensions) { - deps += [ - "//extensions:extensions_browsertests", - "//extensions:extensions_unittests", - "//extensions/browser/api/declarative_net_request/filter_list_converter", - "//extensions/shell:app_shell_unittests", - ] - } - - if (enable_pdf) { - deps += [ - "//pdf/pdfium/fuzzers", - "//third_party/pdfium/samples:pdfium_test", - ] - } - - if (enable_remoting) { - deps += [ "//remoting:remoting_all" ] - } - - if (toolkit_views) { - deps += [ - "//ui/views:views_unittests", - "//ui/views/examples:views_examples", - "//ui/views/examples:views_examples_unittests", - "//ui/views/examples:views_examples_with_content", - ] - } - - if (use_aura) { - deps += [ - "//ui/aura:aura_demo", - "//ui/aura:aura_unittests", - "//ui/wm:wm_unittests", - ] - } - - if (use_aura || is_mac) { - deps += [ "//ui/webui/examples:webui_examples" ] - } - - if (use_ozone) { - deps += [ - "//ui/ozone", - "//ui/ozone:unittests", - ] - if (!is_fuchsia) { - deps += [ "//ui/ozone/demo" ] - } - } - - if (is_win) { - deps += [ - "//chrome/credential_provider", - "//chrome/credential_provider/test:gcp_unittests", - ] - } - - if (is_mac) { - deps += [ - "//chrome/installer/gcapi_mac:gcapi_example", - "//tools/mac", - ] - } - - # Allow building md5sum tool for other OSes (android is added below). - # For Windows, see: crbug.com/1090428. - # TODO(cavalcantii): move it out of 'android' folder. - if (!is_win) { - deps += [ "//tools/android/md5sum" ] - } - - if (is_android) { - deps += [ - "//base:base_junit_tests", - "//base/android/linker:chromium_android_linker", - "//build/android/gyp/test:hello_world", - "//build/android/stacktrace:java_deobfuscate", - "//build/config/android/test/proto:test_build_protos", - "//build/private_code_test:private_paths", - "//chrome/android/monochrome:monochrome_public_apk_checker", - "//chrome/android/webapk/shell_apk:maps_go_webapk", - "//chrome/android/webapk/shell_apk:webapk", - "//chrome/android/webapk/shell_apk/prepare_upload_dir:prepare_webapk_shell_upload_dir", - "//chrome/test:android_browsertests", - "//components:components_junit_tests", - "//content/public/android:content_junit_tests", - "//content/shell/android:content_shell_apk", - "//device:device_junit_tests", - "//media/gpu:video_decode_accelerator_unittest", - "//net/android:net_junit_tests", - "//services:services_junit_tests", - "//testing/android/junit:junit_unit_tests", - "//third_party/android_build_tools/lint:custom_lint_java", - "//third_party/androidx_javascriptengine", - "//third_party/catapult/devil", - "//third_party/jni_zero/samples:jni_generator_tests", - "//third_party/r8:custom_d8_java", - "//tools/android:android_tools", - "//tools/android:memconsumer", - "//tools/android:push_apps_to_background", - "//tools/android/audio_focus_grabber:audio_focus_grabber_apk", - "//tools/android/customtabs_benchmark:customtabs_benchmark_apk", - "//tools/android/kerberos/SpnegoAuthenticator:spnego_authenticator_apk", - "//ui/android:ui_junit_tests", - ] - deps -= [ - "//net:net_perftests", - "//url:url_unittests", - ] - - if (!is_cast_android) { - deps += [ - "//android_webview:empty_group", - "//android_webview/test", - "//android_webview/tools/automated_ui_tests:webview_ui_test_app", - "//android_webview/tools/captured_sites_tests:captured_sites_test_app", - "//android_webview/tools/system_webview_shell", - "//chrome/android:chrome_junit_tests", - "//chrome/android:chrome_public_apk", - "//chrome/android:chrome_public_test_apk", - "//chrome/android:chrome_public_unit_test_apk", - "//chrome/browser/android/examples/custom_tabs_client:custom_tabs_client_example_apk", - "//chrome/browser/android/examples/partner_browser_customizations_provider:partner_browser_customizations_example_apk", - "//content/shell/android:content_shell_test_apk", - ] - - if (android_sdk_release == "tprivacysandbox") { - deps += [ "//android_webview/tools/sdk_sandbox" ] - } - } - - if (enable_chrome_android_internal) { - deps += [ "//clank" ] - } - } - - if (is_linux || is_chromeos || is_android) { - deps += [ - "//third_party/breakpad:breakpad_unittests", - "//third_party/breakpad:core-2-minidump", - "//third_party/breakpad:generate_test_dump", - "//third_party/breakpad:minidump-2-core", - "//tools/dump_process_memory:dump_process", - ] - } - - if (is_chromeos_ash) { - deps += [ - "//ash:ash_unittests", - "//ash/components:ash_components_unittests", - "//ash/keyboard/ui:keyboard_unittests", - "//ash/webui:ash_webui_unittests", - "//chrome/browser/metrics/perf:profile_provider_unittest", - "//chrome/test:ash_crosapi_tests", - "//chrome/test:usage_time_limit_unittests", - "//chromeos/ash/components/proximity_auth:proximity_auth_unittests", - "//chromeos/components:chromeos_components_unittests", - "//components/exo/wayland:wayland_client_compatibility_tests", - "//components/session_manager/core", - "//third_party/shell-encryption:shell_encryption_unittests", - "//ui/chromeos:ui_chromeos_unittests", - ] - } - - if (is_chromeos) { - deps += [ "//chromeos:chromeos_unittests" ] - } - - if (is_chromeos_ash || is_mac || is_win) { - deps += [ - "//rlz:rlz_id", - "//rlz:rlz_lib", - "//rlz:rlz_unittests", - ] - } - - if (is_linux || is_chromeos) { - # The following are definitely linux-only. - deps += [ - "//net:disk_cache_memory_test", - "//net:quic_client", - "//net:quic_server", - "//sandbox/linux:chrome_sandbox", - "//sandbox/linux:sandbox_linux_unittests", - ] - if (!is_clang) { - deps += [ "//testing:empty_main" ] - } - - if (!is_castos) { - deps += [ "//chrome:xdg_mime" ] - } - - if (use_dbus) { - deps += [ - "//dbus:dbus_test_server", - "//dbus:dbus_unittests", - ] - } - - if (is_chrome_branded && is_official_build) { - # TODO(dpranke): add the linux_dump_symbols flag? - deps += [ "//chrome:linux_symbols" ] - } - } - - if (is_ios || is_win || is_linux || is_chromeos_lacros || is_fuchsia) { - deps += [ - "//base:base_i18n_perftests", - "//google_apis:google_apis_unittests", - ] - } - - if ((is_win || is_mac || is_linux || is_chromeos || is_fuchsia) && - (target_cpu == "x86" || target_cpu == "x64")) { - deps += [ - "//third_party/swiftshader/src/Vulkan:icd_file", - "//third_party/swiftshader/src/Vulkan:swiftshader_libvulkan", - ] - } - - # TODO(GYP): Figure out which of these should (and can) build - # for Chrome OS and iOS (without blink). - if (!is_chromeos_ash && use_blink) { - deps += [ - "//cc:cc_perftests", - "//device:device_unittests", - "//gin:gin_shell", - "//gin:gin_unittests", - "//gpu:command_buffer_perftests", - "//gpu:gl_tests", - "//gpu:gpu_perftests", - "//media:media_perftests", - "//third_party/libphonenumber:libphonenumber_unittests", - "//ui/compositor:compositor_unittests", - ] - - if (!is_ios) { - deps += [ - "//base:build_utf8_validator_tables", - "//base:check_example", - "//components:components_perftests", - "//ipc:ipc_perftests", - "//net:dump_cache", - ] - } - - if (!is_android && !is_castos && !is_ios) { - deps += [ - "//chrome/test:load_library_perf_tests", - "//chrome/test:sync_performance_tests", - ] - } - - if (!is_android && !is_ios) { - deps += [ - "//courgette:courgette", - "//courgette:courgette_fuzz", - "//courgette:courgette_minimal_tool", - "//courgette:courgette_unittests", - "//media/cast:generate_barcode_video", - "//media/cast:generate_timecode_audio", - "//net:crash_cache", - "//net:net_watcher", # TODO(GYP): This should be conditional on - # use_v8_in_net - "//net:run_testserver", - "//net:stress_cache", - "//net:tld_cleanup", - "//third_party/leveldatabase:env_chromium_unittests", - "//third_party/libaddressinput:libaddressinput_unittests", - ] - } - - if (enable_extensions) { - deps += [ "//extensions/shell:app_shell" ] - } - - # TODO(https://crbug.com/1299021): These dependencies might be - # redundant given that we were able to disable them, apparently without - # negative consequences, for the ARM32-NaCl-on-ARM64 case. - if (enable_nacl) { - if (target_cpu != "arm64") { - deps += [ "//components/nacl/loader:nacl_loader_unittests" ] - } - - if (is_linux || is_chromeos) { - # TODO(dpranke): Figure out what platforms should actually have this. - deps += [ "//components/nacl/loader:nacl_helper" ] - } - } - - if (media_use_ffmpeg && !is_android) { - deps += [ "//media:ffmpeg_regression_tests" ] - } - } - - if (enable_ppapi) { - deps += [ - "//ppapi:pepper_hash_for_uma", - "//ppapi:ppapi_perftests", - ] - } - - if (is_android || is_linux || is_chromeos_lacros) { - deps += [ - "//components/network_hints/browser", - "//content/public/app", - "//mojo:mojo_perftests", - "//services/service_manager/public/cpp", - "//testing/gmock:gmock_main", - "//third_party/breakpad:dump_syms($host_toolchain)", - "//third_party/breakpad:microdump_stackwalk($host_toolchain)", - "//third_party/breakpad:minidump_dump($host_toolchain)", - "//third_party/breakpad:minidump_stackwalk($host_toolchain)", - ] - } - - if (is_linux || is_chromeos_lacros) { - deps += [ - "//gpu/khronos_glcts_support:khronos_glcts_test", - "//media/cast:cast_benchmarks", - "//media/cast:tap_proxy", - "//skia:filter_fuzz_stub", - "//skia:image_operations_bench", - "//ui/snapshot:snapshot_unittests", - ] - - if (!is_castos) { - deps += [ "//chrome/test:chrome_app_unittests" ] - } - - if (!is_debug && !is_component_build && !is_castos) { - deps += [ "//chrome/tools/service_discovery_sniffer" ] - } - } - - if (is_mac) { - deps += [ - "//third_party/breakpad:dump_syms", - - # The following are accessibility API tools. - "//tools/accessibility/inspect:ax_dump_events", - "//tools/accessibility/inspect:ax_dump_tree", - ] - deps -= [ - # Mojo in GN contains some things which are never compiled in GYP on Mac, - # so compilation fails on Mac. They need porting. - "//mojo", - ] - } - - if (is_win) { - deps += [ - "//base:pe_image_test", - "//chrome/chrome_elf:chrome_elf_unittests", - "//chrome/chrome_elf:dll_hash_main", - "//chrome/elevation_service:elevation_service_unittests", - "//chrome/install_static:install_static_unittests", - "//chrome/installer/gcapi", - "//chrome/installer/setup:setup_unittests", - "//chrome/notification_helper:notification_helper_unittests", - "//chrome/test:delayloads_unittests", - "//components/wifi:wifi_test", - "//components/zucchini", - "//net:quic_client", - "//net:quic_server", - "//sandbox/win:sbox_integration_tests", - "//sandbox/win:sbox_unittests", - "//sandbox/win:sbox_validation_tests", - "//testing/gtest:gtest_main", - - # The following two are accessibility API debugging tools. - "//tools/accessibility/inspect:ax_dump_events", - "//tools/accessibility/inspect:ax_dump_tree", - "//tools/win/chromeexts:chromeexts", - - # Windows virtual display driver testing executable. - "//third_party/win_virtual_display/controller:display_driver_controller_executable", - ] - - # TODO(thakis): Enable this in cross builds, https://crbug.com/799827 - if (!(is_component_build && is_debug && target_cpu == "x86") && - host_os == "win") { - deps += [ "//chrome/test/mini_installer:mini_installer_tests" ] - } - } else if (!is_android && !is_ios && !is_fuchsia) { - deps += [ "//third_party/breakpad:symupload($host_toolchain)" ] - } - - if (is_cast_android || is_castos || (is_fuchsia && enable_cast_receiver)) { - deps += [ "//chromecast:cast_test_lists" ] - } - - if (is_cast_android || is_castos) { - deps += [ - "//chromecast:cast_shell", - "//chromecast/cast_core:core_runtime_simple", - ] - } - - if (is_mac || is_win || is_android || is_linux || is_chromeos) { - deps += [ - "//third_party/crashpad/crashpad:crashpad_tests", - "//third_party/crashpad/crashpad/handler:crashpad_handler", - "//third_party/crashpad/crashpad/tools:crashpad_database_util", - ] - } - - if (enable_message_center) { - deps += [ "//ui/message_center:message_center_unittests" ] - } - - if (!is_android && !is_ios) { - deps += [ "//content/browser/bluetooth/tools:bluetooth_metrics_hash" ] - } - - if (is_win || is_linux || is_chromeos) { - deps += [ "//mojo" ] - } - - if (is_mac || is_linux || is_chromeos || is_android || is_fuchsia) { - deps += [ "//third_party/perfetto:all" ] - } - - if (is_win || is_mac || is_linux || is_chromeos) { - deps += [ "//third_party/sqlite:sqlite_shell" ] - } - - if ((is_linux && !is_castos) || is_chromeos_lacros || is_fuchsia) { - # TODO(https://crbug.com/1329673): Figure out if this should be in gn_all - # and how cross-platform this is. - deps += - [ "//components/services/filesystem:filesystem_service_unittests" ] - } - - if ((is_linux && !is_castos) || is_chromeos_lacros) { - # TODO(https://crbug.com/1329673): Figure out if any of these should be in - # gn_all and figure out how cross-platform they are. - deps += [ - "//chrome/installer/util:strings", - "//chrome/tools/convert_dict", - "//components/constrained_window:unit_tests", - "//components/metrics:serialization", - "//components/sessions:unit_tests", - "//media/cast:udp_proxy", - "//storage/browser:dump_file_system", - "//third_party/angle:libANGLE", - "//third_party/angle:libEGL", - "//third_party/angle:libGLESv2", - "//third_party/leveldatabase:leveldb_test_targets", - "//third_party/libjpeg_turbo:simd", - "//third_party/opus:opus_compare", - "//third_party/opus:opus_demo", - "//third_party/opus:test_opus_api", - "//third_party/opus:test_opus_decode", - "//third_party/opus:test_opus_encode", - "//third_party/opus:test_opus_padding", - "//ui/display/types", - "//ui/shell_dialogs:shell_dialogs_unittests", - ] - - if (target_cpu == "x86" || target_cpu == "x64") { - if (!is_android) { - deps += [ "//chrome/test:load_library_perf_tests" ] - } - deps += [ "//third_party/libjpeg_turbo:simd_asm" ] - } - if ((is_linux || is_chromeos) && current_toolchain == host_toolchain) { - deps += [ "//v8:v8_shell" ] - } - } - - if ((is_linux && !is_castos) || is_chromeos || - ((is_win || is_mac) && use_fuzzing_engine)) { - deps += [ - "//testing/libfuzzer/fuzzers", - "//third_party/freetype-testing:fuzzers", - "//third_party/grpc:fuzzers", - "//third_party/icu/fuzzers", - "//third_party/qcms:fuzzers", - "//third_party/ukey2/fuzzers", - "//third_party/zlib/contrib/tests/fuzzers", - ] - - if (is_chromeos_ash) { - deps += [ "//chrome/services/ipp_parser/public/cpp:fuzzers" ] - } - - # TODO(crbug.com/906751): Get the libFuzzer tests working on Windows. - # Disable them for now because they cause the Windows clang ToT builder to - # fail. - if (!is_win) { - deps += [ "//testing/libfuzzer/tests:libfuzzer_tests" ] - } - } - - # TODO(https://crbug.com/1299021): Remove the special case for arm64. - if (enable_nacl && target_cpu != "arm64") { - deps += [ "//native_client_sdk/src:nacl_core_sdk" ] - } - - if (((is_linux || is_chromeos) && use_ozone) || is_fuchsia) { - deps += [ - "//headless:headless_non_renderer", - "//headless:headless_tests", - ] - } - - if (enable_vr) { - deps += [ - "//chrome/browser/vr:vr_common_perftests", - "//chrome/browser/vr:vr_common_unittests", - ] - if (!is_android) { - deps += [ "//tools/perf/contrib/vr_benchmarks:vr_perf_tests" ] - } else { - deps += [ "//chrome/browser/android/vr:vr_android_unittests" ] - import("//tools/perf/chrome_telemetry_build/android_browser_types.gni") - foreach(_target_suffix, telemetry_android_browser_target_suffixes) { - deps += [ - "//tools/perf/contrib/vr_benchmarks:vr_perf_tests${_target_suffix}", - ] - } - } - } - - if (use_atk) { - deps += [ - "//tools/accessibility/inspect:ax_dump_events", - "//tools/accessibility/inspect:ax_dump_tree", - ] - } - - if (build_dawn_tests) { - deps += [ - "//third_party/dawn/src/dawn/fuzzers:fuzzers", - "//third_party/dawn/src/dawn/tests:dawn_end2end_tests", - "//third_party/dawn/src/dawn/tests:dawn_unittests", - "//third_party/dawn/src/tint:tint_unittests", - "//third_party/dawn/src/tint/fuzzers", - ] - } - - # PFFFT. - deps += [ - "//third_party/pffft:fuzzers", - "//third_party/pffft:pffft_benchmark", - "//third_party/pffft:pffft_unittest", - ] - - # Rust build targets. - if (enable_rust) { - deps += [ ":all_rust" ] - } - - if (!is_android && !is_ios) { - deps += [ "//components/cronet:cronet_tests" ] - } - } - - if (is_chrome_for_testing) { - deps += [ "//chrome/browser/chrome_for_testing:chrome_for_testing" ] - } -} - -# All Rust targets. This is provided for convenience while developing Rust to -# e.g. test build config or toolchain changes. -group("all_rust") { - testonly = true - - deps = [ ":rust_build_tests" ] - - # There is rust stuff behind flags in here. - deps += [ "//base:base_unittests" ] - - if (enable_rust_mojo) { - deps += [ - "//mojo/public/rust", - "//mojo/public/rust:mojo_rust_integration_unittests", - "//mojo/public/rust:mojo_rust_unittests", - ] - } - if (enable_rust_gtest_interop) { - deps += [ "//testing/rust_gtest_interop:rust_gtest_interop_unittests" ] - } -} - -# This group exists to give targets for the waterfall to refer to. -group("rust_build_tests") { - testonly = true - deps = [ "//build/rust/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) || - ((is_chromeos || is_win) && !use_ozone))) { - # On CQ, run the Traffic Annotation Auditor when a change affects one of these - # targets. - group("traffic_annotation_auditor_dependencies") { - deps = [ - "//chrome:chrome", - "//remoting/client", - "//remoting/host:host", - "//tools/traffic_annotation:annotations_xml", - ] - } -} - -if (is_chromeos_ash) { - group("traffic_annotation_auditor_dependencies") { - deps = [ - "//chrome", - "//chromeos", - "//tools/traffic_annotation:annotations_xml", - ] - } -} - -if (is_android && !is_cronet_build) { - # On CQ, run the Traffic Annotation Auditor when a change affects one of these - # targets. - group("traffic_annotation_auditor_dependencies") { - deps = [ - "//chrome/android:chrome_public_apk", - "//tools/traffic_annotation:annotations_xml", - ] - } -} - -if (is_fuchsia) { - # TODO(https://crbug.com/731217): This can't practically be in //v8 without - # duplicating all the Fuchsia running infrastructure there. - fuchsia_component("d8_component") { - testonly = true - manifest = "//v8/gni/v8.cml" - data_deps = [ "//v8:d8" ] - } - fuchsia_package("d8_pkg") { - testonly = true - package_name = "d8" - deps = [ ":d8_component" ] - } - fuchsia_package_installer("d8_fuchsia") { - testonly = true - package = ":d8_pkg" - package_name = "d8" - } -} - -# TODO(GYP_GONE): Figure out if we really need this target or if there's -# some better way to specify things. -if (is_win) { - group("chrome_official_builder_no_unittests") { - deps = [ - "//chrome/common/win:eventlog_provider", - "//chrome/credential_provider", - "//chrome/installer/gcapi", - "//chrome/installer/mini_installer", - "//chrome/updater/win:updater_zip", - "//components/policy:pack_policy_templates", - "//components/zucchini", - "//components/zucchini:zucchini64", - "//courgette", - "//third_party/hyphenation-patterns", - "//tools/metrics:metrics_metadata", - ] - - if (target_cpu == "x86") { - deps += [ - "//courgette:copy_courgette_binaries", - "//courgette(//build/toolchain/win:win_clang_x64)", - ] - } - if (is_chrome_branded) { - deps += [ "//remoting/host:remoting_host_installation" ] - } - } - - group("chrome_official_builder") { - testonly = true - - deps = [ - ":blink_wpt_tests", - ":chrome_official_builder_no_unittests", - "//base:base_unittests", - "//chrome/test:browser_tests", - "//chrome/test:interactive_ui_tests", - "//ipc:ipc_tests", - "//media:media_unittests", - "//media/midi:midi_unittests", - "//net:net_unittests", - "//printing:printing_unittests", - "//sql:sql_unittests", - "//third_party/breakpad:symupload($host_toolchain)", - "//ui/base:ui_base_unittests", - "//ui/gfx:gfx_unittests", - "//ui/touch_selection:ui_touch_selection_unittests", - "//ui/views:views_unittests", - "//url:url_unittests", - ] - } -} - -if (is_chromeos_ash) { - # This group is used to collect all targets used when verifying a new version - # of Chrome for Chrome OS. - group("chromiumos_preflight") { - testonly = true - data_deps = [ - "//chrome", - "//chrome/test/chromedriver:chromedriver_server", - "//components/chromeos_camera:jpeg_decode_accelerator_unittest", - "//components/exo/wayland:wayland_client_integration_tests", - "//components/exo/wayland:wayland_client_perftests", - "//components/exo/wayland:wayland_client_tests", - "//components/exo/wayland:wayland_hdr_client", - "//components/policy/test_support:fake_dmserver", - "//media:media_unittests", - "//media/capture:capture_unittests", - "//sandbox/linux:chrome_sandbox", - "//sandbox/linux:sandbox_linux_unittests", - "//third_party/breakpad:minidump_stackwalk($host_toolchain)", - "//third_party/dawn/src/dawn/tests:dawn_end2end_tests", - "//third_party/dawn/src/dawn/tests:dawn_unittests", - "//ui/ozone:ozone_integration_tests", - - # Blocked on https://github.com/catapult-project/catapult/issues/2297 - #"//third_party/catapult/telemetry:bitmaptools", - "//tools/perf/clear_system_cache", - "//ui/ozone/gl:ozone_gl_unittests", - ] - - if (enable_ppapi) { - data_deps += [ "//ppapi/examples/video_decode" ] - } - - if (use_v4l2_codec || use_vaapi) { - data_deps += [ - "//components/chromeos_camera:jpeg_encode_accelerator_unittest", - "//media/gpu/chromeos:image_processor_test", - "//media/gpu/test/:video_decode_accelerator_perf_tests", - "//media/gpu/test/:video_decode_accelerator_tests", - "//media/gpu/test/:video_encode_accelerator_perf_tests", - "//media/gpu/test/:video_encode_accelerator_tests", - ] - if (use_vaapi) { - data_deps += [ - "//media/gpu/vaapi:decode_test", - "//media/gpu/vaapi:vaapi_unittest", - "//media/gpu/vaapi/test/fake_libva_driver:fake_libva_driver_unittest", - ] - } - if (use_v4l2_codec) { - data_deps += [ - "//media/gpu/chromeos:image_processor_perf_test", - "//media/gpu/v4l2:v4l2_stateless_decoder", - "//media/gpu/v4l2:v4l2_unittest", - ] - } - } - } -} - -if (use_blink && !is_cronet_build) { - group("chromedriver_group") { - testonly = true - - if (is_fuchsia || is_android) { - # On Fuchsia and non-Cast Android, ChromeDriver runs on the host, not the - # device. - if (!is_cast_android) { - deps = [ - "//chrome/test/chromedriver:chromedriver_server($host_toolchain)", - ] - } - if (is_android && !is_cast_android) { - deps += [ "//chrome/test/chromedriver/test/webview_shell:chromedriver_webview_shell_apk" ] - } - } else if (!is_castos && !is_ios) { - deps = [ - "//chrome/test/chromedriver:chromedriver_server", - "//chrome/test/chromedriver:chromedriver_unittests", - "//chrome/test/chromedriver:generate_chromedriver_license", - ] - } - } - - # This group includes all of the targets needed to build and test Blink, - # including running web tests (see below). This target is defined here because - # previously //third_party/WebKit, now //third_party/blink, couldn't depend on - # //content/shell. This might not longer be true, see - # https://crbug.com/1018659. - group("blink_tests") { - testonly = true - - deps = [ - ":blink_web_tests", - ":blink_wpt_tests", - "//third_party/blink/public:all_blink", - ] - } - - # Web tests runner - # third_party/blink/tools/run_web_tests.py - group("run_web_tests") { - testonly = true - deps = [ - ":blink_web_tests", - ":blink_wpt_tests", - ] - } - - if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos) { - script_test("webdriver_wpt_tests") { - script = "//third_party/blink/tools/run_wpt_tests.py" - args = [ - "--product=chrome", - "--no-show-results", - "--zero-tests-executed-ok", - "--test-type=wdspec", - ] - data_deps = [ - "//chrome:chrome", - "//chrome/test/chromedriver:chromedriver_server", - "//third_party/blink/tools:wpt_tests_isolate", - ] - if (is_win) { - data_deps += [ "//build/win:copy_cdb_to_output" ] - } - } - script_test("chrome_wpt") { - script = "//third_party/blink/tools/run_wpt_tests.py" - args = [ - "--product=chrome", - "--no-show-results", - "--zero-tests-executed-ok", - ] - data_deps = [ - "//chrome:chrome", - "//chrome/test/chromedriver:chromedriver_server", - "//third_party/blink/tools:wpt_tests_isolate", - ] - } - script_test("content_shell_wpt") { - script = "//third_party/blink/tools/run_wpt_tests.py" - args = [ - "--no-show-results", - "--zero-tests-executed-ok", - ] - data_deps = [ - ":blink_web_tests_support_data", - "//third_party/blink/tools:wpt_tests_isolate", - ] - } - } - - group("blink_web_tests_support_data") { - testonly = true - data_deps = [ - ":layout_test_data_mojo_bindings", - ":layout_test_data_mojo_bindings_lite", - "//content/shell:content_shell", - "//content/test:mojo_bindings_web_test_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:vr_service_js_data_deps", - "//media/capture/mojom:image_capture_js_data_deps", - "//media/midi:mojo_js_data_deps", - "//mojo/public/interfaces/bindings/tests:test_data_deps", - "//mojo/public/js/ts/bindings/tests:test_interfaces_js_data_deps", - "//mojo/public/mojom/base:base_js_data_deps", - "//services/device/public/mojom:generic_sensor_js_data_deps", - "//services/device/public/mojom:mojom_js_data_deps", - "//services/device/public/mojom:usb_js_data_deps", - "//services/shape_detection/public/mojom:mojom_js_data_deps", - "//skia/public/mojom:mojom_js_data_deps", - "//testing/buildbot/filters:blink_web_tests_filter", - "//third_party/blink/public:blink_devtools_frontend_resources_files", - "//third_party/blink/public:blink_devtools_inspector_resources", - "//third_party/blink/public/mojom:mojom_platform_js_data_deps", - "//third_party/blink/renderer/core:gen_files_for_web_tests", - "//third_party/catapult/third_party/typ", - "//third_party/hyphenation-patterns:test_data", - "//third_party/mesa_headers", - "//tools/imagediff", - "//ui/base:goldctl", - ] - - if (is_android) { - data_deps += [ - "//third_party/breakpad:breakpad_unittests", - "//third_party/breakpad:dump_syms", - "//third_party/breakpad:microdump_stackwalk", - "//third_party/breakpad:minidump_dump", - "//third_party/breakpad:minidump_stackwalk", - "//third_party/breakpad:symupload", - "//tools/android/forwarder2", - ] - } else { - data_deps += [ "//content/web_test:web_test_common_mojom_js_data_deps" ] - } - - if (!is_win && !is_android) { - data_deps += - [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] - } - - if (is_mac) { - data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] - } - - if (is_linux || is_chromeos) { - data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] - } - - if (is_fuchsia) { - data_deps += [ - "//build/config/fuchsia:deployment_resources", - "//content/shell:content_shell_fuchsia", - "//content/shell:content_shell_pkg__archive-manifest", - "//content/shell:content_shell_pkg__archive-metadata", - ] - } - - data = [ - "//build/skia_gold_common/", - "//testing/scripts/common.py", - "//testing/scripts/run_isolated_script_test.py", - "//testing/xvfb.py", - "//third_party/blink/tools/", - "//third_party/blink/web_tests/external/wpt/config.json", - "//third_party/blink/web_tests/resources/", - "//third_party/blink/web_tests/TestLists/", - "//third_party/pywebsocket3/src/mod_pywebsocket/", - "//third_party/test_fonts/test_fonts/", - "//third_party/wpt_tools/", - ] - - if (is_win) { - data += [ - "//third_party/apache-win32/", - "//third_party/apache-windows-arm64/", - "//third_party/perl/perl/", - ] - data_deps += [ "//build/win:copy_cdb_to_output" ] - } - - if (is_mac) { - data += [ - "//third_party/apache-mac/", - "//third_party/apache-mac-arm64/", - ] - } - - if (is_linux || is_fuchsia) { - data += [ "//third_party/apache-linux/" ] - } - - if (is_android) { - data += [ - "//third_party/catapult/", - "//build/android/", - ] - } - } - - _common_web_test_script = "//testing/scripts/run_isolated_script_test.py" - - 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 { - _common_web_test_args += [ "--release" ] - if (dcheck_always_on) { - _common_web_test_args += [ "--timeout-ms=12000" ] - } - } - - if (is_android) { - _common_web_test_args += [ - "--platform", - "android", - ] - } - - if (is_fuchsia) { - _common_web_test_args += [ - "--platform", - "fuchsia", - "--jobs", - "1", - ] - } - - _common_web_test_args += [ - "--seed", - "4", - "--debug-rwt-logging", - "--no-show-results", - "--zero-tests-executed-ok", - "--clobber-old-results", + deps = [ + "//net", ] - - # https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_tests.md - script_test("blink_web_tests") { - script = _common_web_test_script - - args = _common_web_test_args - - data_deps = [ ":blink_web_tests_support_data" ] - data = [ - "//third_party/blink/perf_tests/", - "//third_party/blink/web_tests/VirtualTestSuites", - - # List all test expectations here - "//third_party/blink/web_tests/ASANExpectations", - "//third_party/blink/web_tests/LeakExpectations", - "//third_party/blink/web_tests/MSANExpectations", - "//third_party/blink/web_tests/NeverFixTests", - "//third_party/blink/web_tests/SlowTests", - "//third_party/blink/web_tests/StaleTestExpectations", - "//third_party/blink/web_tests/TestExpectations", - "//third_party/blink/web_tests/WebGPUExpectations", - - # === List Test Cases folders here === - "//third_party/blink/web_tests/accessibility/", - "//third_party/blink/web_tests/android/", - "//third_party/blink/web_tests/animations/", - "//third_party/blink/web_tests/app_banner/", - "//third_party/blink/web_tests/bindings/", - "//third_party/blink/web_tests/clipboard/", - "//third_party/blink/web_tests/compositing/", - "//third_party/blink/web_tests/crypto/", - "//third_party/blink/web_tests/css-parser/", - "//third_party/blink/web_tests/css1/", - "//third_party/blink/web_tests/css2.1/", - "//third_party/blink/web_tests/css3/", - "//third_party/blink/web_tests/cssom/", - "//third_party/blink/web_tests/custom-elements/", - "//third_party/blink/web_tests/custom-properties/", - "//third_party/blink/web_tests/dark-mode/", - "//third_party/blink/web_tests/dom/", - "//third_party/blink/web_tests/editing/", - "//third_party/blink/web_tests/fast/", - "//third_party/blink/web_tests/fonts/", - "//third_party/blink/web_tests/fragmentation/", - "//third_party/blink/web_tests/fullscreen/", - "//third_party/blink/web_tests/gamepad/", - "//third_party/blink/web_tests/harness-tests/", - "//third_party/blink/web_tests/hittesting/", - "//third_party/blink/web_tests/html/", - "//third_party/blink/web_tests/html5lib/", - "//third_party/blink/web_tests/http/", - "//third_party/blink/web_tests/idle-callback/", - "//third_party/blink/web_tests/ietestcenter/", - "//third_party/blink/web_tests/images/", - "//third_party/blink/web_tests/inspector-protocol/", - "//third_party/blink/web_tests/intersection-observer/", - "//third_party/blink/web_tests/jquery/", - "//third_party/blink/web_tests/js/", - "//third_party/blink/web_tests/loader/", - "//third_party/blink/web_tests/media/", - "//third_party/blink/web_tests/media_capabilities/", - "//third_party/blink/web_tests/mhtml/", - "//third_party/blink/web_tests/navigator_language/", - "//third_party/blink/web_tests/navigator_webdriver/", - "//third_party/blink/web_tests/netinfo/", - "//third_party/blink/web_tests/overflow/", - "//third_party/blink/web_tests/paint/", - "//third_party/blink/web_tests/payments/", - "//third_party/blink/web_tests/permissionclient/", - "//third_party/blink/web_tests/plugins/", - "//third_party/blink/web_tests/pointer-lock/", - "//third_party/blink/web_tests/print_testharness/", - "//third_party/blink/web_tests/printing/", - "//third_party/blink/web_tests/register-protocol-handler/", - "//third_party/blink/web_tests/regress/", - "//third_party/blink/web_tests/resize-observer/", - "//third_party/blink/web_tests/resources/", - "//third_party/blink/web_tests/rootscroller/", - "//third_party/blink/web_tests/screen_orientation/", - "//third_party/blink/web_tests/scrollbars/", - "//third_party/blink/web_tests/scrollingcoordinator/", - "//third_party/blink/web_tests/security/", - "//third_party/blink/web_tests/handwriting/", - "//third_party/blink/web_tests/shadow-dom/", - "//third_party/blink/web_tests/storage/", - "//third_party/blink/web_tests/svg/", - "//third_party/blink/web_tests/synthetic_gestures/", - "//third_party/blink/web_tests/tables/", - "//third_party/blink/web_tests/test_runner/", - "//third_party/blink/web_tests/third_party/", - "//third_party/blink/web_tests/timezonechange/", - "//third_party/blink/web_tests/touchadjustment/", - "//third_party/blink/web_tests/transforms/", - "//third_party/blink/web_tests/transitions/", - "//third_party/blink/web_tests/traversal/", - "//third_party/blink/web_tests/typedcssom/", - "//third_party/blink/web_tests/vibration/", - "//third_party/blink/web_tests/view-transition/", - "//third_party/blink/web_tests/virtual/", - "//third_party/blink/web_tests/virtualkeyboard/", - "//third_party/blink/web_tests/wasm/", - "//third_party/blink/web_tests/webaudio/", - "//third_party/blink/web_tests/webexposed/", - "//third_party/blink/web_tests/webgpu/", - "//third_party/blink/web_tests/xmlviewer/", - - # === Test Case Folders Ends === - ] - - if (is_win || is_linux || is_fuchsia) { - data += [ - "//third_party/blink/web_tests/platform/win/", - "//third_party/blink/web_tests/platform/win10/", - "//third_party/blink/web_tests/platform/win11-arm64/", - ] - if (is_linux || is_fuchsia) { - data += [ "//third_party/blink/web_tests/platform/linux/" ] - } - if (is_fuchsia) { - data += [ - "//third_party/blink/web_tests/platform/fuchsia/", - "$root_gen_dir/package_metadata/content_shell.meta", - ] - } - } else if (is_mac) { - data += [ - "//third_party/blink/web_tests/platform/mac/", - "//third_party/blink/web_tests/platform/mac-mac10.15/", - "//third_party/blink/web_tests/platform/mac-mac11/", - "//third_party/blink/web_tests/platform/mac-mac11-arm64/", - "//third_party/blink/web_tests/platform/mac-mac12/", - "//third_party/blink/web_tests/platform/mac-mac12-arm64/", - "//third_party/blink/web_tests/platform/mac-mac13-arm64/", - ] - } - - # flag-specific tests only runs on linux as of now - if (is_linux) { - data += [ - "//third_party/blink/web_tests/FlagSpecificConfig", - "//third_party/blink/web_tests/FlagExpectations/", - "//third_party/blink/web_tests/flag-specific/", - ] - } - } - - script_test("blink_wpt_tests") { - script = _common_web_test_script - - args = _common_web_test_args - - # Use --wpt-only to skip tests under web_tests/virtual/ - args += [ "--wpt-only" ] - - data_deps = [ ":blink_web_tests_support_data" ] - data = [ - "//third_party/blink/perf_tests/", - "//third_party/blink/web_tests/VirtualTestSuites", - - # List all test expectations here - "//third_party/blink/web_tests/ASANExpectations", - "//third_party/blink/web_tests/LeakExpectations", - "//third_party/blink/web_tests/MSANExpectations", - "//third_party/blink/web_tests/NeverFixTests", - "//third_party/blink/web_tests/SlowTests", - "//third_party/blink/web_tests/StaleTestExpectations", - "//third_party/blink/web_tests/TestExpectations", - "//third_party/blink/web_tests/WebGPUExpectations", - - # === List Test Cases folders here === - "//third_party/blink/web_tests/external/", - "//third_party/blink/web_tests/wpt_internal/", - "//third_party/blink/web_tests/virtual/", - - # === Test Case Folders Ends === - ] - - if (is_win || is_linux || is_fuchsia) { - data += [ - "//third_party/blink/web_tests/platform/win/", - "//third_party/blink/web_tests/platform/win10/", - ] - if (is_linux || is_fuchsia) { - data += [ "//third_party/blink/web_tests/platform/linux/" ] - } - if (is_fuchsia) { - data += [ - "//third_party/blink/web_tests/platform/fuchsia/", - "$root_gen_dir/package_metadata/content_shell.meta", - ] - } - } else if (is_mac) { - data += [ - "//third_party/blink/web_tests/platform/mac/", - "//third_party/blink/web_tests/platform/mac-mac10.15/", - "//third_party/blink/web_tests/platform/mac-mac11-arm64/", - ] - } - - # flag-specific tests only runs on linux as of now - if (is_linux) { - data += [ - "//third_party/blink/web_tests/FlagSpecificConfig", - "//third_party/blink/web_tests/FlagExpectations/", - "//third_party/blink/web_tests/flag-specific/", - ] - } - } - - script_test("devtools_web_tests") { - # This target differs from :blink_web_tests in that it uses the - # same test harness but runs an entirely different set of tests - # and doesn't have a dependency on the web_test directory at all. - script = _common_web_test_script - - args = _common_web_test_args + [ - "--layout-tests-directory=@WrappedPath(" + rebase_path( - "//third_party/devtools-frontend/src/test/webtests", - root_out_dir) + ")", - "http/tests/devtools", - ] - - data_deps = [ ":blink_web_tests_support_data" ] - data = [ "//third_party/devtools-frontend/src/test/webtests/" ] - } - - script_test("webgpu_blink_web_tests") { - # This target differs from :blink_web_tests in that it uses the same - # test harness and a few additional flags but, more importantly, only runs - # the web_tests/wpt_internal/webgpu tests, so it doesn't have a data - # dependency on the whole web_test directory. - script = _common_web_test_script - - args = _common_web_test_args - if (is_asan) { - args += [ "--timeout-ms=30000" ] - } - args += [ - "--ignore-default-expectations", - "--additional-expectations", - "@WrappedPath(../../third_party/blink/web_tests/WebGPUExpectations)", - "--isolated-script-test-filter=wpt_internal/webgpu/*", - ] - - data_deps = [ - ":blink_web_tests_support_data", - "//third_party/webgpu-cts", - ] - data = [ - "//third_party/blink/web_tests/external/wpt/common/", - "//third_party/blink/web_tests/external/wpt/resources/", - "//third_party/blink/web_tests/FlagSpecificConfig", - "//third_party/blink/web_tests/VirtualTestSuites", - "//third_party/blink/web_tests/WebGPUExpectations", - "//third_party/blink/web_tests/wpt_internal/", - "//third_party/webgpu-cts/scripts/", - ] - } - - copy("layout_test_data_mojo_bindings") { - testonly = true - - sources = [ "$root_gen_dir/mojo/public/js/mojo_bindings.js" ] - - outputs = - [ "$root_gen_dir/layout_test_data/mojo/public/js/mojo_bindings.js" ] - - deps = [ "//mojo/public/js:bindings" ] - } - - copy("layout_test_data_mojo_bindings_lite") { - testonly = true - - sources = [ "$root_gen_dir/mojo/public/js/mojo_bindings_lite.js" ] - - outputs = [ - "$root_gen_dir/layout_test_data/mojo/public/js/mojo_bindings_lite.js", - ] - - deps = [ "//mojo/public/js:bindings_lite" ] - } - - script_test("blink_python_tests") { - script = "//testing/scripts/run_isolated_script_test.py" - args = [ "@WrappedPath(" + - rebase_path("//third_party/blink/tools/run_blinkpy_tests.py", - root_build_dir) + ")" ] - - data = [ - # These tests use //build/android/devil_chromium.py even when !is_android, - # so cannot use the helpers in //build/android (they assert(is_android)). - "//build/android/", - "//build/gn_helpers.py", - "//build/config/gclient_args.gni", - "//build/skia_gold_common/", - "//components/crash/content/tools/generate_breakpad_symbols.py", - "//testing/unexpected_passes_common/", - "//testing/flake_suppressor_common/", - "//third_party/blink/renderer/bindings/scripts/", - "//third_party/blink/renderer/build/scripts/", - "//third_party/blink/tools/", - "//third_party/blink/web_tests/ASANExpectations", - "//third_party/blink/web_tests/FlagExpectations/", - "//third_party/blink/web_tests/LeakExpectations", - "//third_party/blink/web_tests/MSANExpectations", - "//third_party/blink/web_tests/NeverFixTests", - "//third_party/blink/web_tests/SlowTests", - "//third_party/blink/web_tests/StaleTestExpectations", - "//third_party/blink/web_tests/TestExpectations", - "//third_party/blink/web_tests/VirtualTestSuites", - "//third_party/blink/web_tests/W3CImportExpectations", - "//third_party/blink/web_tests/paint/invalidation/repaint-overlay/", - "//third_party/catapult/common/py_utils/", - "//third_party/catapult/devil/", - "//third_party/catapult/dependency_manager/", - "//third_party/catapult/third_party/typ/", - "//third_party/depot_tools/pylint-2.7", - "//third_party/depot_tools/pylint_main.py", - "//third_party/depot_tools/pylintrc", - "//third_party/ply/", - "//third_party/pyjson5/", - "//third_party/wpt_tools/", - "//tools/idl_parser/", - ] - - data_deps = [ "//ui/base:goldctl" ] - } -} - -# TODO(cassew): Add more OS's that don't support x86. -is_valid_x86_target = - target_os != "ios" && target_os != "mac" && - (target_os != "linux" || use_libfuzzer || !build_with_chromium) - -# Note: v8_target_cpu == arm allows using the V8 arm simulator on x86 for fuzzing. -assert( - is_valid_x86_target || target_cpu != "x86" || v8_target_cpu == "arm", - "'target_cpu=x86' is not supported for 'target_os=$target_os'. Consider omitting 'target_cpu' (default) or using 'target_cpu=x64' instead.") - -group("chromium_builder_perf") { - testonly = true - - if (!is_ios && !is_android && !is_castos && !is_cronet_build) { - data_deps = [ - "//chrome/test:load_library_perf_tests", - "//chrome/test:performance_test_suite", - "//components/tracing:tracing_perftests", - "//gpu:command_buffer_perftests", - "//gpu:gpu_perftests", - "//media:media_perftests", - "//tools/perf/chrome_telemetry_build:telemetry_chrome_test", - ] - - if (!is_chromeos_ash) { - data_deps += [ "//chrome/test:performance_browser_tests" ] - } - - if (!is_win) { - data_deps += - [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] - } - } - - if ((is_linux && !is_castos) || is_chromeos_lacros) { - if (is_official_build) { - # In GN builds, this is controlled by the 'linux_dump_symbols' - # flag, which defaults to 1 for official builds. For now, - # we skip the separate flag and just key off of is_official_build. - data_deps += [ "//chrome:linux_symbols" ] - } - - data_deps += [ "//tools/perf/clear_system_cache" ] - } - - if (is_win) { - data_deps += [ - "//chrome/installer/mini_installer:mini_installer", - "//components:components_perftests", - "//third_party/angle/src/tests:angle_perftests", - ] - } - - # An `if (is_fuchsia)` condition in //chrome/test/BUILD.gn prevents this - # target from being defined. - # TODO(crbug.com/1310086): Resolve that and remove this exception. - if (is_fuchsia) { - data_deps -= [ "//chrome/test:performance_test_suite" ] - } -} - -if (!is_ios && !is_android && !is_castos && !is_cronet_build) { - group("chromium_builder_asan") { - testonly = true - - deps = [ - "//chrome:chrome", - "//content/shell:content_shell", - "//third_party/blink/public/mojom:mojom_modules_js", - "//v8:d8", - ] - if (!is_win) { - deps += [ "//skia:filter_fuzz_stub" ] - } - if (enable_ipc_fuzzer && !is_component_build) { - deps += [ "//tools/ipc_fuzzer:ipc_fuzzer_all" ] - } - if (!is_chromeos_ash) { - deps += [ - "//third_party/pdfium/samples:pdfium_test", - "//v8:v8_shell($v8_snapshot_toolchain)", - ] - } - - if (!is_component_build) { - # See https://bugs.chromium.org/p/chromium/issues/detail?id=942546#c11. - deps += [ - "//third_party/webrtc/rtc_tools:rtp_generator", - "//third_party/webrtc/rtc_tools:video_replay", - ] - } - - if (build_dawn_tests) { - deps += [ "//third_party/dawn/src/tint/fuzzers:fuzzers" ] - } - } } if (is_android && !is_cronet_build) { @@ -1741,20 +70,6 @@ if (is_android && !is_cronet_build) { } } -if (is_chromeos_ash && enable_js_type_check) { - group("webui_closure_compile") { - testonly = true - data_deps = [ - "ash/webui:closure_compile", - "chrome/browser/resources:closure_compile", - "chrome/test/data/webui:closure_compile", - "mojo/public/tools/bindings/generators/js_templates/lite/test:closure_compile", - "mojo/public/tools/bindings/generators/js_templates/lite/test:closure_compile_modules", - "ui/file_manager:closure_compile", - ] - } -} - # Write debug logs to gn_logs.txt. _lines = [ "Generated during 'gn gen' by //BUILD.gn.", diff --git a/src/base/BUILD.gn b/src/base/BUILD.gn index 82cb596dcb..cf77dca5a6 100644 --- a/src/base/BUILD.gn +++ b/src/base/BUILD.gn @@ -29,6 +29,7 @@ import("//build/config/chromeos/ui_mode.gni") import("//build/config/compiler/compiler.gni") import("//build/config/cronet/config.gni") import("//build/config/dcheck_always_on.gni") +import("//build/config/features.gni") import("//build/config/ios/config.gni") import("//build/config/logging.gni") import("//build/config/nacl/config.gni") @@ -37,11 +38,8 @@ import("//build/config/rust.gni") import("//build/config/sanitizers/sanitizers.gni") import("//build/config/sysroot.gni") import("//build/config/ui.gni") -import("//build/nocompile.gni") import("//build/timestamp.gni") import("//build_overrides/build.gni") -import("//testing/libfuzzer/fuzzer_test.gni") -import("//testing/test.gni") if (is_mac) { # Used to generate fuzzer corpus :base_mach_port_rendezvous_convert_corpus. @@ -2625,1461 +2623,6 @@ if (use_safe_libcxx && !is_debug) { } } -component("i18n") { - output_name = "base_i18n" - sources = [ - "i18n/base_i18n_export.h", - "i18n/base_i18n_switches.cc", - "i18n/base_i18n_switches.h", - "i18n/break_iterator.cc", - "i18n/break_iterator.h", - "i18n/case_conversion.cc", - "i18n/case_conversion.h", - "i18n/char_iterator.cc", - "i18n/char_iterator.h", - "i18n/character_encoding.cc", - "i18n/character_encoding.h", - "i18n/encoding_detection.cc", - "i18n/encoding_detection.h", - "i18n/file_util_icu.cc", - "i18n/file_util_icu.h", - "i18n/i18n_constants.cc", - "i18n/i18n_constants.h", - "i18n/icu_string_conversions.cc", - "i18n/icu_string_conversions.h", - "i18n/icu_util.cc", - "i18n/icu_util.h", - "i18n/message_formatter.cc", - "i18n/message_formatter.h", - "i18n/number_formatting.cc", - "i18n/number_formatting.h", - "i18n/rtl.cc", - "i18n/rtl.h", - "i18n/streaming_utf8_validator.cc", - "i18n/streaming_utf8_validator.h", - "i18n/string_compare.cc", - "i18n/string_compare.h", - "i18n/string_search.cc", - "i18n/string_search.h", - "i18n/time_formatting.cc", - "i18n/time_formatting.h", - "i18n/timezone.cc", - "i18n/timezone.h", - "i18n/unicodestring.h", - "i18n/utf8_validator_tables.cc", - "i18n/utf8_validator_tables.h", - ] - defines = [ "BASE_I18N_IMPLEMENTATION" ] - configs += [ "//build/config/compiler:wexit_time_destructors" ] - public_deps = [ - "//third_party/ced", - "//third_party/icu", - ] - deps = [ - ":base", - "//base/third_party/dynamic_annotations", - "//build:chromecast_buildflags", - "//build:chromeos_buildflags", - ] - - if (!is_debug) { - configs -= [ "//build/config/compiler:default_optimization" ] - configs += [ "//build/config/compiler:optimize_max" ] - } - - if (is_chromeos_lacros) { - sources += [ - "i18n/icu_mergeable_data_file.cc", - "i18n/icu_mergeable_data_file.h", - ] - } - - if (is_mac) { - frameworks = [ "CoreFoundation.framework" ] - } -} - -test("base_perftests") { - sources = [ - "big_endian_perftest.cc", - "hash/hash_perftest.cc", - "json/json_perftest.cc", - "message_loop/message_pump_perftest.cc", - "observer_list_perftest.cc", - "rand_util_perftest.cc", - "strings/string_util_perftest.cc", - "substring_set_matcher/substring_set_matcher_perftest.cc", - "synchronization/lock_perftest.cc", - "synchronization/waitable_event_perftest.cc", - "task/job_perftest.cc", - "task/sequence_manager/sequence_manager_perftest.cc", - "task/thread_pool/thread_pool_perftest.cc", - "threading/counter_perftest.cc", - "threading/thread_local_storage_perftest.cc", - "threading/thread_perftest.cc", - "types/expected_macros_perftest.cc", - ] - - deps = [ - ":base", - ":debugging_buildflags", - "//base/test:test_support", - "//base/test:test_support_perf", - "//testing/gtest", - "//testing/perf", - "//third_party/google_benchmark", - ] - - if (use_partition_alloc) { - sources += [ - "allocator/partition_allocator/partition_alloc_perftest.cc", - "allocator/partition_allocator/partition_lock_perftest.cc", - ] - deps += [ ":partition_alloc_test_support" ] - } - - data_deps = [ - # Needed for isolate script to execute. - "//testing:run_perf_test", - ] - - if (is_android) { - deps += [ "//testing/android/native_test:native_test_native_code" ] - shard_timeout = 600 - } - - if (is_fuchsia) { - # Run these performance tests against the actual system. - run_as_chromium_system_test = true - } - - if (!is_official_build) { - # The extra data tables required by stack traces are turned off for official - # build, only do stack trace perftest for unofficial build - sources += [ "debug/stack_trace_perftest.cc" ] - } - - if (build_allocation_stack_trace_recorder) { - sources += [ "debug/allocation_trace_perftest.cc" ] - } -} - -test("base_i18n_perftests") { - sources = [ "i18n/streaming_utf8_validator_perftest.cc" ] - deps = [ - ":base", - ":i18n", - "//base/test:test_support", - "//base/test:test_support_perf", - "//testing/gtest", - ] -} - -if (!is_ios) { - executable("build_utf8_validator_tables") { - sources = [ "i18n/build_utf8_validator_tables.cc" ] - deps = [ - ":base", - "//build/win:default_exe_manifest", - "//third_party/icu:icuuc", - ] - } - - executable("check_example") { - sources = [ "check_example.cc" ] - deps = [ - ":base", - "//build/win:default_exe_manifest", - ] - } - - executable("json_perftest_decodebench") { - sources = [ "json/json_perftest_decodebench.cc" ] - deps = [ ":base" ] - } -} - -if (is_win) { - # Target to manually rebuild pe_image_test.dll which is checked into - # base/test/data/pe_image. - shared_library("pe_image_test") { - sources = [ "win/pe_image_test.cc" ] - ldflags = [ - "/DELAYLOAD:cfgmgr32.dll", - "/DELAYLOAD:shell32.dll", - "/SUBSYSTEM:WINDOWS", - ] - libs = [ - "cfgmgr32.lib", - "shell32.lib", - ] - } - - loadable_module("scoped_handle_test_dll") { - sources = [ "win/scoped_handle_test_dll.cc" ] - deps = [ - ":base", - "//base/win:base_win_buildflags", - ] - } -} - -if ((is_win && (current_cpu == "x64" || current_cpu == "arm64")) || is_mac || - (is_android && (current_cpu == "arm" || current_cpu == "arm64")) || - (is_chromeos && current_cpu == "x64")) { - # Must be a loadable module so that it can be loaded/unloaded at runtime - # during testing. - loadable_module("base_profiler_test_support_library") { - testonly = true - sources = [ "profiler/test_support_library.cc" ] - } -} - -if (is_android && (current_cpu == "arm" || current_cpu == "arm64")) { - # Use separate library for - # |LibunwindstackUnwinderAndroidTest.ReparsesMapsOnNewDynamicLibraryLoad| - # testcase. We can't use the existing `base_profiler_test_support_library` - # library for this test since this gets loaded by other tests and unloading - # a library in Android doesn't guarantee it will actually be unloaded. - # And in the test we would like to observe the change in /proc/self/maps - # on loading a dynamic library. - loadable_module("base_profiler_reparsing_test_support_library") { - testonly = true - sources = [ "profiler/test_support_library.cc" ] - } -} - -if (is_android) { - source_set("native_unwinder_android") { - # This target is intended to be used only within the stack_unwinder dynamic - # feature module, to avoid binary size increase in Chrome due to the - # libunwindstack dependency. The additional :* visibility is needed to allow - # use by base test targets. - visibility = [ - ":*", - "//chrome/android/modules/stack_unwinder/internal:*", - ] - sources = [ - "profiler/libunwindstack_unwinder_android.cc", - "profiler/libunwindstack_unwinder_android.h", - "profiler/native_unwinder_android.cc", - "profiler/native_unwinder_android.h", - "profiler/native_unwinder_android_memory_regions_map_impl.cc", - "profiler/native_unwinder_android_memory_regions_map_impl.h", - ] - - public_deps = [ - ":base", - "//third_party/libunwindstack", - ] - } -} - -source_set("base_stack_sampling_profiler_test_util") { - testonly = true - sources = [ - "profiler/stack_sampling_profiler_test_util.cc", - "profiler/stack_sampling_profiler_test_util.h", - ] - deps = [ - ":base", - "//base/test:test_support", - "//testing/gtest", - ] - if (is_android) { - sources += [ - "profiler/stack_sampling_profiler_java_test_util.cc", - "profiler/stack_sampling_profiler_java_test_util.h", - ] - deps += [ - ":base_profiler_test_support_jni", - ":native_unwinder_android", - ] - } -} - -if (is_apple) { - bundle_data("base_unittests_bundle_data") { - testonly = true - sources = [ - "//tools/metrics/histograms/enums.xml", - "test/data/file_util/binary_file.bin", - "test/data/file_util/binary_file_diff.bin", - "test/data/file_util/binary_file_same.bin", - "test/data/file_util/blank_line.txt", - "test/data/file_util/blank_line_crlf.txt", - "test/data/file_util/crlf.txt", - "test/data/file_util/different.txt", - "test/data/file_util/different_first.txt", - "test/data/file_util/different_last.txt", - "test/data/file_util/empty1.txt", - "test/data/file_util/empty2.txt", - "test/data/file_util/first1.txt", - "test/data/file_util/first2.txt", - "test/data/file_util/original.txt", - "test/data/file_util/same.txt", - "test/data/file_util/same_length.txt", - "test/data/file_util/shortened.txt", - "test/data/json/bom_feff.json", - "test/data/pe_image_reader/signed.exe", - "test/data/serializer_nested_test.json", - "test/data/serializer_test.json", - "test/data/serializer_test_nowhitespace.json", - ] - outputs = [ "{{bundle_resources_dir}}/" + - "{{source_root_relative_dir}}/{{source_file_part}}" ] - } -} - -# Generated file whose location is verified in DIR_GEN_TEST_DATA_ROOT test. -generated_file("generate_file_for_test") { - testonly = true - outputs = [ "$target_gen_dir/generated_file_for_test.txt" ] - data = [ "$target_gen_dir/generated_file_for_test.txt" ] - contents = "Hello world" -} - -if (is_ios) { - bundle_data("base_test_proto_bundle_data") { - testonly = true - public_deps = [ "//base/test:test_proto_descriptor" ] - sources = [ "$root_gen_dir/base/test/test_proto.descriptor" ] - outputs = [ "{{bundle_resources_dir}}/gen/base/test/{{source_file_part}}" ] - } - - bundle_data("base_generated_test_file_bundle_data") { - testonly = true - public_deps = [ ":generate_file_for_test" ] - sources = [ "$target_gen_dir/generated_file_for_test.txt" ] - outputs = [ "{{bundle_resources_dir}}/gen/base/{{source_file_part}}" ] - } -} - -if (is_apple) { - source_set("base_unittests_noarc") { - testonly = true - sources = [ "apple/scoped_nsobject_unittest.mm" ] - - # Do not compile with ARC because this target has tests for code that does - # not compile with ARC. - configs -= [ "//build/config/compiler:enable_arc" ] - deps = [ - ":base", - "//base/test:test_support", - "//testing/gtest", - ] - } -} - -if (!is_nacl && (is_linux || is_chromeos)) { - # This test must compile with -fstack-protector-all - source_set("stack_canary_linux_unittests") { - testonly = true - - sources = [ "stack_canary_linux_unittest.cc" ] - cflags = [ "-fstack-protector-all" ] - - deps = [ - "//base", - "//testing/gtest", - ] - } -} - -if (is_fuchsia) { - fidl_library("testfidl") { - library_name = "base.testfidl" - - sources = [ "fuchsia/test.test-fidl" ] - } - - # TODO(crbug.com/1416553): remove this once all users are migrated to natural bindings. - source_set("test_interface_impl") { - testonly = true - sources = [ - "fuchsia/test_interface_impl.cc", - "fuchsia/test_interface_impl.h", - ] - deps = [ - ":base", - "//testing/gtest", - ] - public_deps = [ - ":testfidl_hlcpp", - "//third_party/fuchsia-sdk/sdk/pkg/fidl_cpp", - "//third_party/fuchsia-sdk/sdk/pkg/zx", - ] - } - - source_set("test_interface_natural_impl") { - testonly = true - public = [ "fuchsia/test_interface_natural_impl.h" ] - sources = [ "fuchsia/test_interface_natural_impl.cc" ] - deps = [ - ":base", - "//testing/gtest", - "//third_party/fuchsia-sdk/sdk/pkg/async", - ] - public_deps = [ - ":testfidl_cpp", - "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.io:fuchsia.io_cpp_common", - "//third_party/fuchsia-sdk/sdk/pkg/fidl_cpp_wire", - "//third_party/fuchsia-sdk/sdk/pkg/sys_cpp", - ] - } - - source_set("test_log_listener_safe") { - testonly = true - sources = [ - "fuchsia/test_log_listener_safe.cc", - "fuchsia/test_log_listener_safe.h", - ] - deps = [ - ":base", - "//base/test:test_support", - "//testing/gtest", - ] - public_deps = [ - "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.logger:fuchsia.logger_hlcpp", - ] - } -} - -source_set("arm_bti_testfunctions") { - testonly = true - - sources = [] - - if (target_cpu == "arm64" && (is_linux || is_android)) { - sources = [ - "allocator/partition_allocator/arm_bti_test_functions.S", - "allocator/partition_allocator/arm_bti_test_functions.h", - ] - } -} - -source_set("path_service_unittest") { - testonly = true - - sources = [ "path_service_unittest.cc" ] - - deps = [ - ":base", - "//base/test:test_support", - "//testing/gtest", - ] - - if (is_ios) { - deps += [ ":base_generated_test_file_bundle_data" ] - } else { - data_deps = [ ":generate_file_for_test" ] - } -} - -test("base_unittests") { - sources = [ - "allocator/dispatcher/dispatcher_unittest.cc", - "allocator/dispatcher/initializer_unittest.cc", - "allocator/dispatcher/internal/dispatcher_internal_unittest.cc", - "allocator/dispatcher/testing/dispatcher_test.cc", - "allocator/dispatcher/testing/dispatcher_test.h", - "allocator/dispatcher/testing/observer_mock.h", - "allocator/dispatcher/testing/tools.h", - "allocator/dispatcher/tls_unittest.cc", - "allocator/partition_allocator/pointers/raw_ptr_test_support.h", - "allocator/partition_allocator/pointers/raw_ptr_unittest.cc", - "allocator/partition_allocator/pointers/raw_ref_unittest.cc", - "at_exit_unittest.cc", - "atomicops_unittest.cc", - "auto_reset_unittest.cc", - "barrier_callback_unittest.cc", - "barrier_closure_unittest.cc", - "base64_unittest.cc", - "base64url_unittest.cc", - "big_endian_unittest.cc", - "bit_cast_unittest.cc", - "bits_unittest.cc", - "build_time_unittest.cc", - "callback_list_unittest.cc", - "cancelable_callback_unittest.cc", - "check_is_test_unittest.cc", - "check_unittest.cc", - "command_line_unittest.cc", - "component_export_unittest.cc", - "containers/adapters_unittest.cc", - "containers/buffer_iterator_unittest.cc", - "containers/checked_iterators_unittest.cc", - "containers/circular_deque_unittest.cc", - "containers/contains_unittest.cc", - "containers/contiguous_iterator_unittest.cc", - "containers/enum_set_unittest.cc", - "containers/erase_unittest.cc", - "containers/extend_unittest.cc", - "containers/fixed_flat_map_unittest.cc", - "containers/fixed_flat_set_unittest.cc", - "containers/flat_map_unittest.cc", - "containers/flat_set_unittest.cc", - "containers/flat_tree_unittest.cc", - "containers/id_map_unittest.cc", - "containers/intrusive_heap_unittest.cc", - "containers/linked_list_unittest.cc", - "containers/lru_cache_unittest.cc", - "containers/small_map_unittest.cc", - "containers/span_unittest.cc", - "containers/unique_ptr_adapters_unittest.cc", - "containers/vector_buffer_unittest.cc", - "cpu_unittest.cc", - "cxx20_is_constant_evaluated_unittest.cc", - "debug/alias_unittest.cc", - "debug/asan_service_unittest.cc", - "debug/crash_logging_unittest.cc", - "debug/debugger_unittest.cc", - "debug/dump_without_crashing_unittest.cc", - "debug/stack_trace_unittest.cc", - "debug/task_trace_unittest.cc", - "environment_unittest.cc", - "feature_list_unittest.cc", - "files/file_enumerator_unittest.cc", - "files/file_error_or_unittest.cc", - "files/file_path_unittest.cc", - "files/file_path_watcher_unittest.cc", - "files/file_proxy_unittest.cc", - "files/file_unittest.cc", - "files/file_util_unittest.cc", - "files/important_file_writer_cleaner_unittest.cc", - "files/important_file_writer_unittest.cc", - "files/memory_mapped_file_unittest.cc", - "files/safe_base_name_unittest.cc", - "files/scoped_temp_dir_unittest.cc", - "functional/bind_unittest.cc", - "functional/callback_helpers_unittest.cc", - "functional/callback_unittest.cc", - "functional/function_ref_unittest.cc", - "functional/identity_unittest.cc", - "functional/invoke_unittest.cc", - "functional/not_fn_unittest.cc", - "functional/overloaded_unittest.cc", - "gmock_unittest.cc", - "hash/hash_unittest.cc", - "hash/legacy_hash_unittest.cc", - "hash/md5_constexpr_unittest.cc", - "hash/md5_unittest.cc", - "hash/sha1_unittest.cc", - "i18n/break_iterator_unittest.cc", - "i18n/case_conversion_unittest.cc", - "i18n/char_iterator_unittest.cc", - "i18n/character_encoding_unittest.cc", - "i18n/file_util_icu_unittest.cc", - "i18n/icu_string_conversions_unittest.cc", - "i18n/icu_util_unittest.cc", - "i18n/message_formatter_unittest.cc", - "i18n/number_formatting_unittest.cc", - "i18n/rtl_unittest.cc", - "i18n/streaming_utf8_validator_unittest.cc", - "i18n/string_search_unittest.cc", - "i18n/time_formatting_unittest.cc", - "i18n/timezone_unittest.cc", - "i18n/transliterator_unittest.cc", - "immediate_crash_unittest.cc", - "json/json_parser_unittest.cc", - "json/json_reader_unittest.cc", - "json/json_value_converter_unittest.cc", - "json/json_value_serializer_unittest.cc", - "json/json_writer_unittest.cc", - "json/string_escape_unittest.cc", - "json/values_util_unittest.cc", - "lazy_instance_unittest.cc", - "logging_unittest.cc", - "memory/aligned_memory_unittest.cc", - "memory/discardable_memory_backing_field_trial_unittest.cc", - "memory/discardable_shared_memory_unittest.cc", - "memory/memory_pressure_listener_unittest.cc", - "memory/platform_shared_memory_region_unittest.cc", - "memory/ptr_util_unittest.cc", - "memory/raw_ptr_asan_unittest.cc", - "memory/ref_counted_memory_unittest.cc", - "memory/ref_counted_unittest.cc", - "memory/safe_ref_unittest.cc", - "memory/shared_memory_hooks_unittest.cc", - "memory/shared_memory_mapping_unittest.cc", - "memory/shared_memory_region_unittest.cc", - "memory/singleton_unittest.cc", - "memory/unsafe_shared_memory_pool_unittest.cc", - "memory/values_equivalent_unittest.cc", - "memory/weak_auto_reset_unittest.cc", - "memory/weak_ptr_unittest.cc", - "message_loop/message_pump_glib_unittest.cc", - "message_loop/message_pump_unittest.cc", - "message_loop/work_id_provider_unittest.cc", - "metrics/bucket_ranges_unittest.cc", - "metrics/crc32_unittest.cc", - "metrics/field_trial_params_unittest.cc", - "metrics/field_trial_unittest.cc", - "metrics/histogram_base_unittest.cc", - "metrics/histogram_delta_serialization_unittest.cc", - "metrics/histogram_functions_unittest.cc", - "metrics/histogram_macros_unittest.cc", - "metrics/histogram_samples_unittest.cc", - "metrics/histogram_shared_memory_unittest.cc", - "metrics/histogram_snapshot_manager_unittest.cc", - "metrics/histogram_threadsafe_unittest.cc", - "metrics/histogram_unittest.cc", - "metrics/metrics_hashes_unittest.cc", - "metrics/persistent_histogram_allocator_unittest.cc", - "metrics/persistent_histogram_storage_unittest.cc", - "metrics/persistent_memory_allocator_unittest.cc", - "metrics/persistent_sample_map_unittest.cc", - "metrics/ranges_manager_unittest.cc", - "metrics/sample_map_unittest.cc", - "metrics/sample_vector_unittest.cc", - "metrics/single_sample_metrics_unittest.cc", - "metrics/sparse_histogram_unittest.cc", - "metrics/statistics_recorder_starvation_unittest.cc", - "metrics/statistics_recorder_unittest.cc", - "native_library_unittest.cc", - "no_destructor_unittest.cc", - "observer_list_threadsafe_unittest.cc", - "observer_list_unittest.cc", - "one_shot_event_unittest.cc", - "parameter_pack_unittest.cc", - "pickle_unittest.cc", - "power_monitor/battery_level_provider_unittest.cc", - "power_monitor/battery_state_sampler_unittest.cc", - "power_monitor/moving_average_unittest.cc", - "power_monitor/power_monitor_device_source_unittest.cc", - "power_monitor/power_monitor_unittest.cc", - "power_monitor/timer_sampling_event_source_unittest.cc", - "process/environment_internal_unittest.cc", - "process/memory_unittest.cc", - "process/process_metrics_unittest.cc", - "process/process_unittest.cc", - "process/process_util_unittest.cc", - "profiler/metadata_recorder_unittest.cc", - "profiler/module_cache_unittest.cc", - "profiler/sample_metadata_unittest.cc", - "profiler/stack_buffer_unittest.cc", - "profiler/stack_copier_suspend_unittest.cc", - "profiler/stack_copier_unittest.cc", - "profiler/stack_sampler_unittest.cc", - "profiler/stack_sampling_profiler_unittest.cc", - "rand_util_unittest.cc", - "ranges/algorithm_unittest.cc", - "ranges/functional_unittest.cc", - "ranges/ranges_unittest.cc", - "run_loop_unittest.cc", - "safe_numerics_unittest.cc", - "sampling_heap_profiler/lock_free_address_hash_set_unittest.cc", - "scoped_add_feature_flags_unittest.cc", - "scoped_clear_last_error_unittest.cc", - "scoped_generic_unittest.cc", - "scoped_multi_source_observation_unittest.cc", - "scoped_native_library_unittest.cc", - "scoped_observation_unittest.cc", - "security_unittest.cc", - "sequence_checker_unittest.cc", - "sequence_token_unittest.cc", - "state_transitions_unittest.cc", - "stl_util_unittest.cc", - "strings/abseil_string_number_conversions_unittest.cc", - "strings/escape_unittest.cc", - "strings/no_trigraphs_unittest.cc", - "strings/pattern_unittest.cc", - "strings/safe_sprintf_unittest.cc", - "strings/strcat_unittest.cc", - "strings/string_number_conversions_unittest.cc", - "strings/string_piece_unittest.cc", - "strings/string_split_unittest.cc", - "strings/string_tokenizer_unittest.cc", - "strings/string_util_unittest.cc", - "strings/stringize_macros_unittest.cc", - "strings/stringprintf_unittest.cc", - "strings/sys_string_conversions_unittest.cc", - "strings/to_string_unittest.cc", - "strings/utf_offset_string_conversions_unittest.cc", - "strings/utf_string_conversion_utils_unittest.cc", - "strings/utf_string_conversions_unittest.cc", - "substring_set_matcher/string_pattern_unittest.cc", - "substring_set_matcher/substring_set_matcher_unittest.cc", - "supports_user_data_unittest.cc", - "sync_socket_unittest.cc", - "synchronization/atomic_flag_unittest.cc", - "synchronization/condition_variable_unittest.cc", - "synchronization/lock_unittest.cc", - "synchronization/waitable_event_unittest.cc", - "synchronization/waitable_event_watcher_unittest.cc", - "sys_byteorder_unittest.cc", - "system/sys_info_unittest.cc", - "system/system_monitor_unittest.cc", - "task/bind_post_task_unittest.cc", - "task/cancelable_task_tracker_unittest.cc", - "task/common/checked_lock_unittest.cc", - "task/common/operations_controller_unittest.cc", - "task/common/task_annotator_unittest.cc", - "task/default_delayed_task_handle_delegate_unittest.cc", - "task/deferred_sequenced_task_runner_unittest.cc", - "task/delayed_task_handle_unittest.cc", - "task/lazy_thread_pool_task_runner_unittest.cc", - "task/post_job_unittest.cc", - "task/scoped_set_task_priority_for_current_thread_unittest.cc", - "task/sequence_manager/atomic_flag_set_unittest.cc", - "task/sequence_manager/lazily_deallocated_deque_unittest.cc", - "task/sequence_manager/sequence_manager_impl_unittest.cc", - "task/sequence_manager/task_order_unittest.cc", - "task/sequence_manager/task_queue_selector_unittest.cc", - "task/sequence_manager/task_queue_unittest.cc", - "task/sequence_manager/test/mock_time_message_pump_unittest.cc", - "task/sequence_manager/thread_controller_power_monitor_unittest.cc", - "task/sequence_manager/thread_controller_with_message_pump_impl_unittest.cc", - "task/sequence_manager/wake_up_queue_unittest.cc", - "task/sequence_manager/work_deduplicator_unittest.cc", - "task/sequence_manager/work_queue_sets_unittest.cc", - "task/sequence_manager/work_queue_unittest.cc", - "task/sequenced_task_runner_unittest.cc", - "task/single_thread_task_executor_unittest.cc", - "task/single_thread_task_runner_unittest.cc", - "task/task_runner_unittest.cc", - "task/task_traits_unittest.cc", - "task/thread_pool/can_run_policy_test.h", - "task/thread_pool/delayed_priority_queue_unittest.cc", - "task/thread_pool/delayed_task_manager_unittest.cc", - "task/thread_pool/environment_config_unittest.cc", - "task/thread_pool/job_task_source_unittest.cc", - "task/thread_pool/pooled_single_thread_task_runner_manager_unittest.cc", - "task/thread_pool/priority_queue_unittest.cc", - "task/thread_pool/sequence_unittest.cc", - "task/thread_pool/service_thread_unittest.cc", - "task/thread_pool/task_source_sort_key_unittest.cc", - "task/thread_pool/task_tracker_unittest.cc", - "task/thread_pool/test_task_factory.cc", - "task/thread_pool/test_task_factory.h", - "task/thread_pool/test_utils.cc", - "task/thread_pool/test_utils.h", - "task/thread_pool/thread_group_impl_unittest.cc", - "task/thread_pool/thread_group_unittest.cc", - "task/thread_pool/thread_pool_impl_unittest.cc", - "task/thread_pool/tracked_ref_unittest.cc", - "task/thread_pool/worker_thread_set_unittest.cc", - "task/thread_pool/worker_thread_unittest.cc", - "task/thread_pool_unittest.cc", - "template_util_unittest.cc", - "test/gmock_callback_support_unittest.cc", - "test/gmock_expected_support_unittest.cc", - "test/gmock_move_support_unittest.cc", - "test/gtest_links_unittest.cc", - "test/gtest_tags_unittest.cc", - "test/gtest_xml_unittest_result_printer_unittest.cc", - "test/launcher/test_launcher_unittest.cc", - "test/launcher/test_results_tracker_unittest.cc", - "test/memory/dangling_ptr_instrumentation.cc", - "test/memory/dangling_ptr_instrumentation.h", - "test/metrics/histogram_enum_reader_unittest.cc", - "test/metrics/histogram_tester_unittest.cc", - "test/metrics/user_action_tester_unittest.cc", - "test/mock_callback_unittest.cc", - "test/rectify_callback_unittest.cc", - "test/repeating_test_future_unittest.cc", - "test/run_until_unittest.cc", - "test/scoped_feature_list_unittest.cc", - "test/scoped_logging_settings.h", - "test/scoped_mock_clock_override_unittest.cc", - "test/scoped_mock_time_message_loop_task_runner_unittest.cc", - "test/scoped_run_loop_timeout_unittest.cc", - "test/task_environment_unittest.cc", - "test/test_future_unittest.cc", - "test/test_mock_time_task_runner_unittest.cc", - "test/test_pending_task_unittest.cc", - "test/test_proto_loader_unittest.cc", - "test/test_waitable_event_unittest.cc", - "test/to_vector_unittest.cc", - "third_party/dynamic_annotations/dynamic_annotations_compiletest.cc", - "thread_annotations_unittest.cc", - "threading/hang_watcher_unittest.cc", - "threading/platform_thread_unittest.cc", - "threading/post_task_and_reply_impl_unittest.cc", - "threading/scoped_blocking_call_unittest.cc", - "threading/scoped_thread_priority_unittest.cc", - "threading/sequence_bound_unittest.cc", - "threading/sequence_local_storage_map_unittest.cc", - "threading/sequence_local_storage_slot_unittest.cc", - "threading/simple_thread_unittest.cc", - "threading/thread_checker_unittest.cc", - "threading/thread_collision_warner_unittest.cc", - "threading/thread_id_name_manager_unittest.cc", - "threading/thread_local_storage_unittest.cc", - "threading/thread_local_unittest.cc", - "threading/thread_restrictions_unittest.cc", - "threading/thread_unittest.cc", - "threading/watchdog_unittest.cc", - "time/pr_time_unittest.cc", - "time/time_delta_from_string_unittest.cc", - "time/time_unittest.cc", - "timer/elapsed_timer_unittest.cc", - "timer/hi_res_timer_manager_unittest.cc", - "timer/lap_timer_unittest.cc", - "timer/mock_timer_unittest.cc", - "timer/timer_unittest.cc", - "timer/wall_clock_timer_unittest.cc", - "token_unittest.cc", - "tools_sanity_unittest.cc", - "traits_bag_unittest.cc", - "tuple_unittest.cc", - "types/cxx23_to_underlying_unittest.cc", - "types/expected_macros_unittest.cc", - "types/expected_unittest.cc", - "types/id_type_unittest.cc", - "types/optional_ref_unittest.cc", - "types/optional_unittest.cc", - "types/optional_util_unittest.cc", - "types/pass_key_unittest.cc", - "types/strong_alias_unittest.cc", - "types/supports_ostream_operator_unittest.cc", - "types/token_type_unittest.cc", - "types/variant_util_unittest.cc", - "unguessable_token_unittest.cc", - "uuid_unittest.cc", - "value_iterators_unittest.cc", - "values_unittest.cc", - "version_unittest.cc", - "vlog_unittest.cc", - ] - - if (!is_cronet_build) { - # location_unittest.cc fails gn check for tracing-shimmed Cronet builds. - # Cronet buildbot do not run base_unittests, so exclusing this test - # instead of adding a nogncheck is preferred (crbug.com/1400235). - sources += [ "location_unittest.cc" ] - } - - if (build_rust_base_conversions) { - sources += [ - "containers/span_rust_unittest.cc", - "strings/string_piece_rust_unittest.cc", - ] - } - - if (use_safe_libcxx) { - sources += [ - "libcpp_hardening_test.cc", - "std_clamp_unittest.cc", - ] - } - - defines = [] - - deps = [ - ":arm_bti_testfunctions", - ":base", - ":base_stack_sampling_profiler_test_util", - ":feature_list_buildflags", - ":i18n", - ":partition_alloc_test_support", - ":path_service_unittest", - ":sanitizer_buildflags", - "//base/allocator:buildflags", - "//base/test:native_library_test_utils", - "//base/test:proto_test_support", - "//base/test:run_all_unittests", - "//base/test:test_proto", - "//base/test:test_support", - "//base/third_party/dynamic_annotations", - "//build:blink_buildflags", - "//build:chromecast_buildflags", - "//build:chromeos_buildflags", - "//testing/gmock", - "//testing/gtest", - "//third_party/icu", - "//third_party/modp_b64", - ] - - data_deps = [ - "//base/test:immediate_crash_test_helper", - "//base/test:test_child_process", - "//base/test:test_shared_library", - "//testing/buildbot/filters:base_unittests_filters", - ] - - if (is_android && enable_chrome_android_internal) { - data_deps += [ "//clank/build/bot/filters:base_unittests_filters" ] - } - - if (build_rust_base_conversions) { - deps += [ "//build/rust:cxx_cppdeps" ] - } - - if (is_apple) { - public_deps = [ - ":base_unittests_bundle_data", - ":base_unittests_noarc", - ] - } - - data = [ - "test/data/", - "//tools/metrics/histograms/enums.xml", - ] - - if (!is_ios) { - sources += [ "allocator/partition_allocator/tagging_unittest.cc" ] - - data_deps += [ "//base/test:test_proto_descriptor" ] - data += [ "$root_gen_dir/base/test/test_proto.descriptor" ] - } - - if (is_win) { - deps += [ "//base/win:base_win_buildflags" ] - - sources += [ - "debug/gdi_debug_util_win_unittest.cc", - "file_version_info_win_unittest.cc", - "process/launch_unittest_win.cc", - "test/fake_iasync_operation_win_unittest.cc", - "test/test_file_util_win_unittest.cc", - "test/test_reg_util_win_unittest.cc", - "threading/platform_thread_win_unittest.cc", - "time/time_win_unittest.cc", - "win/access_control_list_unittest.cc", - "win/access_token_unittest.cc", - "win/async_operation_unittest.cc", - "win/com_init_balancer_unittest.cc", - "win/com_init_check_hook_unittest.cc", - "win/com_init_util_unittest.cc", - "win/dark_mode_support_unittest.cc", - "win/dispatch_stub.cc", - "win/dispatch_stub.h", - "win/dllmain.cc", - "win/embedded_i18n/language_selector_unittest.cc", - "win/enum_variant_unittest.cc", - "win/event_trace_consumer_unittest.cc", - "win/event_trace_controller_unittest.cc", - "win/event_trace_provider_unittest.cc", - "win/hstring_reference_unittest.cc", - "win/i18n_unittest.cc", - "win/map_unittest.cc", - "win/message_window_unittest.cc", - "win/object_watcher_unittest.cc", - "win/pe_image_reader_unittest.cc", - "win/pe_image_unittest.cc", - "win/post_async_results_unittest.cc", - "win/reference_unittest.cc", - "win/registry_unittest.cc", - "win/scoped_bstr_unittest.cc", - "win/scoped_handle_unittest.cc", - "win/scoped_hstring_unittest.cc", - "win/scoped_localalloc_unittest.cc", - "win/scoped_process_information_unittest.cc", - "win/scoped_safearray_unittest.cc", - "win/scoped_variant_unittest.cc", - "win/scoped_winrt_initializer_unittest.cc", - "win/security_descriptor_unittest.cc", - "win/security_util_unittest.cc", - "win/shortcut_unittest.cc", - "win/sid_unittest.cc", - "win/startup_information_unittest.cc", - "win/variant_conversions_unittest.cc", - "win/variant_vector_unittest.cc", - "win/vector_unittest.cc", - "win/win_includes_unittest.cc", - "win/win_util_unittest.cc", - "win/windows_version_unittest.cc", - "win/winrt_storage_util_unittest.cc", - "win/wmi_unittest.cc", - "win/wrapped_window_proc_unittest.cc", - ] - - if (enable_cet_shadow_stack) { - sources += [ "win/cet_shadow_stack_unittest.cc" ] - } - - libs = [ - "ntdll.lib", - "onecore.lib", - ] - } - - if (is_linux || is_chromeos) { - sources += [ - "debug/proc_maps_linux_unittest.cc", - "files/scoped_file_linux_unittest.cc", - ] - - if (!is_nacl) { - deps += [ ":stack_canary_linux_unittests" ] - } - } - - if (is_posix) { - sources += [ - "files/dir_reader_posix_unittest.cc", - "files/file_descriptor_watcher_posix_unittest.cc", - "memory/madv_free_discardable_memory_allocator_posix_unittest.cc", - "memory/madv_free_discardable_memory_posix_unittest.cc", - "message_loop/fd_watch_controller_posix_unittest.cc", - "posix/file_descriptor_shuffle_unittest.cc", - "posix/unix_domain_socket_unittest.cc", - ] - if (!is_nacl && !is_apple) { - sources += [ - "profiler/stack_base_address_posix_unittest.cc", - "profiler/stack_copier_signal_unittest.cc", - "profiler/thread_delegate_posix_unittest.cc", - ] - } - } - - # Allow more direct string conversions on platforms with native utf8 - # strings - if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia) { - defines += [ "SYSTEM_NATIVE_UTF8" ] - } - - if (is_android) { - # Add unwind tables in base_unittests_apk test apk. The unwind tables are - # generated from debug info in the binary. Removing "default_symbols" and - # adding symbols config removes the "strip_debug" config that strips the - # debug info, on base unittests apk. - if (can_unwind_with_cfi_table || enable_arm_cfi_table) { - configs -= [ "//build/config/compiler:default_symbols" ] - if (symbol_level == 2) { - configs += [ "//build/config/compiler:symbols" ] - } else { - configs += [ "//build/config/compiler:minimal_symbols" ] - } - add_unwind_tables_in_apk = true - } - if (can_unwind_with_cfi_table) { - sources += [ "trace_event/cfi_backtrace_android_unittest.cc" ] - } - if (current_cpu == "arm") { - sources += [ - "profiler/chrome_unwind_info_android_unittest.cc", - "profiler/chrome_unwinder_android_unittest.cc", - ] - } - if (current_cpu == "arm64") { - sources += [ "profiler/frame_pointer_unwinder_unittest.cc" ] - } - if (!exclude_unwind_tables && - (current_cpu == "arm" || current_cpu == "arm64")) { - sources += [ - "profiler/libunwindstack_unwinder_android_unittest.cc", - "profiler/native_unwinder_android_unittest.cc", - ] - deps += [ - ":base_profiler_reparsing_test_support_library", - ":base_profiler_test_support_java", - ":base_profiler_test_support_jni", - ":base_profiler_test_support_library", - ":native_unwinder_android", - ] - } - - sources += [ - "android/android_image_reader_compat_unittest.cc", - "android/application_status_listener_unittest.cc", - "android/child_process_unittest.cc", - "android/content_uri_utils_unittest.cc", - "android/jank_metric_uma_recorder_unittest.cc", - "android/java_handler_thread_unittest.cc", - "android/jni_android_unittest.cc", - "android/jni_array_unittest.cc", - "android/jni_string_unittest.cc", - "android/library_loader/library_prefetcher_unittest.cc", - "android/linker/linker_jni.cc", - "android/linker/linker_jni.h", - "android/linker/linker_unittest.cc", - "android/meminfo_dump_provider_unittest.cc", - "android/path_utils_unittest.cc", - "android/radio_utils_unittest.cc", - "android/reached_addresses_bitset_unittest.cc", - "android/scoped_java_ref_unittest.cc", - "android/sys_utils_unittest.cc", - "android/unguessable_token_android_unittest.cc", - "os_compat_android_unittest.cc", - ] - - # Android does not use test_launcher to run gtests. - sources -= [ - "process/process_unittest.cc", - "process/process_util_unittest.cc", - "test/gtest_links_unittest.cc", - "test/gtest_tags_unittest.cc", - "test/gtest_xml_unittest_result_printer_unittest.cc", - "test/launcher/test_launcher_unittest.cc", - "test/launcher/test_results_tracker_unittest.cc", - ] - deps += [ - ":base_java_unittest_support", - "//base/test:test_support_java", - ] - } - - if (build_allocation_stack_trace_recorder) { - sources += [ "debug/allocation_trace_unittest.cc" ] - } - - if (is_apple) { - sources += [ - "apple/backup_util_unittest.mm", - "apple/bind_objc_block_unittest.mm", - "apple/dispatch_source_mach_unittest.cc", - "apple/foundation_util_unittest.mm", - "strings/sys_string_conversions_apple_unittest.mm", - ] - } - - if (is_apple && enable_mach_absolute_time_ticks) { - sources += [ "time/time_apple_unittest.mm" ] - } - - if (is_mac) { - sources += [ - "allocator/partition_allocator/shim/allocator_interception_apple_unittest.mm", - "allocator/partition_allocator/shim/malloc_zone_functions_apple_unittest.cc", - "apple/call_with_eh_frame_unittest.mm", - "apple/scoped_mach_vm_unittest.cc", - "apple/scoped_objc_class_swizzler_unittest.mm", - "enterprise_util_mac_unittest.mm", - "mac/launch_application_unittest.mm", - "mac/mac_util_unittest.mm", - "mac/mach_port_rendezvous_unittest.cc", - "mac/scoped_sending_event_unittest.mm", - "message_loop/message_pump_apple_unittest.mm", - "power_monitor/thermal_state_observer_mac_unittest.mm", - "process/memory_unittest_mac.h", - "process/memory_unittest_mac.mm", - ] - data_deps += [ "//base/mac:launch_application_test_helper" ] - } - - if (is_ios) { - sources += [ - "ios/crb_protocol_observers_unittest.mm", - "ios/device_util_unittest.mm", - "ios/scoped_critical_action_unittest.mm", - ] - - bundle_deps = [ ":base_test_proto_bundle_data" ] - - if (is_cronet_build) { - sources += [ "message_loop/message_pump_io_ios_unittest.cc" ] - } else { - sources += [ "message_loop/message_pump_kqueue_unittest.cc" ] - } - - # ios does not use test_launcher to run gtests. - sources -= [ - "files/file_path_watcher_unittest.cc", - "memory/discardable_shared_memory_unittest.cc", - "process/memory_unittest.cc", - "process/process_unittest.cc", - "process/process_util_unittest.cc", - "sync_socket_unittest.cc", - "synchronization/waitable_event_watcher_unittest.cc", - "test/gtest_links_unittest.cc", - "test/gtest_tags_unittest.cc", - "test/gtest_xml_unittest_result_printer_unittest.cc", - "test/launcher/test_launcher_unittest.cc", - "test/launcher/test_results_tracker_unittest.cc", - ] - - sources -= [ - # The immediate crash tests require shared libraries, which we don't - # support loading on iOS. - "immediate_crash_unittest.cc", - ] - - if (use_allocator_shim) { - sources += [ - "allocator/partition_allocator/shim/allocator_interception_apple_unittest.mm", - "allocator/partition_allocator/shim/malloc_zone_functions_apple_unittest.cc", - ] - } - - if (use_blink) { - sources += [ "files/file_path_watcher_unittest.cc" ] - } - } - - if (use_partition_alloc) { - sources += [ - "allocator/partition_allocator/address_pool_manager_unittest.cc", - "allocator/partition_allocator/address_space_randomization_unittest.cc", - "allocator/partition_allocator/compressed_pointer_unittest.cc", - "allocator/partition_allocator/freeslot_bitmap_unittest.cc", - "allocator/partition_allocator/hardening_unittest.cc", - "allocator/partition_allocator/memory_reclaimer_unittest.cc", - "allocator/partition_allocator/page_allocator_unittest.cc", - "allocator/partition_allocator/partition_alloc_base/bits_pa_unittest.cc", - "allocator/partition_allocator/partition_alloc_base/component_export_pa_unittest.cc", - "allocator/partition_allocator/partition_alloc_base/cpu_pa_unittest.cc", - "allocator/partition_allocator/partition_alloc_base/logging_pa_unittest.cc", - "allocator/partition_allocator/partition_alloc_base/rand_util_pa_unittest.cc", - "allocator/partition_allocator/partition_alloc_base/scoped_clear_last_error_pa_unittest.cc", - "allocator/partition_allocator/partition_alloc_base/strings/cstring_builder_pa_unittest.cc", - "allocator/partition_allocator/partition_alloc_base/strings/safe_sprintf_pa_unittest.cc", - "allocator/partition_allocator/partition_alloc_base/strings/string_util_pa_unittest.cc", - "allocator/partition_allocator/partition_alloc_base/strings/stringprintf_pa_unittest.cc", - "allocator/partition_allocator/partition_alloc_base/thread_annotations_pa_unittest.cc", - "allocator/partition_allocator/partition_alloc_unittest.cc", - "allocator/partition_allocator/partition_lock_unittest.cc", - "allocator/partition_allocator/reverse_bytes_unittest.cc", - "allocator/partition_allocator/thread_cache_unittest.cc", - ] - - if (use_starscan) { - sources += [ - "allocator/partition_allocator/starscan/pcscan_scheduling_unittest.cc", - "allocator/partition_allocator/starscan/pcscan_unittest.cc", - "allocator/partition_allocator/starscan/scan_loop_unittest.cc", - "allocator/partition_allocator/starscan/stack/stack_unittest.cc", - "allocator/partition_allocator/starscan/state_bitmap_unittest.cc", - ] - } - - if ((is_android || is_linux) && target_cpu == "arm64") { - cflags = [ - "-Xclang", - "-target-feature", - "-Xclang", - "+mte", - ] - } - - if (is_android) { - sources += [ - "allocator/partition_allocator/partition_alloc_base/files/file_path_pa_unittest.cc", - "allocator/partition_allocator/partition_alloc_base/native_library_pa_unittest.cc", - ] - } else if (is_fuchsia) { - sources += [ "allocator/partition_allocator/partition_alloc_base/fuchsia/fuchsia_logging_pa_unittest.cc" ] - } - - if (enable_pkeys && is_debug && !is_component_build) { - # This test requires RELRO, which is not enabled in component builds. - # Also, require a debug build, since we only disable stack protectors in - # debug builds in partition alloc (see below why it's needed). - sources += - [ "allocator/partition_allocator/thread_isolation/pkey_unittest.cc" ] - - # We want to test the pkey code without access to memory that is not - # pkey-tagged. This will allow us to catch unintended memory accesses - # that could break our security assumptions. The stack protector reads a - # value from the TLS which won't be pkey-tagged, hence disabling it for - # the test. - configs += [ ":no_stack_protector" ] - } - - deps += [ ":partition_alloc_test_support" ] - } - - if (is_mac) { - sources += [ "message_loop/message_pump_kqueue_unittest.cc" ] - frameworks = [ - "CoreFoundation.framework", - "Foundation.framework", - "OpenCL.framework", - ] - if (current_cpu == "x64") { - deps += [ ":base_profiler_test_support_library" ] - } - } - - if (is_fuchsia || is_linux || is_chromeos) { - sources += [ - "debug/elf_reader_unittest.cc", - "debug/test_elf_image_builder.cc", - "debug/test_elf_image_builder.h", - ] - - deps += [ "//base/test:malloc_wrapper" ] - defines += [ - # This library is used by ElfReaderTest to test reading elf files. - "MALLOC_WRAPPER_LIB=\"${shlib_prefix}malloc_wrapper${shlib_extension}\"", - ] - - if (!is_component_build) { - # Set rpath to find libmalloc_wrapper.so even in a non-component build. - configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] - } - } - - if (is_chromeos_lacros) { - sources += [ "i18n/icu_mergeable_data_file_unittest.cc" ] - } - - if (is_linux || is_chromeos_lacros) { - sources += [ - "linux_util_unittest.cc", - "nix/xdg_util_unittest.cc", - ] - } - - if (!use_glib) { - sources -= [ "message_loop/message_pump_glib_unittest.cc" ] - } - - if (use_libevent) { - sources += [ "message_loop/message_pump_libevent_unittest.cc" ] - deps += [ - ":message_pump_buildflags", - "//third_party/libevent", - ] - } - - if (is_fuchsia) { - sources += [ - "files/dir_reader_posix_unittest.cc", - "files/file_descriptor_watcher_posix_unittest.cc", - "fuchsia/fidl_event_handler_unittest.cc", - "fuchsia/file_utils_unittest.cc", - "fuchsia/filtered_service_directory_unittest.cc", - "fuchsia/fuchsia_logging_unittest.cc", - "fuchsia/intl_profile_watcher_unittest.cc", - "fuchsia/mem_buffer_util_unittest.cc", - "fuchsia/scoped_natural_service_binding_unittest.cc", - "fuchsia/scoped_natural_service_publisher_unittest.cc", - "fuchsia/scoped_service_binding_unittest.cc", - "fuchsia/scoped_service_publisher_unittest.cc", - "fuchsia/system_build_info_unittest.cc", - "fuchsia/system_product_info_unittest.cc", - "fuchsia/test_component_context_for_process_unittest.cc", - "fuchsia/time_zone_data_unittest.cc", - "message_loop/fd_watch_controller_posix_unittest.cc", - "posix/file_descriptor_shuffle_unittest.cc", - ] - - deps += [ - ":test_interface_impl", - ":test_interface_natural_impl", - ":test_log_listener_safe", - "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.buildinfo:fuchsia.buildinfo_cpp", - "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.buildinfo:fuchsia.buildinfo_hlcpp", - "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.hwinfo:fuchsia.hwinfo_cpp", - "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.intl:fuchsia.intl_hlcpp", - "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.logger:fuchsia.logger_cpp", - "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.mem:fuchsia.mem_hlcpp", - "//third_party/fuchsia-sdk/sdk/pkg/async", - "//third_party/fuchsia-sdk/sdk/pkg/async-default", - "//third_party/fuchsia-sdk/sdk/pkg/component_incoming_cpp", - "//third_party/fuchsia-sdk/sdk/pkg/fdio", - "//third_party/fuchsia-sdk/sdk/pkg/sys_cpp", - ] - - additional_manifest_fragments = [ - "//build/config/fuchsia/test/logger.shard.test-cml", - - # Required by PartitionAllocPageAllocatorTest tests with exec capability. - "//build/config/fuchsia/test/mark_vmo_executable.shard.test-cml", - ] - } - - if (!is_fuchsia && !is_ios) { - sources += [ "files/file_locking_unittest.cc" ] - } - - if (is_android) { - deps += [ "//testing/android/native_test:native_test_native_code" ] - sources += [ - "debug/elf_reader_unittest.cc", - "debug/proc_maps_linux_unittest.cc", - "debug/test_elf_image_builder.cc", - "debug/test_elf_image_builder.h", - ] - } - - if (is_win) { - deps += [ "//base:scoped_handle_test_dll" ] - if (current_cpu == "x64" || current_cpu == "arm64") { - sources += [ "profiler/win32_stack_frame_unwinder_unittest.cc" ] - deps += [ ":base_profiler_test_support_library" ] - } - - # These tests are not built by default because they make heavy use of - # parameterized tests. Even when disabled, they incur a startup penalty on - # base_unittests. See comments in the file as for why they are disabled by - # default, and https://crbug.com/1475518 for one consequence of the process - # startup penalty. - # sources += [ "files/os_validation_win_unittest.cc" ] - - if (toolchain_has_rust && win_enable_cfg_guards) { - deps += [ ":rust_cfg_win_test" ] - } - } - if (is_apple) { - sources += [ "profiler/frame_pointer_unwinder_unittest.cc" ] - } - if (is_chromeos && current_cpu == "x64") { - sources += [ "profiler/frame_pointer_unwinder_unittest.cc" ] - deps += [ ":base_profiler_test_support_library" ] - } - - if (use_allocator_shim) { - sources += [ - "allocator/partition_allocator/shim/allocator_shim_unittest.cc", - "sampling_heap_profiler/poisson_allocation_sampler_unittest.cc", - "sampling_heap_profiler/sampling_heap_profiler_unittest.cc", - ] - - if (is_win) { - sources += - [ "allocator/partition_allocator/shim/winheap_stubs_win_unittest.cc" ] - } - - sources += [ - "allocator/partition_alloc_support_unittest.cc", - "allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc", - ] - } - - if (enable_base_tracing) { - sources += [ - "test/trace_event_analyzer_unittest.cc", - "trace_event/memory_allocator_dump_unittest.cc", - "trace_event/memory_dump_manager_unittest.cc", - "trace_event/memory_dump_scheduler_unittest.cc", - "trace_event/memory_infra_background_allowlist_unittest.cc", - "trace_event/memory_usage_estimator_unittest.cc", - "trace_event/process_memory_dump_unittest.cc", - "trace_event/trace_arguments_unittest.cc", - "trace_event/trace_category_unittest.cc", - "trace_event/trace_config_unittest.cc", - "trace_event/trace_conversion_helper_unittest.cc", - "trace_event/trace_event_unittest.cc", - "trace_event/traced_value_support_unittest.cc", - "trace_event/traced_value_unittest.cc", - "trace_event/typed_macros_unittest.cc", - "tracing/perfetto_task_runner_unittest.cc", - ] - - if (is_android) { - sources += [ - "trace_event/cpufreq_monitor_android_unittest.cc", - "trace_event/java_heap_dump_provider_android_unittest.cc", - ] - } - - deps += [ - "//third_party/perfetto/include/perfetto/trace_processor:storage", - "//third_party/perfetto/protos/perfetto/trace:lite", - "//third_party/perfetto/protos/perfetto/trace/interned_data:lite", - "//third_party/perfetto/protos/perfetto/trace/track_event:lite", - ] - } -} - -# Test that CFG is enabled in Rust code. -if (is_win && toolchain_has_rust) { - source_set("rust_cfg_win_test") { - testonly = true - deps = [ - ":base", - "//testing/gtest", - ] - data_deps = [ "//build/rust/tests/test_control_flow_guard" ] - sources = [ "memory/rust_cfg_win_unittest.cc" ] - } -} - action("build_date") { script = "write_build_date_header.py" @@ -4090,936 +2633,3 @@ action("build_date") { build_timestamp, ] } - -if (enable_nocompile_tests) { - nocompile_test("base_nocompile_tests") { - sources = [ - "allocator/partition_allocator/partition_alloc_base/thread_annotations_pa_unittest.nc", - "allocator/partition_allocator/pointers/raw_ptr_unittest.nc", - "allocator/partition_allocator/pointers/raw_ref_unittest.nc", - "callback_list_unittest.nc", - "containers/buffer_iterator_unittest.nc", - "containers/checked_iterators_unittest.nc", - "containers/contains_unittest.nc", - "containers/enum_set_unittest.nc", - "containers/span_unittest.nc", - "debug/crash_logging_unittest.nc", - "functional/bind_unittest.nc", - "functional/callback_unittest.nc", - "functional/function_ref_unittest.nc", - "functional/overloaded_unittest.nc", - "memory/ref_counted_unittest.nc", - "memory/weak_ptr_unittest.nc", - "metrics/field_trial_params_unittest.nc", - "metrics/histogram_unittest.nc", - "no_destructor_unittest.nc", - "observer_list_unittest.nc", - "sequence_checker_unittest.nc", - "strings/string_piece_unittest.nc", - "task/bind_post_task_unittest.nc", - "task/task_traits_unittest.nc", - "thread_annotations_unittest.nc", - "traits_bag_unittest.nc", - "types/pass_key_unittest.nc", - "types/variant_util_unittest.nc", - "values_unittest.nc", - ] - - deps = [ - ":base", - "//base/test:run_all_unittests", - "//testing/gtest", - ] - - # Since the nocompile test is not able to inspect the contents of - # include_dirs, we need to specify the Abseil include dir manually. - include_dirs = [ "//third_party/abseil-cpp" ] - } -} - -if (is_android || is_robolectric) { - generate_jni("base_jni") { - sources = [ - "android/java/src/org/chromium/base/ApkAssets.java", - "android/java/src/org/chromium/base/ApplicationStatus.java", - "android/java/src/org/chromium/base/BaseFeatureMap.java", - "android/java/src/org/chromium/base/BuildInfo.java", - "android/java/src/org/chromium/base/BundleUtils.java", - "android/java/src/org/chromium/base/Callback.java", - "android/java/src/org/chromium/base/CommandLine.java", - "android/java/src/org/chromium/base/ContentUriUtils.java", - "android/java/src/org/chromium/base/CpuFeatures.java", - "android/java/src/org/chromium/base/EarlyTraceEvent.java", - "android/java/src/org/chromium/base/EventLog.java", - "android/java/src/org/chromium/base/FeatureList.java", - "android/java/src/org/chromium/base/FeatureMap.java", - "android/java/src/org/chromium/base/Features.java", - "android/java/src/org/chromium/base/FieldTrialList.java", - "android/java/src/org/chromium/base/FileUtils.java", - "android/java/src/org/chromium/base/ImportantFileWriterAndroid.java", - "android/java/src/org/chromium/base/IntStringCallback.java", - "android/java/src/org/chromium/base/JNIUtils.java", - "android/java/src/org/chromium/base/JavaExceptionReporter.java", - "android/java/src/org/chromium/base/JavaHandlerThread.java", - "android/java/src/org/chromium/base/LocaleUtils.java", - "android/java/src/org/chromium/base/MemoryPressureListener.java", - "android/java/src/org/chromium/base/PathService.java", - "android/java/src/org/chromium/base/PathUtils.java", - "android/java/src/org/chromium/base/PiiElider.java", - "android/java/src/org/chromium/base/PowerMonitor.java", - "android/java/src/org/chromium/base/RadioUtils.java", - "android/java/src/org/chromium/base/SysUtils.java", - "android/java/src/org/chromium/base/ThreadUtils.java", - "android/java/src/org/chromium/base/TimezoneUtils.java", - "android/java/src/org/chromium/base/TraceEvent.java", - "android/java/src/org/chromium/base/UnguessableToken.java", - "android/java/src/org/chromium/base/jank_tracker/JankMetricUMARecorder.java", - "android/java/src/org/chromium/base/library_loader/LibraryLoader.java", - "android/java/src/org/chromium/base/library_loader/LibraryPrefetcher.java", - "android/java/src/org/chromium/base/memory/JavaHeapDumpGenerator.java", - "android/java/src/org/chromium/base/memory/MemoryInfoBridge.java", - "android/java/src/org/chromium/base/metrics/NativeUmaRecorder.java", - "android/java/src/org/chromium/base/metrics/StatisticsRecorderAndroid.java", - "android/java/src/org/chromium/base/task/PostTask.java", - "android/java/src/org/chromium/base/task/TaskRunnerImpl.java", - ] - - if (use_clang_profiling) { - sources += [ - "test/android/javatests/src/org/chromium/base/test/ClangProfiler.java", - ] - } - - public_deps = [ - ":android_runtime_jni_headers", - ":android_runtime_unchecked_jni_headers", - ] - } - - generate_jar_jni("android_runtime_jni_headers") { - classes = [ "java/lang/Runtime.class" ] - } - - generate_jar_jni("android_runtime_unchecked_jni_headers") { - classes = [ "java/lang/Runnable.class" ] - unchecked_exceptions = true - } - - generate_jni("process_launcher_jni") { - sources = [ "android/java/src/org/chromium/base/process_launcher/ChildProcessService.java" ] - } -} # is_android || is_robolectric - -if (is_android) { - java_library("jni_java") { - supports_android = true - sources = [ - "android/java/src/org/chromium/base/JniException.java", - "android/java/src/org/chromium/base/JniStaticTestMocker.java", - "android/java/src/org/chromium/base/NativeLibraryLoadedStatus.java", - "android/java/src/org/chromium/base/annotations/AccessedByNative.java", - "android/java/src/org/chromium/base/annotations/CalledByNative.java", - "android/java/src/org/chromium/base/annotations/CalledByNativeForTesting.java", - "android/java/src/org/chromium/base/annotations/CalledByNativeUnchecked.java", - "android/java/src/org/chromium/base/annotations/JNINamespace.java", - "android/java/src/org/chromium/base/annotations/NativeClassQualifiedName.java", - "android/java/src/org/chromium/base/annotations/NativeMethods.java", - ] - - # Public because @CheckDiscard is added to generated *Jni.java files. - public_deps = [ "//build/android:build_java" ] - } - - java_cpp_features("java_features_srcjar") { - # External code should depend on ":base_java" instead. - visibility = [ ":*" ] - sources = [ - "allocator/partition_alloc_features.cc", - "android/base_features.cc", - "features.cc", - "task/task_features.cc", - ] - template = "android/java/src/org/chromium/base/BaseFeatures.java.tmpl" - } - - java_cpp_strings("java_switches_srcjar") { - # External code should depend on ":base_java" instead. - visibility = [ ":*" ] - sources = [ "base_switches.cc" ] - template = "android/java/src/org/chromium/base/BaseSwitches.java.tmpl" - } - - android_library("process_launcher_java") { - srcjar_deps = [ - ":process_launcher_aidl", - ":process_launcher_jni", - ] - deps = [ - ":base_java", - ":jni_java", - "//build/android:build_java", - "//third_party/android_deps:com_google_code_findbugs_jsr305_java", - "//third_party/androidx:androidx_annotation_annotation_experimental_java", - "//third_party/androidx:androidx_annotation_annotation_java", - "//third_party/androidx:androidx_collection_collection_java", - "//third_party/androidx:androidx_core_core_java", - ] - sources = [ - "android/java/src/org/chromium/base/process_launcher/BindService.java", - "android/java/src/org/chromium/base/process_launcher/ChildConnectionAllocator.java", - "android/java/src/org/chromium/base/process_launcher/ChildProcessConnection.java", - "android/java/src/org/chromium/base/process_launcher/ChildProcessConstants.java", - "android/java/src/org/chromium/base/process_launcher/ChildProcessLauncher.java", - "android/java/src/org/chromium/base/process_launcher/ChildProcessService.java", - "android/java/src/org/chromium/base/process_launcher/ChildProcessServiceDelegate.java", - "android/java/src/org/chromium/base/process_launcher/ChildServiceConnection.java", - "android/java/src/org/chromium/base/process_launcher/ChildServiceConnectionDelegate.java", - "android/java/src/org/chromium/base/process_launcher/ChildServiceConnectionFactory.java", - "android/java/src/org/chromium/base/process_launcher/ChildServiceConnectionImpl.java", - "android/java/src/org/chromium/base/process_launcher/FileDescriptorInfo.java", - ] - } - - android_library("base_java") { - srcjar_deps = [ - ":base_android_java_enums_srcjar", - ":base_jni", - ":java_features_srcjar", - ":java_switches_srcjar", - ] - - deps = [ - ":jni_java", - "//build/android:build_java", - "//third_party/android_deps:com_google_code_findbugs_jsr305_java", - "//third_party/android_deps:com_google_errorprone_error_prone_annotations_java", - "//third_party/androidx:androidx_annotation_annotation_experimental_java", - "//third_party/androidx:androidx_annotation_annotation_java", - "//third_party/androidx:androidx_collection_collection_java", - "//third_party/androidx:androidx_core_core_java", - ] - - sources = [ - "android/java/src/org/chromium/base/ActivityState.java", - "android/java/src/org/chromium/base/ApiCompatibilityUtils.java", - "android/java/src/org/chromium/base/ApkAssets.java", - "android/java/src/org/chromium/base/ApplicationStatus.java", - "android/java/src/org/chromium/base/BaseFeatureMap.java", - "android/java/src/org/chromium/base/BuildInfo.java", - "android/java/src/org/chromium/base/BundleUtils.java", - "android/java/src/org/chromium/base/Callback.java", - "android/java/src/org/chromium/base/CallbackController.java", - "android/java/src/org/chromium/base/CollectionUtil.java", - "android/java/src/org/chromium/base/CommandLine.java", - "android/java/src/org/chromium/base/CommandLineInitUtil.java", - "android/java/src/org/chromium/base/ContentUriUtils.java", - "android/java/src/org/chromium/base/ContextUtils.java", - "android/java/src/org/chromium/base/CpuFeatures.java", - "android/java/src/org/chromium/base/DiscardableReferencePool.java", - "android/java/src/org/chromium/base/EarlyTraceEvent.java", - "android/java/src/org/chromium/base/EventLog.java", - "android/java/src/org/chromium/base/FeatureList.java", - "android/java/src/org/chromium/base/FeatureMap.java", - "android/java/src/org/chromium/base/Features.java", - "android/java/src/org/chromium/base/FieldTrialList.java", - "android/java/src/org/chromium/base/FileUtils.java", - "android/java/src/org/chromium/base/Flag.java", - "android/java/src/org/chromium/base/ImportantFileWriterAndroid.java", - "android/java/src/org/chromium/base/IntStringCallback.java", - "android/java/src/org/chromium/base/JNIUtils.java", - "android/java/src/org/chromium/base/JavaExceptionReporter.java", - "android/java/src/org/chromium/base/JavaHandlerThread.java", - "android/java/src/org/chromium/base/LifetimeAssert.java", - "android/java/src/org/chromium/base/LocaleUtils.java", - "android/java/src/org/chromium/base/Log.java", - "android/java/src/org/chromium/base/MathUtils.java", - "android/java/src/org/chromium/base/MemoryPressureListener.java", - "android/java/src/org/chromium/base/ObserverList.java", - "android/java/src/org/chromium/base/PackageManagerUtils.java", - "android/java/src/org/chromium/base/PackageUtils.java", - "android/java/src/org/chromium/base/PathService.java", - "android/java/src/org/chromium/base/PathUtils.java", - "android/java/src/org/chromium/base/PiiElider.java", - "android/java/src/org/chromium/base/PowerMonitor.java", - "android/java/src/org/chromium/base/PowerMonitorForQ.java", - "android/java/src/org/chromium/base/Promise.java", - "android/java/src/org/chromium/base/RadioUtils.java", - "android/java/src/org/chromium/base/RequiredCallback.java", - "android/java/src/org/chromium/base/ResettersForTesting.java", - "android/java/src/org/chromium/base/StreamUtil.java", - "android/java/src/org/chromium/base/StrictModeContext.java", - "android/java/src/org/chromium/base/SysUtils.java", - "android/java/src/org/chromium/base/ThreadUtils.java", - "android/java/src/org/chromium/base/TimeUtils.java", - "android/java/src/org/chromium/base/TimezoneUtils.java", - "android/java/src/org/chromium/base/TraceEvent.java", - "android/java/src/org/chromium/base/UnguessableToken.java", - "android/java/src/org/chromium/base/UnownedUserData.java", - "android/java/src/org/chromium/base/UnownedUserDataHost.java", - "android/java/src/org/chromium/base/UnownedUserDataKey.java", - "android/java/src/org/chromium/base/UserData.java", - "android/java/src/org/chromium/base/UserDataHost.java", - "android/java/src/org/chromium/base/WrappedClassLoader.java", - "android/java/src/org/chromium/base/compat/ApiHelperForM.java", - "android/java/src/org/chromium/base/compat/ApiHelperForN.java", - "android/java/src/org/chromium/base/compat/ApiHelperForO.java", - "android/java/src/org/chromium/base/compat/ApiHelperForOMR1.java", - "android/java/src/org/chromium/base/compat/ApiHelperForP.java", - "android/java/src/org/chromium/base/compat/ApiHelperForQ.java", - "android/java/src/org/chromium/base/compat/ApiHelperForR.java", - "android/java/src/org/chromium/base/compat/ApiHelperForS.java", - "android/java/src/org/chromium/base/jank_tracker/FrameMetricsListener.java", - "android/java/src/org/chromium/base/jank_tracker/FrameMetricsStore.java", - "android/java/src/org/chromium/base/jank_tracker/JankMetricUMARecorder.java", - "android/java/src/org/chromium/base/jank_tracker/JankMetrics.java", - "android/java/src/org/chromium/base/library_loader/LibraryLoader.java", - "android/java/src/org/chromium/base/library_loader/LibraryPrefetcher.java", - "android/java/src/org/chromium/base/library_loader/Linker.java", - "android/java/src/org/chromium/base/library_loader/LinkerJni.java", - "android/java/src/org/chromium/base/library_loader/LoaderErrors.java", - "android/java/src/org/chromium/base/library_loader/NativeLibraryPreloader.java", - "android/java/src/org/chromium/base/library_loader/ProcessInitException.java", - "android/java/src/org/chromium/base/lifetime/DestroyChecker.java", - "android/java/src/org/chromium/base/lifetime/Destroyable.java", - "android/java/src/org/chromium/base/memory/JavaHeapDumpGenerator.java", - "android/java/src/org/chromium/base/memory/MemoryInfoBridge.java", - "android/java/src/org/chromium/base/memory/MemoryPressureCallback.java", - "android/java/src/org/chromium/base/memory/MemoryPressureMonitor.java", - "android/java/src/org/chromium/base/memory/MemoryPressureUma.java", - "android/java/src/org/chromium/base/memory/MemoryPurgeManager.java", - "android/java/src/org/chromium/base/metrics/CachingUmaRecorder.java", - "android/java/src/org/chromium/base/metrics/HistogramBucket.java", - "android/java/src/org/chromium/base/metrics/NativeUmaRecorder.java", - "android/java/src/org/chromium/base/metrics/NoopUmaRecorder.java", - "android/java/src/org/chromium/base/metrics/RecordHistogram.java", - "android/java/src/org/chromium/base/metrics/RecordUserAction.java", - "android/java/src/org/chromium/base/metrics/ScopedSysTraceEvent.java", - "android/java/src/org/chromium/base/metrics/StatisticsRecorderAndroid.java", - "android/java/src/org/chromium/base/metrics/TimingMetric.java", - "android/java/src/org/chromium/base/metrics/UmaRecorder.java", - "android/java/src/org/chromium/base/metrics/UmaRecorderHolder.java", - "android/java/src/org/chromium/base/supplier/DestroyableObservableSupplier.java", - "android/java/src/org/chromium/base/supplier/ObservableSupplier.java", - "android/java/src/org/chromium/base/supplier/ObservableSupplierImpl.java", - "android/java/src/org/chromium/base/supplier/OneShotCallback.java", - "android/java/src/org/chromium/base/supplier/OneshotSupplier.java", - "android/java/src/org/chromium/base/supplier/OneshotSupplierImpl.java", - "android/java/src/org/chromium/base/supplier/Supplier.java", - "android/java/src/org/chromium/base/supplier/UnownedUserDataSupplier.java", - "android/java/src/org/chromium/base/task/AsyncTask.java", - "android/java/src/org/chromium/base/task/BackgroundOnlyAsyncTask.java", - "android/java/src/org/chromium/base/task/ChainedTasks.java", - "android/java/src/org/chromium/base/task/ChromeThreadPoolExecutor.java", - "android/java/src/org/chromium/base/task/PostTask.java", - "android/java/src/org/chromium/base/task/SequencedTaskRunner.java", - "android/java/src/org/chromium/base/task/SequencedTaskRunnerImpl.java", - "android/java/src/org/chromium/base/task/SerialExecutor.java", - "android/java/src/org/chromium/base/task/SingleThreadTaskRunner.java", - "android/java/src/org/chromium/base/task/SingleThreadTaskRunnerImpl.java", - "android/java/src/org/chromium/base/task/TaskExecutor.java", - "android/java/src/org/chromium/base/task/TaskRunner.java", - "android/java/src/org/chromium/base/task/TaskRunnerImpl.java", - "android/java/src/org/chromium/base/task/ThreadPoolTaskExecutor.java", - "android/java/src/org/chromium/base/task/UiThreadTaskExecutor.java", - ] - - if (use_clang_profiling) { - sources += [ - "test/android/javatests/src/org/chromium/base/test/ClangProfiler.java", - ] - } else { - sources += [ "test/android/javatests/src/stub/org/chromium/base/test/ClangProfiler.java" ] - } - - if (!is_cronet_build) { - sources += [ "android/java/src/org/chromium/base/IntentUtils.java" ] - } - - resources_package = "org.chromium.base" - - proguard_configs = [ - "android/proguard/chromium_apk.flags", - "android/proguard/chromium_code.flags", - "android/proguard/remove_logging.flags", - ] - } - - android_aidl("process_launcher_aidl") { - import_include = [ "android/java/src" ] - sources = [ - "android/java/src/org/chromium/base/process_launcher/IChildProcessService.aidl", - "android/java/src/org/chromium/base/process_launcher/IParentProcess.aidl", - ] - } - - android_library("base_javatests") { - testonly = true - - deps = [ - ":base_java", - ":base_java_test_support", - ":base_java_test_support_uncommon", - "//base:jni_java", - "//base/test:test_support_java", - "//build/android:build_java", - "//third_party/androidx:androidx_annotation_annotation_java", - "//third_party/androidx:androidx_test_monitor_java", - "//third_party/androidx:androidx_test_runner_java", - "//third_party/hamcrest:hamcrest_java", - "//third_party/junit:junit", - "//third_party/mockito:mockito_java", - ] - - sources = [ - # AssertsTest doesn't really belong in //base but it's preferable to - # stick it here than create another target for a single test. - "android/javatests/src/org/chromium/base/AdvancedMockContextTest.java", - "android/javatests/src/org/chromium/base/AssertsTest.java", - "android/javatests/src/org/chromium/base/CommandLineFlagsTest.java", - "android/javatests/src/org/chromium/base/CommandLineInitUtilTest.java", - "android/javatests/src/org/chromium/base/CommandLineTest.java", - "android/javatests/src/org/chromium/base/EarlyTraceEventTest.java", - "android/javatests/src/org/chromium/base/IntentUtilsTest.java", - "android/javatests/src/org/chromium/base/LocaleUtilsTest.java", - "android/javatests/src/org/chromium/base/ObserverListTest.java", - "android/javatests/src/org/chromium/base/PackageUtilsTest.java", - "android/javatests/src/org/chromium/base/StrictModeContextTest.java", - "android/javatests/src/org/chromium/base/UserDataHostTest.java", - "android/javatests/src/org/chromium/base/library_loader/EarlyNativeTest.java", - "android/javatests/src/org/chromium/base/metrics/RecordHistogramTest.java", - "android/javatests/src/org/chromium/base/task/AsyncTaskTest.java", - "android/javatests/src/org/chromium/base/task/PostTaskTest.java", - "android/javatests/src/org/chromium/base/task/SequencedTaskRunnerImplTest.java", - "android/javatests/src/org/chromium/base/task/SingleThreadTaskRunnerImplTest.java", - "android/javatests/src/org/chromium/base/task/TaskRunnerImplTest.java", - "android/javatests/src/org/chromium/base/test/metrics/HistogramWatcherTestBase.java", - "android/javatests/src/org/chromium/base/test/metrics/HistogramWatcherTransitionToNativeTest.java", - "android/javatests/src/org/chromium/base/test/metrics/HistogramWatcherWithNativeTest.java", - "android/javatests/src/org/chromium/base/test/metrics/HistogramWatcherWithoutNativeTest.java", - "android/javatests/src/org/chromium/base/util/GarbageCollectionTestUtilsTest.java", - ] - srcjar_deps = [ ":base_javatests_jni" ] - } - - source_set("base_javatests_lib") { - testonly = true - deps = [ - ":base", - ":base_javatests_jni", - ] - sources = [ "test/library_loader/early_native_test_helper.cc" ] - } - - generate_jni("base_javatests_jni") { - testonly = true - sources = [ "android/javatests/src/org/chromium/base/library_loader/EarlyNativeTest.java" ] - } - - android_library("base_java_url_utils_for_test") { - testonly = true - sources = [ - "test/android/javatests/src/org/chromium/base/test/util/UrlUtils.java", - ] - - deps = [ - ":base_java", - "//base:jni_java", - "//build/android:build_java", - "//third_party/androidx:androidx_annotation_annotation_java", - "//third_party/junit:junit", - ] - } - - android_library("base_java_test_support") { - testonly = true - - deps = [ - ":base_java", - "//base:jni_java", - "//build/android:build_java", - "//third_party/accessibility_test_framework:accessibility_test_framework_java", - "//third_party/android_deps:espresso_java", - "//third_party/android_deps:guava_android_java", - "//third_party/android_sdk:android_test_base_java", - "//third_party/android_sdk:android_test_mock_java", - "//third_party/androidx:androidx_annotation_annotation_java", - "//third_party/androidx:androidx_core_core_java", - "//third_party/androidx:androidx_multidex_multidex_java", - "//third_party/androidx:androidx_test_monitor_java", - "//third_party/androidx:androidx_test_runner_java", - "//third_party/androidx:androidx_test_uiautomator_uiautomator_java", - "//third_party/hamcrest:hamcrest_java", - "//third_party/junit", - ] - - public_deps = [ ":base_java_url_utils_for_test" ] - - sources = [ - "test/android/java/src/org/chromium/base/multidex/ChromiumMultiDexInstaller.java", - "test/android/javatests/src/org/chromium/base/test/BaseActivityTestRule.java", - "test/android/javatests/src/org/chromium/base/test/BaseChromiumAndroidJUnitRunner.java", - "test/android/javatests/src/org/chromium/base/test/BaseChromiumRunnerCommon.java", - "test/android/javatests/src/org/chromium/base/test/BaseJUnit4ClassRunner.java", - "test/android/javatests/src/org/chromium/base/test/BaseJUnit4TestRule.java", - "test/android/javatests/src/org/chromium/base/test/LoadNative.java", - "test/android/javatests/src/org/chromium/base/test/MockitoErrorHandler.java", - "test/android/javatests/src/org/chromium/base/test/ResetCachedFlagValuesTestHook.java", - "test/android/javatests/src/org/chromium/base/test/ResettersForTestingTestRule.java", - "test/android/javatests/src/org/chromium/base/test/ScreenshotOnFailureStatement.java", - "test/android/javatests/src/org/chromium/base/test/TestListInstrumentationRunListener.java", - "test/android/javatests/src/org/chromium/base/test/TestTraceEvent.java", - "test/android/javatests/src/org/chromium/base/test/UiThreadStatement.java", - "test/android/javatests/src/org/chromium/base/test/UiThreadTest.java", - "test/android/javatests/src/org/chromium/base/test/UnitTestLifetimeAssertRule.java", - "test/android/javatests/src/org/chromium/base/test/UnitTestNoBrowserProcessHook.java", - "test/android/javatests/src/org/chromium/base/test/params/BaseJUnit4RunnerDelegate.java", - "test/android/javatests/src/org/chromium/base/test/params/BlockJUnit4RunnerDelegate.java", - "test/android/javatests/src/org/chromium/base/test/params/MethodParamAnnotationRule.java", - "test/android/javatests/src/org/chromium/base/test/params/MethodParamRule.java", - "test/android/javatests/src/org/chromium/base/test/params/ParameterAnnotations.java", - "test/android/javatests/src/org/chromium/base/test/params/ParameterProvider.java", - "test/android/javatests/src/org/chromium/base/test/params/ParameterSet.java", - "test/android/javatests/src/org/chromium/base/test/params/ParameterizedCommandLineFlags.java", - "test/android/javatests/src/org/chromium/base/test/params/ParameterizedFrameworkMethod.java", - "test/android/javatests/src/org/chromium/base/test/params/ParameterizedRunner.java", - "test/android/javatests/src/org/chromium/base/test/params/ParameterizedRunnerDelegate.java", - "test/android/javatests/src/org/chromium/base/test/params/ParameterizedRunnerDelegateCommon.java", - "test/android/javatests/src/org/chromium/base/test/params/ParameterizedRunnerDelegateFactory.java", - "test/android/javatests/src/org/chromium/base/test/params/SkipCommandLineParameterization.java", - "test/android/javatests/src/org/chromium/base/test/util/AdvancedMockContext.java", - "test/android/javatests/src/org/chromium/base/test/util/AndroidSdkLevelSkipCheck.java", - "test/android/javatests/src/org/chromium/base/test/util/AnnotationProcessingUtils.java", - "test/android/javatests/src/org/chromium/base/test/util/AnnotationRule.java", - "test/android/javatests/src/org/chromium/base/test/util/ApplicationContextWrapper.java", - "test/android/javatests/src/org/chromium/base/test/util/ApplicationTestUtils.java", - "test/android/javatests/src/org/chromium/base/test/util/Batch.java", - "test/android/javatests/src/org/chromium/base/test/util/CallbackHelper.java", - "test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java", - "test/android/javatests/src/org/chromium/base/test/util/Criteria.java", - "test/android/javatests/src/org/chromium/base/test/util/CriteriaHelper.java", - "test/android/javatests/src/org/chromium/base/test/util/CriteriaNotSatisfiedException.java", - "test/android/javatests/src/org/chromium/base/test/util/DisableIf.java", - "test/android/javatests/src/org/chromium/base/test/util/DisableIfSkipCheck.java", - "test/android/javatests/src/org/chromium/base/test/util/DisabledTest.java", - "test/android/javatests/src/org/chromium/base/test/util/DoNotBatch.java", - "test/android/javatests/src/org/chromium/base/test/util/DoNotRevive.java", - "test/android/javatests/src/org/chromium/base/test/util/DumpThreadsOnFailureRule.java", - "test/android/javatests/src/org/chromium/base/test/util/EnormousTest.java", - "test/android/javatests/src/org/chromium/base/test/util/EspressoIdleTimeoutRule.java", - "test/android/javatests/src/org/chromium/base/test/util/Feature.java", - "test/android/javatests/src/org/chromium/base/test/util/Features.java", - "test/android/javatests/src/org/chromium/base/test/util/FeaturesBase.java", - "test/android/javatests/src/org/chromium/base/test/util/HistogramWatcher.java", - "test/android/javatests/src/org/chromium/base/test/util/InMemorySharedPreferences.java", - "test/android/javatests/src/org/chromium/base/test/util/InMemorySharedPreferencesContext.java", - "test/android/javatests/src/org/chromium/base/test/util/IntegrationTest.java", - "test/android/javatests/src/org/chromium/base/test/util/JniMocker.java", - "test/android/javatests/src/org/chromium/base/test/util/LooperUtils.java", - "test/android/javatests/src/org/chromium/base/test/util/Manual.java", - "test/android/javatests/src/org/chromium/base/test/util/MaxAndroidSdkLevel.java", - "test/android/javatests/src/org/chromium/base/test/util/MinAndroidSdkLevel.java", - "test/android/javatests/src/org/chromium/base/test/util/PackageManagerWrapper.java", - "test/android/javatests/src/org/chromium/base/test/util/PayloadCallbackHelper.java", - "test/android/javatests/src/org/chromium/base/test/util/RequiresRestart.java", - "test/android/javatests/src/org/chromium/base/test/util/Restriction.java", - "test/android/javatests/src/org/chromium/base/test/util/RestrictionSkipCheck.java", - "test/android/javatests/src/org/chromium/base/test/util/ScalableTimeout.java", - "test/android/javatests/src/org/chromium/base/test/util/SkipCheck.java", - "test/android/javatests/src/org/chromium/base/test/util/TestFileUtil.java", - "test/android/javatests/src/org/chromium/base/test/util/TestThreadUtils.java", - "test/android/javatests/src/org/chromium/base/test/util/TimeoutScale.java", - "test/android/javatests/src/org/chromium/base/test/util/TimeoutTimer.java", - "test/android/javatests/src/org/chromium/base/test/util/UserActionTester.java", - ] - } - - generate_jni("base_java_test_support_uncommon_jni") { - testonly = true - sources = [ - "test/android/javatests/src/org/chromium/base/test/ReachedCodeProfiler.java", - "test/android/javatests/src/org/chromium/base/test/task/ThreadPoolTestHelpers.java", - ] - } - - android_library("base_java_test_support_uncommon") { - testonly = true - - deps = [ - "//base:base_java", - "//base:jni_java", - "//third_party/androidx:androidx_annotation_annotation_java", - "//third_party/androidx:androidx_test_monitor_java", - "//third_party/hamcrest:hamcrest_java", - "//third_party/junit:junit", - ] - - srcjar_deps = [ ":base_java_test_support_uncommon_jni" ] - sources = [ - "test/android/javatests/src/org/chromium/base/FakeTimeTestRule.java", - "test/android/javatests/src/org/chromium/base/test/BundleTestRule.java", - "test/android/javatests/src/org/chromium/base/test/ReachedCodeProfiler.java", - "test/android/javatests/src/org/chromium/base/test/SetUpStatement.java", - "test/android/javatests/src/org/chromium/base/test/SetUpTestRule.java", - "test/android/javatests/src/org/chromium/base/test/task/SchedulerTestHelpers.java", - "test/android/javatests/src/org/chromium/base/test/task/ThreadPoolTestHelpers.java", - "test/android/javatests/src/org/chromium/base/test/util/CloseableOnMainThread.java", - "test/android/javatests/src/org/chromium/base/test/util/InstrumentationUtils.java", - "test/android/javatests/src/org/chromium/base/test/util/Matchers.java", - ] - } - - android_library("base_java_process_launcher_test_support") { - testonly = true - - public_deps = [ ":process_launcher_java" ] - - sources = [ "test/android/javatests/src/org/chromium/base/process_launcher/TestChildProcessConnection.java" ] - } - - robolectric_library("base_junit_test_support") { - sources = [ - "//third_party/robolectric/custom_asynctask/java/src/org/chromium/base/task/test/ShadowAsyncTask.java", - "//third_party/robolectric/custom_asynctask/java/src/org/chromium/base/task/test/ShadowAsyncTaskBridge.java", - "test/android/junit/src/org/chromium/base/task/test/BackgroundShadowAsyncTask.java", - "test/android/junit/src/org/chromium/base/task/test/CustomShadowAsyncTask.java", - "test/android/junit/src/org/chromium/base/task/test/PausedExecutorTestRule.java", - "test/android/junit/src/org/chromium/base/task/test/ShadowPostTask.java", - "test/android/junit/src/org/chromium/base/test/BaseRobolectricAndroidConfigurer.java", - "test/android/junit/src/org/chromium/base/test/BaseRobolectricTestRule.java", - "test/android/junit/src/org/chromium/base/test/BaseRobolectricTestRunner.java", - "test/android/junit/src/org/chromium/base/test/ShadowBuildInfo.java", - "test/android/junit/src/org/chromium/base/test/util/TestRunnerTestRule.java", - ] - - # Make sure robolectric tests have classes filtered out of base_java by - # jar_excluded_patterns. - srcjar_deps = [ "//build/android:native_libraries_gen" ] - - annotation_processor_deps = - [ "//third_party/android_deps:auto_service_processor" ] - deps = [ - ":base_java", - ":base_java_test_support", - "//testing/android/junit:junit_test_support", - "//third_party/android_deps:com_google_auto_service_auto_service_annotations_java", - "//third_party/androidx:androidx_test_core_java", - "//third_party/androidx:androidx_test_monitor_java", - "//third_party/hamcrest:hamcrest_java", - "//third_party/junit:junit", - ] - } - - robolectric_binary("base_junit_tests") { - sources = [ - "android/junit/src/org/chromium/base/ApplicationStatusTest.java", - "android/junit/src/org/chromium/base/BuildInfoTest.java", - "android/junit/src/org/chromium/base/CallbackControllerTest.java", - "android/junit/src/org/chromium/base/CollectionUtilTest.java", - "android/junit/src/org/chromium/base/DiscardableReferencePoolTest.java", - "android/junit/src/org/chromium/base/FeatureListUnitTest.java", - "android/junit/src/org/chromium/base/FileUtilsTest.java", - "android/junit/src/org/chromium/base/LifetimeAssertTest.java", - "android/junit/src/org/chromium/base/LogTest.java", - "android/junit/src/org/chromium/base/MathUtilsTest.java", - "android/junit/src/org/chromium/base/PathUtilsTest.java", - "android/junit/src/org/chromium/base/PiiEliderTest.java", - "android/junit/src/org/chromium/base/PromiseTest.java", - "android/junit/src/org/chromium/base/ResettersForTestingTest.java", - "android/junit/src/org/chromium/base/TimeUtilsTest.java", - "android/junit/src/org/chromium/base/TraceEventTest.java", - "android/junit/src/org/chromium/base/UnownedUserDataHostTest.java", - "android/junit/src/org/chromium/base/UnownedUserDataKeyTest.java", - "android/junit/src/org/chromium/base/jank_tracker/FrameMetricsListenerTest.java", - "android/junit/src/org/chromium/base/jank_tracker/FrameMetricsStoreTest.java", - "android/junit/src/org/chromium/base/jank_tracker/JankMetricUMARecorderTest.java", - "android/junit/src/org/chromium/base/library_loader/LinkerTest.java", - "android/junit/src/org/chromium/base/memory/MemoryPressureMonitorTest.java", - "android/junit/src/org/chromium/base/memory/MemoryPurgeManagerTest.java", - "android/junit/src/org/chromium/base/metrics/CachingUmaRecorderTest.java", - "android/junit/src/org/chromium/base/process_launcher/ChildConnectionAllocatorTest.java", - "android/junit/src/org/chromium/base/process_launcher/ChildProcessConnectionTest.java", - "android/junit/src/org/chromium/base/supplier/ObservableSupplierImplTest.java", - "android/junit/src/org/chromium/base/supplier/OneShotCallbackTest.java", - "android/junit/src/org/chromium/base/supplier/OneshotSupplierImplTest.java", - "android/junit/src/org/chromium/base/supplier/UnownedUserDataSupplierTest.java", - "android/junit/src/org/chromium/base/task/AsyncTaskThreadTest.java", - "android/junit/src/org/chromium/base/task/SequencedTaskRunnerTaskMigrationTest.java", - "android/junit/src/org/chromium/base/util/GarbageCollectionTestUtilsUnitTest.java", - "test/android/junit/src/org/chromium/base/test/SetUpStatementTest.java", - "test/android/junit/src/org/chromium/base/test/TestListInstrumentationRunListenerTest.java", - "test/android/junit/src/org/chromium/base/test/params/ExampleParameterizedTest.java", - "test/android/junit/src/org/chromium/base/test/params/ParameterizedRunnerDelegateCommonTest.java", - "test/android/junit/src/org/chromium/base/test/params/ParameterizedRunnerDelegateFactoryTest.java", - "test/android/junit/src/org/chromium/base/test/params/ParameterizedRunnerTest.java", - "test/android/junit/src/org/chromium/base/test/params/ParameterizedTestNameTest.java", - "test/android/junit/src/org/chromium/base/test/util/AndroidSdkLevelSkipCheckTest.java", - "test/android/junit/src/org/chromium/base/test/util/AnnotationProcessingUtilsTest.java", - "test/android/junit/src/org/chromium/base/test/util/CommandLineFlagsNoClassAnnotationCheckTest.java", - "test/android/junit/src/org/chromium/base/test/util/CommandLineFlagsWithClassAnnotationCheckTest.java", - "test/android/junit/src/org/chromium/base/test/util/DisableIfTest.java", - "test/android/junit/src/org/chromium/base/test/util/DisabledTestForClassRobolectricTest.java", - "test/android/junit/src/org/chromium/base/test/util/DisabledTestRobolectricTest.java", - "test/android/junit/src/org/chromium/base/test/util/RestrictionSkipCheckTest.java", - "test/android/junit/src/org/chromium/base/test/util/SkipCheckTest.java", - ] - deps = [ - ":base_java", - ":base_java_process_launcher_test_support", - ":base_java_test_support", - ":base_java_test_support_uncommon", - ":base_junit_test_support", - "//base:jni_java", - "//base/test:test_support_java", - "//third_party/android_deps:guava_android_java", - "//third_party/androidx:androidx_annotation_annotation_java", - "//third_party/androidx:androidx_test_core_java", - "//third_party/androidx:androidx_test_runner_java", - "//third_party/hamcrest:hamcrest_java", - ] - } - - java_cpp_enum("base_android_java_enums_srcjar") { - sources = [ - "android/application_status_listener.h", - "android/child_process_binding_types.h", - "android/library_loader/library_loader_hooks.h", - "android/linker/linker_jni.h", - "android/task_scheduler/task_runner_android.h", - "android/task_scheduler/task_traits_android.h", - "memory/memory_pressure_listener.h", - "metrics/histogram_base.h", - "task/task_traits.h", - ] - if (enable_base_tracing) { - sources += [ "trace_event/trace_config.h" ] - } - } - - generate_jni("base_profiler_test_support_jni") { - testonly = true - sources = - [ "android/javatests/src/org/chromium/base/profiler/TestSupport.java" ] - } - - android_library("base_profiler_test_support_java") { - testonly = true - sources = - [ "android/javatests/src/org/chromium/base/profiler/TestSupport.java" ] - srcjar_deps = [ ":base_profiler_test_support_jni" ] - - deps = [ - "//base:jni_java", - "//build/android:build_java", - ] - } - - android_library("base_java_unittest_support") { - testonly = true - - deps = [ - ":base_java", - "//base:jni_java", - ] - - sources = [ - "test/android/java/src/org/chromium/base/ContentUriTestUtils.java", - "test/android/java/src/org/chromium/base/JavaHandlerThreadHelpers.java", - ] - } -} # is_android - -# Keep the list of fuzzer_tests in alphabetical order. -fuzzer_test("base64_decode_fuzzer") { - sources = [ "base64_decode_fuzzer.cc" ] - deps = [ "//base" ] -} - -fuzzer_test("base64_encode_fuzzer") { - sources = [ "base64_encode_fuzzer.cc" ] - deps = [ "//base" ] -} - -fuzzer_test("base64url_fuzzer") { - sources = [ "base64url_fuzzer.cc" ] - deps = [ "//base" ] -} - -fuzzer_test("base_json_correctness_fuzzer") { - sources = [ "json/json_correctness_fuzzer.cc" ] - deps = [ ":base" ] - dict = "//testing/libfuzzer/fuzzers/dicts/json.dict" -} - -fuzzer_test("base_json_reader_fuzzer") { - sources = [ "json/json_reader_fuzzer.cc" ] - deps = [ "//base" ] - dict = "//testing/libfuzzer/fuzzers/dicts/json.dict" -} - -fuzzer_test("base_json_string_escape_fuzzer") { - sources = [ "json/string_escape_fuzzer.cc" ] - deps = [ "//base" ] -} - -if (is_mac) { - protoc_convert("base_mach_port_rendezvous_convert_corpus") { - sources = [ - "test/data/mach_port_rendezvous_fuzz/dead_name.textproto", - "test/data/mach_port_rendezvous_fuzz/send.textproto", - ] - inputs = [ "//testing/libfuzzer/fuzzers/mach/mach_message.proto" ] - output_pattern = "$target_gen_dir/base_mach_port_rendezvous_corpus/{{source_name_part}}.binarypb" - args = [ - "--encode=mach_fuzzer.MachMessage", - "-I", - rebase_path("//"), - rebase_path(inputs[0]), - ] - } - fuzzer_test("base_mach_port_rendezvous_fuzzer") { - sources = [ "mac/mach_port_rendezvous_fuzzer.cc" ] - deps = [ - "//base", - "//testing/libfuzzer/fuzzers/mach:converter", - "//third_party/libprotobuf-mutator", - ] - seed_corpus = "$target_gen_dir/base_mach_port_rendezvous_corpus" - seed_corpus_deps = [ ":base_mach_port_rendezvous_convert_corpus" ] - } -} - -fuzzer_test("command_line_fuzzer") { - sources = [ "command_line_fuzzer.cc" ] - deps = [ "//base" ] -} - -fuzzer_test("escape_fuzzer") { - sources = [ "strings/escape_fuzzer.cc" ] - deps = [ "//base" ] -} - -fuzzer_test("file_path_fuzzer") { - sources = [ "files/file_path_fuzzer.cc" ] - deps = [ "//base" ] -} - -fuzzer_test("string_number_conversions_fuzzer") { - sources = [ "strings/string_number_conversions_fuzzer.cc" ] - deps = [ "//base" ] -} - -fuzzer_test("string_pattern_fuzzer") { - sources = [ "strings/pattern_fuzzer.cc" ] - deps = [ "//base" ] -} - -fuzzer_test("string_tokenizer_fuzzer") { - sources = [ "strings/string_tokenizer_fuzzer.cc" ] - deps = [ "//base" ] -} - -fuzzer_test("substring_set_matcher_fuzzer") { - sources = [ "substring_set_matcher/substring_set_matcher_fuzzer.cc" ] - deps = [ "//base" ] -} - -fuzzer_test("sys_string_conversions_fuzzer") { - sources = [ "strings/sys_string_conversions_fuzzer.cc" ] - deps = [ "//base" ] -} - -fuzzer_test("time_delta_from_string_fuzzer") { - sources = [ "time/time_delta_from_string_fuzzer.cc" ] - deps = [ "//base" ] -} - -fuzzer_test("time_fuzzer") { - sources = [ "time/time_fuzzer.cc" ] - deps = [ - "//base", - "//base/test:test_support", - ] -} - -fuzzer_test("utf_string_conversions_fuzzer") { - sources = [ "strings/utf_string_conversions_fuzzer.cc" ] - deps = [ "//base" ] -} - -fuzzer_test("pickle_fuzzer") { - sources = [ "pickle_fuzzer.cc" ] - deps = [ - "//base", - "//base/test:test_support", - ] -} - -# TODO(1151236): Temporarily move test_support from -# //base/allocator/partition_allocator/BUILD.gn to //base/BUILD.gn. After -# fixing partition_allocator tests issue, we will move test_support to -# //base/allocator/partition_allocator/BUILD.gn again. -source_set("partition_alloc_test_support") { - testonly = true - - sources = [ - "allocator/partition_allocator/extended_api.cc", - "allocator/partition_allocator/extended_api.h", - "allocator/partition_allocator/partition_alloc_base/threading/platform_thread_for_testing.h", - "allocator/partition_allocator/partition_alloc_for_testing.h", - "allocator/partition_allocator/pointers/raw_ptr_counting_impl_wrapper_for_test.h", - ] - if (is_posix) { - sources += [ "allocator/partition_allocator/partition_alloc_base/threading/platform_thread_posix_for_testing.cc" ] - } - if (is_fuchsia) { - sources += [ - "allocator/partition_allocator/partition_alloc_base/threading/platform_thread_fuchsia_for_testing.cc", - "allocator/partition_allocator/partition_alloc_base/threading/platform_thread_posix_for_testing.cc", - ] - } - if (is_win) { - sources += [ "allocator/partition_allocator/partition_alloc_base/threading/platform_thread_win_for_testing.cc" ] - } - if (is_apple) { - sources += [ "allocator/partition_allocator/partition_alloc_base/threading/platform_thread_apple_for_testing.mm" ] - } - if (is_linux || is_chromeos) { - sources += [ "allocator/partition_allocator/partition_alloc_base/threading/platform_thread_linux_for_testing.cc" ] - } - if (is_android) { - sources += [ "allocator/partition_allocator/partition_alloc_base/threading/platform_thread_android_for_testing.cc" ] - } - public_deps = [ - "allocator/partition_allocator:buildflags", - "//build:branding_buildflags", - "//build/config/compiler:compiler_buildflags", - ] - public_configs = [] - if (is_fuchsia) { - public_deps += [ - "//third_party/fuchsia-sdk/sdk/pkg/fit", - "//third_party/fuchsia-sdk/sdk/pkg/sync", - "//third_party/fuchsia-sdk/sdk/pkg/zx", - ] - - # Needed for users of spinning_mutex.h, which for performance reasons, - # contains inlined calls to `libsync` inside the header file. - # It appends an entry to the "libs" section of the dependent target. - public_configs += [ ":fuchsia_sync_lib" ] - } - deps = [ ":base" ] - - if (!is_debug) { - configs -= [ "//build/config/compiler:default_optimization" ] - configs += [ "//build/config/compiler:optimize_speed" ] - } -} - -if (enable_base_tracing) { - # This group makes visible those targets in subdirectories that are not - # explicitly depended on. - group("gn_all") { - testonly = true - deps = [ "//base/tracing:perfetto_diff_tests" ] - } -} diff --git a/src/build/BUILD.gn b/src/build/BUILD.gn index 852cdf966b..a90328e86e 100644 --- a/src/build/BUILD.gn +++ b/src/build/BUILD.gn @@ -79,16 +79,6 @@ buildflag_header("chromeos_buildflags") { ] } -if (build_with_chromium) { - group("gold_common_pytype") { - testonly = true - - data = [ "//build/skia_gold_common/" ] - - data_deps = [ "//testing:pytype_dependencies" ] - } -} - if (is_chromeos) { process_version("version_metadata") { sources = [ "//chrome/VERSION" ] diff --git a/src/components/version_info/BUILD.gn b/src/components/version_info/BUILD.gn index 236a8e980e..22992eb442 100644 --- a/src/components/version_info/BUILD.gn +++ b/src/components/version_info/BUILD.gn @@ -29,24 +29,6 @@ static_library("version_info") { ] } -# Isolate the //ui/base dependency in this target. -static_library("version_string") { - sources = [ - "version_string.cc", - "version_string.h", - ] - - deps = [ - ":version_info", - "//components/strings", - ] - - if (use_unofficial_version_number) { - defines = [ "USE_UNOFFICIAL_VERSION_NUMBER" ] - deps += [ "//ui/base" ] - } -} - source_set("channel") { sources = [ "channel.h" ] } diff --git a/src/crypto/BUILD.gn b/src/crypto/BUILD.gn index a54329473a..156bfaf359 100644 --- a/src/crypto/BUILD.gn +++ b/src/crypto/BUILD.gn @@ -6,7 +6,6 @@ import("//build/buildflag_header.gni") import("//build/config/chromeos/ui_mode.gni") import("//components/nacl/toolchain.gni") import("//crypto/features.gni") -import("//testing/test.gni") buildflag_header("buildflags") { header = "crypto_buildflags.h" @@ -149,75 +148,3 @@ component("crypto") { defines = [ "CRYPTO_IMPLEMENTATION" ] } - -test("crypto_unittests") { - sources = [ - "aead_unittest.cc", - "ec_private_key_unittest.cc", - "ec_signature_creator_unittest.cc", - "encryptor_unittest.cc", - "hmac_unittest.cc", - "p224_spake_unittest.cc", - "random_unittest.cc", - "rsa_private_key_unittest.cc", - "secure_hash_unittest.cc", - "sha2_unittest.cc", - "signature_creator_unittest.cc", - "signature_verifier_unittest.cc", - "symmetric_key_unittest.cc", - "unexportable_key_unittest.cc", - ] - - if (is_win) { - sources += [ "unexportable_key_metrics_unittest.cc" ] - } - - # Some files are built when NSS is used for the platform certificate library. - if (use_nss_certs) { - sources += [ - "nss_key_util_unittest.cc", - "nss_util_unittest.cc", - ] - configs += [ "//build/config/linux/nss" ] - } - - deps = [ - ":crypto", - ":test_support", - "//base", - "//base/test:run_all_unittests", - "//base/test:test_support", - "//testing/gmock", - "//testing/gtest", - ] -} - -static_library("test_support") { - testonly = true - sources = [ - "scoped_mock_unexportable_key_provider.cc", - "scoped_mock_unexportable_key_provider.h", - ] - - if (use_nss_certs) { - sources += [ - "scoped_test_nss_db.cc", - "scoped_test_nss_db.h", - ] - configs += [ "//build/config/linux/nss" ] - } - - if (is_chromeos_ash) { - sources += [ - "scoped_test_nss_chromeos_user.cc", - "scoped_test_nss_chromeos_user.h", - "scoped_test_system_nss_key_slot.cc", - "scoped_test_system_nss_key_slot.h", - ] - } - - deps = [ - ":crypto", - "//base", - ] -} diff --git a/src/net/BUILD.gn b/src/net/BUILD.gn index f0493cfd84..c6a235b5bd 100644 --- a/src/net/BUILD.gn +++ b/src/net/BUILD.gn @@ -10,8 +10,6 @@ import("//build/config/cronet/config.gni") import("//build/config/features.gni") import("//crypto/features.gni") import("//net/features.gni") -import("//testing/libfuzzer/fuzzer_test.gni") -import("//testing/test.gni") import("//third_party/icu/config.gni") import("//third_party/protobuf/proto_library.gni") import("//tools/grit/grit_rule.gni") @@ -1684,7 +1682,6 @@ source_set("net_deps") { ":cronet_buildflags", ":isolation_info_proto", ":net_export_header", - ":net_resources", ":preload_decoder", "//base", "//base/third_party/dynamic_annotations", @@ -1789,14 +1786,6 @@ component("uri_template") { public_deps = [ "//base" ] } -grit("net_resources") { - source = "base/net_resources.grd" - outputs = [ - "grit/net_resources.h", - "net_resources.pak", - ] -} - proto_library("net_nqe_proto") { visibility = [ ":net_public_deps" ] @@ -1816,49 +1805,6 @@ proto_library("isolation_info_proto") { sources = [ "base/isolation_info.proto" ] } -component("extras") { - sources = [ - "extras/sqlite/cookie_crypto_delegate.h", - "extras/sqlite/sqlite_persistent_cookie_store.cc", - "extras/sqlite/sqlite_persistent_cookie_store.h", - "extras/sqlite/sqlite_persistent_shared_dictionary_store.cc", - "extras/sqlite/sqlite_persistent_shared_dictionary_store.h", - "extras/sqlite/sqlite_persistent_store_backend_base.cc", - "extras/sqlite/sqlite_persistent_store_backend_base.h", - ] - defines = [ "IS_NET_EXTRAS_IMPL" ] - configs += [ "//build/config/compiler:wexit_time_destructors" ] - deps = [ - ":net", - "//base", - "//sql:sql", - ] - public_deps = [ ":shared_dictionary" ] - - if (enable_reporting) { - sources += [ - "extras/sqlite/sqlite_persistent_reporting_and_nel_store.cc", - "extras/sqlite/sqlite_persistent_reporting_and_nel_store.h", - ] - } -} - -component("shared_dictionary") { - sources = [ - "extras/shared_dictionary/shared_dictionary_info.cc", - "extras/shared_dictionary/shared_dictionary_info.h", - "extras/shared_dictionary/shared_dictionary_isolation_key.cc", - "extras/shared_dictionary/shared_dictionary_isolation_key.h", - "extras/shared_dictionary/shared_dictionary_usage_info.h", - ] - defines = [ "IS_NET_SHARED_DICTIONARY_IMPL" ] - configs += [ "//build/config/compiler:wexit_time_destructors" ] - deps = [ - ":net", - "//base", - ] -} - static_library("preload_decoder") { sources = [ "extras/preload_data/decoder.cc", @@ -1866,2189 +1812,3 @@ static_library("preload_decoder") { ] deps = [ "//base" ] } - -if (!is_ios) { - executable("dump_cache") { - testonly = true - sources = [ - "tools/dump_cache/dump_cache.cc", - "tools/dump_cache/dump_files.cc", - "tools/dump_cache/dump_files.h", - ] - - deps = [ - ":net", - ":test_support", - "//base", - "//build/win:default_exe_manifest", - ] - } -} - -if (is_ios) { - bundle_data_from_filelist("test_support_bundle_data") { - visibility = [ ":test_support" ] - testonly = true - filelist_name = "data/test_support_bundle_data.filelist" - } -} - -static_library("gtest_util") { - testonly = true - sources = [ - "test/gtest_util.h", - "test/scoped_disable_exit_on_dfatal.cc", - "test/scoped_disable_exit_on_dfatal.h", - ] - public_deps = [ - "//base", - "//base/test:test_support", - "//net", - "//testing/gmock", - "//testing/gtest", - ] -} - -static_library("test_support") { - testonly = true - sources = [ - "base/connection_endpoint_metadata_test_util.cc", - "base/connection_endpoint_metadata_test_util.h", - "base/load_timing_info_test_util.cc", - "base/load_timing_info_test_util.h", - "base/mock_file_stream.cc", - "base/mock_file_stream.h", - "base/mock_network_change_notifier.cc", - "base/mock_network_change_notifier.h", - "base/test_completion_callback.cc", - "base/test_completion_callback.h", - "base/test_data_stream.cc", - "base/test_data_stream.h", - "cert/mock_cert_net_fetcher.cc", - "cert/mock_cert_net_fetcher.h", - "cert/mock_cert_verifier.cc", - "cert/mock_cert_verifier.h", - "cert/mock_client_cert_verifier.cc", - "cert/mock_client_cert_verifier.h", - "cert/pki/mock_signature_verify_cache.cc", - "cert/pki/mock_signature_verify_cache.h", - "cookies/canonical_cookie_test_helpers.h", - "cookies/cookie_change_dispatcher_test_helpers.cc", - "cookies/cookie_change_dispatcher_test_helpers.h", - "cookies/cookie_monster_store_test.cc", - "cookies/cookie_monster_store_test.h", - "cookies/cookie_store_change_unittest.h", - "cookies/cookie_store_test_callbacks.cc", - "cookies/cookie_store_test_callbacks.h", - "cookies/cookie_store_test_helpers.cc", - "cookies/cookie_store_test_helpers.h", - "cookies/cookie_store_unittest.h", - "cookies/test_cookie_access_delegate.cc", - "cookies/test_cookie_access_delegate.h", - "disk_cache/disk_cache_test_base.cc", - "disk_cache/disk_cache_test_base.h", - "disk_cache/disk_cache_test_util.cc", - "disk_cache/disk_cache_test_util.h", - "disk_cache/mock/mock_backend_impl.cc", - "disk_cache/mock/mock_backend_impl.h", - "disk_cache/mock/mock_entry_impl.cc", - "disk_cache/mock/mock_entry_impl.h", - "filter/filter_source_stream_test_util.cc", - "filter/filter_source_stream_test_util.h", - "filter/mock_source_stream.cc", - "filter/mock_source_stream.h", - "http/http_stream_factory_test_util.cc", - "http/http_stream_factory_test_util.h", - "http/http_transaction_test_util.cc", - "http/http_transaction_test_util.h", - "http/mock_http_cache.cc", - "http/mock_http_cache.h", - "http/transport_security_state_test_util.cc", - "http/transport_security_state_test_util.h", - "log/test_net_log.cc", - "log/test_net_log.h", - "log/test_net_log_util.cc", - "log/test_net_log_util.h", - "nqe/network_quality_estimator_test_util.cc", - "nqe/network_quality_estimator_test_util.h", - "proxy_resolution/mock_pac_file_fetcher.cc", - "proxy_resolution/mock_pac_file_fetcher.h", - "proxy_resolution/mock_proxy_resolver.cc", - "proxy_resolution/mock_proxy_resolver.h", - "proxy_resolution/proxy_config_service_common_unittest.cc", - "proxy_resolution/proxy_config_service_common_unittest.h", - "socket/read_buffering_stream_socket.cc", - "socket/read_buffering_stream_socket.h", - "socket/socket_test_util.cc", - "socket/socket_test_util.h", - "socket/transport_client_socket_test_util.cc", - "socket/transport_client_socket_test_util.h", - "spdy/spdy_test_util_common.cc", - "spdy/spdy_test_util_common.h", - "ssl/client_cert_identity_test_util.cc", - "ssl/client_cert_identity_test_util.h", - "ssl/ssl_private_key_test_util.cc", - "ssl/ssl_private_key_test_util.h", - "ssl/test_ssl_config_service.cc", - "ssl/test_ssl_config_service.h", - "ssl/test_ssl_private_key.cc", - "ssl/test_ssl_private_key.h", - "test/cert_builder.cc", - "test/cert_builder.h", - "test/cert_test_util.cc", - "test/cert_test_util.h", - "test/ct_test_util.cc", - "test/ct_test_util.h", - "test/embedded_test_server/connection_tracker.cc", - "test/embedded_test_server/connection_tracker.h", - "test/embedded_test_server/controllable_http_response.cc", - "test/embedded_test_server/controllable_http_response.h", - "test/embedded_test_server/default_handlers.cc", - "test/embedded_test_server/default_handlers.h", - "test/embedded_test_server/embedded_test_server.cc", - "test/embedded_test_server/embedded_test_server.h", - "test/embedded_test_server/embedded_test_server_connection_listener.cc", - "test/embedded_test_server/embedded_test_server_connection_listener.h", - "test/embedded_test_server/http1_connection.cc", - "test/embedded_test_server/http1_connection.h", - "test/embedded_test_server/http2_connection.cc", - "test/embedded_test_server/http2_connection.h", - "test/embedded_test_server/http_connection.cc", - "test/embedded_test_server/http_connection.h", - "test/embedded_test_server/http_request.cc", - "test/embedded_test_server/http_request.h", - "test/embedded_test_server/http_response.cc", - "test/embedded_test_server/http_response.h", - "test/embedded_test_server/request_handler_util.cc", - "test/embedded_test_server/request_handler_util.h", - "test/embedded_test_server/simple_connection_listener.cc", - "test/embedded_test_server/simple_connection_listener.h", - "test/event_waiter.h", - "test/key_util.cc", - "test/key_util.h", - "test/net_test_suite.cc", - "test/net_test_suite.h", - "test/quic_simple_test_server.cc", - "test/quic_simple_test_server.h", - "test/revocation_builder.cc", - "test/revocation_builder.h", - "test/ssl_test_util.cc", - "test/ssl_test_util.h", - "test/test_certificate_data.h", - "test/test_data_directory.cc", - "test/test_data_directory.h", - "test/test_doh_server.cc", - "test/test_doh_server.h", - "test/test_with_task_environment.h", - "test/url_request/ssl_certificate_error_job.cc", - "test/url_request/ssl_certificate_error_job.h", - "test/url_request/url_request_failed_job.cc", - "test/url_request/url_request_failed_job.h", - "test/url_request/url_request_hanging_read_job.cc", - "test/url_request/url_request_hanging_read_job.h", - "test/url_request/url_request_mock_data_job.cc", - "test/url_request/url_request_mock_data_job.h", - "url_request/url_request_test_job.cc", - "url_request/url_request_test_job.h", - "url_request/url_request_test_util.cc", - "url_request/url_request_test_util.h", - ] - - if (is_linux || is_chromeos || is_android) { - sources += [ - "base/address_tracker_linux_test_util.cc", - "base/address_tracker_linux_test_util.h", - ] - } - - configs += [ "//build/config:precompiled_headers" ] - - public_deps = [ - ":cronet_buildflags", - ":gtest_util", - "//base", - "//base/test:test_support", - "//crypto", - "//net", - "//net/dns:test_support", - "//net/tools/tld_cleanup", - "//net/traffic_annotation:test_support", - "//testing/gmock", - "//testing/gtest", - "//url", - ] - - deps = [ - ":quic_test_flags_utils", - ":simple_quic_tools", - "//net/http:transport_security_state_unittest_data_default", - "//third_party/zlib", - ] - - allow_circular_includes_from = [ "//net/dns:test_support" ] - - # Data dependencies shared with suites other than net_unittests. - data = [ - "data/cert_net_fetcher_impl_unittest/", - "data/dns/", - "data/ov_name_constraints/", - "data/parse_certificate_unittest/", - "data/ssl/", - "data/url_request_unittest/", - "data/websocket/", - ] - - if (is_mac) { - frameworks = [ "Security.framework" ] - } - - if (is_ios) { - deps += [ ":test_support_bundle_data" ] - } - - if (use_nss_certs) { - configs += [ "//build/config/linux/nss" ] - } - - if (enable_websockets || (is_cronet_build && !is_ios)) { - sources += [ - "test/spawned_test_server/base_test_server.cc", - "test/spawned_test_server/base_test_server.h", - "test/spawned_test_server/spawned_test_server.h", - ] - } - - public_configs = [ ":net_test_config" ] - - if (use_remote_test_server) { - sources += [ - "test/spawned_test_server/remote_test_server.cc", - "test/spawned_test_server/remote_test_server.h", - "test/spawned_test_server/remote_test_server_spawner_request.cc", - "test/spawned_test_server/remote_test_server_spawner_request.h", - ] - } else if (!is_ios) { - sources += [ - "test/spawned_test_server/local_test_server.cc", - "test/spawned_test_server/local_test_server.h", - ] - if (is_win) { - sources += [ "test/spawned_test_server/local_test_server_win.cc" ] - } else if (is_posix || is_fuchsia) { - sources += [ "test/spawned_test_server/local_test_server_posix.cc" ] - } - } - - if (enable_python_utils) { - sources += [ - "test/python_utils.cc", - "test/python_utils.h", - ] - } - - if (use_nss_certs) { - sources += [ "test/cert_test_util_nss.cc" ] - } - - if (!disable_file_support) { - sources += [ - "test/url_request/url_request_mock_http_job.cc", - "test/url_request/url_request_mock_http_job.h", - "test/url_request/url_request_test_job_backed_by_file.cc", - "test/url_request/url_request_test_job_backed_by_file.h", - ] - } - - if (enable_reporting) { - sources += [ - "network_error_logging/mock_persistent_nel_store.cc", - "network_error_logging/mock_persistent_nel_store.h", - "network_error_logging/network_error_logging_test_util.cc", - "network_error_logging/network_error_logging_test_util.h", - "reporting/mock_persistent_reporting_store.cc", - "reporting/mock_persistent_reporting_store.h", - "reporting/reporting_test_util.cc", - "reporting/reporting_test_util.h", - ] - } -} - -if (!is_ios && !is_android) { - executable("cert_verify_tool") { - testonly = true - sources = [ - "tools/cert_verify_tool/cert_verify_tool.cc", - "tools/cert_verify_tool/cert_verify_tool_util.cc", - "tools/cert_verify_tool/cert_verify_tool_util.h", - "tools/cert_verify_tool/verify_using_cert_verify_proc.cc", - "tools/cert_verify_tool/verify_using_cert_verify_proc.h", - "tools/cert_verify_tool/verify_using_path_builder.cc", - "tools/cert_verify_tool/verify_using_path_builder.h", - ] - - deps = [ - ":net", - ":test_support", - "//base", - "//build/win:default_exe_manifest", - ] - - if (is_mac) { - frameworks = [ "Security.framework" ] - } - } - - proto_library("cert_verify_comparison_tool_proto") { - sources = [ "tools/cert_verify_tool/dumper.proto" ] - - visibility = [ ":cert_verify_comparison_tool" ] - } - - executable("cert_verify_comparison_tool") { - testonly = true - sources = [ - "tools/cert_verify_tool/cert_verify_comparision_tool.cc", - "tools/cert_verify_tool/cert_verify_tool_util.cc", - "tools/cert_verify_tool/cert_verify_tool_util.h", - "tools/cert_verify_tool/verify_using_cert_verify_proc.cc", - "tools/cert_verify_tool/verify_using_cert_verify_proc.h", - ] - - deps = [ - ":cert_verify_comparison_tool_proto", - ":net", - ":test_support", - "//base", - "//build/win:default_exe_manifest", - ] - - if (is_mac) { - frameworks = [ "Security.framework" ] - } - } - - executable("crash_cache") { - testonly = true - sources = [ "tools/crash_cache/crash_cache.cc" ] - - deps = [ - ":net", - ":test_support", - "//base", - "//build/win:default_exe_manifest", - ] - } - - executable("hpack_example_generator") { - testonly = true - sources = [ "spdy/fuzzing/hpack_example_generator.cc" ] - - deps = [ - ":net", - ":spdy_test_tools", - "//base", - "//build/win:default_exe_manifest", - ] - } - - executable("net_watcher") { - testonly = true - sources = [ "tools/net_watcher/net_watcher.cc" ] - deps = [ - ":net", - "//base", - "//build:chromeos_buildflags", - "//build/win:default_exe_manifest", - ] - } - - executable("run_testserver") { - testonly = true - sources = [ "tools/testserver/run_testserver.cc" ] - deps = [ - ":test_support", - "//base", - "//base/test:test_support", - "//build/win:default_exe_manifest", - "//testing/gtest", - ] - } - - executable("stress_cache") { - testonly = true - sources = [ "tools/stress_cache/stress_cache.cc" ] - - deps = [ - ":net", - ":test_support", - "//base", - "//build/win:default_exe_manifest", - ] - } - - executable("tld_cleanup") { - sources = [ "tools/tld_cleanup/tld_cleanup.cc" ] - - deps = [ - "//base", - "//base:i18n", - "//build/win:default_exe_manifest", - "//net/tools/tld_cleanup", - ] - } -} - -if (use_external_gssapi) { - # In order for the tests to be reliable, these two targets cannot depend on a - # valid GSSAPI library. This is easy to achieve on most platforms. But on - # macOS care must be taken to not depend directly or indirectly on - # GSS.framework. This is suprisingly easy to get wrong since - # Security.framework is such a common dependency and it indirectly depends on - # GSS. - shared_library("test_gssapi") { - testonly = true - sources = [ - "tools/gssapi/gss_import_name.cc", - "tools/gssapi/gss_methods.cc", - "tools/gssapi/gss_types.h", - ] - } - - shared_library("test_badgssapi") { - testonly = true - sources = [ - "tools/gssapi/gss_methods.cc", - "tools/gssapi/gss_types.h", - ] - } -} - -if (is_linux || is_chromeos || is_mac) { - executable("cachetool") { - testonly = true - sources = [ "tools/cachetool/cachetool.cc" ] - deps = [ - ":net", - ":test_support", - "//base", - ] - } - - executable("content_decoder_tool") { - testonly = true - sources = [ - "tools/content_decoder_tool/content_decoder_tool.cc", - "tools/content_decoder_tool/content_decoder_tool.h", - "tools/content_decoder_tool/content_decoder_tool_bin.cc", - ] - deps = [ - ":net", - ":test_support", - "//base", - "//url", - ] - } -} - -if (is_android) { - generate_jni("net_jni_headers") { - sources = [ - "android/java/src/org/chromium/net/AndroidCertVerifyResult.java", - "android/java/src/org/chromium/net/AndroidKeyStore.java", - "android/java/src/org/chromium/net/AndroidNetworkLibrary.java", - "android/java/src/org/chromium/net/AndroidTrafficStats.java", - "android/java/src/org/chromium/net/DnsStatus.java", - "android/java/src/org/chromium/net/GURLUtils.java", - "android/java/src/org/chromium/net/HttpNegotiateAuthenticator.java", - "android/java/src/org/chromium/net/HttpUtil.java", - "android/java/src/org/chromium/net/NetStringUtil.java", - "android/java/src/org/chromium/net/NetworkActiveNotifier.java", - "android/java/src/org/chromium/net/NetworkChangeNotifier.java", - "android/java/src/org/chromium/net/ProxyChangeListener.java", - "android/java/src/org/chromium/net/X509Util.java", - ] - } -} - -if (is_android || is_linux || is_chromeos) { - executable("disk_cache_memory_test") { - testonly = true - sources = [ "tools/disk_cache_memory_test/disk_cache_memory_test.cc" ] - deps = [ - ":net", - "//base", - ] - } -} - -source_set("spdy_test_tools") { - testonly = true - sources = [ - "spdy/fuzzing/hpack_fuzz_util.cc", - "spdy/fuzzing/hpack_fuzz_util.h", - ] - deps = [ - ":net", - "//base", - "//testing/gmock", - "//testing/gtest", - ] -} - -source_set("quic_test_flags_utils") { - testonly = true - sources = [ - "quic/platform/impl/quic_test_flags_utils.cc", - "quic/platform/impl/quic_test_flags_utils.h", - ] - deps = [ ":net" ] -} - -source_set("quic_test_tools") { - testonly = true - sources = [ - "quic/crypto_test_utils_chromium.cc", - "quic/crypto_test_utils_chromium.h", - "quic/mock_crypto_client_stream.cc", - "quic/mock_crypto_client_stream.h", - "quic/mock_crypto_client_stream_factory.cc", - "quic/mock_crypto_client_stream_factory.h", - "quic/mock_decrypter.cc", - "quic/mock_decrypter.h", - "quic/mock_encrypter.cc", - "quic/mock_encrypter.h", - "quic/mock_quic_context.cc", - "quic/mock_quic_context.h", - "quic/test_task_runner.cc", - "quic/test_task_runner.h", - ] - deps = [ - ":net", - ":simple_quic_tools", - ":test_support", - "//base", - "//crypto:test_support", - "//testing/gmock", - "//testing/gtest", - "//third_party/boringssl", - "//third_party/protobuf:protobuf_lite", - "//third_party/quic_trace:quic_trace_proto", - ] - public_deps = [ - ":quic_test_flags_utils", - "//net/third_party/quiche:quiche_test_support", - ] -} - -source_set("simple_quic_tools") { - sources = [ - "tools/quic/quic_client_message_loop_network_helper.cc", - "tools/quic/quic_client_message_loop_network_helper.h", - "tools/quic/quic_simple_client.cc", - "tools/quic/quic_simple_client.h", - "tools/quic/quic_simple_server.cc", - "tools/quic/quic_simple_server.h", - "tools/quic/quic_simple_server_packet_writer.cc", - "tools/quic/quic_simple_server_packet_writer.h", - "tools/quic/quic_simple_server_session_helper.cc", - "tools/quic/quic_simple_server_session_helper.h", - "tools/quic/quic_simple_server_socket.cc", - "tools/quic/quic_simple_server_socket.h", - "tools/quic/synchronous_host_resolver.cc", - "tools/quic/synchronous_host_resolver.h", - ] - deps = [ - ":net", - "//base", - "//base/third_party/dynamic_annotations", - "//net/third_party/quiche:quiche_tool_support", - "//third_party/protobuf:protobuf_lite", - "//url", - ] - public_deps = [ "//net/third_party/quiche:quiche_tool_support" ] -} - -if (!is_ios) { - executable("quic_client") { - testonly = true - sources = [ "tools/quic/quic_simple_client_bin.cc" ] - deps = [ - ":net", - ":simple_quic_tools", - "//base", - "//build/win:default_exe_manifest", - "//net/third_party/quiche:quic_client_core", - "//url", - ] - } - executable("quic_server") { - sources = [ - "tools/quic/quic_simple_server_backend_factory.cc", - "tools/quic/quic_simple_server_backend_factory.h", - "tools/quic/quic_simple_server_bin.cc", - ] - deps = [ - ":net", - ":simple_quic_tools", - "//base", - "//build/win:default_exe_manifest", - "//net/third_party/quiche:quic_server_core", - "//third_party/boringssl", - "//third_party/protobuf:protobuf_lite", - ] - } - executable("crypto_message_printer") { - sources = [ "tools/quic/crypto_message_printer_bin.cc" ] - deps = [ - ":net", - "//base", - "//build/win:default_exe_manifest", - ] - } -} - -if (is_ios) { - bundle_data_from_filelist("net_test_bundle_data") { - testonly = true - filelist_name = "data/test_bundle_data.filelist" - } -} - -test("net_unittests") { - sources = [ - "base/address_family_unittest.cc", - "base/address_list_unittest.cc", - "base/backoff_entry_serializer_unittest.cc", - "base/backoff_entry_unittest.cc", - "base/chunked_upload_data_stream_unittest.cc", - "base/data_url_unittest.cc", - "base/datagram_buffer_unittest.cc", - "base/elements_upload_data_stream_unittest.cc", - "base/expiring_cache_unittest.cc", - "base/file_stream_unittest.cc", - "base/filename_util_unittest.cc", - "base/host_mapping_rules_unittest.cc", - "base/host_port_pair_unittest.cc", - "base/interval_test.cc", - "base/ip_address_unittest.cc", - "base/ip_endpoint_unittest.cc", - "base/isolation_info_unittest.cc", - "base/lookup_string_in_fixed_set_unittest.cc", - "base/mime_sniffer_unittest.cc", - "base/mime_util_unittest.cc", - "base/net_errors_unittest.cc", - "base/net_string_util_unittest.cc", - "base/network_activity_monitor_unittest.cc", - "base/network_anonymization_key_unittest.cc", - "base/network_change_notifier_unittest.cc", - "base/network_delegate_unittest.cc", - "base/network_interfaces_unittest.cc", - "base/network_isolation_key_unittest.cc", - "base/parse_number_unittest.cc", - "base/port_util_unittest.cc", - "base/prioritized_dispatcher_unittest.cc", - "base/prioritized_task_runner_unittest.cc", - "base/priority_queue_unittest.cc", - "base/proxy_server_unittest.cc", - "base/proxy_string_util_unittest.cc", - "base/registry_controlled_domains/registry_controlled_domain_unittest.cc", - "base/scheme_host_port_matcher_rule_unittest.cc", - "base/scheme_host_port_matcher_unittest.cc", - "base/schemeful_site_unittest.cc", - "base/test_completion_callback_unittest.cc", - "base/test_proxy_delegate.cc", - "base/test_proxy_delegate.h", - "base/upload_bytes_element_reader_unittest.cc", - "base/upload_file_element_reader_unittest.cc", - "base/url_search_params_unittest.cc", - "base/url_util_unittest.cc", - "cert/caching_cert_verifier_unittest.cc", - "cert/cert_and_ct_verifier_unittest.cc", - "cert/cert_database_unittest.cc", - "cert/cert_verifier_unittest.cc", - "cert/cert_verify_proc_builtin_unittest.cc", - "cert/cert_verify_proc_unittest.cc", - "cert/coalescing_cert_verifier_unittest.cc", - "cert/crl_set_unittest.cc", - "cert/ct_log_response_parser_unittest.cc", - "cert/ct_log_verifier_unittest.cc", - "cert/ct_objects_extractor_unittest.cc", - "cert/ct_serialization_unittest.cc", - "cert/ev_root_ca_metadata_unittest.cc", - "cert/internal/cert_issuer_source_aia_unittest.cc", - "cert/internal/cert_issuer_source_sync_unittest.cc", - "cert/internal/revocation_checker_unittest.cc", - "cert/internal/system_trust_store_unittest.cc", - "cert/known_roots_unittest.cc", - "cert/merkle_audit_proof_unittest.cc", - "cert/merkle_tree_leaf_unittest.cc", - "cert/multi_log_ct_verifier_unittest.cc", - "cert/multi_threaded_cert_verifier_unittest.cc", - "cert/pem_unittest.cc", - "cert/pki/cert_issuer_source_static_unittest.cc", - "cert/pki/cert_issuer_source_sync_unittest.h", - "cert/pki/certificate_policies_unittest.cc", - "cert/pki/crl_unittest.cc", - "cert/pki/extended_key_usage_unittest.cc", - "cert/pki/general_names_unittest.cc", - "cert/pki/ip_util_unittest.cc", - "cert/pki/name_constraints_unittest.cc", - "cert/pki/nist_pkits_unittest.cc", - "cert/pki/nist_pkits_unittest.h", - "cert/pki/ocsp_unittest.cc", - "cert/pki/parse_certificate_unittest.cc", - "cert/pki/parse_name_unittest.cc", - "cert/pki/parsed_certificate_unittest.cc", - "cert/pki/path_builder_pkits_unittest.cc", - "cert/pki/path_builder_unittest.cc", - "cert/pki/path_builder_verify_certificate_chain_unittest.cc", - "cert/pki/revocation_util_unittest.cc", - "cert/pki/signature_algorithm_unittest.cc", - "cert/pki/simple_path_builder_delegate_unittest.cc", - "cert/pki/string_util_unittest.cc", - "cert/pki/test_helpers.cc", - "cert/pki/test_helpers.h", - "cert/pki/trust_store_collection_unittest.cc", - "cert/pki/trust_store_unittest.cc", - "cert/pki/verify_certificate_chain_pkits_unittest.cc", - "cert/pki/verify_certificate_chain_typed_unittest.h", - "cert/pki/verify_certificate_chain_unittest.cc", - "cert/pki/verify_name_match_unittest.cc", - "cert/pki/verify_signed_data_unittest.cc", - "cert/signed_certificate_timestamp_unittest.cc", - "cert/symantec_certs_unittest.cc", - "cert/test_root_certs_unittest.cc", - "cert/time_conversions_unittest.cc", - "cert/x509_cert_types_unittest.cc", - "cert/x509_certificate_unittest.cc", - "cert/x509_util_unittest.cc", - "cert_net/cert_net_fetcher_url_request_unittest.cc", - "cookies/canonical_cookie_unittest.cc", - "cookies/cookie_constants_unittest.cc", - "cookies/cookie_deletion_info_unittest.cc", - "cookies/cookie_inclusion_status_unittest.cc", - "cookies/cookie_monster_unittest.cc", - "cookies/cookie_options_unittest.cc", - "cookies/cookie_partition_key_collection_unittest.cc", - "cookies/cookie_partition_key_unittest.cc", - "cookies/cookie_util_unittest.cc", - "cookies/parsed_cookie_unittest.cc", - "cookies/site_for_cookies_unittest.cc", - "cookies/static_cookie_policy_unittest.cc", - "der/encode_values_unittest.cc", - "der/input_unittest.cc", - "der/parse_values_unittest.cc", - "der/parser_unittest.cc", - "disk_cache/backend_cleanup_tracker_unittest.cc", - "disk_cache/backend_unittest.cc", - "disk_cache/blockfile/addr_unittest.cc", - "disk_cache/blockfile/bitmap_unittest.cc", - "disk_cache/blockfile/block_files_unittest.cc", - "disk_cache/blockfile/mapped_file_unittest.cc", - "disk_cache/blockfile/stats_unittest.cc", - "disk_cache/blockfile/storage_block_unittest.cc", - "disk_cache/cache_util_unittest.cc", - "disk_cache/entry_unittest.cc", - "disk_cache/simple/simple_file_enumerator_unittest.cc", - "disk_cache/simple/simple_file_tracker_unittest.cc", - "disk_cache/simple/simple_index_file_unittest.cc", - "disk_cache/simple/simple_index_unittest.cc", - "disk_cache/simple/simple_test_util.cc", - "disk_cache/simple/simple_test_util.h", - "disk_cache/simple/simple_util_unittest.cc", - "disk_cache/simple/simple_version_upgrade_unittest.cc", - "filter/filter_source_stream_unittest.cc", - "filter/gzip_source_stream_unittest.cc", - "first_party_sets/addition_overlaps_union_find_unittest.cc", - "first_party_sets/first_party_set_entry_override_unittest.cc", - "first_party_sets/first_party_sets_cache_filter_unittest.cc", - "first_party_sets/first_party_sets_context_config_unittest.cc", - "first_party_sets/global_first_party_sets_unittest.cc", - "http/alternative_service_unittest.cc", - "http/bidirectional_stream_unittest.cc", - "http/broken_alternative_services_unittest.cc", - "http/http_auth_cache_unittest.cc", - "http/http_auth_challenge_tokenizer_unittest.cc", - "http/http_auth_controller_unittest.cc", - "http/http_auth_filter_unittest.cc", - "http/http_auth_handler_basic_unittest.cc", - "http/http_auth_handler_digest_unittest.cc", - "http/http_auth_handler_factory_unittest.cc", - "http/http_auth_handler_mock.cc", - "http/http_auth_handler_mock.h", - "http/http_auth_handler_unittest.cc", - "http/http_auth_multi_round_parse_unittest.cc", - "http/http_auth_preferences_unittest.cc", - "http/http_auth_unittest.cc", - "http/http_basic_state_unittest.cc", - "http/http_byte_range_unittest.cc", - "http/http_cache_unittest.cc", - "http/http_cache_writers_unittest.cc", - "http/http_chunked_decoder_unittest.cc", - "http/http_content_disposition_unittest.cc", - "http/http_log_util_unittest.cc", - "http/http_network_layer_unittest.cc", - "http/http_network_transaction_unittest.cc", - "http/http_no_vary_search_data_unittest.cc", - "http/http_proxy_client_socket_unittest.cc", - "http/http_proxy_connect_job_unittest.cc", - "http/http_request_headers_unittest.cc", - "http/http_request_info_unittest.cc", - "http/http_response_body_drainer_unittest.cc", - "http/http_response_headers_unittest.cc", - "http/http_response_info_unittest.cc", - "http/http_security_headers_unittest.cc", - "http/http_server_properties_manager_unittest.cc", - "http/http_server_properties_unittest.cc", - "http/http_status_code_unittest.cc", - "http/http_stream_factory_job_controller_unittest.cc", - "http/http_stream_factory_unittest.cc", - "http/http_stream_parser_unittest.cc", - "http/http_stream_request_unittest.cc", - "http/http_util_unittest.cc", - "http/http_vary_data_unittest.cc", - "http/mock_allow_http_auth_preferences.cc", - "http/mock_allow_http_auth_preferences.h", - "http/test_upload_data_stream_not_allow_http1.cc", - "http/test_upload_data_stream_not_allow_http1.h", - "http/transport_security_persister_unittest.cc", - "http/transport_security_state_unittest.cc", - "http/url_security_manager_unittest.cc", - "log/file_net_log_observer_unittest.cc", - "log/net_log_capture_mode_unittest.cc", - "log/net_log_unittest.cc", - "log/net_log_util_unittest.cc", - "log/net_log_values_unittest.cc", - "nqe/effective_connection_type_unittest.cc", - "nqe/event_creator_unittest.cc", - "nqe/network_id_unittest.cc", - "nqe/network_qualities_prefs_manager_unittest.cc", - "nqe/network_quality_estimator_params_unittest.cc", - "nqe/network_quality_estimator_unittest.cc", - "nqe/network_quality_estimator_util_unittest.cc", - "nqe/network_quality_store_unittest.cc", - "nqe/observation_buffer_unittest.cc", - "nqe/socket_watcher_unittest.cc", - "nqe/throughput_analyzer_unittest.cc", - "proxy_resolution/configured_proxy_resolution_service_unittest.cc", - "proxy_resolution/multi_threaded_proxy_resolver_unittest.cc", - "proxy_resolution/network_delegate_error_observer_unittest.cc", - "proxy_resolution/pac_file_decider_unittest.cc", - "proxy_resolution/pac_file_fetcher_impl_unittest.cc", - "proxy_resolution/proxy_bypass_rules_unittest.cc", - "proxy_resolution/proxy_config_unittest.cc", - "proxy_resolution/proxy_info_unittest.cc", - "proxy_resolution/proxy_list_unittest.cc", - "quic/bidirectional_stream_quic_impl_unittest.cc", - "quic/crypto/proof_test_chromium.cc", - "quic/crypto/proof_verifier_chromium_test.cc", - "quic/dedicated_web_transport_http3_client_test.cc", - "quic/mock_quic_data.cc", - "quic/mock_quic_data.h", - "quic/network_connection_unittest.cc", - "quic/platform/impl/quic_chromium_clock_test.cc", - "quic/properties_based_quic_server_info_test.cc", - "quic/quic_address_mismatch_test.cc", - "quic/quic_chromium_alarm_factory_test.cc", - "quic/quic_chromium_client_session_peer.cc", - "quic/quic_chromium_client_session_peer.h", - "quic/quic_chromium_client_session_test.cc", - "quic/quic_chromium_client_stream_test.cc", - "quic/quic_chromium_connection_helper_test.cc", - "quic/quic_clock_skew_detector_test.cc", - "quic/quic_end_to_end_unittest.cc", - "quic/quic_http_stream_test.cc", - "quic/quic_http_utils_test.cc", - "quic/quic_network_transaction_unittest.cc", - "quic/quic_proxy_client_socket_unittest.cc", - "quic/quic_stream_factory_peer.cc", - "quic/quic_stream_factory_peer.h", - "quic/quic_stream_factory_test.cc", - "quic/quic_test_packet_maker.cc", - "quic/quic_test_packet_maker.h", - "quic/quic_test_packet_printer.cc", - "quic/quic_test_packet_printer.h", - "quic/set_quic_flag_test.cc", - "quic/test_quic_crypto_client_config_handle.cc", - "quic/test_quic_crypto_client_config_handle.h", - "socket/client_socket_pool_base_unittest.cc", - "socket/client_socket_pool_unittest.cc", - "socket/connect_job_factory_unittest.cc", - "socket/connect_job_test_util.cc", - "socket/connect_job_test_util.h", - "socket/connect_job_unittest.cc", - "socket/mock_client_socket_pool_manager.cc", - "socket/mock_client_socket_pool_manager.h", - "socket/sequenced_socket_data_unittest.cc", - "socket/socket_bio_adapter_unittest.cc", - "socket/socket_tag_unittest.cc", - "socket/socks5_client_socket_unittest.cc", - "socket/socks_client_socket_unittest.cc", - "socket/socks_connect_job_unittest.cc", - "socket/ssl_client_socket_unittest.cc", - "socket/ssl_connect_job_unittest.cc", - "socket/ssl_server_socket_unittest.cc", - "socket/tcp_client_socket_unittest.cc", - "socket/tcp_server_socket_unittest.cc", - "socket/tcp_socket_unittest.cc", - "socket/transport_client_socket_pool_test_util.cc", - "socket/transport_client_socket_pool_test_util.h", - "socket/transport_client_socket_pool_unittest.cc", - "socket/transport_client_socket_unittest.cc", - "socket/transport_connect_job_unittest.cc", - "socket/udp_socket_unittest.cc", - "socket/websocket_endpoint_lock_manager_unittest.cc", - "socket/websocket_transport_client_socket_pool_unittest.cc", - "spdy/alps_decoder_test.cc", - "spdy/bidirectional_stream_spdy_impl_unittest.cc", - "spdy/buffered_spdy_framer_unittest.cc", - "spdy/fuzzing/hpack_fuzz_util_test.cc", - "spdy/header_coalescer_test.cc", - "spdy/http2_priority_dependencies_unittest.cc", - "spdy/spdy_buffer_unittest.cc", - "spdy/spdy_http_stream_unittest.cc", - "spdy/spdy_http_utils_unittest.cc", - "spdy/spdy_log_util_unittest.cc", - "spdy/spdy_network_transaction_unittest.cc", - "spdy/spdy_proxy_client_socket_unittest.cc", - "spdy/spdy_read_queue_unittest.cc", - "spdy/spdy_session_pool_unittest.cc", - "spdy/spdy_session_test_util.cc", - "spdy/spdy_session_test_util.h", - "spdy/spdy_session_unittest.cc", - "spdy/spdy_stream_test_util.cc", - "spdy/spdy_stream_test_util.h", - "spdy/spdy_stream_unittest.cc", - "spdy/spdy_write_queue_unittest.cc", - "ssl/client_cert_identity_unittest.cc", - "ssl/client_cert_store_unittest-inl.h", - "ssl/ssl_cipher_suite_names_unittest.cc", - "ssl/ssl_client_auth_cache_unittest.cc", - "ssl/ssl_client_session_cache_unittest.cc", - "ssl/ssl_config_service_unittest.cc", - "ssl/ssl_config_unittest.cc", - "ssl/ssl_connection_status_flags_unittest.cc", - "ssl/ssl_platform_key_util_unittest.cc", - "test/embedded_test_server/embedded_test_server_unittest.cc", - "test/embedded_test_server/http_request_unittest.cc", - "test/embedded_test_server/http_response_unittest.cc", - "test/run_all_unittests.cc", - "third_party/nist-pkits/pkits_testcases-inl.h", - "third_party/uri_template/uri_template_test.cc", - "tools/content_decoder_tool/content_decoder_tool.cc", - "tools/content_decoder_tool/content_decoder_tool.h", - "tools/content_decoder_tool/content_decoder_tool_unittest.cc", - "tools/quic/quic_simple_client_test.cc", - "tools/tld_cleanup/tld_cleanup_util_unittest.cc", - "url_request/redirect_info_unittest.cc", - "url_request/redirect_util_unittest.cc", - "url_request/report_sender_unittest.cc", - "url_request/url_request_context_builder_unittest.cc", - "url_request/url_request_filter_unittest.cc", - "url_request/url_request_http_job_unittest.cc", - "url_request/url_request_job_factory_unittest.cc", - "url_request/url_request_job_unittest.cc", - "url_request/url_request_quic_unittest.cc", - "url_request/url_request_throttler_simulation_unittest.cc", - "url_request/url_request_throttler_test_support.cc", - "url_request/url_request_throttler_test_support.h", - "url_request/url_request_throttler_unittest.cc", - "url_request/url_request_unittest.cc", - "url_request/view_cache_helper_unittest.cc", - ] - - if (!is_cronet_build) { - sources += [ - "extras/shared_dictionary/shared_dictionary_isolation_key_unittest.cc", - "extras/sqlite/sqlite_persistent_cookie_store_unittest.cc", - "extras/sqlite/sqlite_persistent_shared_dictionary_store_unittest.cc", - "log/trace_net_log_observer_unittest.cc", - ] - } - - if (is_android) { - sources += [ - "android/dummy_spnego_authenticator.cc", - "android/dummy_spnego_authenticator.h", - "android/http_auth_negotiate_android_unittest.cc", - "android/network_change_notifier_android_unittest.cc", - "android/network_library_unittest.cc", - "android/traffic_stats_unittest.cc", - "cert/cert_verify_proc_android_unittest.cc", - "proxy_resolution/proxy_config_service_android_unittest.cc", - "ssl/ssl_platform_key_android_unittest.cc", - ] - } - - if (is_chromeos_ash && use_nss_certs) { - sources += [ - "cert/nss_cert_database_chromeos_unittest.cc", - "cert/nss_profile_filter_chromeos_unittest.cc", - ] - } - - if (is_linux) { - sources += [ - "base/network_change_notifier_linux_unittest.cc", - "proxy_resolution/proxy_config_service_linux_unittest.cc", - ] - } - - if (is_linux || is_chromeos) { - sources += [ - "base/address_tracker_linux_unittest.cc", - "base/network_interfaces_linux_unittest.cc", - ] - } - - if (is_mac) { - sources += [ - "cert/internal/trust_store_mac_unittest.cc", - "ssl/client_cert_store_mac_unittest.cc", - "ssl/ssl_platform_key_mac_unittest.cc", - ] - } - - if (is_apple) { - sources += [ "cert/x509_util_apple_unittest.cc" ] - } - - if (is_win) { - sources += [ - "base/network_change_notifier_win_unittest.cc", - "base/network_interfaces_win_unittest.cc", - "http/http_auth_sspi_win_unittest.cc", - "http/mock_sspi_library_win.cc", - "http/mock_sspi_library_win.h", - "proxy_resolution/win/dhcp_pac_file_adapter_fetcher_win_unittest.cc", - "proxy_resolution/win/dhcp_pac_file_fetcher_win_unittest.cc", - "proxy_resolution/win/proxy_config_service_win_unittest.cc", - "proxy_resolution/win/windows_system_proxy_resolution_service_unittest.cc", - "ssl/client_cert_store_win_unittest.cc", - "ssl/ssl_platform_key_win_unittest.cc", - ] - } - - configs += [ "//build/config:precompiled_headers" ] - defines = [] - - deps = [ - ":cronet_buildflags", - ":net", - ":preload_decoder", - ":quic_test_tools", - ":simple_quic_tools", - ":spdy_test_tools", - ":test_support", - "//base", - "//base:i18n", - "//base/third_party/dynamic_annotations", - "//build:chromeos_buildflags", - "//crypto", - "//crypto:test_support", - "//net/base/registry_controlled_domains", - "//net/base/registry_controlled_domains:lookup_strings_test_sets", - "//net/dns:tests", - "//net/dns/public:tests", - "//net/http:transport_security_state_unittest_data", - "//net/http:transport_security_state_unittest_data_default", - "//net/third_party/quiche:quiche_tests", - "//net/tools/huffman_trie:huffman_trie_generator_sources", - "//testing/gmock", - "//testing/gtest", - "//third_party/protobuf:protobuf_lite", - "//third_party/zlib", - "//url", - "//url:buildflags", - ] - - if (enable_websockets) { - deps += [ "//net/server:tests" ] - } - - if (is_cronet_build) { - deps += [ "//third_party/perfetto/include/perfetto/test:test_support" ] - } else { - deps += [ - ":extras", - "//components/sqlite_proto", - "//sql", - "//sql:test_support", - ] - } - - if (is_posix) { - sources += [ "base/sockaddr_util_posix_unittest.cc" ] - } - - if (is_android || is_chromeos_ash) { - sources += [ "base/network_change_notifier_passive_unittest.cc" ] - } - - if (enable_reporting) { - sources += [ - "network_error_logging/mock_persistent_nel_store_unittest.cc", - "network_error_logging/network_error_logging_service_unittest.cc", - "reporting/mock_persistent_reporting_store_unittest.cc", - "reporting/reporting_browsing_data_remover_unittest.cc", - "reporting/reporting_cache_unittest.cc", - "reporting/reporting_delivery_agent_unittest.cc", - "reporting/reporting_endpoint_manager_unittest.cc", - "reporting/reporting_garbage_collector_unittest.cc", - "reporting/reporting_header_parser_unittest.cc", - "reporting/reporting_network_change_observer_unittest.cc", - "reporting/reporting_service_unittest.cc", - "reporting/reporting_uploader_unittest.cc", - ] - if (!is_cronet_build) { - sources += [ - "extras/sqlite/sqlite_persistent_reporting_and_nel_store_unittest.cc", - ] - } - } - - data = [ - "data/cache_tests/", - "data/certificate_policies_unittest/", - "data/cert_issuer_source_aia_unittest/", - "data/cert_issuer_source_static_unittest/", - "data/crl_unittest/", - "data/embedded_test_server/", - "data/file_stream_unittest/", - "data/filter_unittests/", - "data/gencerts/", - "data/name_constraints_unittest/", - "data/ocsp_unittest/", - "data/pac_file_fetcher_unittest/", - "data/path_builder_unittest/", - "data/quic_http_response_cache_data/", - "data/quic_http_response_cache_data_with_push/", - "data/spdy_tests/", - "data/test.html", - "data/trial_comparison_cert_verifier_unittest/", - "data/verify_certificate_chain_unittest/", - "data/verify_name_match_unittest/", - "data/verify_signed_data_unittest/", - ] - data_deps = [ - "third_party/nist-pkits/", - "//testing/buildbot/filters:net_unittests_filters", - ] - - if (is_linux || is_chromeos || is_mac || is_win || is_fuchsia) { - deps += [ "//third_party/pywebsocket3/" ] - data_deps += [ "//third_party/pywebsocket3/" ] - data += [ - "tools/testserver/", - "//third_party/pywebsocket3/src/mod_pywebsocket/", - ] - } - - if (is_linux || is_chromeos) { - sources += [ "tools/quic/quic_simple_server_test.cc" ] - } - - if (is_apple) { - sources += [ "base/mac/url_conversions_unittest.mm" ] - } - - if (is_mac) { - frameworks = [ "Security.framework" ] - } - - if (!is_win) { - sources += [ - "http/http_auth_handler_ntlm_portable_unittest.cc", - "ntlm/ntlm_buffer_reader_unittest.cc", - "ntlm/ntlm_buffer_writer_unittest.cc", - "ntlm/ntlm_client_unittest.cc", - "ntlm/ntlm_test_data.h", - "ntlm/ntlm_unittest.cc", - ] - } - - if (enable_python_utils) { - sources += [ "test/python_utils_unittest.cc" ] - } - - if (is_fuchsia) { - use_test_server = true - deps += [ - "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.net.interfaces:fuchsia.net.interfaces_hlcpp", - "//third_party/fuchsia-sdk/sdk/pkg/fidl_cpp", - ] - sources += [ - "base/fuchsia/network_interface_cache_unittest.cc", - "base/network_change_notifier_fuchsia_unittest.cc", - ] - additional_manifest_fragments = - [ "//build/config/fuchsia/test/network.shard.test-cml" ] - } - - if (use_nss_certs) { - sources += [ - "cert/internal/system_trust_store_nss_unittest.cc", - "cert/internal/trust_store_nss_unittest.cc", - "cert/nss_cert_database_unittest.cc", - "cert/x509_util_nss_unittest.cc", - ] - if (!is_castos) { - sources += [ - "ssl/client_cert_store_nss_unittest.cc", - "ssl/ssl_platform_key_nss_unittest.cc", - ] - } - configs += [ "//build/config/linux/nss" ] - } - - if (use_external_gssapi) { - sources += [ - "http/http_auth_gssapi_posix_unittest.cc", - "http/mock_gssapi_library_posix.cc", - "http/mock_gssapi_library_posix.h", - ] - data_deps += [ - ":test_badgssapi", - ":test_gssapi", - ] - } - - if (use_kerberos) { - sources += [ "http/http_auth_handler_negotiate_unittest.cc" ] - } - - if (enable_websockets) { - sources += [ - "websockets/websocket_basic_handshake_stream_test.cc", - "websockets/websocket_basic_stream_adapters_test.cc", - "websockets/websocket_basic_stream_test.cc", - "websockets/websocket_channel_test.cc", - "websockets/websocket_deflate_parameters_test.cc", - "websockets/websocket_deflate_predictor_impl_test.cc", - "websockets/websocket_deflate_stream_test.cc", - "websockets/websocket_deflater_test.cc", - "websockets/websocket_errors_test.cc", - "websockets/websocket_extension_parser_test.cc", - "websockets/websocket_extension_test.cc", - "websockets/websocket_frame_parser_test.cc", - "websockets/websocket_frame_test.cc", - "websockets/websocket_handshake_challenge_test.cc", - "websockets/websocket_handshake_stream_create_helper_test.cc", - "websockets/websocket_inflater_test.cc", - "websockets/websocket_stream_cookie_test.cc", - "websockets/websocket_stream_create_test_base.cc", - "websockets/websocket_stream_create_test_base.h", - "websockets/websocket_stream_test.cc", - "websockets/websocket_test_util.cc", - "websockets/websocket_test_util.h", - ] - - if (!is_ios) { - # TODO(crbug.com/1281277): iOS does not have support for the spawned test - # server, which is used by this test. The long term plan is to add - # websocket support to the embedded test server and when that happens, - # this test could be enabled. - sources += [ "websockets/websocket_end_to_end_test.cc" ] - } - } - - if (!disable_file_support) { - sources += [ - "base/directory_lister_unittest.cc", - "base/directory_listing_unittest.cc", - "test/url_request/url_request_test_job_backed_by_file_unittest.cc", - ] - } - - if (enable_built_in_dns) { - sources += [ "url_request/http_with_dns_over_https_unittest.cc" ] - } - - if (is_ios) { - bundle_deps = [ - ":net_test_bundle_data", - "//net/third_party/nist-pkits:test_bundle_data", - ] - } - - if (enable_unix_sockets) { - sources += [ - "socket/unix_domain_client_socket_posix_unittest.cc", - "socket/unix_domain_server_socket_posix_unittest.cc", - ] - } - - # Use getifaddrs() on POSIX platforms, except Linux. - if (is_posix && !is_linux && !is_chromeos) { - sources += [ "base/network_interfaces_getifaddrs_unittest.cc" ] - } - - # Unit tests that aren't supported by the current ICU alternatives on Android. - if (is_android && use_platform_icu_alternatives) { - sources -= [ - "base/filename_util_unittest.cc", - "base/url_util_unittest.cc", - "cert/x509_certificate_unittest.cc", - "url_request/url_request_job_unittest.cc", - ] - deps += [ "//url:url_java" ] - } - - # Unit tests that are not supported by the current ICU alternatives on iOS. - if (is_ios && use_platform_icu_alternatives) { - sources -= [ - "base/filename_util_unittest.cc", - "base/url_util_unittest.cc", - "cert/x509_certificate_unittest.cc", - "http/http_auth_handler_basic_unittest.cc", - "http/http_auth_handler_digest_unittest.cc", - "http/http_auth_handler_factory_unittest.cc", - "http/http_auth_unittest.cc", - "http/http_content_disposition_unittest.cc", - "http/http_network_transaction_unittest.cc", - "spdy/spdy_network_transaction_unittest.cc", - "spdy/spdy_proxy_client_socket_unittest.cc", - "url_request/url_request_job_unittest.cc", - "url_request/url_request_unittest.cc", - ] - } - - if (!disable_brotli_filter) { - sources += [ "filter/brotli_source_stream_unittest.cc" ] - } - - if (!disable_zstd_filter) { - sources += [ "filter/zstd_source_stream_unittest.cc" ] - } - - if (is_android) { - data_deps += [ "//net/tools/testserver:testserver_py" ] - deps += [ - ":net_jni_headers", - "//base:base_java_unittest_support", - "//net/android:net_java", - "//net/android:net_java_test_support", - "//net/android:net_test_support_jni", - "//net/android:net_test_support_provider_java", - "//net/android:net_test_support_provider_jni", - "//net/android:net_tests_java", - "//net/android:net_tests_jni", - "//net/android:net_unittests_apk_resources", - - # TODO(mmenke): This depends on test_support_base, which depends on - # icu. Figure out a way to remove that dependency. - "//testing/android/native_test:native_test_native_code", - ] - android_manifest = "//net/android/unittest_support/AndroidManifest.xml" - - sources += [ - "base/address_tracker_linux_unittest.cc", - "base/network_interfaces_linux_unittest.cc", - ] - shard_timeout = 300 - } - - if (is_win) { - libs = [ - "iphlpapi.lib", - "ncrypt.lib", - ] - } - - if (chrome_root_store_supported) { - sources += [ "cert/internal/trust_store_chrome_unittest.cc" ] - deps += [ "//net/data/ssl/chrome_root_store:gen_root_store_test_inc" ] - - if (is_win) { - sources += [ "cert/internal/trust_store_win_unittest.cc" ] - sources += [ "cert/internal/path_builder_trust_store_win_unittest.cc" ] - libs += [ "crypt32.lib" ] - } - } - - if (trial_comparison_cert_verifier_supported) { - sources += [ "cert/trial_comparison_cert_verifier_unittest.cc" ] - } - - # Include transport_security_state_generator tests. - if (host_toolchain == current_toolchain) { - deps += [ - "//net/tools/huffman_trie:huffman_trie_generator_test_sources", - "//net/tools/transport_security_state_generator:transport_security_state_generator_test_sources", - ] - } -} - -# !is_android && !is_win && !is_mac -if (!is_ios) { - # TODO(crbug.com/594965): this should be converted to "app" template and - # enabled on iOS too. - test("net_perftests") { - sources = [ - "base/mime_sniffer_perftest.cc", - "cookies/cookie_monster_perftest.cc", - "disk_cache/disk_cache_perftest.cc", - "extras/sqlite/sqlite_persistent_cookie_store_perftest.cc", - "socket/udp_socket_perftest.cc", - "url_request/url_request_quic_perftest.cc", - ] - - deps = [ - ":extras", - ":net", - ":quic_test_tools", - ":simple_quic_tools", - ":test_support", - "//base", - "//base:i18n", - "//base/test:test_support_perf", - "//testing/gtest", - "//testing/perf", - "//url", - ] - data_deps = [ - # Needed for isolate script to execute. - "//testing:run_perf_test", - ] - if (enable_websockets) { - sources += [ "websockets/websocket_frame_perftest.cc" ] - } - if (is_win) { - deps += [ "//build/win:default_exe_manifest" ] - } - } -} - -# Fuzzers - -# This has a global (InitGlobals) that must always be linked in, so -# must be a source set instead of a static library. -if (use_fuzzing_engine) { - # fuzzer_test targets are no-op when |use_fuzzing_engine| is false. Fuzzer - # support targets should be disabled too. - source_set("net_fuzzer_test_support") { - testonly = true - - sources = [ - "base/fuzzer_test_support.cc", - "filter/fuzzed_source_stream.cc", - "filter/fuzzed_source_stream.h", - "socket/fuzzed_datagram_client_socket.cc", - "socket/fuzzed_datagram_client_socket.h", - "socket/fuzzed_server_socket.cc", - "socket/fuzzed_server_socket.h", - "socket/fuzzed_socket.cc", - "socket/fuzzed_socket.h", - "socket/fuzzed_socket_factory.cc", - "socket/fuzzed_socket_factory.h", - ] - public_deps = [ - "//base/test:test_support", - "//net/dns:fuzzer_test_support", - ] - deps = [ - "//base", - "//base:i18n", - "//net", - ] - data = [ - "data/fuzzer_data", - "data/fuzzer_dictionaries", - ] - allow_circular_includes_from = [ "//net/dns:fuzzer_test_support" ] - } -} - -fuzzer_test("net_der_parser_fuzzer") { - sources = [ "der/parser_fuzzer.cc" ] - deps = [ - "//net", - "//third_party/abseil-cpp:absl", - ] -} - -proto_library("disk_cache_lpm_fuzzer_proto") { - sources = [ "disk_cache/disk_cache_fuzzer.proto" ] -} - -fuzzer_test("disk_cache_lpm_fuzzer") { - sources = [ "disk_cache/disk_cache_fuzzer.cc" ] - deps = [ - ":disk_cache_lpm_fuzzer_proto", - ":test_support", - "//base", - "//net", - "//third_party/libprotobuf-mutator", - ] -} - -proto_library("backoff_entry_serializer_fuzzer_input") { - proto_in_dir = "//" - sources = [ "base/backoff_entry_serializer_fuzzer_input.proto" ] - link_deps = [ "//testing/libfuzzer/proto:json_proto" ] -} - -fuzzer_test("net_backoff_entry_serializer_fuzzer") { - sources = [ "base/backoff_entry_serializer_fuzzer.cc" ] - deps = [ - ":backoff_entry_serializer_fuzzer_input", - ":net_fuzzer_test_support", - ":test_support", - "//base", - "//net", - "//testing/libfuzzer/proto:json_proto", - "//testing/libfuzzer/proto:json_proto_converter", - "//third_party/libprotobuf-mutator", - ] -} - -fuzzer_test("net_data_url_fuzzer") { - sources = [ "base/data_url_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - ":test_support", - "//base", - "//net", - ] - dict = "data/fuzzer_dictionaries/net_data_url_fuzzer.dict" - - # IsTokenChar() and ToLowerASCII() are surprisingly slow in instrumented builds. - libfuzzer_options = [ "max_len=100000" ] -} - -fuzzer_test("net_mime_sniffer_fuzzer") { - sources = [ "base/mime_sniffer_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//base", - "//net", - ] - dict = "data/fuzzer_dictionaries/net_mime_sniffer_fuzzer.dict" -} - -fuzzer_test("net_parse_proxy_list_pac_fuzzer") { - sources = [ "proxy_resolution/parse_proxy_list_pac_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//net", - ] -} - -fuzzer_test("net_parse_proxy_list_fuzzer") { - sources = [ "proxy_resolution/parse_proxy_list_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//net", - ] -} - -fuzzer_test("net_parse_proxy_bypass_rules_fuzzer") { - sources = [ "proxy_resolution/parse_proxy_bypass_rules_fuzzer.cc" ] - - libfuzzer_options = [ - # The proxy bypass rules aren't very complicated, so this is more than - # enough to explore the grammar. Allowing the length to become too large - # can result in test timeouts (https://crbug.com/813619). - "max_len=512", - ] - - deps = [ - ":net_fuzzer_test_support", - "//net", - ] -} - -fuzzer_test("net_parse_proxy_rules_fuzzer") { - sources = [ "proxy_resolution/parse_proxy_rules_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//net", - ] - dict = "data/fuzzer_dictionaries/net_parse_proxy_bypass_rules_fuzzer.dict" -} - -fuzzer_test("net_get_domain_and_registry_fuzzer") { - sources = - [ "base/registry_controlled_domains/get_domain_and_registry_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//base", - "//net", - ] - dict = "data/fuzzer_dictionaries/net_get_domain_and_registry_fuzzer.dict" -} - -fuzzer_test("net_lookup_string_in_fixed_set_fuzzer") { - sources = [ "base/lookup_string_in_fixed_set_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//base", - "//net", - "//net/base/registry_controlled_domains:lookup_strings_test_sets", - ] - dict = "data/fuzzer_dictionaries/net_get_domain_and_registry_fuzzer.dict" -} - -fuzzer_test("net_base_schemeful_site_fuzzer") { - sources = [ "base/schemeful_site_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//base", - "//net", - "//testing/libfuzzer/proto:url_proto", - "//testing/libfuzzer/proto:url_proto_converter", - "//third_party/libprotobuf-mutator", - ] -} - -fuzzer_test("net_cert_ct_decode_signed_certificate_timestamp_fuzzer") { - sources = [ "cert/decode_signed_certificate_timestamp_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//base", - "//net", - ] -} - -fuzzer_test("net_cert_verify_name_match_fuzzer") { - sources = [ "cert/pki/verify_name_match_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//base", - "//net", - ] -} - -fuzzer_test("net_cert_normalize_name_fuzzer") { - sources = [ "cert/pki/verify_name_match_normalizename_fuzzer.cc" ] - deps = [ - "//base", - "//net", - ] -} - -fuzzer_test("net_cert_verify_name_in_subtree_fuzzer") { - sources = [ "cert/pki/verify_name_match_verifynameinsubtree_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//base", - "//net", - ] -} - -fuzzer_test("net_cert_crl_parse_crl_certificatelist_fuzzer") { - sources = [ "cert/pki/crl_parse_crl_certificatelist_fuzzer.cc" ] - seed_corpus = "data/fuzzer_data/crl_parse_crl_certificatelist_fuzzer" - deps = [ - "//base", - "//net", - ] -} - -fuzzer_test("net_cert_crl_parse_crl_tbscertlist_fuzzer") { - sources = [ "cert/pki/crl_parse_crl_tbscertlist_fuzzer.cc" ] - seed_corpus = "data/fuzzer_data/crl_parse_crl_tbscertlist_fuzzer" - deps = [ - "//base", - "//net", - ] -} - -fuzzer_test("net_cert_crl_parse_issuing_distribution_point_fuzzer") { - sources = [ "cert/pki/crl_parse_issuing_distribution_point_fuzzer.cc" ] - seed_corpus = "data/fuzzer_data/crl_parse_issuing_distribution_point_fuzzer" - deps = [ - "//base", - "//net", - ] -} - -fuzzer_test("net_cert_crl_getcrlstatusforcert_fuzzer") { - sources = [ "cert/pki/crl_getcrlstatusforcert_fuzzer.cc" ] - seed_corpus = "data/fuzzer_data/crl_getcrlstatusforcert_fuzzer" - deps = [ - "//base", - "//net", - ] -} - -fuzzer_test("net_cert_ocsp_parse_ocsp_cert_id_fuzzer") { - sources = [ "cert/pki/ocsp_parse_ocsp_cert_id_fuzzer.cc" ] - seed_corpus = "data/fuzzer_data/parse_ocsp_cert_id_fuzzer" - deps = [ - "//base", - "//net", - ] -} - -fuzzer_test("net_cert_ocsp_parse_ocsp_single_response_fuzzer") { - sources = [ "cert/pki/ocsp_parse_ocsp_single_response_fuzzer.cc" ] - seed_corpus = "data/fuzzer_data/parse_ocsp_single_response_fuzzer" - deps = [ - "//base", - "//net", - ] -} - -fuzzer_test("net_cert_ocsp_parse_ocsp_response_data_fuzzer") { - sources = [ "cert/pki/ocsp_parse_ocsp_response_data_fuzzer.cc" ] - seed_corpus = "data/fuzzer_data/parse_ocsp_response_data_fuzzer" - deps = [ - "//base", - "//net", - ] -} - -fuzzer_test("net_cert_ocsp_parse_ocsp_response_fuzzer") { - sources = [ "cert/pki/ocsp_parse_ocsp_response_fuzzer.cc" ] - seed_corpus = "data/fuzzer_data/parse_ocsp_response_fuzzer" - deps = [ - "//base", - "//net", - ] -} - -fuzzer_test("net_cert_parse_authority_key_identifier_fuzzer") { - sources = [ "cert/pki/parse_authority_key_identifier_fuzzer.cc" ] - seed_corpus = "data/fuzzer_data/parse_authority_key_identifier_fuzzer" - deps = [ - "//base", - "//net", - ] -} - -fuzzer_test("net_cert_parse_certificate_fuzzer") { - sources = [ "cert/pki/parse_certificate_fuzzer.cc" ] - deps = [ - "//base", - "//net", - ] -} - -fuzzer_test("net_canonical_cookie_fuzzer") { - sources = [ "cookies/canonical_cookie_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//net", - ] - dict = "data/fuzzer_dictionaries/net_cookies_fuzzer.dict" - seed_corpus = "data/fuzzer_data/cookies/" -} - -fuzzer_test("net_cookie_partition_key_fuzzer") { - sources = [ "cookies/cookie_partition_key_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//net", - ] -} - -fuzzer_test("net_cookie_util_parsing_fuzzer") { - sources = [ "cookies/cookie_util_parsing_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//net", - ] - dict = "data/fuzzer_dictionaries/net_cookies_fuzzer.dict" - libfuzzer_options = [ "max_len=8192" ] - seed_corpus = "data/fuzzer_data/cookies/" -} - -fuzzer_test("net_parse_cookie_line_fuzzer") { - sources = [ "cookies/parse_cookie_line_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//net", - ] - dict = "data/fuzzer_dictionaries/net_cookies_fuzzer.dict" - seed_corpus = "data/fuzzer_data/cookies/" -} - -fuzzer_test("net_http_stream_parser_fuzzer") { - sources = [ "http/http_stream_parser_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - ":test_support", - "//base", - "//net", - ] - dict = "data/fuzzer_dictionaries/net_http_stream_parser_fuzzer.dict" -} - -if (!is_win) { - fuzzer_test("net_ntlm_ntlm_client_fuzzer") { - sources = [ - "ntlm/ntlm_client_fuzzer.cc", - "ntlm/ntlm_test_data.h", - ] - deps = [ - ":net_fuzzer_test_support", - ":test_support", - "//base", - "//net", - ] - dict = "data/fuzzer_dictionaries/net_ntlm_ntlm_client_fuzzer.dict" - seed_corpus = "data/fuzzer_data/ntlm_client_fuzzer/" - } -} - -if (!disable_brotli_filter) { - fuzzer_test("net_brotli_source_stream_fuzzer") { - sources = [ "filter/brotli_source_stream_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - ":test_support", - "//base", - "//net", - ] - } -} - -if (!disable_zstd_filter) { - fuzzer_test("net_zstd_source_stream_fuzzer") { - sources = [ "filter/zstd_source_stream_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - ":test_support", - "//base", - "//net", - ] - } -} - -fuzzer_test("net_gzip_source_stream_fuzzer") { - sources = [ "filter/gzip_source_stream_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - ":test_support", - "//base", - "//net", - ] -} - -fuzzer_test("net_crl_set_fuzzer") { - sources = [ "cert/crl_set_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - ":test_support", - "//base", - "//net", - ] - seed_corpus = "data/fuzzer_data/net_crl_set_fuzzer/" -} - -fuzzer_test("net_unescape_url_component_fuzzer") { - sources = [ "base/unescape_url_component_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//base", - "//net", - ] - dict = "data/fuzzer_dictionaries/unescape_url_component_fuzzer.dict" - libfuzzer_options = [ "max_len = 2048" ] -} - -fuzzer_test("net_websocket_deflate_stream_fuzzer") { - sources = [ "websockets/websocket_deflate_stream_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//net", - ] - dict = "data/fuzzer_dictionaries/net_websocket_frame_parser_fuzzer.dict" - libfuzzer_options = [ "max_len=512" ] -} - -fuzzer_test("net_websocket_extension_parser_fuzzer") { - sources = [ "websockets/websocket_extension_parser_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//net", - ] - dict = "data/fuzzer_dictionaries/net_websocket_extension_parser_fuzzer.dict" - libfuzzer_options = [ "max_len = 256" ] -} - -fuzzer_test("net_websocket_frame_parser_fuzzer") { - sources = [ "websockets/websocket_frame_parser_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//net", - ] - dict = "data/fuzzer_dictionaries/net_websocket_frame_parser_fuzzer.dict" - libfuzzer_options = [ "max_len=256" ] -} - -if (use_fuzzing_engine) { - # This is a separate target because //net/server:http_server - # wants to limit its visibility to a select number of target, but the - # "fuzzer_test" template expands on iOS to many targets that need to - # have the "deps" information propagated in order to support "fat" - # binaries. - source_set("net_web_socket_encoder_fuzzer_deps") { - testonly = true - visibility = [ - ":net_web_socket_encoder_fuzzer", - ":net_web_socket_encoder_fuzzer_executable", - ":run_net_web_socket_encoder_fuzzer", - ] - public_deps = [ - ":net_fuzzer_test_support", - "//net", - "//net/server:http_server", - ] - } - - fuzzer_test("net_web_socket_encoder_fuzzer") { - sources = [ "server/web_socket_encoder_fuzzer.cc" ] - deps = [ ":net_web_socket_encoder_fuzzer_deps" ] - libfuzzer_options = [ "max_len=256" ] - } -} - -fuzzer_test("net_http_chunked_decoder_fuzzer") { - sources = [ "http/http_chunked_decoder_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//net", - ] - dict = "data/fuzzer_dictionaries/http_chunked_decoder_fuzzer.dict" -} - -fuzzer_test("net_http_auth_handler_basic_fuzzer") { - sources = [ "http/http_auth_handler_basic_fuzzer.cc" ] - dict = "data/fuzzer_dictionaries/net_http_auth_handler_basic_fuzzer.dict" - deps = [ - ":net_fuzzer_test_support", - ":test_support", - "//net", - ] -} - -fuzzer_test("net_http_auth_handler_digest_fuzzer") { - sources = [ "http/http_auth_handler_digest_fuzzer.cc" ] - dict = "data/fuzzer_dictionaries/net_http_auth_handler_digest_fuzzer.dict" - deps = [ - ":net_fuzzer_test_support", - ":test_support", - "//net", - ] -} - -fuzzer_test("net_http_auth_handler_fuzzer") { - sources = [ "http/http_auth_handler_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - ":test_support", - "//base", - "//net", - ] -} - -fuzzer_test("net_http_content_disposition_fuzzer") { - sources = [ "http/http_content_disposition_fuzzer.cc" ] - dict = "data/fuzzer_dictionaries/net_http_content_disposition_fuzzer.dict" - deps = [ - ":net_fuzzer_test_support", - "//net", - ] -} - -fuzzer_test("net_http_proxy_client_socket_fuzzer") { - sources = [ "http/http_proxy_client_socket_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - ":test_support", - "//base", - "//net", - ] - dict = "data/fuzzer_dictionaries/net_http_proxy_client_socket_fuzzer.dict" -} - -fuzzer_test("net_structured_headers_fuzzer") { - sources = [ "http/structured_headers_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - ":test_support", - "//base", - "//net", - ] - seed_corpus = "data/fuzzer_data/structured_headers_corpus" -} - -fuzzer_test("net_parse_url_hostname_to_address_fuzzer") { - sources = [ "base/parse_url_hostname_to_address_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//base", - "//net", - ] - libfuzzer_options = [ "max_len=512" ] - seed_corpus = "data/fuzzer_data/hostnames/" -} - -fuzzer_test("net_quic_crypto_framer_parse_message_fuzzer") { - sources = [ "quic/quic_crypto_framer_parse_message_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//base", - "//net", - ] -} - -fuzzer_test("net_quic_transport_parameters_fuzzer") { - sources = [ "quic/quic_transport_parameters_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//base", - "//net", - ] -} - -fuzzer_test("net_socks_client_socket_fuzzer") { - sources = [ "socket/socks_client_socket_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - ":test_support", - "//base", - "//net", - ] -} - -fuzzer_test("net_socks5_client_socket_fuzzer") { - sources = [ "socket/socks5_client_socket_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - ":test_support", - "//base", - "//net", - ] -} - -fuzzer_test("net_url_request_fuzzer") { - sources = [ "url_request/url_request_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - ":test_support", - "//base", - "//net", - ] - dict = "data/fuzzer_dictionaries/net_url_request_fuzzer.dict" -} - -fuzzer_test("net_auth_challenge_tokenizer_fuzzer") { - sources = [ "http/http_auth_challenge_tokenizer_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - ":test_support", - "//base", - "//net", - ] -} - -fuzzer_test("net_http_security_headers_hsts_fuzzer") { - sources = [ "http/http_security_headers_hsts_fuzzer.cc" ] - deps = [ - "//base", - "//net", - ] - dict = "data/fuzzer_dictionaries/net_http_security_headers_fuzzer.dict" - seed_corpus = "data/fuzzer_data/http_security_headers/" -} - -fuzzer_test("net_http_transport_security_state_static_fuzzer") { - sources = [ "http/transport_security_state_static_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//net", - ] - dict = - "data/fuzzer_dictionaries/net_http_transport_security_state_fuzzer.dict" -} - -fuzzer_test("net_spdy_session_fuzzer") { - sources = [ "spdy/spdy_session_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - ":test_support", - "//base", - "//net", - "//net/data/ssl/certificates:generate_fuzzer_cert_includes", - ] - dict = "data/fuzzer_dictionaries/net_spdy_session_fuzzer.dict" - seed_corpus = "data/fuzzer_data/net_spdy_session_fuzzer/" -} - -fuzzer_test("net_http2_frame_decoder_fuzzer") { - sources = [ "spdy/fuzzing/http2_frame_decoder_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - ":test_support", - "//base", - "//net", - ] -} - -fuzzer_test("net_hpack_decoder_fuzzer") { - sources = [ "spdy/fuzzing/hpack_decoder_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - ":test_support", - "//base", - "//net", - ] -} - -proto_library("reporting_policy_proto") { - proto_in_dir = "//" - sources = [ "reporting/reporting_policy.proto" ] - link_deps = [ "//testing/libfuzzer/proto:json_proto" ] -} - -fuzzer_test("net_reporting_header_parser_fuzzer") { - sources = [ "reporting/reporting_header_parser_fuzzer.cc" ] - - deps = [ - ":net_fuzzer_test_support", - ":reporting_policy_proto", - ":test_support", - "//base", - "//net", - "//testing/libfuzzer/proto:json_proto", - "//testing/libfuzzer/proto:json_proto_converter", - "//third_party/libprotobuf-mutator", - ] -} - -fuzzer_test("net_quic_stream_factory_fuzzer") { - sources = [ "quic/quic_stream_factory_fuzzer.cc" ] - - deps = [ - ":net_fuzzer_test_support", - ":quic_test_tools", - ":test_support", - "//net", - "//net/data/ssl/certificates:generate_fuzzer_cert_includes", - ] -} - -fuzzer_test("net_uri_template_fuzzer") { - sources = [ "third_party/uri_template/uri_template_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - "//base", - "//net", - ] - dict = "data/fuzzer_dictionaries/net_uri_template_fuzzer.dict" -} - -if (is_linux || is_chromeos) { - fuzzer_test("net_base_address_tracker_linux_fuzzer") { - sources = [ "base/address_tracker_linux_fuzzer.cc" ] - deps = [ - ":net_fuzzer_test_support", - ":test_support", - "//base", - "//net", - ] - } -} diff --git a/src/net/dns/BUILD.gn b/src/net/dns/BUILD.gn index 6eb142954e..5c25754a06 100644 --- a/src/net/dns/BUILD.gn +++ b/src/net/dns/BUILD.gn @@ -3,8 +3,6 @@ # found in the LICENSE file. import("//net/features.gni") -import("//testing/libfuzzer/fuzzer_test.gni") -import("//third_party/protobuf/proto_library.gni") enable_built_in_dns = use_blink @@ -17,16 +15,7 @@ source_set("dns") { # Internals only intended for use inside network stack (and tests). friend = [ - "//chrome/browser:test_support", - "//chrome/test/*", - "//components/certificate_transparency:unit_tests", - "//components/cronet/*", - - # Needed for brokering system DNS resolution out of the network service. - "//content/browser/system_dns_resolution", - "//content/test/*", "//net/*", - "//services/network/*", ] public = [] @@ -201,30 +190,7 @@ source_set("host_resolver") { # Restricted access so we can keep track of all usage external to the # network stack and network service. friend = [ - # chromecast/browser/url_request_context_factory.cc - # URLRequestContext creation for chromecast. - "//chromecast/browser", - - # URLRequestContext and HttpNetworkSession::Context creation for iOS. - "//ios/components/io_thread", - "//ios/web/shell", - "//ios/web_view:*", - - # Tests and test support. - "//chrome/browser:test_support", - "//chrome/test/*", - "//components/grpc_support/test:unit_tests", - "//content/shell:content_shell_lib", - "//content/test:*", - - # Stand-alone tools. - "//google_apis/gcm:mcs_probe", - - # Network stack/service. - "//components/certificate_transparency/*", - "//components/cronet/*", "//net/*", - "//services/network/*", ] sources = [ @@ -263,16 +229,7 @@ source_set("host_resolver_manager") { # Restricted access so we can keep track of all usage external to the # network stack and network service. friend = [ - # chromecast/browser/url_request_context_factory.cc - # URLRequestContext creation for chromecast. - "//chromecast/browser", - - # Tests and test support. - "//components/cronet:cronet_common_unittests", - - # Network stack/service. "//net/*", - "//services/network/*", ] sources = [ "host_resolver_manager.h" ] @@ -302,24 +259,7 @@ source_set("dns_client") { # Restricted access so we can keep track of all usage external to the # network stack. friend = [ - # chrome/browser/local_discovery/service_discovery_client_impl.cc - # Result parsing utilities for parsing results read through MdnsClient. - # TODO(crbug.com/874662): Remove once migrated to network service. - "//chrome/browser", - - # chrome/browser/ash/smb_client/discovery/mdns_host_locator.cc - # Result parsing for results read through MdnsClient. - # TODO(crbug.com/902531): Remove once migrated to network service. - "//chrome/browser/ash", - - # Tests and test support - "//chrome/browser:test_support", - "//chrome/test/*", - - # Network stack/service - "//components/certificate_transparency/*", "//net/*", - "//services/network/*", ] sources = [ @@ -356,29 +296,7 @@ source_set("mdns_client") { # Restricted access so we can keep track of all usage external to the # network stack. friend = [ - # chrome/browser/local_discovery/service_discovery_client_mdns.h - # chrome/browser/local_discovery/service_discovery_client_impl.h - # Makes MDNS queries using MDnsClient. - # TODO(crbug.com/874662): Remove once migrated to network service. - "//chrome/browser", - - # chrome/tools/service_discovery_sniffer/service_discovery_sniffer.cc - # Creates MDnsClient instance and passes to ServiceDiscoveryClientImpl. - # TODO(crbug.com/874662): Remove once discovery client migrated. - "//chrome/tools/service_discovery_sniffer", - - # chrome/browser/ash/smb_client/discovery/mdns_host_locator.h - # chrome/browser/ash/smb_client/discovery/mdns_host_locator.cc - # Makes MDNS queries using MDnsClient. - # TODO(crbug.com/902531): Remove once migrated to network service. - "//chrome/browser/ash", - - # Tests and test support - "//chrome/browser:test_support", - - # Network stack/service "//net/*", - "//services/network/*", ] public = [] @@ -395,229 +313,3 @@ source_set("mdns_client") { ] public_deps = [ "//net:net_public_deps" ] } - -source_set("tests") { - testonly = true - sources = [ - "address_info_unittest.cc", - "context_host_resolver_unittest.cc", - "dns_alias_utility_unittest.cc", - "dns_config_service_unittest.cc", - "dns_hosts_unittest.cc", - "dns_names_util_unittest.cc", - "dns_query_unittest.cc", - "dns_response_result_extractor_unittest.cc", - "dns_response_unittest.cc", - "dns_transaction_unittest.cc", - "dns_udp_tracker_unittest.cc", - "dns_util_unittest.cc", - "host_cache_unittest.cc", - "host_resolver_cache_unittest.cc", - "host_resolver_internal_result_unittest.cc", - "host_resolver_manager_unittest.cc", - "https_record_rdata_unittest.cc", - "httpssvc_metrics_unittest.cc", - "loopback_only_unittest.cc", - "mapped_host_resolver_unittest.cc", - "nsswitch_reader_unittest.cc", - "opt_record_rdata_unittest.cc", - "record_parsed_unittest.cc", - "record_rdata_unittest.cc", - "resolve_context_unittest.cc", - "serial_worker_unittest.cc", - "system_dns_config_change_notifier_unittest.cc", - ] - - if (is_win) { - sources += [ "dns_config_service_win_unittest.cc" ] - } - - if (is_android) { - sources += [ "dns_config_service_android_unittest.cc" ] - } else if (is_linux) { - sources += [ "dns_config_service_linux_unittest.cc" ] - } else if (is_posix) { - sources += [ "dns_config_service_posix_unittest.cc" ] - } - - if (enable_built_in_dns) { - sources += [ - "address_sorter_unittest.cc", - "dns_client_unittest.cc", - ] - if (is_posix || is_fuchsia) { - sources += [ "address_sorter_posix_unittest.cc" ] - } - } - - if (enable_mdns) { - sources += [ - "mdns_cache_unittest.cc", - "mdns_client_unittest.cc", - ] - } - - deps = [ - "//base", - "//net", - "//net:test_support", - "//testing/gmock", - "//testing/gtest", - ] -} - -source_set("test_support") { - visibility = [ "//net:test_support" ] - testonly = true - sources = [ - "dns_test_util.cc", - "host_resolver_internal_result_test_util.cc", - "host_resolver_results_test_util.cc", - "mock_host_resolver.cc", - ] - public = [ - "dns_test_util.h", - "host_resolver_internal_result_test_util.h", - "host_resolver_results_test_util.h", - "mock_host_resolver.h", - ] - - if (enable_mdns) { - sources += [ - "mock_mdns_client.cc", - "mock_mdns_socket_factory.cc", - ] - public += [ - "mock_mdns_client.h", - "mock_mdns_socket_factory.h", - ] - } - - deps = [ - "//base", - "//net", - "//testing/gmock", - "//testing/gtest", - ] -} - -if (use_fuzzing_engine) { - # fuzzer_test targets are no-op when |use_fuzzing_engine| is false. Fuzzer - # support targets should be disabled too. - source_set("fuzzer_test_support") { - testonly = true - sources = [ - "fuzzed_host_resolver_util.cc", - "fuzzed_host_resolver_util.h", - ] - deps = [ - "//base", - "//base/test:test_support", - "//net", - ] - } -} - -proto_library("host_cache_fuzzer_proto") { - proto_in_dir = "//" - sources = [ "host_cache_fuzzer.proto" ] - deps = [ "//testing/libfuzzer/proto:json_proto" ] -} - -fuzzer_test("net_dns_host_cache_fuzzer") { - sources = [ "host_cache_fuzzer.cc" ] - deps = [ - ":host_cache_fuzzer_proto", - "//base", - "//net", - "//net:net_fuzzer_test_support", - "//testing/libfuzzer/proto:json_proto", - "//testing/libfuzzer/proto:json_proto_converter", - "//third_party/libprotobuf-mutator", - ] - dict = "//testing/libfuzzer/fuzzers/dicts/json.dict" -} - -fuzzer_test("net_dns_hosts_parse_fuzzer") { - sources = [ "dns_hosts_parse_fuzzer.cc" ] - deps = [ - "//base", - "//net", - "//net:net_fuzzer_test_support", - ] - dict = "//net/data/fuzzer_dictionaries/net_dns_hosts_parse_fuzzer.dict" -} - -fuzzer_test("net_dns_https_record_rdata_fuzzer") { - sources = [ "https_record_rdata_fuzzer.cc" ] - deps = [ - "//base", - "//net", - "//net:net_fuzzer_test_support", - ] - dict = "//net/data/fuzzer_dictionaries/net_dns_record_fuzzer.dict" -} - -fuzzer_test("net_dns_nsswitch_reader_fuzzer") { - sources = [ "nsswitch_reader_fuzzer.cc" ] - deps = [ - "//base", - "//net", - "//net:net_fuzzer_test_support", - ] - dict = "//net/data/fuzzer_dictionaries/net_dns_nsswitch_reader_fuzzer.dict" -} - -fuzzer_test("net_dns_record_fuzzer") { - sources = [ "dns_record_fuzzer.cc" ] - deps = [ - "//base", - "//net", - "//net:net_fuzzer_test_support", - ] - dict = "//net/data/fuzzer_dictionaries/net_dns_record_fuzzer.dict" -} - -fuzzer_test("net_dns_query_parse_fuzzer") { - sources = [ "dns_query_parse_fuzzer.cc" ] - deps = [ - "//base", - "//net", - "//net:net_fuzzer_test_support", - ] - dict = "//net/data/fuzzer_dictionaries/net_dns_record_fuzzer.dict" -} - -fuzzer_test("net_dns_response_fuzzer") { - sources = [ "dns_response_fuzzer.cc" ] - deps = [ - "//base", - "//net", - "//net:net_fuzzer_test_support", - ] - dict = "//net/data/fuzzer_dictionaries/net_dns_record_fuzzer.dict" -} - -fuzzer_test("net_host_resolver_manager_fuzzer") { - sources = [ "host_resolver_manager_fuzzer.cc" ] - deps = [ - "//base", - "//net", - "//net:net_fuzzer_test_support", - "//net:test_support", - ] - dict = "//net/data/fuzzer_dictionaries/net_host_resolver_manager_fuzzer.dict" -} - -if (is_win) { - fuzzer_test("net_dns_parse_domain_ascii_win_fuzzer") { - sources = [ "dns_parse_domain_ascii_win_fuzzer.cc" ] - deps = [ - "//base", - "//net", - "//net:net_fuzzer_test_support", - ] - dict = "//net/data/fuzzer_dictionaries/net_dns_hosts_parse_fuzzer.dict" - seed_corpus = "//net/data/fuzzer_data/dns_parse_domain_ascii_win_fuzzer" - } -} diff --git a/src/net/dns/public/BUILD.gn b/src/net/dns/public/BUILD.gn index dbcecd02f6..ecfac8f080 100644 --- a/src/net/dns/public/BUILD.gn +++ b/src/net/dns/public/BUILD.gn @@ -61,32 +61,3 @@ source_set("public") { public_deps = [ "//net:net_public_deps" ] } - -if (is_android) { - java_cpp_enum("secure_dns_mode_generated_enum") { - sources = [ "secure_dns_mode.h" ] - } -} - -source_set("tests") { - testonly = true - sources = [ - "dns_over_https_config_unittest.cc", - "dns_over_https_server_config_unittest.cc", - "doh_provider_entry_unittest.cc", - ] - - if (is_posix && !is_android) { - sources += [ "resolv_reader_unittest.cc" ] - } - - if (is_win) { - sources += [ "win_dns_system_settings_unittest.cc" ] - } - - deps = [ - "//net", - "//testing/gmock", - "//testing/gtest", - ] -} diff --git a/src/net/third_party/quiche/BUILD.gn b/src/net/third_party/quiche/BUILD.gn index 6fa6e6097e..ace243e68c 100644 --- a/src/net/third_party/quiche/BUILD.gn +++ b/src/net/third_party/quiche/BUILD.gn @@ -25,11 +25,8 @@ # (*) only used on platforms where epoll tests are built import("//build/config/chromeos/ui_mode.gni") -import("//testing/libfuzzer/fuzzer_test.gni") import("//third_party/protobuf/proto_library.gni") -build_epoll_based_tools = is_linux || is_chromeos - config("quiche_internal_config") { cflags = [] if (is_clang) { @@ -772,1115 +769,3 @@ proto_library("net_quic_test_tools_proto") { extra_configs = [ "//build/config/compiler:wexit_time_destructors" ] } - -if (build_epoll_based_tools) { - static_library("epoll_tool_support") { - testonly = true - sources = [ - "overrides/quiche_platform_impl/epoll_bug_impl.h", - "overrides/quiche_platform_impl/epoll_logging_impl.h", - "overrides/quiche_platform_impl/epoll_thread_impl.h", - "overrides/quiche_platform_impl/quiche_udp_socket_platform_impl.h", - "src/quiche/common/platform/api/quiche_udp_socket_platform_api.h", - "src/quiche/common/platform/default/quiche_platform_impl/quiche_stream_buffer_allocator_impl.h", - "src/quiche/common/quiche_ip_address_family.cc", - "src/quiche/common/quiche_ip_address_family.h", - "src/quiche/quic/core/io/event_loop_connecting_client_socket.cc", - "src/quiche/quic/core/io/event_loop_connecting_client_socket.h", - "src/quiche/quic/core/io/event_loop_socket_factory.cc", - "src/quiche/quic/core/io/event_loop_socket_factory.h", - "src/quiche/quic/core/io/quic_default_event_loop.cc", - "src/quiche/quic/core/io/quic_default_event_loop.h", - "src/quiche/quic/core/io/quic_poll_event_loop.cc", - "src/quiche/quic/core/io/quic_poll_event_loop.h", - "src/quiche/quic/core/io/socket.cc", - "src/quiche/quic/core/io/socket.h", - "src/quiche/quic/core/io/socket_internal.h", - "src/quiche/quic/core/io/socket_posix.inc", - "src/quiche/quic/core/io/socket_win.inc", - "src/quiche/quic/core/quic_default_clock.cc", - "src/quiche/quic/core/quic_default_clock.h", - "src/quiche/quic/core/quic_default_packet_writer.cc", - "src/quiche/quic/core/quic_default_packet_writer.h", - "src/quiche/quic/core/quic_packet_reader.cc", - "src/quiche/quic/core/quic_packet_reader.h", - "src/quiche/quic/core/quic_udp_socket.cc", - "src/quiche/quic/core/quic_udp_socket.h", - "src/quiche/quic/core/quic_udp_socket_posix.inc", - "src/quiche/quic/core/quic_udp_socket_win.inc", - "src/quiche/quic/masque/masque_client.cc", - "src/quiche/quic/masque/masque_client.h", - "src/quiche/quic/masque/masque_client_session.cc", - "src/quiche/quic/masque/masque_client_session.h", - "src/quiche/quic/masque/masque_client_tools.cc", - "src/quiche/quic/masque/masque_client_tools.h", - "src/quiche/quic/masque/masque_dispatcher.cc", - "src/quiche/quic/masque/masque_dispatcher.h", - "src/quiche/quic/masque/masque_encapsulated_client.cc", - "src/quiche/quic/masque/masque_encapsulated_client.h", - "src/quiche/quic/masque/masque_encapsulated_client_session.cc", - "src/quiche/quic/masque/masque_encapsulated_client_session.h", - "src/quiche/quic/masque/masque_server.cc", - "src/quiche/quic/masque/masque_server.h", - "src/quiche/quic/masque/masque_server_backend.cc", - "src/quiche/quic/masque/masque_server_backend.h", - "src/quiche/quic/masque/masque_server_session.cc", - "src/quiche/quic/masque/masque_server_session.h", - "src/quiche/quic/masque/masque_utils.cc", - "src/quiche/quic/masque/masque_utils.h", - "src/quiche/quic/platform/api/quic_udp_socket_platform_api.h", - "src/quiche/quic/tools/connect_tunnel.cc", - "src/quiche/quic/tools/connect_tunnel.h", - "src/quiche/quic/tools/quic_client_default_network_helper.cc", - "src/quiche/quic/tools/quic_client_default_network_helper.h", - "src/quiche/quic/tools/quic_default_client.cc", - "src/quiche/quic/tools/quic_default_client.h", - "src/quiche/quic/tools/quic_name_lookup.cc", - "src/quiche/quic/tools/quic_name_lookup.h", - "src/quiche/quic/tools/quic_server.cc", - "src/quiche/quic/tools/quic_server.h", - "src/quiche/quic/tools/web_transport_test_server.cc", - ] - - configs += [ ":quiche_internal_config" ] - public_configs = [ ":quiche_config" ] - - deps = [ - ":quiche_tool_support", - "//base", - "//net", - "//third_party/boringssl", - ] - } - - executable("epoll_quic_client") { - testonly = true - sources = [ - "src/quiche/quic/tools/quic_client_bin.cc", - "src/quiche/quic/tools/quic_epoll_client_factory.cc", - "src/quiche/quic/tools/quic_epoll_client_factory.h", - ] - - configs += [ ":quiche_internal_config" ] - public_configs = [ ":quiche_config" ] - - deps = [ - ":epoll_tool_support", - ":quic_client_core", - ":quiche_tool_support", - "//base", - "//net", - "//third_party/boringssl", - ] - } - - executable("epoll_quic_server") { - testonly = true - sources = [ - "src/quiche/quic/tools/quic_server_bin.cc", - "src/quiche/quic/tools/quic_server_factory.cc", - "src/quiche/quic/tools/quic_server_factory.h", - ] - - configs += [ ":quiche_internal_config" ] - public_configs = [ ":quiche_config" ] - - deps = [ - ":epoll_tool_support", - ":quic_server_core", - ":quiche_tool_support", - "//base", - "//net", - "//third_party/boringssl", - ] - } - - executable("quic_client_interop_test") { - testonly = true - sources = [ "src/quiche/quic/tools/quic_client_interop_test_bin.cc" ] - - configs += [ ":quiche_internal_config" ] - public_configs = [ ":quiche_config" ] - - deps = [ - ":epoll_tool_support", - ":quiche_test_support", - ":quiche_tool_support", - "//net", - ] - } - - executable("masque_client") { - testonly = true - sources = [ "src/quiche/quic/masque/masque_client_bin.cc" ] - - configs += [ ":quiche_internal_config" ] - public_configs = [ ":quiche_config" ] - - deps = [ - ":epoll_tool_support", - ":quiche_tool_support", - "//net", - "//third_party/boringssl", - "//third_party/protobuf:protobuf_lite", - ] - } - - executable("masque_server") { - testonly = true - sources = [ "src/quiche/quic/masque/masque_server_bin.cc" ] - - configs += [ ":quiche_internal_config" ] - public_configs = [ ":quiche_config" ] - - deps = [ - ":epoll_tool_support", - ":quiche_tool_support", - "//net", - "//third_party/boringssl", - "//third_party/protobuf:protobuf_lite", - ] - } - - static_library("epoll_test_support") { - testonly = true - sources = [ - "overrides/quiche_platform_impl/epoll_address_test_utils_impl.h", - "overrides/quiche_platform_impl/epoll_expect_bug_impl.h", - "overrides/quiche_platform_impl/epoll_test_impl.h", - "overrides/quiche_platform_impl/quiche_epoll_test_tools_impl.h", - "src/quiche/quic/test_tools/quic_server_peer.cc", - "src/quiche/quic/test_tools/quic_server_peer.h", - "src/quiche/quic/test_tools/quic_test_client.cc", - "src/quiche/quic/test_tools/quic_test_client.h", - "src/quiche/quic/test_tools/quic_test_server.cc", - "src/quiche/quic/test_tools/quic_test_server.h", - "src/quiche/quic/test_tools/server_thread.cc", - "src/quiche/quic/test_tools/server_thread.h", - ] - - configs += [ ":quiche_internal_config" ] - public_configs = [ ":quiche_config" ] - - deps = [ - ":epoll_tool_support", - ":quiche_test_support", - ":quiche_tool_support", - "//base", - "//net", - "//net:gtest_util", - "//testing/gmock", - "//testing/gtest", - ] - } -} - -static_library("quiche_test_support") { - testonly = true - sources = [ - "overrides/quiche_platform_impl/quiche_expect_bug_impl.h", - "overrides/quiche_platform_impl/quiche_mock_log_impl.h", - "overrides/quiche_platform_impl/quiche_test_helpers_impl.cc", - "overrides/quiche_platform_impl/quiche_test_helpers_impl.h", - "overrides/quiche_platform_impl/quiche_test_impl.cc", - "overrides/quiche_platform_impl/quiche_test_impl.h", - "overrides/quiche_platform_impl/quiche_test_output_impl.cc", - "overrides/quiche_platform_impl/quiche_test_output_impl.h", - "src/quiche/common/platform/api/quiche_expect_bug.h", - "src/quiche/common/platform/api/quiche_test.h", - "src/quiche/common/platform/api/quiche_test_loopback.cc", - "src/quiche/common/platform/api/quiche_test_loopback.h", - "src/quiche/common/platform/api/quiche_test_output.h", - "src/quiche/common/platform/default/quiche_platform_impl/quiche_test_loopback_impl.cc", - "src/quiche/common/platform/default/quiche_platform_impl/quiche_test_loopback_impl.h", - "src/quiche/common/test_tools/quiche_test_utils.cc", - "src/quiche/common/test_tools/quiche_test_utils.h", - "src/quiche/http2/adapter/test_frame_sequence.cc", - "src/quiche/http2/adapter/test_frame_sequence.h", - "src/quiche/http2/adapter/test_utils.cc", - "src/quiche/http2/adapter/test_utils.h", - "src/quiche/http2/test_tools/frame_decoder_state_test_util.cc", - "src/quiche/http2/test_tools/frame_decoder_state_test_util.h", - "src/quiche/http2/test_tools/frame_parts.cc", - "src/quiche/http2/test_tools/frame_parts.h", - "src/quiche/http2/test_tools/frame_parts_collector.cc", - "src/quiche/http2/test_tools/frame_parts_collector.h", - "src/quiche/http2/test_tools/frame_parts_collector_listener.cc", - "src/quiche/http2/test_tools/frame_parts_collector_listener.h", - "src/quiche/http2/test_tools/hpack_block_builder.cc", - "src/quiche/http2/test_tools/hpack_block_builder.h", - "src/quiche/http2/test_tools/hpack_block_collector.cc", - "src/quiche/http2/test_tools/hpack_block_collector.h", - "src/quiche/http2/test_tools/hpack_entry_collector.cc", - "src/quiche/http2/test_tools/hpack_entry_collector.h", - "src/quiche/http2/test_tools/hpack_example.cc", - "src/quiche/http2/test_tools/hpack_example.h", - "src/quiche/http2/test_tools/hpack_string_collector.cc", - "src/quiche/http2/test_tools/hpack_string_collector.h", - "src/quiche/http2/test_tools/http2_constants_test_util.cc", - "src/quiche/http2/test_tools/http2_constants_test_util.h", - "src/quiche/http2/test_tools/http2_frame_builder.cc", - "src/quiche/http2/test_tools/http2_frame_builder.h", - "src/quiche/http2/test_tools/http2_frame_decoder_listener_test_util.cc", - "src/quiche/http2/test_tools/http2_frame_decoder_listener_test_util.h", - "src/quiche/http2/test_tools/http2_random.cc", - "src/quiche/http2/test_tools/http2_random.h", - "src/quiche/http2/test_tools/http2_structure_decoder_test_util.cc", - "src/quiche/http2/test_tools/http2_structure_decoder_test_util.h", - "src/quiche/http2/test_tools/http2_structures_test_util.cc", - "src/quiche/http2/test_tools/http2_structures_test_util.h", - "src/quiche/http2/test_tools/payload_decoder_base_test_util.cc", - "src/quiche/http2/test_tools/payload_decoder_base_test_util.h", - "src/quiche/http2/test_tools/random_decoder_test_base.cc", - "src/quiche/http2/test_tools/random_decoder_test_base.h", - "src/quiche/http2/test_tools/random_util.cc", - "src/quiche/http2/test_tools/random_util.h", - "src/quiche/quic/core/quic_trace_visitor.cc", - "src/quiche/quic/core/quic_trace_visitor.h", - "src/quiche/quic/platform/api/quic_expect_bug.h", - "src/quiche/quic/platform/api/quic_test.h", - "src/quiche/quic/platform/api/quic_test_loopback.h", - "src/quiche/quic/platform/api/quic_test_output.h", - "src/quiche/quic/test_tools/bad_packet_writer.cc", - "src/quiche/quic/test_tools/bad_packet_writer.h", - "src/quiche/quic/test_tools/crypto_test_utils.cc", - "src/quiche/quic/test_tools/crypto_test_utils.h", - "src/quiche/quic/test_tools/failing_proof_source.cc", - "src/quiche/quic/test_tools/failing_proof_source.h", - "src/quiche/quic/test_tools/fake_proof_source.cc", - "src/quiche/quic/test_tools/fake_proof_source.h", - "src/quiche/quic/test_tools/first_flight.cc", - "src/quiche/quic/test_tools/first_flight.h", - "src/quiche/quic/test_tools/limited_mtu_test_writer.cc", - "src/quiche/quic/test_tools/limited_mtu_test_writer.h", - "src/quiche/quic/test_tools/mock_clock.cc", - "src/quiche/quic/test_tools/mock_clock.h", - "src/quiche/quic/test_tools/mock_quic_client_promised_info.cc", - "src/quiche/quic/test_tools/mock_quic_client_promised_info.h", - "src/quiche/quic/test_tools/mock_quic_dispatcher.cc", - "src/quiche/quic/test_tools/mock_quic_dispatcher.h", - "src/quiche/quic/test_tools/mock_quic_session_visitor.cc", - "src/quiche/quic/test_tools/mock_quic_session_visitor.h", - "src/quiche/quic/test_tools/mock_quic_spdy_client_stream.cc", - "src/quiche/quic/test_tools/mock_quic_spdy_client_stream.h", - "src/quiche/quic/test_tools/mock_quic_time_wait_list_manager.cc", - "src/quiche/quic/test_tools/mock_quic_time_wait_list_manager.h", - "src/quiche/quic/test_tools/mock_random.cc", - "src/quiche/quic/test_tools/mock_random.h", - "src/quiche/quic/test_tools/packet_dropping_test_writer.cc", - "src/quiche/quic/test_tools/packet_dropping_test_writer.h", - "src/quiche/quic/test_tools/packet_reordering_writer.cc", - "src/quiche/quic/test_tools/packet_reordering_writer.h", - "src/quiche/quic/test_tools/qpack/qpack_decoder_test_utils.cc", - "src/quiche/quic/test_tools/qpack/qpack_decoder_test_utils.h", - "src/quiche/quic/test_tools/qpack/qpack_encoder_peer.cc", - "src/quiche/quic/test_tools/qpack/qpack_encoder_peer.h", - "src/quiche/quic/test_tools/qpack/qpack_offline_decoder.cc", - "src/quiche/quic/test_tools/qpack/qpack_offline_decoder.h", - "src/quiche/quic/test_tools/qpack/qpack_test_utils.cc", - "src/quiche/quic/test_tools/qpack/qpack_test_utils.h", - "src/quiche/quic/test_tools/quic_buffered_packet_store_peer.cc", - "src/quiche/quic/test_tools/quic_buffered_packet_store_peer.h", - "src/quiche/quic/test_tools/quic_client_promised_info_peer.cc", - "src/quiche/quic/test_tools/quic_client_promised_info_peer.h", - "src/quiche/quic/test_tools/quic_client_session_cache_peer.h", - "src/quiche/quic/test_tools/quic_coalesced_packet_peer.cc", - "src/quiche/quic/test_tools/quic_coalesced_packet_peer.h", - "src/quiche/quic/test_tools/quic_config_peer.cc", - "src/quiche/quic/test_tools/quic_config_peer.h", - "src/quiche/quic/test_tools/quic_connection_peer.cc", - "src/quiche/quic/test_tools/quic_connection_peer.h", - "src/quiche/quic/test_tools/quic_crypto_server_config_peer.cc", - "src/quiche/quic/test_tools/quic_crypto_server_config_peer.h", - "src/quiche/quic/test_tools/quic_dispatcher_peer.cc", - "src/quiche/quic/test_tools/quic_dispatcher_peer.h", - "src/quiche/quic/test_tools/quic_flow_controller_peer.cc", - "src/quiche/quic/test_tools/quic_flow_controller_peer.h", - "src/quiche/quic/test_tools/quic_framer_peer.cc", - "src/quiche/quic/test_tools/quic_framer_peer.h", - "src/quiche/quic/test_tools/quic_interval_deque_peer.h", - "src/quiche/quic/test_tools/quic_packet_creator_peer.cc", - "src/quiche/quic/test_tools/quic_packet_creator_peer.h", - "src/quiche/quic/test_tools/quic_path_validator_peer.cc", - "src/quiche/quic/test_tools/quic_path_validator_peer.h", - "src/quiche/quic/test_tools/quic_sent_packet_manager_peer.cc", - "src/quiche/quic/test_tools/quic_sent_packet_manager_peer.h", - "src/quiche/quic/test_tools/quic_server_session_base_peer.h", - "src/quiche/quic/test_tools/quic_session_peer.cc", - "src/quiche/quic/test_tools/quic_session_peer.h", - "src/quiche/quic/test_tools/quic_spdy_session_peer.cc", - "src/quiche/quic/test_tools/quic_spdy_session_peer.h", - "src/quiche/quic/test_tools/quic_spdy_stream_peer.cc", - "src/quiche/quic/test_tools/quic_spdy_stream_peer.h", - "src/quiche/quic/test_tools/quic_stream_id_manager_peer.cc", - "src/quiche/quic/test_tools/quic_stream_id_manager_peer.h", - "src/quiche/quic/test_tools/quic_stream_peer.cc", - "src/quiche/quic/test_tools/quic_stream_peer.h", - "src/quiche/quic/test_tools/quic_stream_send_buffer_peer.cc", - "src/quiche/quic/test_tools/quic_stream_send_buffer_peer.h", - "src/quiche/quic/test_tools/quic_stream_sequencer_buffer_peer.cc", - "src/quiche/quic/test_tools/quic_stream_sequencer_buffer_peer.h", - "src/quiche/quic/test_tools/quic_stream_sequencer_peer.cc", - "src/quiche/quic/test_tools/quic_stream_sequencer_peer.h", - "src/quiche/quic/test_tools/quic_sustained_bandwidth_recorder_peer.cc", - "src/quiche/quic/test_tools/quic_sustained_bandwidth_recorder_peer.h", - "src/quiche/quic/test_tools/quic_test_backend.cc", - "src/quiche/quic/test_tools/quic_test_backend.h", - "src/quiche/quic/test_tools/quic_test_utils.cc", - "src/quiche/quic/test_tools/quic_test_utils.h", - "src/quiche/quic/test_tools/quic_time_wait_list_manager_peer.cc", - "src/quiche/quic/test_tools/quic_time_wait_list_manager_peer.h", - "src/quiche/quic/test_tools/quic_unacked_packet_map_peer.cc", - "src/quiche/quic/test_tools/quic_unacked_packet_map_peer.h", - "src/quiche/quic/test_tools/rtt_stats_peer.cc", - "src/quiche/quic/test_tools/rtt_stats_peer.h", - "src/quiche/quic/test_tools/send_algorithm_test_utils.cc", - "src/quiche/quic/test_tools/send_algorithm_test_utils.h", - "src/quiche/quic/test_tools/simple_data_producer.cc", - "src/quiche/quic/test_tools/simple_data_producer.h", - "src/quiche/quic/test_tools/simple_quic_framer.cc", - "src/quiche/quic/test_tools/simple_quic_framer.h", - "src/quiche/quic/test_tools/simple_session_cache.cc", - "src/quiche/quic/test_tools/simple_session_cache.h", - "src/quiche/quic/test_tools/simple_session_notifier.cc", - "src/quiche/quic/test_tools/simple_session_notifier.h", - "src/quiche/quic/test_tools/simulator/actor.cc", - "src/quiche/quic/test_tools/simulator/actor.h", - "src/quiche/quic/test_tools/simulator/alarm_factory.cc", - "src/quiche/quic/test_tools/simulator/alarm_factory.h", - "src/quiche/quic/test_tools/simulator/link.cc", - "src/quiche/quic/test_tools/simulator/link.h", - "src/quiche/quic/test_tools/simulator/packet_filter.cc", - "src/quiche/quic/test_tools/simulator/packet_filter.h", - "src/quiche/quic/test_tools/simulator/port.cc", - "src/quiche/quic/test_tools/simulator/port.h", - "src/quiche/quic/test_tools/simulator/queue.cc", - "src/quiche/quic/test_tools/simulator/queue.h", - "src/quiche/quic/test_tools/simulator/quic_endpoint.cc", - "src/quiche/quic/test_tools/simulator/quic_endpoint.h", - "src/quiche/quic/test_tools/simulator/quic_endpoint_base.cc", - "src/quiche/quic/test_tools/simulator/quic_endpoint_base.h", - "src/quiche/quic/test_tools/simulator/simulator.cc", - "src/quiche/quic/test_tools/simulator/simulator.h", - "src/quiche/quic/test_tools/simulator/switch.cc", - "src/quiche/quic/test_tools/simulator/switch.h", - "src/quiche/quic/test_tools/simulator/traffic_policer.cc", - "src/quiche/quic/test_tools/simulator/traffic_policer.h", - "src/quiche/quic/test_tools/test_certificates.cc", - "src/quiche/quic/test_tools/test_certificates.h", - "src/quiche/quic/test_tools/test_ticket_crypter.cc", - "src/quiche/quic/test_tools/test_ticket_crypter.h", - "src/quiche/quic/test_tools/web_transport_resets_backend.cc", - "src/quiche/quic/test_tools/web_transport_resets_backend.h", - "src/quiche/quic/test_tools/web_transport_test_tools.h", - "src/quiche/spdy/test_tools/mock_spdy_framer_visitor.cc", - "src/quiche/spdy/test_tools/mock_spdy_framer_visitor.h", - "src/quiche/spdy/test_tools/spdy_test_utils.cc", - "src/quiche/spdy/test_tools/spdy_test_utils.h", - "src/quiche/web_transport/test_tools/mock_web_transport.h", - ] - - configs += [ ":quiche_internal_config" ] - public_configs = [ ":quiche_config" ] - - deps = [ - ":quiche", - ":quiche_tool_support", - "//base", - "//crypto:test_support", - "//net:quic_test_flags_utils", - "//net:test_support", - "//testing/gmock", - "//testing/gtest", - "//third_party/boringssl", - "//third_party/protobuf:protobuf_lite", - "//third_party/quic_trace:quic_trace_proto", - ] -} - -static_library("quiche_tool_support") { - sources = [ - "overrides/quiche_platform_impl/quiche_command_line_flags_impl.cc", - "overrides/quiche_platform_impl/quiche_command_line_flags_impl.h", - "overrides/quiche_platform_impl/quiche_default_proof_providers_impl.cc", - "overrides/quiche_platform_impl/quiche_default_proof_providers_impl.h", - "overrides/quiche_platform_impl/quiche_system_event_loop_impl.h", - "src/quiche/common/platform/api/quiche_command_line_flags.h", - "src/quiche/common/platform/api/quiche_default_proof_providers.h", - "src/quiche/common/platform/api/quiche_file_utils.cc", - "src/quiche/common/platform/api/quiche_file_utils.h", - "src/quiche/common/platform/api/quiche_system_event_loop.h", - "src/quiche/common/platform/default/quiche_platform_impl/quiche_file_utils_impl.cc", - "src/quiche/common/platform/default/quiche_platform_impl/quiche_file_utils_impl.h", - "src/quiche/quic/core/chlo_extractor.cc", - "src/quiche/quic/core/chlo_extractor.h", - "src/quiche/quic/core/http/quic_spdy_server_stream_base.cc", - "src/quiche/quic/core/http/quic_spdy_server_stream_base.h", - "src/quiche/quic/core/quic_buffered_packet_store.cc", - "src/quiche/quic/core/quic_buffered_packet_store.h", - "src/quiche/quic/core/quic_dispatcher.cc", - "src/quiche/quic/core/quic_dispatcher.h", - "src/quiche/quic/core/quic_packet_writer_wrapper.cc", - "src/quiche/quic/core/quic_packet_writer_wrapper.h", - "src/quiche/quic/core/quic_process_packet_interface.h", - "src/quiche/quic/core/quic_time_wait_list_manager.cc", - "src/quiche/quic/core/quic_time_wait_list_manager.h", - "src/quiche/quic/core/tls_chlo_extractor.cc", - "src/quiche/quic/core/tls_chlo_extractor.h", - "src/quiche/quic/platform/api/quic_default_proof_providers.h", - "src/quiche/quic/tools/devious_baton.cc", - "src/quiche/quic/tools/devious_baton.h", - "src/quiche/quic/tools/fake_proof_verifier.h", - "src/quiche/quic/tools/quic_backend_response.cc", - "src/quiche/quic/tools/quic_backend_response.h", - "src/quiche/quic/tools/quic_client_base.cc", - "src/quiche/quic/tools/quic_client_base.h", - "src/quiche/quic/tools/quic_memory_cache_backend.cc", - "src/quiche/quic/tools/quic_memory_cache_backend.h", - "src/quiche/quic/tools/quic_simple_client_session.cc", - "src/quiche/quic/tools/quic_simple_client_session.h", - "src/quiche/quic/tools/quic_simple_client_stream.cc", - "src/quiche/quic/tools/quic_simple_client_stream.h", - "src/quiche/quic/tools/quic_simple_crypto_server_stream_helper.cc", - "src/quiche/quic/tools/quic_simple_crypto_server_stream_helper.h", - "src/quiche/quic/tools/quic_simple_dispatcher.cc", - "src/quiche/quic/tools/quic_simple_dispatcher.h", - "src/quiche/quic/tools/quic_simple_server_backend.h", - "src/quiche/quic/tools/quic_simple_server_session.cc", - "src/quiche/quic/tools/quic_simple_server_session.h", - "src/quiche/quic/tools/quic_simple_server_stream.cc", - "src/quiche/quic/tools/quic_simple_server_stream.h", - "src/quiche/quic/tools/quic_spdy_client_base.cc", - "src/quiche/quic/tools/quic_spdy_client_base.h", - "src/quiche/quic/tools/quic_spdy_server_base.h", - "src/quiche/quic/tools/quic_tcp_like_trace_converter.cc", - "src/quiche/quic/tools/quic_tcp_like_trace_converter.h", - "src/quiche/quic/tools/quic_url.cc", - "src/quiche/quic/tools/quic_url.h", - "src/quiche/quic/tools/simple_ticket_crypter.cc", - "src/quiche/quic/tools/simple_ticket_crypter.h", - "src/quiche/quic/tools/web_transport_test_visitors.h", - ] - - configs += [ ":quiche_internal_config" ] - public_configs = [ ":quiche_config" ] - - deps = [ - "//base", - "//base/third_party/dynamic_annotations", - "//net", - "//third_party/protobuf:protobuf_lite", - "//url", - ] -} - -# QUICHE-provided CLI tools that don't use epoll. -if (!is_ios) { - # The two libraries below, quic_client_core and quic_server_core, define - # mutually exclusive command-line flags, and thus any target depending - # directly on both will fail to build. Only executable targets should depend - # on those. - source_set("quic_client_core") { - testonly = true - sources = [ - "src/quiche/quic/tools/quic_toy_client.cc", - "src/quiche/quic/tools/quic_toy_client.h", - ] - - configs += [ ":quiche_internal_config" ] - public_configs = [ ":quiche_config" ] - - deps = [ - "//net", - "//net:quic_test_tools", - "//net:simple_quic_tools", - ] - } - source_set("quic_server_core") { - sources = [ - "src/quiche/common/masque/connect_udp_datagram_payload.cc", - "src/quiche/common/masque/connect_udp_datagram_payload.h", - "src/quiche/quic/tools/connect_server_backend.cc", - "src/quiche/quic/tools/connect_server_backend.h", - "src/quiche/quic/tools/connect_tunnel.cc", - "src/quiche/quic/tools/connect_tunnel.h", - "src/quiche/quic/tools/connect_udp_tunnel.cc", - "src/quiche/quic/tools/connect_udp_tunnel.h", - "src/quiche/quic/tools/quic_name_lookup.cc", - "src/quiche/quic/tools/quic_name_lookup.h", - "src/quiche/quic/tools/quic_toy_server.cc", - "src/quiche/quic/tools/quic_toy_server.h", - ] - - configs += [ ":quiche_internal_config" ] - public_configs = [ ":quiche_config" ] - - deps = [ - "//net", - "//net:simple_quic_tools", - ] - } - - executable("quic_packet_printer") { - sources = [ "src/quiche/quic/tools/quic_packet_printer_bin.cc" ] - - configs += [ ":quiche_internal_config" ] - public_configs = [ ":quiche_config" ] - - deps = [ - "//base", - "//build/win:default_exe_manifest", - "//net", - "//net:simple_quic_tools", - "//third_party/boringssl", - "//third_party/protobuf:protobuf_lite", - ] - } - - executable("quic_crypto_message_printer") { - sources = [ "src/quiche/quic/tools/crypto_message_printer_bin.cc" ] - - configs += [ ":quiche_internal_config" ] - public_configs = [ ":quiche_config" ] - - deps = [ - "//base", - "//build/win:default_exe_manifest", - "//net", - "//net:simple_quic_tools", - "//third_party/boringssl", - "//third_party/protobuf:protobuf_lite", - ] - } - - executable("quic_reject_reason_decoder") { - sources = [ "src/quiche/quic/tools/quic_reject_reason_decoder_bin.cc" ] - - configs += [ ":quiche_internal_config" ] - public_configs = [ ":quiche_config" ] - - deps = [ - "//base", - "//build/win:default_exe_manifest", - "//net", - "//net:simple_quic_tools", - "//third_party/boringssl", - "//third_party/protobuf:protobuf_lite", - ] - } - - executable("qpack_offline_decoder") { - testonly = true - - configs += [ ":quiche_internal_config" ] - public_configs = [ ":quiche_config" ] - - sources = [ "src/quiche/quic/tools/qpack_offline_decoder_bin.cc" ] - deps = [ - "//base", - "//net", - "//net:quic_test_tools", - "//net:simple_quic_tools", - "//testing/gmock", - ] - } -} - -bundle_data("test_data") { - visibility = [ ":quiche_tests" ] - testonly = true - sources = [ - "src/quiche/common/anonymous_tokens/testdata/strong_rsa_modulus2048_example.binarypb", - "src/quiche/common/anonymous_tokens/testdata/strong_rsa_modulus2048_example_2.binarypb", - "src/quiche/common/anonymous_tokens/testdata/strong_rsa_modulus3072_example.binarypb", - "src/quiche/common/anonymous_tokens/testdata/strong_rsa_modulus4096_example.binarypb", - "src/quiche/common/platform/api/testdir/README.md", - "src/quiche/common/platform/api/testdir/a/b/c/d/e", - "src/quiche/common/platform/api/testdir/a/subdir/testfile", - "src/quiche/common/platform/api/testdir/a/z", - "src/quiche/common/platform/api/testdir/testfile", - ] - outputs = [ "{{bundle_resources_dir}}/" + - "{{source_root_relative_dir}}/{{source_file_part}}" ] -} - -source_set("quiche_tests") { - testonly = true - sources = [ - "src/quiche/binary_http/binary_http_message_test.cc", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/client/anonymous_tokens_rsa_bssa_client_test.cc", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/crypto/anonymous_tokens_pb_openssl_converters_test.cc", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/crypto/at_crypto_utils_test.cc", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/crypto/rsa_blind_signer_test.cc", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/crypto/rsa_blinder_test.cc", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/crypto/rsa_ssa_pss_verifier_test.cc", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/shared/proto_utils_test.cc", - "src/quiche/blind_sign_auth/blind_sign_auth_test.cc", - "src/quiche/blind_sign_auth/cached_blind_sign_auth_test.cc", - "src/quiche/common/capsule_test.cc", - "src/quiche/common/platform/api/quiche_file_utils_test.cc", - "src/quiche/common/platform/api/quiche_hostname_utils_test.cc", - "src/quiche/common/platform/api/quiche_mem_slice_test.cc", - "src/quiche/common/platform/api/quiche_reference_counted_test.cc", - "src/quiche/common/platform/api/quiche_stack_trace_test.cc", - "src/quiche/common/platform/api/quiche_time_utils_test.cc", - "src/quiche/common/platform/api/quiche_url_utils_test.cc", - "src/quiche/common/quiche_buffer_allocator_test.cc", - "src/quiche/common/quiche_circular_deque_test.cc", - "src/quiche/common/quiche_data_reader_test.cc", - "src/quiche/common/quiche_data_writer_test.cc", - "src/quiche/common/quiche_endian_test.cc", - "src/quiche/common/quiche_ip_address_test.cc", - "src/quiche/common/quiche_linked_hash_map_test.cc", - "src/quiche/common/quiche_mem_slice_storage_test.cc", - "src/quiche/common/quiche_random_test.cc", - "src/quiche/common/quiche_text_utils_test.cc", - "src/quiche/common/simple_buffer_allocator_test.cc", - "src/quiche/common/structured_headers_generated_test.cc", - "src/quiche/common/structured_headers_test.cc", - "src/quiche/http2/adapter/event_forwarder_test.cc", - "src/quiche/http2/adapter/header_validator_test.cc", - "src/quiche/http2/adapter/noop_header_validator_test.cc", - "src/quiche/http2/adapter/oghttp2_adapter_test.cc", - "src/quiche/http2/adapter/oghttp2_session_test.cc", - "src/quiche/http2/adapter/window_manager_test.cc", - "src/quiche/http2/core/priority_write_scheduler_test.cc", - "src/quiche/http2/decoder/decode_buffer_test.cc", - "src/quiche/http2/decoder/decode_http2_structures_test.cc", - "src/quiche/http2/decoder/http2_frame_decoder_test.cc", - "src/quiche/http2/decoder/http2_structure_decoder_test.cc", - "src/quiche/http2/decoder/payload_decoders/altsvc_payload_decoder_test.cc", - "src/quiche/http2/decoder/payload_decoders/continuation_payload_decoder_test.cc", - "src/quiche/http2/decoder/payload_decoders/data_payload_decoder_test.cc", - "src/quiche/http2/decoder/payload_decoders/goaway_payload_decoder_test.cc", - "src/quiche/http2/decoder/payload_decoders/headers_payload_decoder_test.cc", - "src/quiche/http2/decoder/payload_decoders/ping_payload_decoder_test.cc", - "src/quiche/http2/decoder/payload_decoders/priority_payload_decoder_test.cc", - "src/quiche/http2/decoder/payload_decoders/priority_update_payload_decoder_test.cc", - "src/quiche/http2/decoder/payload_decoders/push_promise_payload_decoder_test.cc", - "src/quiche/http2/decoder/payload_decoders/rst_stream_payload_decoder_test.cc", - "src/quiche/http2/decoder/payload_decoders/settings_payload_decoder_test.cc", - "src/quiche/http2/decoder/payload_decoders/unknown_payload_decoder_test.cc", - "src/quiche/http2/decoder/payload_decoders/window_update_payload_decoder_test.cc", - "src/quiche/http2/hpack/decoder/hpack_block_collector_test.cc", - "src/quiche/http2/hpack/decoder/hpack_block_decoder_test.cc", - "src/quiche/http2/hpack/decoder/hpack_decoder_state_test.cc", - "src/quiche/http2/hpack/decoder/hpack_decoder_string_buffer_test.cc", - "src/quiche/http2/hpack/decoder/hpack_decoder_tables_test.cc", - "src/quiche/http2/hpack/decoder/hpack_decoder_test.cc", - "src/quiche/http2/hpack/decoder/hpack_entry_collector_test.cc", - "src/quiche/http2/hpack/decoder/hpack_entry_decoder_test.cc", - "src/quiche/http2/hpack/decoder/hpack_entry_type_decoder_test.cc", - "src/quiche/http2/hpack/decoder/hpack_string_decoder_test.cc", - "src/quiche/http2/hpack/decoder/hpack_whole_entry_buffer_test.cc", - "src/quiche/http2/hpack/http2_hpack_constants_test.cc", - "src/quiche/http2/hpack/huffman/hpack_huffman_decoder_test.cc", - "src/quiche/http2/hpack/huffman/hpack_huffman_encoder_test.cc", - "src/quiche/http2/hpack/huffman/hpack_huffman_transcoder_test.cc", - "src/quiche/http2/hpack/varint/hpack_varint_decoder_test.cc", - "src/quiche/http2/hpack/varint/hpack_varint_encoder_test.cc", - "src/quiche/http2/hpack/varint/hpack_varint_round_trip_test.cc", - "src/quiche/http2/http2_constants_test.cc", - "src/quiche/http2/http2_structures_test.cc", - "src/quiche/http2/test_tools/hpack_block_builder_test.cc", - "src/quiche/http2/test_tools/http2_random_test.cc", - "src/quiche/oblivious_http/buffers/oblivious_http_integration_test.cc", - "src/quiche/oblivious_http/buffers/oblivious_http_request_test.cc", - "src/quiche/oblivious_http/buffers/oblivious_http_response_test.cc", - "src/quiche/oblivious_http/common/oblivious_http_header_key_config_test.cc", - "src/quiche/oblivious_http/oblivious_http_client_test.cc", - "src/quiche/oblivious_http/oblivious_http_gateway_test.cc", - "src/quiche/quic/core/congestion_control/bandwidth_sampler_test.cc", - "src/quiche/quic/core/congestion_control/bbr2_simulator_test.cc", - "src/quiche/quic/core/congestion_control/bbr_sender_test.cc", - "src/quiche/quic/core/congestion_control/cubic_bytes_test.cc", - "src/quiche/quic/core/congestion_control/general_loss_algorithm_test.cc", - "src/quiche/quic/core/congestion_control/hybrid_slow_start_test.cc", - "src/quiche/quic/core/congestion_control/pacing_sender_test.cc", - "src/quiche/quic/core/congestion_control/prr_sender_test.cc", - "src/quiche/quic/core/congestion_control/rtt_stats_test.cc", - "src/quiche/quic/core/congestion_control/send_algorithm_test.cc", - "src/quiche/quic/core/congestion_control/tcp_cubic_sender_bytes_test.cc", - "src/quiche/quic/core/congestion_control/uber_loss_algorithm_test.cc", - "src/quiche/quic/core/congestion_control/windowed_filter_test.cc", - "src/quiche/quic/core/crypto/aes_128_gcm_12_decrypter_test.cc", - "src/quiche/quic/core/crypto/aes_128_gcm_12_encrypter_test.cc", - "src/quiche/quic/core/crypto/aes_128_gcm_decrypter_test.cc", - "src/quiche/quic/core/crypto/aes_128_gcm_encrypter_test.cc", - "src/quiche/quic/core/crypto/aes_256_gcm_decrypter_test.cc", - "src/quiche/quic/core/crypto/aes_256_gcm_encrypter_test.cc", - "src/quiche/quic/core/crypto/cert_compressor_test.cc", - "src/quiche/quic/core/crypto/certificate_util_test.cc", - "src/quiche/quic/core/crypto/certificate_view_test.cc", - "src/quiche/quic/core/crypto/chacha20_poly1305_decrypter_test.cc", - "src/quiche/quic/core/crypto/chacha20_poly1305_encrypter_test.cc", - "src/quiche/quic/core/crypto/chacha20_poly1305_tls_decrypter_test.cc", - "src/quiche/quic/core/crypto/chacha20_poly1305_tls_encrypter_test.cc", - "src/quiche/quic/core/crypto/channel_id_test.cc", - "src/quiche/quic/core/crypto/client_proof_source_test.cc", - "src/quiche/quic/core/crypto/crypto_framer_test.cc", - "src/quiche/quic/core/crypto/crypto_handshake_message_test.cc", - "src/quiche/quic/core/crypto/crypto_secret_boxer_test.cc", - "src/quiche/quic/core/crypto/crypto_server_test.cc", - "src/quiche/quic/core/crypto/crypto_utils_test.cc", - "src/quiche/quic/core/crypto/curve25519_key_exchange_test.cc", - "src/quiche/quic/core/crypto/null_decrypter_test.cc", - "src/quiche/quic/core/crypto/null_encrypter_test.cc", - "src/quiche/quic/core/crypto/p256_key_exchange_test.cc", - "src/quiche/quic/core/crypto/proof_source_x509_test.cc", - "src/quiche/quic/core/crypto/quic_client_session_cache_test.cc", - "src/quiche/quic/core/crypto/quic_compressed_certs_cache_test.cc", - "src/quiche/quic/core/crypto/quic_crypto_client_config_test.cc", - "src/quiche/quic/core/crypto/quic_crypto_server_config_test.cc", - "src/quiche/quic/core/crypto/quic_hkdf_test.cc", - "src/quiche/quic/core/crypto/transport_parameters_test.cc", - "src/quiche/quic/core/crypto/web_transport_fingerprint_proof_verifier_test.cc", - "src/quiche/quic/core/frames/quic_frames_test.cc", - "src/quiche/quic/core/http/http_decoder_test.cc", - "src/quiche/quic/core/http/http_encoder_test.cc", - "src/quiche/quic/core/http/http_frames_test.cc", - "src/quiche/quic/core/http/quic_client_promised_info_test.cc", - "src/quiche/quic/core/http/quic_client_push_promise_index_test.cc", - "src/quiche/quic/core/http/quic_header_list_test.cc", - "src/quiche/quic/core/http/quic_headers_stream_test.cc", - "src/quiche/quic/core/http/quic_receive_control_stream_test.cc", - "src/quiche/quic/core/http/quic_send_control_stream_test.cc", - "src/quiche/quic/core/http/quic_server_session_base_test.cc", - "src/quiche/quic/core/http/quic_spdy_session_test.cc", - "src/quiche/quic/core/http/quic_spdy_stream_body_manager_test.cc", - "src/quiche/quic/core/http/quic_spdy_stream_test.cc", - "src/quiche/quic/core/http/spdy_server_push_utils_test.cc", - "src/quiche/quic/core/http/spdy_utils_test.cc", - "src/quiche/quic/core/http/web_transport_http3_test.cc", - "src/quiche/quic/core/legacy_quic_stream_id_manager_test.cc", - "src/quiche/quic/core/packet_number_indexed_queue_test.cc", - "src/quiche/quic/core/qpack/qpack_blocking_manager_test.cc", - "src/quiche/quic/core/qpack/qpack_decoded_headers_accumulator_test.cc", - "src/quiche/quic/core/qpack/qpack_decoder_stream_receiver_test.cc", - "src/quiche/quic/core/qpack/qpack_decoder_stream_sender_test.cc", - "src/quiche/quic/core/qpack/qpack_decoder_test.cc", - "src/quiche/quic/core/qpack/qpack_encoder_stream_receiver_test.cc", - "src/quiche/quic/core/qpack/qpack_encoder_stream_sender_test.cc", - "src/quiche/quic/core/qpack/qpack_encoder_test.cc", - "src/quiche/quic/core/qpack/qpack_header_table_test.cc", - "src/quiche/quic/core/qpack/qpack_index_conversions_test.cc", - "src/quiche/quic/core/qpack/qpack_instruction_decoder_test.cc", - "src/quiche/quic/core/qpack/qpack_instruction_encoder_test.cc", - "src/quiche/quic/core/qpack/qpack_receive_stream_test.cc", - "src/quiche/quic/core/qpack/qpack_required_insert_count_test.cc", - "src/quiche/quic/core/qpack/qpack_round_trip_test.cc", - "src/quiche/quic/core/qpack/qpack_send_stream_test.cc", - "src/quiche/quic/core/qpack/qpack_static_table_test.cc", - "src/quiche/quic/core/qpack/value_splitting_header_list_test.cc", - "src/quiche/quic/core/quic_alarm_test.cc", - "src/quiche/quic/core/quic_arena_scoped_ptr_test.cc", - "src/quiche/quic/core/quic_bandwidth_test.cc", - "src/quiche/quic/core/quic_buffered_packet_store_test.cc", - "src/quiche/quic/core/quic_chaos_protector_test.cc", - "src/quiche/quic/core/quic_coalesced_packet_test.cc", - "src/quiche/quic/core/quic_config_test.cc", - "src/quiche/quic/core/quic_connection_context_test.cc", - "src/quiche/quic/core/quic_connection_id_manager_test.cc", - "src/quiche/quic/core/quic_connection_id_test.cc", - "src/quiche/quic/core/quic_connection_test.cc", - "src/quiche/quic/core/quic_control_frame_manager_test.cc", - "src/quiche/quic/core/quic_crypto_client_handshaker_test.cc", - "src/quiche/quic/core/quic_crypto_client_stream_test.cc", - "src/quiche/quic/core/quic_crypto_server_stream_test.cc", - "src/quiche/quic/core/quic_crypto_stream_test.cc", - "src/quiche/quic/core/quic_data_writer_test.cc", - "src/quiche/quic/core/quic_datagram_queue_test.cc", - "src/quiche/quic/core/quic_dispatcher_test.cc", - "src/quiche/quic/core/quic_error_codes_test.cc", - "src/quiche/quic/core/quic_flow_controller_test.cc", - "src/quiche/quic/core/quic_framer_test.cc", - "src/quiche/quic/core/quic_idle_network_detector_test.cc", - "src/quiche/quic/core/quic_interval_deque_test.cc", - "src/quiche/quic/core/quic_interval_set_test.cc", - "src/quiche/quic/core/quic_interval_test.cc", - "src/quiche/quic/core/quic_lru_cache_test.cc", - "src/quiche/quic/core/quic_network_blackhole_detector_test.cc", - "src/quiche/quic/core/quic_one_block_arena_test.cc", - "src/quiche/quic/core/quic_packet_creator_test.cc", - "src/quiche/quic/core/quic_packet_number_test.cc", - "src/quiche/quic/core/quic_packets_test.cc", - "src/quiche/quic/core/quic_path_validator_test.cc", - "src/quiche/quic/core/quic_received_packet_manager_test.cc", - "src/quiche/quic/core/quic_sent_packet_manager_test.cc", - "src/quiche/quic/core/quic_server_id_test.cc", - "src/quiche/quic/core/quic_session_test.cc", - "src/quiche/quic/core/quic_socket_address_coder_test.cc", - "src/quiche/quic/core/quic_stream_id_manager_test.cc", - "src/quiche/quic/core/quic_stream_priority_test.cc", - "src/quiche/quic/core/quic_stream_send_buffer_test.cc", - "src/quiche/quic/core/quic_stream_sequencer_buffer_test.cc", - "src/quiche/quic/core/quic_stream_sequencer_test.cc", - "src/quiche/quic/core/quic_stream_test.cc", - "src/quiche/quic/core/quic_sustained_bandwidth_recorder_test.cc", - "src/quiche/quic/core/quic_tag_test.cc", - "src/quiche/quic/core/quic_time_accumulator_test.cc", - "src/quiche/quic/core/quic_time_test.cc", - "src/quiche/quic/core/quic_time_wait_list_manager_test.cc", - "src/quiche/quic/core/quic_trace_visitor_test.cc", - "src/quiche/quic/core/quic_unacked_packet_map_test.cc", - "src/quiche/quic/core/quic_utils_test.cc", - "src/quiche/quic/core/quic_version_manager_test.cc", - "src/quiche/quic/core/quic_versions_test.cc", - "src/quiche/quic/core/quic_write_blocked_list_test.cc", - "src/quiche/quic/core/tls_chlo_extractor_test.cc", - "src/quiche/quic/core/tls_client_handshaker_test.cc", - "src/quiche/quic/core/uber_quic_stream_id_manager_test.cc", - "src/quiche/quic/core/uber_received_packet_manager_test.cc", - "src/quiche/quic/platform/api/quic_socket_address_test.cc", - "src/quiche/quic/test_tools/crypto_test_utils_test.cc", - "src/quiche/quic/test_tools/quic_test_utils_test.cc", - "src/quiche/quic/test_tools/simple_session_notifier_test.cc", - "src/quiche/quic/test_tools/simulator/quic_endpoint_test.cc", - "src/quiche/quic/test_tools/simulator/simulator_test.cc", - "src/quiche/quic/tools/quic_memory_cache_backend_test.cc", - "src/quiche/quic/tools/quic_tcp_like_trace_converter_test.cc", - "src/quiche/quic/tools/simple_ticket_crypter_test.cc", - "src/quiche/spdy/core/array_output_buffer_test.cc", - "src/quiche/spdy/core/hpack/hpack_decoder_adapter_test.cc", - "src/quiche/spdy/core/hpack/hpack_encoder_test.cc", - "src/quiche/spdy/core/hpack/hpack_entry_test.cc", - "src/quiche/spdy/core/hpack/hpack_header_table_test.cc", - "src/quiche/spdy/core/hpack/hpack_output_stream_test.cc", - "src/quiche/spdy/core/hpack/hpack_round_trip_test.cc", - "src/quiche/spdy/core/hpack/hpack_static_table_test.cc", - "src/quiche/spdy/core/http2_header_block_test.cc", - "src/quiche/spdy/core/http2_header_storage_test.cc", - "src/quiche/spdy/core/spdy_alt_svc_wire_format_test.cc", - "src/quiche/spdy/core/spdy_frame_builder_test.cc", - "src/quiche/spdy/core/spdy_framer_test.cc", - "src/quiche/spdy/core/spdy_intrusive_list_test.cc", - "src/quiche/spdy/core/spdy_pinnable_buffer_piece_test.cc", - "src/quiche/spdy/core/spdy_prefixed_buffer_reader_test.cc", - "src/quiche/spdy/core/spdy_protocol_test.cc", - "src/quiche/spdy/core/spdy_simple_arena_test.cc", - ] - - data = [ - "src/quiche/common/platform/api/testdir/", - "src/quiche/common/anonymous_tokens/testdata/", - ] - - configs += [ ":quiche_internal_config" ] - public_configs = [ ":quiche_config" ] - - deps = [ - ":blind_sign_auth", - ":blind_sign_auth_test_support", - "//net", - "//net:quic_test_tools", - "//net:simple_quic_tools", - "//net:spdy_test_tools", - "//testing/gmock", - "//testing/gtest", - ] - if (is_ios) { - deps += [ ":test_data" ] - } - public_deps = [] - - if (build_epoll_based_tools) { - sources += [ - "overrides/quiche_platform_impl/quiche_command_line_flags_test.cc", - "src/quiche/quic/core/chlo_extractor_test.cc", - "src/quiche/quic/core/http/end_to_end_test.cc", - "src/quiche/quic/core/http/quic_spdy_client_session_test.cc", - "src/quiche/quic/core/http/quic_spdy_client_stream_test.cc", - "src/quiche/quic/core/http/quic_spdy_server_stream_base_test.cc", - "src/quiche/quic/tools/quic_default_client_test.cc", - "src/quiche/quic/tools/quic_server_test.cc", - "src/quiche/quic/tools/quic_simple_server_session_test.cc", - "src/quiche/quic/tools/quic_simple_server_stream_test.cc", - "src/quiche/quic/tools/quic_url_test.cc", - ] - public_deps += [ - ":epoll_test_support", - ":epoll_tool_support", - ] - } -} - -fuzzer_test("net_quic_framer_fuzzer") { - sources = [ "src/quiche/quic/test_tools/fuzzing/quic_framer_fuzzer.cc" ] - - deps = [ - "//net", - "//net:net_fuzzer_test_support", - "//net:quic_test_tools", - "//net:test_support", - "//net/data/ssl/certificates:generate_fuzzer_cert_includes", - ] -} - -fuzzer_test("net_quic_framer_process_data_packet_fuzzer") { - sources = [ "src/quiche/quic/test_tools/fuzzing/quic_framer_process_data_packet_fuzzer.cc" ] - - deps = [ - "//net", - "//net:net_fuzzer_test_support", - "//net:quic_test_tools", - "//net:test_support", - "//net/data/ssl/certificates:generate_fuzzer_cert_includes", - ] -} - -fuzzer_test("net_qpack_decoder_fuzzer") { - sources = [ "src/quiche/quic/core/qpack/fuzzer/qpack_decoder_fuzzer.cc" ] - deps = [ - "//base", - "//net", - "//net:net_fuzzer_test_support", - "//net:quic_test_tools", - "//net:test_support", - ] -} - -fuzzer_test("net_qpack_encoder_stream_receiver_fuzzer") { - sources = [ - "src/quiche/quic/core/qpack/fuzzer/qpack_encoder_stream_receiver_fuzzer.cc", - ] - deps = [ - "//base", - "//net", - "//net:net_fuzzer_test_support", - ] -} - -fuzzer_test("net_qpack_encoder_stream_sender_fuzzer") { - sources = [ - "src/quiche/quic/core/qpack/fuzzer/qpack_encoder_stream_sender_fuzzer.cc", - ] - deps = [ - "//base", - "//net", - "//net:net_fuzzer_test_support", - "//net:quic_test_tools", - "//net:test_support", - ] -} - -fuzzer_test("net_qpack_round_trip_fuzzer") { - sources = [ "src/quiche/quic/core/qpack/fuzzer/qpack_round_trip_fuzzer.cc" ] - deps = [ - "//base", - "//net", - "//net:net_fuzzer_test_support", - "//net:quic_test_tools", - "//net:test_support", - ] -} - -component("blind_sign_auth") { - visibility = [ - ":blind_sign_auth_test_support", - ":quiche_tests", - "//chrome/browser:browser", - "//chrome/test:*", - ] - - sources = [ - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/client/anonymous_tokens_rsa_bssa_client.cc", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/client/anonymous_tokens_rsa_bssa_client.h", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/crypto/anonymous_tokens_pb_openssl_converters.cc", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/crypto/anonymous_tokens_pb_openssl_converters.h", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/crypto/blind_signer.h", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/crypto/blinder.h", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/crypto/constants.h", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/crypto/crypto_utils.cc", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/crypto/crypto_utils.h", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/crypto/rsa_blind_signer.cc", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/crypto/rsa_blind_signer.h", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/crypto/rsa_blinder.cc", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/crypto/rsa_blinder.h", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/crypto/rsa_ssa_pss_verifier.cc", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/crypto/rsa_ssa_pss_verifier.h", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/crypto/verifier.h", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/shared/proto_utils.cc", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/shared/proto_utils.h", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/shared/status_utils.h", - "src/quiche/blind_sign_auth/blind_sign_auth.cc", - "src/quiche/blind_sign_auth/blind_sign_auth.h", - "src/quiche/blind_sign_auth/blind_sign_auth_interface.h", - "src/quiche/blind_sign_auth/blind_sign_http_interface.h", - "src/quiche/blind_sign_auth/blind_sign_http_response.h", - "src/quiche/blind_sign_auth/cached_blind_sign_auth.cc", - "src/quiche/blind_sign_auth/cached_blind_sign_auth.h", - ] - configs += [ ":quiche_internal_config" ] - public_configs = [ ":quiche_config" ] - - deps = [ - ":quiche", - "//base", - "//third_party/abseil-cpp:absl", - "//third_party/boringssl", - "//url", - ] - - public_deps = [ ":blind_sign_auth_proto" ] - - defines = [ "IS_QUICHE_IMPL" ] -} - -proto_library("blind_sign_auth_proto") { - visibility = [ - ":blind_sign_auth", - ":blind_sign_auth_test_support", - ":quiche", - ":quiche_tests", - ] - - sources = [ - "src/quiche/blind_sign_auth/anonymous_tokens/proto/anonymous_tokens.proto", - "src/quiche/blind_sign_auth/proto/any.proto", - "src/quiche/blind_sign_auth/proto/attestation.proto", - "src/quiche/blind_sign_auth/proto/auth_and_sign.proto", - "src/quiche/blind_sign_auth/proto/get_initial_data.proto", - "src/quiche/blind_sign_auth/proto/key_services.proto", - "src/quiche/blind_sign_auth/proto/public_metadata.proto", - "src/quiche/blind_sign_auth/proto/spend_token_data.proto", - "src/quiche/blind_sign_auth/proto/timestamp.proto", - ] - cc_generator_options = "lite=true,dllexport_decl=COMPONENT_EXPORT(QUICHE):" - cc_include = "base/component_export.h" - component_build_force_source_set = true - - proto_in_dir = "src" - - deps = [ "//base" ] - - defines = [ "IS_QUICHE_IMPL" ] - - extra_configs = [ "//build/config/compiler:wexit_time_destructors" ] -} - -static_library("blind_sign_auth_test_support") { - visibility = [ ":quiche_tests" ] - testonly = true - sources = [ - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/testing/proto_utils.cc", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/testing/proto_utils.h", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/testing/utils.cc", - "src/quiche/blind_sign_auth/anonymous_tokens/cpp/testing/utils.h", - "src/quiche/blind_sign_auth/test_tools/mock_blind_sign_auth_interface.h", - "src/quiche/blind_sign_auth/test_tools/mock_blind_sign_http_interface.h", - ] - configs += [ ":quiche_internal_config" ] - public_configs = [ ":quiche_config" ] - - deps = [ - ":blind_sign_auth", - ":quiche", - ":quiche_test_support", - ":quiche_tool_support", - "//base", - "//testing/gmock", - "//testing/gtest", - "//third_party/abseil-cpp:absl", - "//third_party/boringssl", - ] -} diff --git a/src/net/tools/huffman_trie/BUILD.gn b/src/net/tools/huffman_trie/BUILD.gn index 4e9331ab56..feb1553587 100644 --- a/src/net/tools/huffman_trie/BUILD.gn +++ b/src/net/tools/huffman_trie/BUILD.gn @@ -17,19 +17,3 @@ source_set("huffman_trie_generator_sources") { ] deps = [ "//base" ] } - -source_set("huffman_trie_generator_test_sources") { - testonly = true - sources = [ - "bit_writer_unittest.cc", - "huffman/huffman_builder_unittest.cc", - "trie/trie_bit_buffer_unittest.cc", - ] - deps = [ - ":huffman_trie_generator_sources", - "//base", - "//base/test:test_support", - "//testing/gmock", - "//testing/gtest", - ] -} diff --git a/src/net/tools/transport_security_state_generator/BUILD.gn b/src/net/tools/transport_security_state_generator/BUILD.gn index 6069a30232..1bf81bbe91 100644 --- a/src/net/tools/transport_security_state_generator/BUILD.gn +++ b/src/net/tools/transport_security_state_generator/BUILD.gn @@ -28,23 +28,6 @@ source_set("transport_security_state_generator_sources") { ] } -source_set("transport_security_state_generator_test_sources") { - testonly = true - sources = [ - "cert_util_unittest.cc", - "input_file_parsers_unittest.cc", - "spki_hash_unittest.cc", - ] - deps = [ - ":transport_security_state_generator_sources", - "//base", - "//base/test:test_support", - "//testing/gmock", - "//testing/gtest", - "//third_party/boringssl", - ] -} - executable("transport_security_state_generator") { sources = [ "transport_security_state_generator.cc" ] deps = [ diff --git a/src/third_party/boringssl/BUILD.gn b/src/third_party/boringssl/BUILD.gn index c4e7925447..d8f2463987 100644 --- a/src/third_party/boringssl/BUILD.gn +++ b/src/third_party/boringssl/BUILD.gn @@ -7,7 +7,6 @@ import("//build/config/arm.gni") import("//build/config/compiler/compiler.gni") import("//build/config/sanitizers/sanitizers.gni") import("//build_overrides/build.gni") -import("//testing/libfuzzer/fuzzer_test.gni") import("BUILD.generated.gni") import("BUILD.generated_tests.gni") diff --git a/src/third_party/brotli/BUILD.gn b/src/third_party/brotli/BUILD.gn index 0e986ea204..0aa74779e8 100644 --- a/src/third_party/brotli/BUILD.gn +++ b/src/third_party/brotli/BUILD.gn @@ -2,8 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//testing/libfuzzer/fuzzer_test.gni") - if (is_win) { import("//build/config/win/visual_studio_version.gni") } @@ -210,9 +208,3 @@ if (current_toolchain == host_toolchain) { } } } - -fuzzer_test("brotli_fuzzer") { - sources = [ "fuzz/decode_fuzzer.c" ] - deps = [ ":dec" ] - libfuzzer_options = [ "max_len=1280" ] -} diff --git a/src/url/BUILD.gn b/src/url/BUILD.gn index 7a10d5d282..38713d28f5 100644 --- a/src/url/BUILD.gn +++ b/src/url/BUILD.gn @@ -3,8 +3,6 @@ # found in the LICENSE file. import("//build/buildflag_header.gni") -import("//testing/libfuzzer/fuzzer_test.gni") -import("//testing/test.gni") import("features.gni") import("//build/config/android/jni.gni") @@ -101,288 +99,3 @@ component("url") { ] } } - -if (is_android || is_robolectric) { - generate_jni("url_jni_headers") { - sources = [ "android/java/src/org/chromium/url/IDNStringUtil.java" ] - } - - generate_jni("origin_jni_headers") { - sources = [ "android/java/src/org/chromium/url/Origin.java" ] - } - - generate_jni("gurl_jni_headers") { - sources = [ - "android/java/src/org/chromium/url/GURL.java", - "android/java/src/org/chromium/url/Parsed.java", - ] - } - - source_set("gurl_android") { - sources = [ - "android/gurl_android.cc", - "android/gurl_android.h", - "android/parsed_android.cc", - "android/parsed_android.h", - ] - - deps = [ - ":gurl_jni_headers", - ":url", - "//base:base", - ] - - if (is_robolectric) { - # Make jni.h available. - configs += [ "//third_party/jdk" ] - } - } - - static_library("origin_android") { - sources = [ "android/origin_android.cc" ] - - deps = [ - ":gurl_android", - ":origin_jni_headers", - ":url", - "//base", - ] - } -} - -if (is_android) { - android_library("url_java") { - sources = [ "android/java/src/org/chromium/url/IDNStringUtil.java" ] - deps = [ "//base:jni_java" ] - } -} - -if (is_android && !is_cronet_build) { - android_library("gurl_java") { - srcjar_deps = [ ":gurl_jni_headers" ] - sources = [ - "android/java/src/org/chromium/url/GURL.java", - "android/java/src/org/chromium/url/Parsed.java", - "android/java/src/org/chromium/url/URI.java", - ] - deps = [ - "//base:base_java", - "//base:jni_java", - "//build/android:build_java", - "//third_party/android_deps:com_google_errorprone_error_prone_annotations_java", - "//third_party/androidx:androidx_annotation_annotation_java", - "//url/mojom:url_mojom_gurl_java", - ] - } - - android_library("origin_java") { - srcjar_deps = [ ":origin_jni_headers" ] - sources = [ "android/java/src/org/chromium/url/Origin.java" ] - deps = [ - ":gurl_java", - "//base:jni_java", - "//build/android:build_java", - "//mojo/public/java:bindings_java", - "//mojo/public/mojom/base:base_java", - "//url/mojom:url_mojom_origin_java", - ] - } -} - -source_set("url_test_support") { - testonly = true - - sources = [ - "gurl_abstract_tests.h", - "origin_abstract_tests.cc", - "origin_abstract_tests.h", - ] - - public_deps = [ - ":url", - "//base", - "//base/test:test_support", - "//testing/gmock", - "//testing/gtest", - ] -} - -test("url_unittests") { - sources = [ - "gurl_unittest.cc", - "origin_unittest.cc", - "run_all_unittests.cc", - "scheme_host_port_unittest.cc", - "url_canon_icu_unittest.cc", - "url_canon_unittest.cc", - "url_parse_unittest.cc", - "url_test_utils.h", - "url_util_unittest.cc", - ] - - deps = [ - ":url", - ":url_test_support", - "//base", - "//base/test:test_support", - "//testing/gmock", - "//testing/gtest", - ] - - if (use_platform_icu_alternatives) { - # Unit tests that are not supported by the current ICU alternatives on Android. - if (is_android) { - sources -= [ - "url_canon_icu_unittest.cc", - "url_canon_unittest.cc", - ] - deps += [ ":url_java" ] - } - - # Unit tests that are not supported by the current ICU alternatives on iOS. - if (is_ios) { - sources -= [ - "origin_unittest.cc", - "scheme_host_port_unittest.cc", - "url_canon_icu_unittest.cc", - "url_canon_unittest.cc", - ] - } - } else { # !use_platform_icu_alternatives - deps += [ "//third_party/icu:icuuc" ] - } - - if (!is_ios && !is_cronet_build) { - sources += [ - "mojom/scheme_host_port_mojom_traits_unittest.cc", - "mojom/url_gurl_mojom_traits_unittest.cc", - ] - deps += [ - "//mojo/core/embedder", - "//mojo/public/cpp/test_support:test_utils", - "//url/ipc:url_ipc_unittests", - "//url/mojom:mojom_traits", - "//url/mojom:test_url_mojom_gurl", - ] - } -} - -test("url_perftests") { - sources = [ - "run_all_perftests.cc", - "url_parse_perftest.cc", - ] - - deps = [ - ":url", - "//base", - "//base/test:test_support", - "//testing/gtest", - ] -} - -fuzzer_test("gurl_fuzzer") { - sources = [ "gurl_fuzzer.cc" ] - deps = [ - ":url", - "//base", - "//base:i18n", - ] - dict = "gurl_fuzzer.dict" -} - -if (is_android && !is_cronet_build) { - source_set("android_test_helper") { - testonly = true - sources = [ - "android/gurl_java_test_helper.cc", - "android/origin_java_test_helper.cc", - ] - deps = [ - ":gurl_android", - ":j_test_jni_headers", - ":origin_android", - ":url", - "//base/test:test_support", - ] - } - - android_library("android_test_helper_java") { - testonly = true - - srcjar_deps = [ ":j_test_jni_headers" ] - sources = [ - "android/javatests/src/org/chromium/url/GURLJavaTestHelper.java", - "android/javatests/src/org/chromium/url/OriginJavaTestHelper.java", - ] - deps = [ - ":gurl_java", - ":origin_java", - "//base:base_java_test_support", - "//base:jni_java", - ] - } - - # Targets depending on gurl_junit_test_support do not need to bypass platform - # checks. - android_library("gurl_junit_test_support") { - testonly = true - sources = [ "android/test/java/src/org/chromium/url/JUnitTestGURLs.java" ] - deps = [ ":gurl_java" ] - } - - android_library("url_java_unit_tests") { - testonly = true - sources = [ - "android/javatests/src/org/chromium/url/GURLJavaTest.java", - "android/javatests/src/org/chromium/url/OriginJavaTest.java", - ] - deps = [ - ":android_test_helper_java", - ":gurl_java", - ":gurl_junit_test_support", - ":origin_java", - "//base:base_java", - "//base:base_java_test_support", - "//base:jni_java", - "//content/public/test/android:content_java_test_support", - "//mojo/public/mojom/base:base_java", - "//third_party/androidx:androidx_core_core_java", - "//third_party/androidx:androidx_test_runner_java", - "//third_party/junit", - "//third_party/mockito:mockito_java", - "//url/mojom:url_mojom_gurl_java", - "//url/mojom:url_mojom_origin_java", - ] - } - - # See https://bugs.chromium.org/p/chromium/issues/detail?id=908819 for why we - # can't put 'java' in the name here. - generate_jni("j_test_jni_headers") { - testonly = true - sources = [ - "android/javatests/src/org/chromium/url/GURLJavaTestHelper.java", - "android/javatests/src/org/chromium/url/OriginJavaTestHelper.java", - ] - } -} - -# Use this in robolectric_binary() targets if you just need GURL and //base -# functionality. Otherwise, define a custom shared_library(). -if (!is_cronet_build && target_os == "android") { - shared_library_with_jni("libgurl_robolectric") { - testonly = true - enable_target = is_robolectric - sources = [ "android/robolectric_test_main.cc" ] - deps = [ - "//base", - "//url", - "//url:gurl_android", - ] - - # Make jni.h available. - configs += [ "//third_party/jdk" ] - - java_targets = [ "//chrome/android:chrome_junit_tests" ] - } -}