blob: 762da0400359180e7c47fda0b3899e432821a760 [file] [log] [blame]
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/chromecast_build.gni")
import("//build/split_static_library.gni")
import("//third_party/blink/renderer/bindings/bindings.gni")
import("//third_party/blink/renderer/bindings/modules/v8/generated.gni")
import("//third_party/blink/renderer/bindings/modules/v8/v8.gni")
import("//third_party/blink/renderer/build/scripts/scripts.gni")
import("//third_party/blink/renderer/modules/modules.gni")
import("//third_party/blink/renderer/modules/modules_idl_files.gni")
visibility = [ "//third_party/blink/renderer/*" ]
if (!is_component_build && is_win) {
# This target as a static library (for non-component builds) is >2GB for
# official builds and some goma builds on Windows. This causes linking to
# fail. As a workaround, force using a split static library for these
# configurations.
modules_target_type = "split_static_library"
} else {
modules_target_type = "component"
}
config("modules_implementation") {
defines = [ "BLINK_MODULES_IMPLEMENTATION=1" ]
}
make_names("module_names") {
in_files = [ "indexeddb/indexed_db_names.json5" ]
output_dir = blink_modules_output_dir
deps = [] # Don't use default deps (otherwise it will be circular).
}
target("jumbo_" + modules_target_type, "modules") {
output_name = "blink_modules"
if (modules_target_type == "split_static_library") {
split_count = 5
}
visibility = [] # Allow re-assignment of list.
visibility = [ "//third_party/blink/*" ]
sources = [
"event_modules.h",
"event_modules_factory.h",
"event_target_modules.h",
"modules_export.h",
"modules_initializer.cc",
"modules_initializer.h",
]
# Compile sources generated by module_names script.
sources += get_target_outputs(":module_names")
sources += bindings_modules_v8_files
sources += rebase_path(
[ bindings_generated_v8_context_snapshot_external_references_file ],
".",
"//")
configs += [
":modules_implementation",
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
"//build/config/compiler:no_size_t_to_int_warning",
"//third_party/blink/renderer:config",
"//third_party/blink/renderer:non_test_config",
"//third_party/blink/renderer:inside_blink",
"//third_party/blink/renderer/core:blink_core_pch",
"//tools/v8_context_snapshot:use_v8_context_snapshot",
]
deps = [
":make_modules_generated",
":module_names",
"//net:net",
"//third_party/blink/renderer/bindings/modules:generated",
"//third_party/blink/renderer/bindings/modules/v8:bindings_modules_impl",
"//third_party/blink/renderer/bindings/modules/v8:bindings_modules_origin_trial_features",
"//third_party/blink/renderer/core",
"//third_party/blink/renderer/modules/accessibility",
"//third_party/blink/renderer/modules/animationworklet",
"//third_party/blink/renderer/modules/app_banner",
"//third_party/blink/renderer/modules/audio_output_devices",
"//third_party/blink/renderer/modules/background_fetch",
"//third_party/blink/renderer/modules/background_sync",
"//third_party/blink/renderer/modules/badging",
"//third_party/blink/renderer/modules/battery",
"//third_party/blink/renderer/modules/beacon",
"//third_party/blink/renderer/modules/bluetooth",
"//third_party/blink/renderer/modules/broadcastchannel",
"//third_party/blink/renderer/modules/cache_storage",
"//third_party/blink/renderer/modules/canvas",
"//third_party/blink/renderer/modules/clipboard",
"//third_party/blink/renderer/modules/contacts_picker",
"//third_party/blink/renderer/modules/cookie_store",
"//third_party/blink/renderer/modules/credentialmanager",
"//third_party/blink/renderer/modules/crypto",
"//third_party/blink/renderer/modules/csspaint",
"//third_party/blink/renderer/modules/device_orientation",
"//third_party/blink/renderer/modules/document_metadata",
"//third_party/blink/renderer/modules/donottrack",
"//third_party/blink/renderer/modules/encoding",
"//third_party/blink/renderer/modules/encryptedmedia",
"//third_party/blink/renderer/modules/eventsource",
"//third_party/blink/renderer/modules/exported",
"//third_party/blink/renderer/modules/filesystem",
"//third_party/blink/renderer/modules/gamepad",
"//third_party/blink/renderer/modules/geolocation",
"//third_party/blink/renderer/modules/hid",
"//third_party/blink/renderer/modules/idle",
"//third_party/blink/renderer/modules/imagecapture",
"//third_party/blink/renderer/modules/indexeddb",
"//third_party/blink/renderer/modules/installation",
"//third_party/blink/renderer/modules/installedapp",
"//third_party/blink/renderer/modules/keyboard",
"//third_party/blink/renderer/modules/locks",
"//third_party/blink/renderer/modules/manifest",
"//third_party/blink/renderer/modules/media_capabilities",
"//third_party/blink/renderer/modules/media_controls",
"//third_party/blink/renderer/modules/mediacapturefromelement",
"//third_party/blink/renderer/modules/mediarecorder",
"//third_party/blink/renderer/modules/mediasession",
"//third_party/blink/renderer/modules/mediasource",
"//third_party/blink/renderer/modules/mediastream",
"//third_party/blink/renderer/modules/navigatorcontentutils",
"//third_party/blink/renderer/modules/netinfo",
"//third_party/blink/renderer/modules/nfc",
"//third_party/blink/renderer/modules/notifications",
"//third_party/blink/renderer/modules/payments",
"//third_party/blink/renderer/modules/peerconnection",
"//third_party/blink/renderer/modules/permissions",
"//third_party/blink/renderer/modules/picture_in_picture",
"//third_party/blink/renderer/modules/plugins",
"//third_party/blink/renderer/modules/presentation",
"//third_party/blink/renderer/modules/push_messaging",
"//third_party/blink/renderer/modules/quota",
"//third_party/blink/renderer/modules/remoteplayback",
"//third_party/blink/renderer/modules/screen_orientation",
"//third_party/blink/renderer/modules/sensor",
"//third_party/blink/renderer/modules/service_worker",
"//third_party/blink/renderer/modules/shapedetection",
"//third_party/blink/renderer/modules/speech",
"//third_party/blink/renderer/modules/srcobject",
"//third_party/blink/renderer/modules/storage",
"//third_party/blink/renderer/modules/time_zone_monitor",
"//third_party/blink/renderer/modules/vibration",
"//third_party/blink/renderer/modules/vr",
"//third_party/blink/renderer/modules/wake_lock",
"//third_party/blink/renderer/modules/webaudio",
"//third_party/blink/renderer/modules/webdatabase",
"//third_party/blink/renderer/modules/webgl",
"//third_party/blink/renderer/modules/webgpu",
"//third_party/blink/renderer/modules/webmidi",
"//third_party/blink/renderer/modules/webshare",
"//third_party/blink/renderer/modules/websockets",
"//third_party/blink/renderer/modules/webusb",
"//third_party/blink/renderer/modules/worklet",
"//third_party/blink/renderer/modules/xr",
"//third_party/icu",
"//third_party/webrtc/pc:libjingle_peerconnection",
"//third_party/webrtc/rtc_base:rtc_base",
"//third_party/webrtc_overrides:init_webrtc",
"//third_party/zlib",
]
if (!is_android) {
deps += [ "//third_party/blink/renderer/modules/serial" ]
}
if (is_win) {
cflags = [ "/wd4334" ] # Result of 32-bit shift implicitly converted to 64 bits.
}
configs -= [ "//build/config/compiler:default_symbols" ]
configs += blink_symbols_config
}
jumbo_source_set("modules_testing") {
sources = [
"$bindings_modules_v8_output_dir/v8_internals_partial.cc",
"$bindings_modules_v8_output_dir/v8_internals_partial.h",
"accessibility/testing/internals_accessibility.cc",
"accessibility/testing/internals_accessibility.h",
"mediastream/testing/internals_media_stream.cc",
"mediastream/testing/internals_media_stream.h",
"netinfo/testing/internals_net_info.cc",
"netinfo/testing/internals_net_info.h",
"peerconnection/adapters/test/mock_ice_transport_adapter.h",
"peerconnection/adapters/test/mock_ice_transport_adapter_cross_thread_factory.h",
"peerconnection/adapters/test/mock_p2p_quic_packet_transport.h",
"peerconnection/adapters/test/mock_p2p_quic_stream.h",
"peerconnection/adapters/test/mock_p2p_quic_stream_delegate.h",
"peerconnection/adapters/test/mock_p2p_quic_transport.h",
"peerconnection/adapters/test/mock_p2p_quic_transport_delegate.h",
"peerconnection/adapters/test/mock_p2p_quic_transport_factory.h",
"peerconnection/testing/internals_rtc_certificate.cc",
"peerconnection/testing/internals_rtc_certificate.h",
"peerconnection/testing/internals_rtc_peer_connection.cc",
"peerconnection/testing/internals_rtc_peer_connection.h",
"service_worker/testing/internals_service_worker.cc",
"service_worker/testing/internals_service_worker.h",
"speech/testing/internals_speech_synthesis.cc",
"speech/testing/internals_speech_synthesis.h",
"speech/testing/platform_speech_synthesizer_mock.cc",
"speech/testing/platform_speech_synthesizer_mock.h",
"vibration/testing/internals_vibration.cc",
"vibration/testing/internals_vibration.h",
"webaudio/testing/internals_web_audio.cc",
"webaudio/testing/internals_web_audio.h",
]
configs += [
"//third_party/blink/renderer:config",
"//third_party/blink/renderer:inside_blink",
"//third_party/blink/renderer/core:blink_core_pch",
]
deps = [
"//third_party/blink/renderer/core",
"//third_party/blink/renderer/modules",
]
}
group("make_modules_generated") {
public_deps = [
":module_names",
"//third_party/blink/renderer/bindings/modules:bindings_modules_generated",
"//third_party/blink/renderer/core:core_event_interfaces",
]
}
jumbo_source_set("unit_tests") {
testonly = true
sources = [
"accessibility/accessibility_object_model_test.cc",
"accessibility/ax_object_cache_test.cc",
"accessibility/ax_object_test.cc",
"accessibility/ax_position_test.cc",
"accessibility/ax_range_test.cc",
"accessibility/ax_selection_test.cc",
"accessibility/testing/accessibility_selection_test.cc",
"accessibility/testing/accessibility_selection_test.h",
"accessibility/testing/accessibility_test.cc",
"accessibility/testing/accessibility_test.h",
"animationworklet/animation_worklet_global_scope_test.cc",
"animationworklet/animation_worklet_proxy_client_test.cc",
"animationworklet/worklet_animation_test.cc",
"background_fetch/background_fetch_icon_loader_test.cc",
"background_fetch/background_fetch_manager_test.cc",
"cache_storage/cache_test.cc",
"canvas/canvas2d/canvas_rendering_context_2d_api_test.cc",
"canvas/canvas2d/canvas_rendering_context_2d_test.cc",
"canvas/htmlcanvas/html_canvas_element_module_test.cc",
"canvas/offscreencanvas/offscreen_canvas_test.cc",
"credentialmanager/credentials_container_test.cc",
"credentialmanager/password_credential_test.cc",
"csspaint/paint_rendering_context_2d_test.cc",
"csspaint/paint_worklet_global_scope_test.cc",
"csspaint/paint_worklet_test.cc",
"device_orientation/device_motion_event_pump_unittest.cc",
"device_orientation/device_orientation_event_pump_unittest.cc",
"document_metadata/copyless_paste_extractor_test.cc",
"eventsource/event_source_parser_test.cc",
"filesystem/dom_file_system_base_test.cc",
"filesystem/file_writer_test.cc",
"indexeddb/idb_factory_test.cc",
"indexeddb/idb_key_path_test.cc",
"indexeddb/idb_request_test.cc",
"indexeddb/idb_test_helper.cc",
"indexeddb/idb_transaction_test.cc",
"indexeddb/idb_value_wrapping_test.cc",
"indexeddb/indexed_db_blink_mojom_traits_test.cc",
"indexeddb/mock_web_idb_callbacks.cc",
"indexeddb/mock_web_idb_callbacks.h",
"indexeddb/mock_web_idb_database.cc",
"indexeddb/mock_web_idb_database.h",
"indexeddb/mock_web_idb_factory.cc",
"indexeddb/mock_web_idb_factory.h",
"indexeddb/web_idb_cursor_impl_unittest.cc",
"indexeddb/web_idb_database_impl_unittest.cc",
"manifest/image_resource_type_converters_test.cc",
"media_controls/elements/media_control_animated_arrow_container_element_test.cc",
"media_controls/elements/media_control_display_cutout_fullscreen_button_element_test.cc",
"media_controls/elements/media_control_input_element_test.cc",
"media_controls/elements/media_control_loading_panel_element_test.cc",
"media_controls/elements/media_control_panel_element_test.cc",
"media_controls/elements/media_control_scrubbing_message_element_test.cc",
"media_controls/elements/media_control_timeline_element_test.cc",
"media_controls/elements/media_control_toggle_closed_captions_button_element_test.cc",
"media_controls/media_controls_display_cutout_delegate_test.cc",
"media_controls/media_controls_impl_test.cc",
"media_controls/media_controls_orientation_lock_delegate_test.cc",
"media_controls/media_controls_rotate_to_fullscreen_delegate_test.cc",
"media_controls/non_touch/media_controls_non_touch_impl_test.cc",
"mediastream/media_constraints_test.cc",
"mediastream/media_devices_test.cc",
"notifications/notification_data_test.cc",
"notifications/notification_image_loader_test.cc",
"notifications/notification_resources_loader_test.cc",
"payments/abort_test.cc",
"payments/can_make_payment_test.cc",
"payments/complete_test.cc",
"payments/merchant_validation_event_test.cc",
"payments/on_payment_response_test.cc",
"payments/payment_address_test.cc",
"payments/payment_event_data_conversion_test.cc",
"payments/payment_request_details_test.cc",
"payments/payment_request_test.cc",
"payments/payment_request_update_event_test.cc",
"payments/payment_response_test.cc",
"payments/payment_test_helper.cc",
"payments/payment_test_helper.h",
"payments/payments_validators_test.cc",
"peerconnection/adapters/p2p_quic_stream_unittest.cc",
"peerconnection/adapters/p2p_quic_transport_test.cc",
"peerconnection/adapters/quic_packet_transport_adapter_test.cc",
"peerconnection/byte_buffer_queue_test.cc",
"peerconnection/call_setup_state_tracker_unittest.cc",
"peerconnection/rtc_data_channel_test.cc",
"peerconnection/rtc_ice_transport_test.cc",
"peerconnection/rtc_ice_transport_test.h",
"peerconnection/rtc_peer_connection_test.cc",
"peerconnection/rtc_quic_stream_test.cc",
"peerconnection/rtc_quic_transport_test.cc",
"peerconnection/rtc_quic_transport_test.h",
"peerconnection/rtc_sctp_transport_test.cc",
"picture_in_picture/picture_in_picture_controller_test.cc",
"presentation/mock_presentation_service.h",
"presentation/presentation_availability_state_test.cc",
"presentation/presentation_availability_test.cc",
"presentation/presentation_receiver_test.cc",
"presentation/presentation_request_test.cc",
"push_messaging/push_manager_test.cc",
"push_messaging/push_message_data_test.cc",
"push_messaging/push_subscription_test.cc",
"remoteplayback/remote_playback_test.cc",
"screen_orientation/screen_orientation_controller_impl_test.cc",
"service_worker/service_worker_container_test.cc",
"service_worker/service_worker_installed_scripts_manager_test.cc",
"service_worker/thread_safe_script_container_test.cc",
"service_worker/web_embedded_worker_impl_test.cc",
"wake_lock/screen_wake_lock_test.cc",
"webaudio/audio_basic_processor_handler_test.cc",
"webaudio/audio_context_autoplay_test.cc",
"webaudio/audio_context_test.cc",
"webaudio/audio_node_input_test.cc",
"webaudio/audio_worklet_global_scope_test.cc",
"webaudio/audio_worklet_thread_test.cc",
"webaudio/convolver_node_test.cc",
"webaudio/dynamics_compressor_node_test.cc",
"webaudio/script_processor_node_test.cc",
"webaudio/stereo_panner_node_test.cc",
"webdatabase/quota_tracker_test.cc",
"websockets/dom_websocket_test.cc",
"websockets/websocket_channel_impl_test.cc",
"worklet/animation_and_paint_worklet_thread_test.cc",
"worklet/worklet_thread_test_common.cc",
"worklet/worklet_thread_test_common.h",
"xr/xr_rigid_transform_test.cc",
]
configs += [
"//third_party/blink/renderer:config",
"//third_party/blink/renderer:inside_blink",
"//third_party/blink/renderer/core:blink_core_pch",
]
deps = [
":modules",
":modules_testing",
"//net:quic_test_tools",
"//services/device/public/cpp/test:test_support",
"//services/viz/public/interfaces:interfaces_blink",
"//skia",
"//testing/gmock",
"//testing/gtest",
"//third_party/blink/renderer/core",
"//third_party/blink/renderer/modules/gamepad:unit_tests",
"//third_party/blink/renderer/modules/storage:unit_tests",
"//third_party/blink/renderer/platform",
"//third_party/blink/renderer/platform/wtf",
"//third_party/webrtc/rtc_base:rtc_base",
"//v8",
]
data_deps = [
":accessibility_unittests_data",
]
}
group("accessibility_unittests_data") {
data = [
"accessibility/testing/data/",
]
}