blob: 2a03b7c8c32875390a482e3bbe784ef14096854b [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/config/compiler/compiler.gni")
import("//build/config/dcheck_always_on.gni")
import("//build/config/ui.gni")
import("//build/toolchain/toolchain.gni")
import("//testing/libfuzzer/fuzzer_test.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/scripts/scripts.gni")
import("//third_party/blink/renderer/build/scripts/scripts.gni")
import("//third_party/blink/renderer/config.gni")
import("//third_party/blink/renderer/core/core.gni")
import("//third_party/blink/renderer/modules/modules_idl_files.gni")
import("//third_party/blink/renderer/platform/platform_generated.gni")
import("//third_party/protobuf/proto_library.gni")
visibility = [
"//third_party/blink/renderer/*",
"//third_party/blink/public/*",
]
rel_blink_core_gen_dir = rebase_path(blink_core_output_dir, root_build_dir)
# Config for code that builds as part of core.
config("config") {
defines = [ "BLINK_CORE_IMPLEMENTATION=1" ]
}
config("core_include_dirs") {
include_dirs = []
}
import("//build/config/pch.gni")
config("blink_core_pch") {
# Add precompiled header (pch) support when enabled, possible and
# making sense.
if (enable_precompiled_headers) {
if (is_win) {
# This is a string rather than a file GN knows about. It has to match
# exactly what's in the /FI flag below, and what might appear in the
# source code in quotes for an #include directive.
precompiled_header = rebase_path("precompile_core.h", root_build_dir)
# This is a file that GN will compile with the above header. It will be
# implicitly added to the sources (potentially multiple times, with one
# variant for each language used in the target).
precompiled_source =
"//third_party/blink/renderer/core/win/precompile_core.cc"
# Force include the header.
cflags = [ "/FI$precompiled_header" ]
} else if (is_mac) {
precompiled_source = "//third_party/blink/renderer/core/precompile_core.h"
}
}
}
core_config_add += [
":blink_core_pch",
"//build/config/compiler:noshadowing",
]
source_set("generated") {
deps = [
":core_generated",
":prerequisites",
"//gin",
"//skia",
"//third_party/blink/renderer/bindings/core/v8:bindings_core_origin_trial_features",
"//third_party/blink/renderer/bindings/core/v8:bindings_core_v8_generated",
"//third_party/blink/renderer/core/inspector:generated",
"//third_party/blink/renderer/core/probe:generated",
"//third_party/iccjpeg",
"//third_party/libpng",
"//third_party/libwebp",
"//third_party/libxml",
"//third_party/libxslt",
# FIXME: don't depend on bindings/modules http://crbug.com/358074
"//third_party/blink/renderer/bindings/modules:bindings_modules_generated",
"//third_party/blink/renderer/bindings/modules/v8:bindings_modules_v8_generated",
"//third_party/blink/renderer/platform:make_platform_generated",
"//third_party/blink/renderer/platform/wtf",
"//url",
"//v8",
]
}
source_set("prerequisites") {
public_deps = [
"//services/network/public/cpp:cpp",
"//services/service_manager/public/cpp",
"//skia",
"//third_party/angle:translator",
"//third_party/blink/public/mojom:mojom_broadcastchannel_bindings_blink",
"//third_party/blink/renderer/core/animation:buildflags",
"//third_party/blink/renderer/core/inspector:generated",
"//third_party/blink/renderer/core/probe:generated",
"//third_party/blink/renderer/platform",
"//third_party/iccjpeg",
"//third_party/icu",
"//third_party/libpng",
"//third_party/libwebp",
"//third_party/libxml",
"//third_party/libxslt",
"//third_party/ots",
"//third_party/snappy",
"//third_party/zlib",
"//ui/base/ime/mojom",
"//ui/display/mojom:mojom_blink",
"//ui/events:dom_keycode_converter",
"//ui/gfx/geometry",
"//ui/native_theme",
"//url",
"//v8",
]
deps = [
"//third_party/blink/public:scaled_resources",
"//third_party/blink/renderer/bindings/core/v8:bindings_core_v8_generated",
# FIXME: don't depend on bindings_modules http://crbug.com/358074
"//third_party/blink/renderer/bindings/modules/v8:bindings_modules_v8_generated",
]
public_configs = [
":core_include_dirs",
"//third_party/blink/renderer:config",
"//third_party/blink/renderer:inside_blink",
]
}
# Note that this is a source set rather than a group, even though it has no
# sources. A group would implicitly forward all direct dependent configs
# through it, but we want to keep our internal targets' public_configs private
# and only forward some of them.
component("core") {
output_name = "blink_core"
visibility = [] # Allow re-assignment of list.
visibility = [ "//third_party/blink/*" ]
# If you create a new subdirectory, make a new BUILD file for that directory
# and reference it in the deps below rather than adding the sources here.
sources = [
"core_export.h",
"core_initializer.cc",
"core_initializer.h",
]
configs -= core_config_remove
configs += core_config_add
public_deps = [
":core_generated",
"//skia",
"//third_party/blink/public/mojom:mojom_broadcastchannel_bindings_blink",
"//third_party/blink/renderer/core/accessibility",
"//third_party/blink/renderer/core/animation",
"//third_party/blink/renderer/core/animation_frame",
"//third_party/blink/renderer/core/aom",
"//third_party/blink/renderer/core/clipboard",
"//third_party/blink/renderer/core/content_capture",
"//third_party/blink/renderer/core/context_features",
"//third_party/blink/renderer/core/css",
"//third_party/blink/renderer/core/display_lock",
"//third_party/blink/renderer/core/dom",
"//third_party/blink/renderer/core/editing",
"//third_party/blink/renderer/core/events",
"//third_party/blink/renderer/core/execution_context",
"//third_party/blink/renderer/core/exported",
"//third_party/blink/renderer/core/feature_policy",
"//third_party/blink/renderer/core/fetch",
"//third_party/blink/renderer/core/fileapi",
"//third_party/blink/renderer/core/frame",
"//third_party/blink/renderer/core/fullscreen",
"//third_party/blink/renderer/core/geometry",
"//third_party/blink/renderer/core/html",
"//third_party/blink/renderer/core/imagebitmap",
"//third_party/blink/renderer/core/input",
"//third_party/blink/renderer/core/inspector",
"//third_party/blink/renderer/core/intersection_observer",
"//third_party/blink/renderer/core/invisible_dom",
"//third_party/blink/renderer/core/layout",
"//third_party/blink/renderer/core/layout/svg:svg_layout",
"//third_party/blink/renderer/core/loader",
"//third_party/blink/renderer/core/mathml",
"//third_party/blink/renderer/core/messaging",
"//third_party/blink/renderer/core/mojo",
"//third_party/blink/renderer/core/offscreencanvas",
"//third_party/blink/renderer/core/origin_trials",
"//third_party/blink/renderer/core/page",
"//third_party/blink/renderer/core/paint",
"//third_party/blink/renderer/core/probe",
"//third_party/blink/renderer/core/resize_observer",
"//third_party/blink/renderer/core/script",
"//third_party/blink/renderer/core/scroll",
"//third_party/blink/renderer/core/streams",
"//third_party/blink/renderer/core/style:rendering",
"//third_party/blink/renderer/core/style:svg_style",
"//third_party/blink/renderer/core/svg",
"//third_party/blink/renderer/core/timezone",
"//third_party/blink/renderer/core/timing",
"//third_party/blink/renderer/core/trustedtypes",
"//third_party/blink/renderer/core/typed_arrays",
"//third_party/blink/renderer/core/url",
"//third_party/blink/renderer/core/workers",
"//third_party/blink/renderer/core/xml",
"//third_party/blink/renderer/core/xmlhttprequest",
"//url",
"//v8",
]
deps = [
"//third_party/blink/public/common",
"//third_party/blink/renderer/platform",
"//third_party/blink/renderer/platform/wtf",
]
if (is_win && is_debug && is_component_build && current_cpu == "x64") {
# Incremental linking fails when the .ilk file gets too large.
# 64-bit debug builds with full symbols trigger this problem, so we turn
# off incremental linking in that configuration.
# For fastest builds, use component release builds without debug
# information.
# VC++ bug filed for 64-bit debug incremental link failures:
# https://connect.microsoft.com/VisualStudio/feedback/details/2846790
configs -= [ "//build/config/win:default_incremental_linking" ]
configs += [ "//build/config/win:no_incremental_linking" ]
}
public_configs = [ ":core_include_dirs" ]
if (is_mac) {
libs = [
"AppKit.framework",
"Carbon.framework",
]
}
}
jumbo_source_set("testing") {
testonly = true
configs += [
":blink_core_pch",
"//third_party/blink/renderer:config",
"//third_party/blink/renderer:inside_blink",
]
deps = [
":core",
":generated_testing_idls",
"//third_party/blink/renderer/bindings/core/v8:testing",
]
sources = [
"$blink_core_output_dir/testing/internal_settings_generated.cc",
"$blink_core_output_dir/testing/internal_settings_generated.h",
"fetch/testing/internals_fetch.cc",
"fetch/testing/internals_fetch.h",
"fetch/testing/worker_internals_fetch.cc",
"fetch/testing/worker_internals_fetch.h",
"html/forms/mock_file_chooser.h",
"testing/callback_function_test.cc",
"testing/callback_function_test.h",
"testing/color_scheme_helper.cc",
"testing/color_scheme_helper.h",
"testing/death_aware_script_wrappable.cc",
"testing/death_aware_script_wrappable.h",
"testing/dictionary_test.cc",
"testing/dictionary_test.h",
"testing/dummy_modulator.cc",
"testing/dummy_modulator.h",
"testing/dummy_page_holder.cc",
"testing/dummy_page_holder.h",
"testing/fake_local_frame_host.cc",
"testing/fake_local_frame_host.h",
"testing/fake_remote_frame_host.cc",
"testing/fake_remote_frame_host.h",
"testing/garbage_collected_script_wrappable.cc",
"testing/garbage_collected_script_wrappable.h",
"testing/gc_object_liveness_observer.h",
"testing/gc_observation.cc",
"testing/gc_observation.h",
"testing/hit_test_layer_rect.h",
"testing/hit_test_layer_rect_list.cc",
"testing/hit_test_layer_rect_list.h",
"testing/internal_settings.cc",
"testing/internal_settings.h",
"testing/internals.cc",
"testing/internals.h",
"testing/mock_hyphenation.cc",
"testing/mock_hyphenation.h",
"testing/null_execution_context.cc",
"testing/null_execution_context.h",
"testing/origin_trials_test.cc",
"testing/origin_trials_test.h",
"testing/origin_trials_test_partial.h",
"testing/record_test.cc",
"testing/record_test.h",
"testing/scoped_mock_overlay_scrollbars.h",
"testing/sequence_test.cc",
"testing/sequence_test.h",
"testing/static_selection.cc",
"testing/static_selection.h",
"testing/type_conversions.h",
"testing/union_types_test.cc",
"testing/union_types_test.h",
"testing/v8/web_core_test_support.cc",
"testing/v8/web_core_test_support.h",
"testing/wait_for_event.cc",
"testing/wait_for_event.h",
"testing/worker_internals.cc",
"testing/worker_internals.h",
"timing/internals_profiler.cc",
"timing/internals_profiler.h",
]
# Compile the sources produced by these IDL file lists.
testing_idl_files =
webcore_testing_idl_files + core_testing_dictionary_idl_files +
generated_webcore_testing_idl_files +
webcore_testing_idl_with_modules_dependency_files
sources += process_file_template(
testing_idl_files,
[
"$bindings_core_v8_output_dir/v8_{{source_name_part}}.cc",
"$bindings_core_v8_output_dir/v8_{{source_name_part}}.h",
])
}
# core_bindings_generated ------------------------------------------------------
generate_event_interfaces("core_event_interfaces") {
sources = [
"css/font_face_set_load_event.idl",
"css/media_query_list_event.idl",
"display_lock/render_subtree_activation_event.idl",
"dom/events/custom_event.idl",
"dom/events/event.idl",
"editing/ime/text_format_update_event.idl",
"editing/ime/text_update_event.idl",
"events/animation_event.idl",
"events/animation_playback_event.idl",
"events/application_cache_error_event.idl",
"events/before_unload_event.idl",
"events/clipboard_event.idl",
"events/composition_event.idl",
"events/drag_event.idl",
"events/error_event.idl",
"events/focus_event.idl",
"events/hash_change_event.idl",
"events/input_event.idl",
"events/keyboard_event.idl",
"events/message_event.idl",
"events/mouse_event.idl",
"events/mutation_event.idl",
"events/overscroll_event.idl",
"events/page_transition_event.idl",
"events/pointer_event.idl",
"events/pop_state_event.idl",
"events/progress_event.idl",
"events/promise_rejection_event.idl",
"events/resource_progress_event.idl",
"events/security_policy_violation_event.idl",
"events/text_event.idl",
"events/touch_event.idl",
"events/transition_event.idl",
"events/ui_event.idl",
"events/wheel_event.idl",
"html/forms/form_data_event.idl",
"html/track/track_event.idl",
"invisible_dom/activate_invisible_event.idl",
"mojo/test/mojo_interface_request_event.idl",
]
output_file = "core/event_interface_names.json5"
}
# generated_testing_idls -------------------------------------------------------
group("generated_testing_idls") {
public_deps = [
":generated_settings_macros",
":generated_testing_idls_internal_runtime_flags",
":generated_testing_idls_settings",
]
}
blink_python_runner("generated_settings_macros") {
script = "../build/scripts/make_settings.py"
inputs = scripts_for_json5_files + [
"../build/scripts/make_settings.py",
"../build/scripts/templates/settings_macros.h.tmpl",
"frame/settings.json5",
]
outputs = [
"$blink_core_output_dir/settings_macros.h",
]
args = [
rebase_path("frame/settings.json5", root_build_dir),
"--output_dir",
rel_blink_core_gen_dir,
]
}
blink_python_runner("generated_testing_idls_settings") {
script = "../build/scripts/make_internal_settings.py"
inputs = scripts_for_json5_files + [
"../build/scripts/make_internal_settings.py",
"../build/scripts/templates/internal_settings_generated.idl.tmpl",
"../build/scripts/templates/internal_settings_generated.cc.tmpl",
"../build/scripts/templates/internal_settings_generated.h.tmpl",
"frame/settings.json5",
]
args = [
rebase_path("frame/settings.json5", root_build_dir),
"--output_dir",
"$rel_blink_core_gen_dir/testing",
]
outputs = [
"$blink_core_output_dir/testing/internal_settings_generated.idl",
"$blink_core_output_dir/testing/internal_settings_generated.cc",
"$blink_core_output_dir/testing/internal_settings_generated.h",
]
}
blink_python_runner("generated_testing_idls_internal_runtime_flags") {
script = "../build/scripts/make_internal_runtime_flags.py"
inputs = scripts_for_json5_files + [
"../build/scripts/make_internal_runtime_flags.py",
"../platform/runtime_enabled_features.json5",
"../build/scripts/templates/internal_runtime_flags.h.tmpl",
"../build/scripts/templates/internal_runtime_flags.idl.tmpl",
]
args = [
rebase_path("../platform/runtime_enabled_features.json5", root_build_dir),
"--output_dir",
"$rel_blink_core_gen_dir/testing",
]
outputs = [
"$blink_core_output_dir/testing/internal_runtime_flags.idl",
"$blink_core_output_dir/testing/internal_runtime_flags.h",
]
}
css_properties("make_core_generated_computed_style_initial_values") {
script = "../build/scripts/core/style/make_computed_style_initial_values.py"
in_files = [ "style/computed_style_extra_fields.json5" ]
other_inputs = [ "../build/scripts/core/style/templates/computed_style_initial_values.h.tmpl" ]
outputs = [
"$blink_core_output_dir/style/computed_style_initial_values.h",
]
}
css_properties("make_core_generated_computed_style_base") {
script = "../build/scripts/core/style/make_computed_style_base.py"
in_files = [
"style/computed_style_extra_fields.json5",
"style/computed_style_diff_functions.json5",
"css/css_value_keywords.json5",
"css/css_properties_ranking.json5",
"css/css_group_config.json5",
]
other_inputs = [
"../build/scripts/core/style/templates/computed_style_base.cc.tmpl",
"../build/scripts/core/style/templates/computed_style_base.h.tmpl",
"../build/scripts/core/style/templates/computed_style_base_constants.h.tmpl",
"../build/scripts/templates/fields/field.tmpl",
"../build/scripts/templates/fields/group.tmpl",
"../build/scripts/templates/fields/base.tmpl",
"../build/scripts/templates/fields/keyword.tmpl",
"../build/scripts/templates/fields/pointer.tmpl",
"../build/scripts/templates/fields/primitive.tmpl",
"../build/scripts/templates/fields/monotonic_flag.tmpl",
"../build/scripts/templates/fields/external.tmpl",
"../build/scripts/keyword_utils.py",
]
outputs = [
"$blink_core_output_dir/style/computed_style_base.cc",
"$blink_core_output_dir/style/computed_style_base.h",
"$blink_core_output_dir/style/computed_style_base_constants.h",
]
}
css_properties("make_core_generated_css_value_id_mappings") {
script = "../build/scripts/core/css/make_css_value_id_mappings.py"
in_files = [ "css/css_value_keywords.json5" ]
other_inputs = [
"../build/scripts/core/css/templates/css_value_id_mappings_generated.h.tmpl",
"../build/scripts/keyword_utils.py",
]
outputs = [
"$blink_core_output_dir/css/css_value_id_mappings_generated.h",
]
}
css_properties("make_core_generated_css_property_instances") {
script = "../build/scripts/core/css/properties/make_css_property_instances.py"
other_inputs = [
"../build/scripts/core/css/properties/templates/css_property_instances.cc.tmpl",
"../build/scripts/core/css/properties/templates/css_property_instances.h.tmpl",
]
outputs = [
"$blink_core_output_dir/css/properties/css_property_instances.cc",
"$blink_core_output_dir/css/properties/css_property_instances.h",
]
}
css_properties("make_core_generated_css_subclasses") {
script =
"../build/scripts/core/css/properties/make_css_property_subclasses.py"
in_files = [ "css/properties/css_property_methods.json5" ]
other_inputs = [
"css/css_properties.json5",
"../build/scripts/core/css/properties/templates/css_properties.h.tmpl",
"../build/scripts/core/css/properties/templates/css_properties.cc.tmpl",
]
outputs = [
"$blink_core_output_dir/css/properties/longhands.cc",
"$blink_core_output_dir/css/properties/longhands.h",
"$blink_core_output_dir/css/properties/shorthands.cc",
"$blink_core_output_dir/css/properties/shorthands.h",
]
}
css_properties("make_core_generated_css_property_names") {
script = "../build/scripts/core/css/make_css_property_names.py"
other_inputs = [
"../build/scripts/gperf.py",
"../build/scripts/core/css/templates/css_property_names.cc.tmpl",
"../build/scripts/core/css/templates/css_property_names.h.tmpl",
]
outputs = [
"$blink_core_output_dir/css/css_property_names.cc",
"$blink_core_output_dir/css/css_property_names.h",
]
}
code_generator("make_core_generated_atrule_names") {
script = "../build/scripts/core/css/parser/make_atrule_names.py"
json_inputs = [ "css/parser/at_rule_names.json5" ]
other_inputs = [ "../build/scripts/gperf.py" ]
templates = [
"../build/scripts/core/css/parser/templates/at_rule_descriptors.cc.tmpl",
"../build/scripts/core/css/parser/templates/at_rule_descriptors.h.tmpl",
]
outputs = [
"$blink_core_output_dir/css/parser/at_rule_descriptors.cc",
"$blink_core_output_dir/css/parser/at_rule_descriptors.h",
]
other_args = [
"--gperf",
gperf_exe,
]
}
code_generator("make_core_generated_media_features") {
script = "../build/scripts/core/css/make_media_features.py"
json_inputs = [ "css/media_feature_names.json5" ]
other_inputs =
scripts_for_json5_files + [ "../build/scripts/media_feature_symbol.py" ]
templates = [ "../build/scripts/core/css/templates/media_features.h.tmpl" ]
outputs = [
"$blink_core_output_dir/css/media_features.h",
]
}
css_properties("make_core_generated_style_property_shorthand") {
script = "../build/scripts/core/css/make_style_shorthands.py"
other_inputs = [
"../build/scripts/core/css/templates/style_property_shorthand.cc.tmpl",
"../build/scripts/core/css/templates/style_property_shorthand.h.tmpl",
]
outputs = [
"$blink_core_output_dir/style_property_shorthand.cc",
"$blink_core_output_dir/style_property_shorthand.h",
]
}
css_properties("make_core_generated_cssom_types") {
script = "../build/scripts/core/css/make_cssom_types.py"
other_inputs = [
"../build/scripts/core/css/templates/cssom_keywords.cc.tmpl",
"../build/scripts/core/css/templates/cssom_types.cc.tmpl",
]
outputs = [
"$blink_core_output_dir/cssom_keywords.cc",
"$blink_core_output_dir/cssom_types.cc",
]
}
code_generator("make_core_generated_css_value_keywords") {
script = "../build/scripts/core/css/make_css_value_keywords.py"
json_inputs = [
"css/css_value_keywords.json5",
"css/svg_css_value_keywords.json5",
]
other_inputs = [ "../build/scripts/gperf.py" ]
templates = [
"../build/scripts/core/css/templates/css_value_keywords.cc.tmpl",
"../build/scripts/core/css/templates/css_value_keywords.h.tmpl",
]
outputs = [
"$blink_core_output_dir/css_value_keywords.cc",
"$blink_core_output_dir/css_value_keywords.h",
]
other_args = [
"--gperf",
gperf_exe,
]
}
process_json5_files("make_core_generated_html_element_factory") {
script = "../build/scripts/make_element_factory.py"
in_files = [
"html/aria_properties.json5",
"html/html_tag_names.json5",
"html/html_attribute_names.json5",
]
other_inputs = make_element_factory_files
outputs = [
"$blink_core_output_dir/html_element_factory.cc",
"$blink_core_output_dir/html_element_factory.h",
"$blink_core_output_dir/html_names.cc",
"$blink_core_output_dir/html_names.h",
]
}
process_json5_files("make_core_generated_html_element_type_helpers") {
script = "../build/scripts/make_element_type_helpers.py"
in_files = [ "html/html_tag_names.json5" ]
other_inputs = make_element_type_helpers_files
outputs = [
"$blink_core_output_dir/html_element_type_helpers.cc",
"$blink_core_output_dir/html_element_type_helpers.h",
]
}
process_json5_files("make_core_generated_mathml_names") {
script = "../build/scripts/make_element_factory.py"
in_files = [
"mathml/mathml_tag_names.json5",
"mathml/mathml_attribute_names.json5",
]
other_inputs = make_element_factory_files
outputs = [
"$blink_core_output_dir/mathml_element_factory.cc",
"$blink_core_output_dir/mathml_element_factory.h",
"$blink_core_output_dir/mathml_names.cc",
"$blink_core_output_dir/mathml_names.h",
]
}
process_json5_files("make_core_generated_mathml_element_type_helpers") {
script = "../build/scripts/make_element_type_helpers.py"
in_files = [ "mathml/mathml_tag_names.json5" ]
other_inputs = make_element_type_helpers_files
outputs = [
"$blink_core_output_dir/mathml_element_type_helpers.cc",
"$blink_core_output_dir/mathml_element_type_helpers.h",
]
}
process_json5_files("make_core_generated_svg_names") {
script = "../build/scripts/make_element_factory.py"
in_files = [
"svg/svg_tag_names.json5",
"svg/svg_attribute_names.json5",
]
other_inputs = make_element_factory_files
outputs = [
"$blink_core_output_dir/svg_element_factory.cc",
"$blink_core_output_dir/svg_element_factory.h",
"$blink_core_output_dir/svg_names.cc",
"$blink_core_output_dir/svg_names.h",
]
}
process_json5_files("make_core_generated_svg_element_type_helpers") {
script = "../build/scripts/make_element_type_helpers.py"
in_files = [ "svg/svg_tag_names.json5" ]
other_inputs = make_element_type_helpers_files
outputs = [
"$blink_core_output_dir/svg_element_type_helpers.h",
]
}
# make_event_factory -----------------------------------------------------------
make_event_factory("make_core_generated_event_factory") {
in_files = [
"$blink_core_output_dir/event_interface_names.json5",
"events/event_interface_aliases.json5",
]
outputs = [
"$blink_core_output_dir/event_factory.cc",
]
}
# make_names -------------------------------------------------------------------
code_generator("make_core_generated_media_feature_names") {
script = "../build/scripts/core/css/make_media_feature_names.py"
json_inputs = [ "css/media_feature_names.json5" ]
templates = [
"../build/scripts/templates/make_names.cc.tmpl",
"../build/scripts/templates/make_names.h.tmpl",
]
other_inputs =
make_names_files + [ "../build/scripts/media_feature_symbol.py" ]
outputs = [
"$blink_core_output_dir/css/media_feature_names.cc",
"$blink_core_output_dir/css/media_feature_names.h",
]
}
make_names("make_core_generated_media_type_names") {
in_files = [ "css/media_type_names.json5" ]
output_dir = blink_core_output_dir
}
make_names("make_core_generated_event_names") {
in_files = [ "$blink_core_output_dir/event_interface_names.json5" ]
output_dir = blink_core_output_dir
}
make_names("make_core_generated_event_target_names") {
in_files = [ "events/event_target_names.json5" ]
output_dir = blink_core_output_dir
}
make_names("make_core_generated_event_type_names") {
in_files = [ "events/event_type_names.json5" ]
output_dir = blink_core_output_dir
}
make_names("make_core_generated_html_tokenizer_names") {
in_files = [ "html/parser/html_tokenizer_names.json5" ]
output_dir = blink_core_output_dir
}
make_names("make_core_generated_input_type_names") {
in_files = [ "html/forms/input_type_names.json5" ]
output_dir = blink_core_output_dir
}
make_names("make_core_generated_keywords") {
in_files = [ "html/keywords.json5" ]
output_dir = blink_core_output_dir
}
make_names("make_core_generated_performance_entry_names") {
in_files = [ "timing/performance_entry_names.json5" ]
output_dir = blink_core_output_dir
}
# make_qualified_names ---------------------------------------------------------
make_qualified_names("make_core_generated_xlink_names") {
in_files = [ "svg/xlink_attribute_names.json5" ]
outputs = [
"$blink_core_output_dir/xlink_names.cc",
"$blink_core_output_dir/xlink_names.h",
]
}
make_qualified_names("make_core_generated_xml_ns_names") {
in_files = [ "xml/xmlns_attribute_names.json5" ]
outputs = [
"$blink_core_output_dir/xmlns_names.cc",
"$blink_core_output_dir/xmlns_names.h",
]
}
make_qualified_names("make_core_generated_xml_names") {
in_files = [ "xml/xml_attribute_names.json5" ]
outputs = [
"$blink_core_output_dir/xml_names.cc",
"$blink_core_output_dir/xml_names.h",
]
}
# One-off scripts --------------------------------------------------------------
action("make_core_generated_html_entity_table") {
visibility = [] # Allow re-assignment of list.
visibility = [ ":*" ]
script = "../build/scripts/make_html_entity_table.py"
inputs = [
"html/parser/html_entity_names.csv",
]
outputs = [
"$blink_core_output_dir/html_entity_table.cc",
]
args = [ "-o" ] + rebase_path(outputs, root_build_dir)
args += rebase_path(inputs, root_build_dir)
deps = make_core_generated_deps
}
blink_python_runner("make_core_generated_css_tokenizer_codepoints") {
visibility = [] # Allow re-assignment of list.
visibility = [ ":*" ]
script = "../build/scripts/core/css/make_css_tokenizer_codepoints.py"
outputs = [
"$blink_core_output_dir/css/css_tokenizer_codepoints.cc",
]
args = [
"--output_dir",
"$rel_blink_core_gen_dir/css",
]
deps = make_core_generated_deps
}
blink_python_runner("make_core_generated_css_primitive_value_unit_trie") {
visibility = [] # Allow re-assignment of list.
visibility = [ ":*" ]
script = "../build/scripts/core/css/make_css_primitive_value_unit_trie.py"
input_file = "css/css_primitive_value_units.json5"
inputs = make_trie_helpers_files + [
input_file,
"../build/scripts/core/css/templates/css_primitive_value_unit_trie.cc.tmpl",
]
outputs = [
"$blink_core_output_dir/css/css_primitive_value_unit_trie.cc",
]
args = [
rebase_path(input_file, root_build_dir),
"--output_dir",
"$rel_blink_core_gen_dir/css",
]
deps = make_core_generated_deps
}
blink_python_runner("make_core_generated_feature_policy_helper") {
script = "../build/scripts/make_feature_policy_helper.py"
inputs = scripts_for_json5_files + [
"../build/scripts/make_feature_policy_helper.py",
"./feature_policy/feature_policy_features.json5",
"../platform/runtime_enabled_features.json5",
"../build/scripts/templates/feature_policy_helper.cc.tmpl",
]
outputs = [
"$blink_core_output_dir/feature_policy/feature_policy_helper.cc",
]
args = [
rebase_path("../platform/runtime_enabled_features.json5", root_build_dir),
rebase_path("./feature_policy/feature_policy_features.json5",
root_build_dir),
"--output_dir",
"$rel_blink_core_gen_dir/feature_policy",
]
}
blink_python_runner("make_core_generated_html_element_lookup_trie") {
visibility = [] # Allow re-assignment of list.
visibility = [ ":*" ]
script = "../build/scripts/make_element_lookup_trie.py"
input_file = "html/html_tag_names.json5"
inputs = make_trie_helpers_files + [
input_file,
"../build/scripts/templates/element_lookup_trie.cc.tmpl",
"../build/scripts/templates/element_lookup_trie.h.tmpl",
]
outputs = [
"$blink_core_output_dir/html_element_lookup_trie.cc",
"$blink_core_output_dir/html_element_lookup_trie.h",
]
args = [
rebase_path(input_file, root_build_dir),
"--output_dir",
rel_blink_core_gen_dir,
]
deps = make_core_generated_deps
}
blink_python_runner("make_core_generated_origin_trials") {
script = "../build/scripts/make_origin_trials.py"
inputs = scripts_for_json5_files + [
"../build/scripts/make_origin_trials.py",
"../platform/runtime_enabled_features.json5",
"../build/scripts/templates/origin_trials.cc.tmpl",
]
outputs = [
"$blink_core_output_dir/origin_trials/origin_trials.cc",
]
args = [
rebase_path("../platform/runtime_enabled_features.json5", root_build_dir),
"--output_dir",
"$rel_blink_core_gen_dir/origin_trials",
]
}
blink_python_runner("make_core_generated_web_origin_trials") {
script = "../build/scripts/make_web_origin_trials.py"
inputs = scripts_for_json5_files + [
"../build/scripts/make_web_origin_trials.py",
"../platform/runtime_enabled_features.json5",
"../build/scripts/templates/web_origin_trials.cc.tmpl",
]
outputs = [
"$blink_core_output_dir/exported/web_origin_trials.cc",
]
args = [
rebase_path("../platform/runtime_enabled_features.json5", root_build_dir),
"--output_dir",
"$rel_blink_core_gen_dir/exported",
]
}
action_foreach("make_core_generated_bison") {
script = "../build/scripts/rule_bison.py"
sources = [
"xml/xpath_grammar.y",
]
outputs = [
"$blink_core_output_dir/{{source_name_part}}.cc",
"$blink_core_output_dir/{{source_name_part}}.h",
]
args = [
"{{source}}",
rel_blink_core_gen_dir,
bison_exe,
]
deps = make_core_generated_deps
}
# Targets from above that generate outputs that need to be compiled.
# All sources declared as outputs from these targets will be compiled into one
# target.
targets_generating_sources = [
":make_core_generated_atrule_names",
":make_core_generated_bison",
":make_core_generated_css_primitive_value_unit_trie",
":make_core_generated_computed_style_initial_values",
":make_core_generated_computed_style_base",
":make_core_generated_css_subclasses",
":make_core_generated_css_property_names",
":make_core_generated_css_property_instances",
":make_core_generated_css_value_id_mappings",
":make_core_generated_cssom_types",
":make_core_generated_event_factory",
":make_core_generated_event_names",
":make_core_generated_event_target_names",
":make_core_generated_event_type_names",
":make_core_generated_feature_policy_helper",
":make_core_generated_html_element_factory",
":make_core_generated_html_element_lookup_trie",
":make_core_generated_html_entity_table",
":make_core_generated_html_tokenizer_names",
":make_core_generated_input_type_names",
":make_core_generated_keywords",
":make_core_generated_mathml_names",
":make_core_generated_mathml_element_type_helpers",
":make_core_generated_media_feature_names",
":make_core_generated_media_type_names",
":make_core_generated_performance_entry_names",
":make_core_generated_origin_trials",
":make_core_generated_style_property_shorthand",
":make_core_generated_svg_names",
":make_core_generated_web_origin_trials",
":make_core_generated_xlink_names",
":make_core_generated_xml_names",
":make_core_generated_xml_ns_names",
":make_core_generated_html_element_type_helpers",
":make_core_generated_css_value_keywords",
":make_core_generated_media_features",
":make_core_generated_svg_element_type_helpers",
]
group("all_generators") {
public_deps = targets_generating_sources
public_deps += [
# This target's generated source is #included into another source file.
# So we don't want to list it in the "generating sources" list above,
# but it does need to be listed as a dependency here.
":make_core_generated_css_tokenizer_codepoints",
]
}
# Compiles the code generated by the targets above.
if (is_component_build) {
# To get exported symbols correct in component builds, the files must be in
# source sets.
core_generated_target_type = "source_set"
} else {
core_generated_target_type = "static_library"
}
target("jumbo_" + core_generated_target_type, "core_generated") {
sources = bindings_core_v8_files
# Add all sources generated by the targets above.
foreach(current, targets_generating_sources) {
sources += get_target_outputs(current)
}
deps = []
public_deps = [
":all_generators",
"//third_party/blink/renderer/bindings/core/v8:bindings_core_impl",
]
configs -= core_config_remove
configs += core_config_add + [ "..:inside_blink" ]
# Dependencies required to compile the sources.
public_deps += [
":prerequisites",
"//gin",
"//skia",
"//third_party/blink/renderer/bindings/core/v8:bindings_core_v8_generated",
"//third_party/iccjpeg",
"//third_party/libpng",
"//third_party/libwebp",
"//third_party/libxml",
"//third_party/libxslt",
# FIXME: don't depend on bindings/modules http://crbug.com/358074
"//third_party/blink/renderer/bindings/modules:bindings_modules_generated",
"//third_party/blink/renderer/bindings/modules/v8:bindings_modules_v8_generated",
"//third_party/blink/renderer/platform:make_platform_generated",
"//third_party/blink/renderer/platform/wtf",
"//url",
"//v8",
]
configs += [
":core_include_dirs",
"//tools/v8_context_snapshot:use_v8_context_snapshot",
]
cflags = []
defines = []
if (is_win && is_component_build) {
defines += [ "USING_V8_SHARED" ]
}
if (is_win) {
cflags += [
# In generated bindings code: "switch contains default but no case".
# 4701 and 4702 are disabled because of issues in Bison-generated
# XPathGrammar.cpp.
"/wd4065",
"/wd4701",
"/wd4702",
]
}
if (is_debug || dcheck_always_on) {
deps += [ "//components/crash/core/common:crash_key" ]
}
}
# Fuzzer for blink::TextResourceDecoder.
fuzzer_test("text_resource_decoder_fuzzer") {
sources = [
"html/parser/text_resource_decoder_for_fuzzing.h",
"html/parser/text_resource_decoder_fuzzer.cc",
]
deps = [
":core",
"../platform:blink_fuzzer_test_support",
]
}
jumbo_source_set("unit_tests") {
testonly = true
sources = [
"clipboard/clipboard_utilities_test.cc",
"content_capture/content_capture_test.cc",
"css/css_test_helpers.cc",
"css/css_test_helpers.h",
"css/css_uri_value_test.cc",
"css/css_value_test_helper.h",
"css/mock_css_paint_image_generator.h",
"display_lock/display_lock_budget_test.cc",
"display_lock/display_lock_context_test.cc",
"display_lock/display_lock_utilities_test.cc",
"dom/attr_test.cc",
"dom/document_statistics_collector_test.cc",
"dom/document_test.cc",
"dom/dom_implementation_test.cc",
"dom/dom_node_ids_test.cc",
"dom/element_test.cc",
"dom/events/event_path_test.cc",
"dom/events/event_target_test.cc",
"dom/events/listener_leak_test.cc",
"dom/first_letter_pseudo_element_test.cc",
"dom/flat_tree_traversal_test.cc",
"dom/idle_deadline_test.cc",
"dom/layout_tree_builder_traversal_test.cc",
"dom/live_node_list_registry_test.cc",
"dom/mutation_observer_test.cc",
"dom/names_map_test.cc",
"dom/node_test.cc",
"dom/nth_index_cache_test.cc",
"dom/range_test.cc",
"dom/scripted_animation_controller_test.cc",
"dom/scripted_idle_task_controller_test.cc",
"dom/shadow_dom_v0_test.cc",
"dom/slot_assignment_test.cc",
"dom/space_split_string_test.cc",
"dom/static_range_test.cc",
"dom/text_test.cc",
"dom/tree_scope_adopter_test.cc",
"dom/tree_scope_test.cc",
"dom/user_gesture_indicator_test.cc",
"dom/weak_identifier_map_test.cc",
"dom/whitespace_attacher_test.cc",
"editing/caret_display_item_client_test.cc",
"editing/finder/text_finder_test.cc",
"editing/keyboard_test.cc",
"editing/link_selection_test.cc",
"events/pointer_event_factory_test.cc",
"events/touch_event_test.cc",
"events/web_input_event_conversion_test.cc",
"execution_context/agent_metrics_collector_test.cc",
"execution_context/context_lifecycle_state_observer_test.cc",
"exported/local_frame_client_impl_test.cc",
"exported/prerendering_test.cc",
"exported/web_document_subresource_filter_test.cc",
"exported/web_document_test.cc",
"exported/web_drag_data_test.cc",
"exported/web_element_test.cc",
"exported/web_frame_serializer_import_test.cc",
"exported/web_frame_serializer_sanitization_test.cc",
"exported/web_frame_serializer_test.cc",
"exported/web_frame_serializer_test_helper.cc",
"exported/web_frame_serializer_test_helper.h",
"exported/web_frame_test.cc",
"exported/web_image_test.cc",
"exported/web_layer_test.cc",
"exported/web_meaningful_layouts_test.cc",
"exported/web_node_test.cc",
"exported/web_plugin_container_test.cc",
"exported/web_range_test.cc",
"exported/web_scoped_window_focus_allowed_indicator_test.cc",
"exported/web_searchable_form_data_test.cc",
"exported/web_selector_test.cc",
"exported/web_view_test.cc",
"feature_policy/feature_policy_test.cc",
"feature_policy/policy_test.cc",
"fetch/blob_bytes_consumer_test.cc",
"fetch/body_stream_buffer_test.cc",
"fetch/bytes_consumer_tee_test.cc",
"fetch/bytes_consumer_test_util.cc",
"fetch/bytes_consumer_test_util.h",
"fetch/fetch_data_loader_test.cc",
"fetch/fetch_header_list_test.cc",
"fetch/fetch_request_data_test.cc",
"fetch/fetch_response_data_test.cc",
"fetch/form_data_bytes_consumer_test.cc",
"fetch/multipart_parser_test.cc",
"fetch/place_holder_bytes_consumer_test.cc",
"fetch/readable_stream_bytes_consumer_test.cc",
"fetch/request_test.cc",
"fetch/response_test.cc",
"frame/ad_tracker_test.cc",
"frame/browser_controls_test.cc",
"frame/csp/content_security_policy_test.cc",
"frame/csp/csp_directive_list_test.cc",
"frame/csp/csp_source_test.cc",
"frame/csp/media_list_directive_test.cc",
"frame/csp/source_list_directive_test.cc",
"frame/deprecation_report_body_test.cc",
"frame/document_loading_rendering_test.cc",
"frame/dom_timer_test.cc",
"frame/find_in_page_test.cc",
"frame/frame_overlay_test.cc",
"frame/frame_serializer_test.cc",
"frame/frame_test.cc",
"frame/frame_test_helpers.cc",
"frame/frame_test_helpers.h",
"frame/history_test.cc",
"frame/local_frame_back_forward_cache_test.cc",
"frame/local_frame_test.cc",
"frame/local_frame_ukm_aggregator_test.cc",
"frame/local_frame_view_test.cc",
"frame/mhtml_archive_test.cc",
"frame/mhtml_loading_test.cc",
"frame/performance_monitor_test.cc",
"frame/reporting_context_test.cc",
"frame/root_frame_viewport_test.cc",
"frame/rotation_viewport_anchor_test.cc",
"frame/use_counter_helper_test.cc",
"frame/visual_viewport_test.cc",
"fullscreen/scoped_allow_fullscreen_test.cc",
"geometry/dom_matrix_test.cc",
"html/anchor_element_metrics_sender_test.cc",
"html/anchor_element_metrics_test.cc",
"html/canvas/canvas_async_blob_creator_test.cc",
"html/canvas/canvas_font_cache_test.cc",
"html/canvas/html_canvas_element_test.cc",
"html/canvas/image_data_test.cc",
"html/custom/custom_element_definition_test.cc",
"html/custom/custom_element_descriptor_test.cc",
"html/custom/custom_element_reaction_queue_test.cc",
"html/custom/custom_element_reaction_stack_test.cc",
"html/custom/custom_element_reaction_test_helpers.h",
"html/custom/custom_element_registry_test.cc",
"html/custom/custom_element_test.cc",
"html/custom/custom_element_test_helpers.cc",
"html/custom/custom_element_test_helpers.h",
"html/custom/custom_element_upgrade_sorter_test.cc",
"html/forms/email_input_type_test.cc",
"html/forms/external_date_time_chooser_test.cc",
"html/forms/external_popup_menu_test.cc",
"html/forms/file_input_type_test.cc",
"html/forms/form_controller_test.cc",
"html/forms/form_data_test.cc",
"html/forms/html_data_list_element_test.cc",
"html/forms/html_form_control_element_test.cc",
"html/forms/html_form_element_test.cc",
"html/forms/html_input_element_test.cc",
"html/forms/html_output_element_test.cc",
"html/forms/html_select_element_test.cc",
"html/forms/html_text_area_element_test.cc",
"html/forms/internal_popup_menu_test.cc",
"html/forms/option_list_test.cc",
"html/forms/password_input_type_test.cc",
"html/forms/step_range_test.cc",
"html/forms/text_control_element_test.cc",
"html/forms/type_ahead_test.cc",
"html/html_content_element_test.cc",
"html/html_dimension_test.cc",
"html/html_element_test.cc",
"html/html_embed_element_test.cc",
"html/html_frame_element_test.cc",
"html/html_iframe_element_test.cc",
"html/html_image_element_test.cc",
"html/html_link_element_sizes_attribute_test.cc",
"html/html_link_element_test.cc",
"html/html_meta_element_test.cc",
"html/html_object_element_test.cc",
"html/html_plugin_element_test.cc",
"html/html_slot_element_test.cc",
"html/html_table_row_element_test.cc",
"html/image_document_test.cc",
"html/imports/html_import_sheets_test.cc",
"html/lazy_load_frame_observer_test.cc",
"html/lazy_load_image_observer_test.cc",
"html/link_element_loading_test.cc",
"html/link_rel_attribute_test.cc",
"html/media/autoplay_uma_helper_test.cc",
"html/media/html_media_element_event_listeners_test.cc",
"html/media/html_media_element_test.cc",
"html/media/html_media_test_helper.cc",
"html/media/html_media_test_helper.h",
"html/media/html_video_element_persistent_test.cc",
"html/media/html_video_element_test.cc",
"html/media/media_custom_controls_fullscreen_detector_test.cc",
"html/media/video_auto_fullscreen_test.cc",
"html/media/video_filling_viewport_test.cc",
"html/media/video_wake_lock_test.cc",
"html/parser/atomic_html_token_test.cc",
"html/parser/compact_html_token_test.cc",
"html/parser/html_document_parser_loading_test.cc",
"html/parser/html_document_parser_test.cc",
"html/parser/html_entity_parser_test.cc",
"html/parser/html_parser_idioms_test.cc",
"html/parser/html_preload_scanner_document_test.cc",
"html/parser/html_preload_scanner_test.cc",
"html/parser/html_resource_preloader_test.cc",
"html/parser/html_srcset_parser_test.cc",
"html/parser/html_tokenizer_test.cc",
"html/parser/html_tree_builder_simulator_test.cc",
"html/parser/html_view_source_parser_test.cc",
"html/parser/text_resource_decoder_test.cc",
"html/shadow/progress_shadow_element_test.cc",
"html/time_ranges_test.cc",
"html/track/text_track_list_test.cc",
"html/track/vtt/buffered_line_reader_test.cc",
"html/track/vtt/vtt_scanner_test.cc",
"imagebitmap/image_bitmap_test.cc",
"input/event_handler_test.cc",
"input/fallback_cursor_event_manager_test.cc",
"input/ime_on_focus_test.cc",
"input/overscroll_behavior_test.cc",
"input/pointer_event_manager_test.cc",
"input/scroll_snap_test.cc",
"input/touch_action_test.cc",
"input/touch_event_manager_test.cc",
"inspector/inspector_session_state_test.cc",
"inspector/main_thread_debugger_test.cc",
"inspector/protocol_parser_test.cc",
"inspector/protocol_unittest.cc",
"intersection_observer/intersection_observer_test.cc",
"layout/api/selection_state_test.cc",
"layout/collapsed_border_value_test.cc",
"layout/force_legacy_layout_test.cc",
"layout/geometry/logical_offset_test.cc",
"layout/geometry/logical_rect_test.cc",
"layout/geometry/physical_offset_test.cc",
"layout/geometry/physical_rect_test.cc",
"layout/geometry/physical_size_test.cc",
"layout/grid_test.cc",
"layout/hit_testing_test.cc",
"layout/layout_block_test.cc",
"layout/layout_box_model_object_test.cc",
"layout/layout_box_test.cc",
"layout/layout_count_test.cc",
"layout/layout_embedded_content_test.cc",
"layout/layout_flexible_box_test.cc",
"layout/layout_geometry_map_test.cc",
"layout/layout_image_test.cc",
"layout/layout_inline_test.cc",
"layout/layout_media_test.cc",
"layout/layout_multi_column_flow_thread_test.cc",
"layout/layout_object_test.cc",
"layout/layout_progress_test.cc",
"layout/layout_replaced_test.cc",
"layout/layout_shift_region_test.cc",
"layout/layout_shift_tracker_test.cc",
"layout/layout_table_cell_test.cc",
"layout/layout_table_col_test.cc",
"layout/layout_table_row_test.cc",
"layout/layout_table_section_test.cc",
"layout/layout_table_test.cc",
"layout/layout_text_control_single_line_test.cc",
"layout/layout_text_control_test.cc",
"layout/layout_text_fragment_test.cc",
"layout/layout_text_test.cc",
"layout/layout_theme_test.cc",
"layout/layout_view_test.cc",
"layout/line/abstract_inline_text_box_test.cc",
"layout/line/inline_text_box_test.cc",
"layout/line/line_orientation_utils_test.cc",
"layout/map_coordinates_test.cc",
"layout/min_max_size_test.cc",
"layout/multi_column_fragmentainer_group_test.cc",
"layout/ng/custom/layout_worklet_test.cc",
"layout/ng/exclusions/ng_exclusion_space_test.cc",
"layout/ng/geometry/ng_box_strut_test.cc",
"layout/ng/geometry/ng_static_position_test.cc",
"layout/ng/inline/layout_ng_text_test.cc",
"layout/ng/inline/ng_baseline_test.cc",
"layout/ng/inline/ng_caret_position_test.cc",
"layout/ng/inline/ng_fragment_item_test.cc",
"layout/ng/inline/ng_inline_cursor_test.cc",
"layout/ng/inline/ng_inline_fragment_traversal_test.cc",
"layout/ng/inline/ng_inline_items_builder_test.cc",
"layout/ng/inline/ng_inline_layout_algorithm_test.cc",
"layout/ng/inline/ng_inline_node_test.cc",
"layout/ng/inline/ng_line_breaker_test.cc",
"layout/ng/inline/ng_offset_mapping_test.cc",
"layout/ng/inline/ng_physical_line_box_fragment_test.cc",
"layout/ng/inline/ng_physical_text_fragment_test.cc",
"layout/ng/list/layout_ng_list_item_test.cc",
"layout/ng/ng_absolute_utils_test.cc",
"layout/ng/ng_base_layout_algorithm_test.cc",
"layout/ng/ng_base_layout_algorithm_test.h",
"layout/ng/ng_block_child_iterator_test.cc",
"layout/ng/ng_block_layout_algorithm_test.cc",
"layout/ng/ng_block_node_test.cc",
"layout/ng/ng_column_layout_algorithm_test.cc",
"layout/ng/ng_constraint_space_builder_test.cc",
"layout/ng/ng_fieldset_layout_algorithm_test.cc",
"layout/ng/ng_inline_layout_test.cc",
"layout/ng/ng_layout_result_caching_test.cc",
"layout/ng/ng_layout_test.h",
"layout/ng/ng_length_utils_test.cc",
"layout/ng/ng_out_of_flow_layout_part_test.cc",
"layout/ng/ng_physical_box_fragment_test.cc",
"layout/ng/ng_relative_utils_test.cc",
"layout/overflow_model_test.cc",
"layout/paint_containment_test.cc",
"layout/scroll_anchor_test.cc",
"layout/scrollbars_test.cc",
"layout/shapes/box_shape_test.cc",
"layout/style_retain_scope_test.cc",
"layout/svg/layout_svg_foreign_object_test.cc",
"layout/svg/layout_svg_root_test.cc",
"layout/svg/layout_svg_text_test.cc",
"layout/text_autosizer_test.cc",
"layout/visual_rect_mapping_test.cc",
"loader/alternate_signed_exchange_resource_info_test.cc",
"loader/base_fetch_context_test.cc",
"loader/document_load_timing_test.cc",
"loader/document_loader_test.cc",
"loader/frame_fetch_context_test.cc",
"loader/frame_resource_fetcher_properties_test.cc",
"loader/idleness_detector_test.cc",
"loader/image_loader_test.cc",
"loader/interactive_detector_test.cc",
"loader/link_loader_test.cc",
"loader/long_task_detector_test.cc",
"loader/mixed_content_checker_test.cc",
"loader/modulescript/module_script_loader_test.cc",
"loader/modulescript/module_tree_linker_test.cc",
"loader/navigation_policy_test.cc",
"loader/ping_loader_test.cc",
"loader/previews_resource_loading_hints_test.cc",
"loader/programmatic_scroll_test.cc",
"loader/progress_tracker_test.cc",
"loader/resource/css_style_sheet_resource_test.cc",
"loader/resource/font_resource_test.cc",
"loader/resource/image_resource_test.cc",
"loader/resource/mock_font_resource_client.cc",
"loader/resource/mock_font_resource_client.h",
"loader/resource/mock_image_resource_observer.cc",
"loader/resource/mock_image_resource_observer.h",
"loader/resource/multipart_image_resource_parser_test.cc",
"loader/resource_load_observer_for_frame_test.cc",
"loader/text_resource_decoder_builder_test.cc",
"loader/threadable_loader_test.cc",
"loader/threaded_icon_loader_test.cc",
"loader/web_associated_url_loader_impl_test.cc",
"messaging/blink_transferable_message_mojom_traits_test.cc",
"messaging/message_port_descriptor_mojom_traits_test.cc",
"origin_trials/origin_trial_context_test.cc",
"page/autoscroll_controller_test.cc",
"page/chrome_client_impl_test.cc",
"page/chrome_client_test.cc",
"page/context_menu_controller_test.cc",
"page/drag_controller_test.cc",
"page/drag_image_test.cc",
"page/focus_controller_test.cc",
"page/page_popup_client_test.cc",
"page/plugin_data_test.cc",
"page/print_context_test.cc",
"page/scrolling/element_fragment_anchor_test.cc",
"page/scrolling/main_thread_scrolling_reasons_test.cc",
"page/scrolling/root_scroller_test.cc",
"page/scrolling/scroll_into_view_test.cc",
"page/scrolling/scroll_metrics_test.cc",
"page/scrolling/scroll_state_test.cc",
"page/scrolling/scrolling_coordinator_test.cc",
"page/scrolling/snap_coordinator_test.cc",
"page/scrolling/text_fragment_anchor_metrics_test.cc",
"page/scrolling/text_fragment_anchor_test.cc",
"page/slot_scoped_traversal_test.cc",
"page/spatial_navigation_test.cc",
"page/touch_adjustment_test.cc",
"page/validation_message_overlay_delegate_test.cc",
"page/viewport_test.cc",
"page/window_features_test.cc",
"page/zoom_test.cc",
"paint/block_painter_test.cc",
"paint/box_paint_invalidator_test.cc",
"paint/box_painter_test.cc",
"paint/clip_path_clipper_test.cc",
"paint/clip_rect_test.cc",
"paint/compositing/composited_layer_mapping_test.cc",
"paint/compositing/compositing_inputs_updater_test.cc",
"paint/compositing/compositing_layer_assigner_test.cc",
"paint/compositing/compositing_layer_property_updater_test.cc",
"paint/compositing/compositing_reason_finder_test.cc",
"paint/compositing/compositing_requirements_updater_test.cc",
"paint/compositing/paint_layer_compositor_test.cc",
"paint/css_mask_painter_test.cc",
"paint/first_meaningful_paint_detector_test.cc",
"paint/fragment_data_test.cc",
"paint/html_canvas_painter_test.cc",
"paint/image_element_timing_test.cc",
"paint/image_paint_timing_detector_test.cc",
"paint/inline_text_box_painter_test.cc",
"paint/largest_contentful_paint_calculator_test.cc",
"paint/link_highlight_impl_test.cc",
"paint/ng/ng_box_fragment_painter_test.cc",
"paint/ng/ng_paint_fragment_test.cc",
"paint/ng/ng_paint_fragment_traversal_test.cc",
"paint/ng/ng_text_fragment_painter_test.cc",
"paint/nine_piece_image_grid_test.cc",
"paint/object_paint_invalidator_test.cc",
"paint/paint_and_raster_invalidation_test.cc",
"paint/paint_and_raster_invalidation_test.h",
"paint/paint_controller_paint_test.cc",
"paint/paint_controller_paint_test.h",
"paint/paint_layer_clipper_test.cc",
"paint/paint_layer_painter_test.cc",
"paint/paint_layer_scrollable_area_test.cc",
"paint/paint_layer_test.cc",
"paint/paint_property_tree_builder_test.cc",
"paint/paint_property_tree_builder_test.h",
"paint/paint_property_tree_printer_test.cc",
"paint/paint_property_tree_update_tests.cc",
"paint/paint_timing_test_helper.h",
"paint/pre_paint_tree_walk_test.cc",
"paint/table_painter_test.cc",
"paint/text_paint_timing_detector_test.cc",
"paint/text_painter_test.cc",
"paint/text_selection_repaint_test.cc",
"paint/video_painter_test.cc",
"paint/view_painter_test.cc",
"resize_observer/resize_observer_test.cc",
"scheduler_integration_tests/frame_scheduler_test.cc",
"scheduler_integration_tests/frame_throttling_test.cc",
"scheduler_integration_tests/scheduler_affecting_features_test.cc",
"scheduler_integration_tests/throttling_test.cc",
"scheduler_integration_tests/virtual_time_test.cc",
"script/document_modulator_impl_test.cc",
"script/dynamic_module_resolver_test.cc",
"script/layered_api_test.cc",
"script/mock_script_element_base.h",
"script/module_map_test.cc",
"script/module_record_resolver_impl_test.cc",
"script/module_script_test.cc",
"script/script_runner_test.cc",
"scroll/scrollable_area_test.cc",
"scroll/scrollbar_theme_overlay_test.cc",
"streams/miscellaneous_operations_test.cc",
"streams/queue_with_sizes_test.cc",
"streams/readable_stream_test.cc",
"streams/stream_promise_resolver_test.cc",
"streams/test_underlying_source.h",
"streams/transferable_streams_test.cc",
"streams/transform_stream_test.cc",
"streams/writable_stream_test.cc",
"style/border_value_test.cc",
"style/computed_style_test.cc",
"style/filter_operations_test.cc",
"style/style_difference_test.cc",
"style/style_variables_test.cc",
"style/svg_computed_style_test.cc",
"svg/animation/priority_queue_test.cc",
"svg/graphics/svg_image_test.cc",
"svg/svg_foreign_object_element_test.cc",
"svg/svg_path_parser_test.cc",
"svg/svg_path_query_test.cc",
"svg/svg_text_content_element_test.cc",
"svg/svg_use_element_test.cc",
"svg/unsafe_svg_attribute_sanitization_test.cc",
"testing/fake_web_plugin.cc",
"testing/fake_web_plugin.h",
"testing/sim/sim_canvas.cc",
"testing/sim/sim_canvas.h",
"testing/sim/sim_compositor.cc",
"testing/sim/sim_compositor.h",
"testing/sim/sim_network.cc",
"testing/sim/sim_network.h",
"testing/sim/sim_page.cc",
"testing/sim/sim_page.h",
"testing/sim/sim_request.cc",
"testing/sim/sim_request.h",
"testing/sim/sim_test.cc",
"testing/sim/sim_test.h",
"timing/memory_info_test.cc",
"timing/performance_mark_test.cc",
"timing/performance_navigation_timing_test.cc",
"timing/performance_observer_test.cc",
"timing/performance_resource_timing_test.cc",
"timing/performance_test.cc",
"timing/profiler_group_test.cc",
"timing/time_clamper_test.cc",
"timing/window_performance_test.cc",
"trustedtypes/trusted_types_util_test.cc",
"typed_arrays/array_buffer/array_buffer_contents_test.cc",
"url/url_search_params_test.cc",
"workers/dedicated_worker_test.cc",
"workers/main_thread_worklet_test.cc",
"workers/threaded_worklet_test.cc",
"workers/worker_thread_test.cc",
"workers/worker_thread_test_helper.h",
"workers/worklet_module_responses_map_test.cc",
"xml/parser/shared_buffer_reader_test.cc",
"xml/parser/xml_document_parser_test.cc",
"xml/xpath_functions_test.cc",
]
configs += [
":blink_core_pch",
"//third_party/blink/renderer:config",
"//third_party/blink/renderer:inside_blink",
]
deps = [
":core",
":unit_test_support",
"//mojo/public/cpp/system",
"//skia:skcms",
"//testing/gmock",
"//testing/gtest",
"//third_party/blink/renderer/core/accessibility:unit_tests",
"//third_party/blink/renderer/core/animation:unit_tests",
"//third_party/blink/renderer/core/clipboard:unit_tests",
"//third_party/blink/renderer/core/css:unit_tests",
"//third_party/blink/renderer/core/editing:unit_tests",
"//third_party/blink/renderer/core/fileapi:unit_tests",
]
data_deps = [
":unit_tests_data",
]
# FIXME: Enable mojo unittests on Android after fixing data dependency.
# crbug.com/741925
if (!is_android) {
deps += [ "//third_party/blink/renderer/core/mojo:unit_tests" ]
}
if (!is_mac) {
sources += [
"scroll/scroll_animator_test.cc",
"scroll/scrolling_test.cc",
]
}
if (use_aura) {
sources += [ "scroll/scrollbar_theme_aura_test.cc" ]
}
}
group("unit_tests_data") {
data = [
"//third_party/blink/web_tests/svg/animations/path-animation.svg",
"//third_party/blink/web_tests/svg/stroke/zero-length-path-linecap-rendering.svg",
"//third_party/blink/web_tests/svg/foreignObject/fixed-position.svg",
"//third_party/blink/web_tests/svg/clip-path/clip-in-mask.svg",
]
}
jumbo_source_set("perf_tests") {
testonly = true
sources = [
"layout/visual_rect_mapping_perftest.cc",
]
configs += [
":blink_core_pch",
"//third_party/blink/renderer:config",
"//third_party/blink/renderer:inside_blink",
]
deps = [
":core",
":unit_test_support",
"//mojo/public/cpp/system",
"//testing/gmock",
"//testing/gtest",
]
}
jumbo_source_set("unit_test_support") {
testonly = true
sources = [
"testing/core_unit_test_helper.cc",
"testing/core_unit_test_helper.h",
"testing/page_test_base.cc",
"testing/page_test_base.h",
"testing/scoped_fake_plugin_registry.cc",
"testing/scoped_fake_plugin_registry.h",
]
configs += [
":blink_core_pch",
"//third_party/blink/renderer:config",
"//third_party/blink/renderer:inside_blink",
]
deps = [
":core",
"//testing/gmock",
"//testing/gtest",
]
}
# Fuzzer for blink::StyleSheetContents
fuzzer_test("stylesheet_contents_fuzzer") {
sources = [
"css/style_sheet_contents_fuzzer.cc",
]
deps = [
":core",
"../platform:blink_fuzzer_test_support",
]
dict = "//third_party/blink/renderer/core/css/css.dict"
seed_corpus = "//third_party/blink/web_tests/fast/css/resources"
libfuzzer_options = [ "max_len=1024" ]
}
# Fuzzer for blink::CSSParserFastPaths
fuzzer_test("css_parser_fast_paths_fuzzer") {
sources = [
"css/parser/css_parser_fast_paths_fuzzer.cc",
]
deps = [
":core",
"../platform:blink_fuzzer_test_support",
]
dict = "//third_party/blink/renderer/core/css/css.dict"
libfuzzer_options = [ "max_len=128" ]
}
# Fuzzer for blink::HTMLPreloadScanner.
fuzzer_test("html_preload_scanner_fuzzer") {
sources = [
"html/parser/html_preload_scanner_fuzzer.cc",
"html/parser/text_resource_decoder_for_fuzzing.h",
]
seed_corpus = "//third_party/blink/web_tests/fast/parser"
deps = [
":core",
"../platform:blink_fuzzer_test_support",
]
}
# Fuzzer for blink::ContentSecurityPolicy.
fuzzer_test("content_security_policy_fuzzer") {
sources = [
"frame/csp/content_security_policy_fuzzer.cc",
]
deps = [
":core",
"//third_party/blink/renderer/platform:blink_fuzzer_test_support",
]
dict = "//testing/libfuzzer/fuzzers/dicts/content_security_policy.dict"
seed_corpus = "//testing/libfuzzer/fuzzers/content_security_policy_corpus"
}
fuzzer_test("css_parser_proto_fuzzer") {
sources = [
"css/parser/css_parser_proto_fuzzer.cc",
"css/parser/css_proto_converter.cc",
"css/parser/css_proto_converter.h",
]
deps = [
":core",
":css_proto",
"//third_party/blink/renderer/platform:blink_fuzzer_test_support",
"//third_party/libprotobuf-mutator",
]
dict = "//third_party/blink/renderer/core/css/css.dict"
}
proto_library("css_proto") {
sources = [
"css/parser/css.proto",
]
}
# Fuzzers for blink::FeaturePolicy.
fuzzer_test("feature_policy_fuzzer") {
sources = [
"feature_policy/feature_policy_fuzzer.cc",
]
deps = [
"//third_party/blink/renderer/platform:blink_fuzzer_test_support",
"//third_party/icu",
]
dict = "//third_party/blink/renderer/core/feature_policy/feature_policy.dict"
seed_corpus =
"//third_party/blink/renderer/core/feature_policy/feature_policy_corpus"
}
fuzzer_test("feature_policy_attr_fuzzer") {
sources = [
"feature_policy/feature_policy_attr_fuzzer.cc",
]
deps = [
"//third_party/blink/renderer/platform:blink_fuzzer_test_support",
"//third_party/icu",
]
dict = "//third_party/blink/renderer/core/feature_policy/feature_policy.dict"
seed_corpus =
"//third_party/blink/renderer/core/feature_policy/feature_policy_corpus"
}
fuzzer_test("feature_policy_value_fuzzer") {
sources = [
"feature_policy/feature_policy_value_fuzzer.cc",
]
deps = [
"//third_party/blink/renderer/platform:blink_fuzzer_test_support",
"//third_party/icu",
]
dict = "//third_party/blink/renderer/core/feature_policy/feature_policy_value.dict"
seed_corpus = "//third_party/blink/renderer/core/feature_policy/feature_policy_value_corpus"
}