mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 06:16:30 +03:00
build: Remove tests and minimize
This commit is contained in:
parent
127087ea77
commit
0b695a805e
1715
src/BUILD.gn
1715
src/BUILD.gn
File diff suppressed because it is too large
Load Diff
2316
src/base/BUILD.gn
2316
src/base/BUILD.gn
File diff suppressed because it is too large
Load Diff
@ -59,16 +59,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" ]
|
||||
|
@ -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" ]
|
||||
}
|
||||
|
@ -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"
|
||||
@ -150,75 +149,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",
|
||||
]
|
||||
}
|
||||
|
2220
src/net/BUILD.gn
2220
src/net/BUILD.gn
File diff suppressed because it is too large
Load Diff
@ -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"
|
||||
}
|
||||
}
|
||||
|
@ -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",
|
||||
]
|
||||
}
|
||||
|
1108
src/net/third_party/quiche/BUILD.gn
vendored
1108
src/net/third_party/quiche/BUILD.gn
vendored
File diff suppressed because it is too large
Load Diff
@ -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",
|
||||
]
|
||||
}
|
||||
|
@ -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 = [
|
||||
|
1
src/third_party/boringssl/BUILD.gn
vendored
1
src/third_party/boringssl/BUILD.gn
vendored
@ -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")
|
||||
|
||||
|
8
src/third_party/brotli/BUILD.gn
vendored
8
src/third_party/brotli/BUILD.gn
vendored
@ -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" ]
|
||||
}
|
||||
|
309
src/url/BUILD.gn
309
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/cronet/config.gni")
|
||||
@ -102,310 +100,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" ]
|
||||
}
|
||||
|
||||
# Unlike gurl_junit_test_support targets depending on gurl_junit_shadows must
|
||||
# bypass platform checks.
|
||||
robolectric_library("gurl_junit_shadows") {
|
||||
sources = [ "android/test/java/src/org/chromium/url/ShadowGURL.java" ]
|
||||
deps = [
|
||||
":gurl_java",
|
||||
":gurl_junit_test_support",
|
||||
]
|
||||
}
|
||||
|
||||
android_library("url_java_unit_tests") {
|
||||
testonly = true
|
||||
sources = [
|
||||
"android/javatests/src/org/chromium/url/GURLJavaTest.java",
|
||||
"android/javatests/src/org/chromium/url/JUnitTestGURLsTest.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",
|
||||
]
|
||||
}
|
||||
|
||||
robolectric_library("gurl_junit_tests") {
|
||||
sources = [ "android/junit/src/org/chromium/url/ShadowGURLTest.java" ]
|
||||
deps = [
|
||||
":gurl_java",
|
||||
":gurl_junit_shadows",
|
||||
":gurl_junit_test_support",
|
||||
"//base:base_java_test_support",
|
||||
"//base:base_junit_test_support",
|
||||
"//base/test:test_support_java",
|
||||
"//third_party/junit",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
if (is_robolectric) {
|
||||
# Use this in robolectric_binary() targets if you just need GURL and //base
|
||||
# functionality. Otherwise, define a custom shared_library().
|
||||
shared_library_with_jni("libgurl_robolectric") {
|
||||
testonly = true
|
||||
sources = [ "android/robolectric_test_main.cc" ]
|
||||
deps = [
|
||||
"//base",
|
||||
"//url:gurl_android",
|
||||
]
|
||||
|
||||
# Make jni.h available.
|
||||
configs += [ "//third_party/jdk" ]
|
||||
|
||||
java_targets = [ "//chrome/android:chrome_junit_tests" ]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user