blob: 8be06c3c9ec885a81389899f23c0ba71e5d69283 [file] [log] [blame]
# 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/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",
"cache_storage/cache_storage_utils.cc",
"client_hints/client_hints.cc",
"device_memory/approximated_device_memory.cc",
"dom_storage/session_storage_namespace_id.cc",
"download/download_stats.cc",
"experiments/memory_ablation_experiment.cc",
"feature_policy/feature_policy.cc",
"features.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",
"manifest/manifest.cc",
"manifest/manifest_icon_selector.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",
]
public_deps = [
"//third_party/blink/public/common:headers",
]
deps = [
"//base",
"//mojo/public/cpp/system",
"//net",
"//services/network/public/cpp:cpp",
]
# iOS doesn't use and must not depend on //media
if (!is_ios) {
deps += [ "//media" ]
}
if (is_android) {
sources += [
"font_unique_name_lookup/font_table_matcher.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/" ]
}
}
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 = [
"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",
"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",
]
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" ]
} else {
# is_android
sources += [
"font_unique_name_lookup/font_table_matcher_unittest.cc",
"font_unique_name_lookup/icu_fold_case_util_unittest.cc",
]
}
}