| # Copyright 2017 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/jumbo.gni") |
| import("//testing/libfuzzer/fuzzer_test.gni") |
| import("//testing/test.gni") |
| |
| jumbo_source_set("common") { |
| # No target should directly depend on this target since this is just the |
| # source set rather than the actual component that can be linked to. |
| # Dependencies instead should be to //third_party/blink/public/common:common. |
| visibility = [ |
| ":*", |
| "//third_party/blink/public/common", |
| "//third_party/blink/public:all_blink", |
| ] |
| |
| defines = [ "BLINK_COMMON_IMPLEMENTATION=1" ] |
| |
| sources = [ |
| # NOTE: Please do not add public headers that need to be referenced from |
| # outside WebKit, add them in public/common instead. |
| "associated_interfaces/associated_interface_provider.cc", |
| "associated_interfaces/associated_interface_registry.cc", |
| "blob/blob_utils.cc", |
| "bluetooth/web_bluetooth_device_id.cc", |
| "bluetooth/web_bluetooth_device_id.h", |
| "bluetooth/web_bluetooth_device_id_struct_traits.h", |
| "cache_storage/cache_storage_utils.cc", |
| "client_hints/client_hints.cc", |
| "device_memory/approximated_device_memory.cc", |
| "dom_storage/session_storage_namespace_id.cc", |
| "experiments/memory_ablation_experiment.cc", |
| "feature_policy/feature_policy.cc", |
| "feature_policy/policy_value.cc", |
| "features.cc", |
| "fetch/fetch_api_request_body_mojom_traits.cc", |
| "frame/frame_policy.cc", |
| "frame/from_ad_state.cc", |
| "frame/user_activation_state.cc", |
| "indexeddb/indexed_db_default_mojom_traits.cc", |
| "indexeddb/indexeddb_key.cc", |
| "indexeddb/indexeddb_key_path.cc", |
| "indexeddb/indexeddb_key_range.cc", |
| "indexeddb/indexeddb_metadata.cc", |
| "loader/request_destination.cc", |
| "loader/url_loader_factory_bundle.cc", |
| "loader/url_loader_factory_bundle_mojom_traits.cc", |
| "logging/logging_utils.cc", |
| "manifest/manifest.cc", |
| "manifest/manifest_icon_selector.cc", |
| "manifest/manifest_util.cc", |
| "mediastream/media_devices.cc", |
| "mediastream/media_devices_mojom_traits.cc", |
| "mediastream/media_stream_controls.cc", |
| "mediastream/media_stream_mojom_traits.cc", |
| "mediastream/media_stream_request.cc", |
| "messaging/cloneable_message.cc", |
| "messaging/cloneable_message_struct_traits.cc", |
| "messaging/message_port_channel.cc", |
| "messaging/string_message_codec.cc", |
| "messaging/transferable_message.cc", |
| "messaging/transferable_message_struct_traits.cc", |
| "mime_util/mime_util.cc", |
| "notifications/notification_resources.cc", |
| "notifications/notification_struct_traits.cc", |
| "notifications/platform_notification_data.cc", |
| "origin_policy/origin_policy.cc", |
| "origin_policy/origin_policy_parser.cc", |
| "origin_policy/origin_policy_parser.h", |
| "origin_trials/trial_token.cc", |
| "origin_trials/trial_token_validator.cc", |
| "privacy_preferences.cc", |
| "service_worker/service_worker_status_code.cc", |
| "service_worker/service_worker_type_converters.cc", |
| "service_worker/service_worker_utils.cc", |
| "web_package/http_structured_header.cc", |
| "web_package/signed_exchange_consts.cc", |
| "web_package/signed_exchange_request_matcher.cc", |
| ] |
| |
| public_deps = [ |
| "//third_party/blink/public/common:headers", |
| ] |
| |
| deps = [ |
| "//base", |
| "//mojo/public/cpp/system", |
| "//net", |
| "//services/metrics/public/cpp:ukm_builders", |
| "//services/network/public/cpp:cpp", |
| ] |
| |
| # iOS doesn't use and must not depend on //media |
| if (!is_ios) { |
| deps += [ "//media" ] |
| } |
| |
| if (is_android || is_win) { |
| sources += [ |
| "font_unique_name_lookup/font_table_matcher.cc", |
| "font_unique_name_lookup/font_table_persistence.cc", |
| "font_unique_name_lookup/icu_fold_case_util.cc", |
| ] |
| |
| deps += [ "//third_party/icu" ] |
| } |
| |
| if (is_win) { |
| sources += [ "dwrite_rasterizer_support/dwrite_rasterizer_support.cc" ] |
| deps += [ "//ui/gfx/" ] |
| } |
| } |
| |
| fuzzer_test("http_structured_header_fuzzer") { |
| sources = [ |
| "web_package/http_structured_header_fuzzer.cc", |
| ] |
| deps = [ |
| ":common", |
| "//third_party/blink/renderer/platform:blink_fuzzer_test_support", |
| ] |
| seed_corpus = "web_package/http_structured_header_corpus" |
| } |
| |
| test("blink_common_unittests") { |
| visibility = [ "*" ] |
| deps = [ |
| ":common_unittests_sources", |
| "//third_party/blink/public/common", |
| ] |
| if (is_android) { |
| deps += [ |
| "//base:base_java", |
| "//media/base/android:media_java", |
| ] |
| } |
| } |
| |
| jumbo_source_set("common_unittests_sources") { |
| testonly = true |
| |
| sources = [ |
| "bluetooth/web_bluetooth_device_id_unittest.cc", |
| "client_hints/client_hints_unittest.cc", |
| "device_memory/approximated_device_memory_unittest.cc", |
| "feature_policy/feature_policy_unittest.cc", |
| "frame/user_activation_state_unittest.cc", |
| "indexeddb/indexeddb_key_unittest.cc", |
| "manifest/manifest_icon_selector_unittest.cc", |
| "manifest/manifest_util_unittest.cc", |
| "mediastream/media_devices_unittest.cc", |
| "mime_util/mime_util_unittest.cc", |
| "notifications/notification_struct_traits_unittest.cc", |
| "origin_policy/origin_policy_unittest.cc", |
| "origin_trials/trial_token_unittest.cc", |
| "origin_trials/trial_token_validator_unittest.cc", |
| "test/run_all_unittests.cc", |
| "web_package/http_structured_header_unittest.cc", |
| "web_package/signed_exchange_request_matcher_unittest.cc", |
| ] |
| |
| deps = [ |
| "//base", |
| "//base/test:test_support", |
| "//mojo/core/embedder", |
| "//net", |
| "//skia/public/interfaces", |
| "//testing/gtest", |
| "//third_party/blink/public/common:headers", |
| "//third_party/boringssl", |
| "//url/mojom:url_mojom_gurl", |
| "//v8", |
| "//v8:v8_libplatform", |
| ] |
| |
| if (!is_android) { |
| # TODO(crbug.com/845384): Enable these tests also on Android. Currently |
| # they are excluded as they require V8 environment but V8 snapshot is |
| # not available in the current minimum test setting. |
| sources += [ "messaging/string_message_codec_unittest.cc" ] |
| } |
| |
| if (is_android || is_win) { |
| sources += [ |
| "font_unique_name_lookup/font_table_matcher_unittest.cc", |
| "font_unique_name_lookup/icu_fold_case_util_unittest.cc", |
| ] |
| } |
| } |