build: Remove tests and minimize

This commit is contained in:
klzgrad 2021-05-16 21:03:12 +08:00
parent 067c0ffe3c
commit bb09e74e03
16 changed files with 3 additions and 8412 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -31,13 +31,3 @@ source_set("base_numerics") {
"wrapping_math.h", "wrapping_math.h",
] ]
} }
source_set("unittests") {
testonly = true
visibility = [ "//base/*" ]
sources = [ "byte_conversions_unittest.cc" ]
deps = [
"//base/numerics:base_numerics",
"//testing/gtest",
]
}

View File

@ -14,17 +14,3 @@ component("common") {
deps = [ "//base" ] deps = [ "//base" ]
} }
source_set("unit_tests") {
testonly = true
sources = [ "public/miracle_parameter_unittest.cc" ]
deps = [
":common",
"//base",
"//base/test:test_support",
"//testing/gmock",
"//testing/gtest",
]
}

View File

@ -10,15 +10,3 @@ static_library("time_tracker") {
deps = [ "//base" ] deps = [ "//base" ]
} }
source_set("unit_tests") {
testonly = true
sources = [ "time_tracker_unittest.cc" ]
deps = [
":time_tracker",
"//base",
"//base/test:test_support",
"//testing/gtest",
]
}

View File

@ -6,7 +6,6 @@ import("//build/buildflag_header.gni")
import("//build/config/chromeos/ui_mode.gni") import("//build/config/chromeos/ui_mode.gni")
import("//components/nacl/toolchain.gni") import("//components/nacl/toolchain.gni")
import("//crypto/features.gni") import("//crypto/features.gni")
import("//testing/test.gni")
buildflag_header("buildflags") { buildflag_header("buildflags") {
header = "crypto_buildflags.h" header = "crypto_buildflags.h"
@ -143,127 +142,3 @@ component("crypto") {
defines = [ "CRYPTO_IMPLEMENTATION" ] defines = [ "CRYPTO_IMPLEMENTATION" ]
} }
if (is_apple) {
source_set("mock_apple_keychain") {
sources = [
"mock_apple_keychain.cc",
"mock_apple_keychain.h",
]
if (is_mac) {
sources += [ "mock_apple_keychain_mac.cc" ]
} else if (is_ios) {
sources += [ "mock_apple_keychain_ios.cc" ]
}
deps = [
":crypto",
"//base",
]
}
}
test("crypto_unittests") {
sources = [
"aead_unittest.cc",
"ec_private_key_unittest.cc",
"ec_signature_creator_unittest.cc",
"encryptor_unittest.cc",
"hmac_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 || is_mac) {
sources += [ "unexportable_key_metrics_unittest.cc" ]
}
if (is_apple) {
sources += [ "mock_apple_keychain_unittest.cc" ]
}
if (is_mac) {
sources += [
"apple_keychain_util_unittest.mm",
"unexportable_key_mac_unittest.mm",
"user_verifying_key_mac_unittest.mm",
]
}
# 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",
]
if (is_apple) {
deps += [ ":mock_apple_keychain" ]
}
}
static_library("test_support") {
testonly = true
sources = [
"scoped_fake_user_verifying_key_provider.cc",
"scoped_fake_user_verifying_key_provider.h",
"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",
]
}
if (is_mac) {
sources += [
"fake_apple_keychain_v2.h",
"fake_apple_keychain_v2.mm",
"scoped_fake_apple_keychain_v2.h",
"scoped_fake_apple_keychain_v2.mm",
]
frameworks = [
"CoreFoundation.framework",
"Foundation.framework",
"LocalAuthentication.framework",
"Security.framework",
]
}
deps = [
":crypto",
"//base",
]
}

File diff suppressed because it is too large Load Diff

View File

@ -3,8 +3,6 @@
# found in the LICENSE file. # found in the LICENSE file.
import("//net/features.gni") import("//net/features.gni")
import("//testing/libfuzzer/fuzzer_test.gni")
import("//third_party/protobuf/proto_library.gni")
enable_built_in_dns = use_blink enable_built_in_dns = use_blink
@ -17,16 +15,7 @@ source_set("dns") {
# Internals only intended for use inside network stack (and tests). # Internals only intended for use inside network stack (and tests).
friend = [ 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/*", "//net/*",
"//services/network/*",
] ]
public = [] public = []
@ -211,30 +200,7 @@ source_set("host_resolver") {
# Restricted access so we can keep track of all usage external to the # Restricted access so we can keep track of all usage external to the
# network stack and network service. # network stack and network service.
friend = [ 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/*", "//net/*",
"//services/network/*",
] ]
sources = [ sources = [
@ -273,16 +239,7 @@ source_set("host_resolver_manager") {
# Restricted access so we can keep track of all usage external to the # Restricted access so we can keep track of all usage external to the
# network stack and network service. # network stack and network service.
friend = [ 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/*", "//net/*",
"//services/network/*",
] ]
sources = [ "host_resolver_manager.h" ] sources = [ "host_resolver_manager.h" ]
@ -312,24 +269,7 @@ source_set("dns_client") {
# Restricted access so we can keep track of all usage external to the # Restricted access so we can keep track of all usage external to the
# network stack. # network stack.
friend = [ friend = [
# chrome/browser/local_discovery/service_discovery_client_impl.cc
# Result parsing utilities for parsing results read through MdnsClient.
# TODO(crbug.com/41408297): 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/41424787): Remove once migrated to network service.
"//chrome/browser/ash/smb_client/discovery",
# Tests and test support
"//chrome/browser:test_support",
"//chrome/test/*",
# Network stack/service
"//components/certificate_transparency/*",
"//net/*", "//net/*",
"//services/network/*",
] ]
sources = [ sources = [
@ -366,29 +306,7 @@ source_set("mdns_client") {
# Restricted access so we can keep track of all usage external to the # Restricted access so we can keep track of all usage external to the
# network stack. # network stack.
friend = [ 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/41408297): 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/41408297): 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/41424787): Remove once migrated to network service.
"//chrome/browser/ash/smb_client/discovery",
# Tests and test support
"//chrome/browser:test_support",
# Network stack/service
"//net/*", "//net/*",
"//services/network/*",
] ]
public = [] public = []
@ -405,247 +323,3 @@ source_set("mdns_client") {
] ]
public_deps = [ "//net:net_public_deps" ] 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_task_results_manager_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_ipv6_reachability_override_unittest.cc",
"host_resolver_manager_unittest.cc",
"host_resolver_service_endpoint_request_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_manager_unittest.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",
"//base/test:test_support",
"//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_host_resolver_cache_fuzzer") {
sources = [ "host_resolver_cache_fuzzer.cc" ]
deps = [
"//base",
"//net",
"//net:net_fuzzer_test_support",
"//testing/libfuzzer/proto:json_proto",
"//testing/libfuzzer/proto:json_proto_converter",
"//third_party/libprotobuf-mutator",
]
}
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"
libfuzzer_options = [ "max_len=4096" ]
}
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"
}
}

View File

@ -63,32 +63,3 @@ source_set("public") {
public_deps = [ "//net:net_public_deps" ] 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",
]
}

View File

@ -26,11 +26,8 @@
import("//build/config/chromeos/ui_mode.gni") import("//build/config/chromeos/ui_mode.gni")
import("//net/third_party/quiche/src/build/source_list.gni") import("//net/third_party/quiche/src/build/source_list.gni")
import("//testing/libfuzzer/fuzzer_test.gni")
import("//third_party/protobuf/proto_library.gni") import("//third_party/protobuf/proto_library.gni")
build_epoll_based_tools = is_linux || is_chromeos
config("quiche_internal_config") { config("quiche_internal_config") {
cflags = [] cflags = []
if (is_clang) { if (is_clang) {
@ -131,827 +128,3 @@ proto_library("net_quic_test_tools_proto") {
extra_configs = [ "//build/config/compiler:wexit_time_destructors" ] extra_configs = [ "//build/config/compiler:wexit_time_destructors" ]
} }
if (build_epoll_based_tools) {
static_library("epoll_tool_support") {
# TODO(crbug.com/325102878): Remove once usage of the deprecated version of
# absl::HexStringToBytes have been removed.
cflags = [ "-Wno-deprecated-declarations" ]
testonly = true
sources = [
"overrides/quiche_platform_impl/quiche_udp_socket_platform_impl.h",
"src/quiche/common/platform/default/quiche_platform_impl/quiche_stream_buffer_allocator_impl.h",
] + io_tool_support_srcs + io_tool_support_hdrs
configs += [ ":quiche_internal_config" ]
public_configs = [ ":quiche_config" ]
deps = [
":quiche_tool_support",
"//base",
"//net",
"//third_party/boringssl",
]
}
executable("epoll_quic_client") {
testonly = true
sources = [
"src/quiche/quic/tools/quic_client_bin.cc",
"src/quiche/quic/tools/quic_epoll_client_factory.cc",
"src/quiche/quic/tools/quic_epoll_client_factory.h",
]
configs += [ ":quiche_internal_config" ]
public_configs = [ ":quiche_config" ]
deps = [
":epoll_tool_support",
":quic_client_core",
":quiche_tool_support",
"//base",
"//net",
"//third_party/boringssl",
]
}
executable("epoll_quic_server") {
testonly = true
sources = [
"src/quiche/quic/tools/quic_server_bin.cc",
"src/quiche/quic/tools/quic_server_factory.cc",
"src/quiche/quic/tools/quic_server_factory.h",
]
configs += [ ":quiche_internal_config" ]
public_configs = [ ":quiche_config" ]
deps = [
":epoll_tool_support",
":quic_server_core",
":quiche_tool_support",
"//base",
"//net",
"//third_party/boringssl",
]
}
executable("quic_client_interop_test") {
testonly = true
sources = [ "src/quiche/quic/tools/quic_client_interop_test_bin.cc" ]
configs += [ ":quiche_internal_config" ]
public_configs = [ ":quiche_config" ]
deps = [
":epoll_tool_support",
":quiche_test_support",
":quiche_tool_support",
"//net",
]
}
executable("masque_client") {
testonly = true
# TODO(crbug.com/325102878): Remove once usage of the deprecated version of
# absl::HexStringToBytes have been removed.
cflags = [ "-Wno-deprecated-declarations" ]
sources = [ "src/quiche/quic/masque/masque_client_bin.cc" ]
configs += [ ":quiche_internal_config" ]
public_configs = [ ":quiche_config" ]
deps = [
":epoll_tool_support",
":quiche_tool_support",
"//net",
"//third_party/boringssl",
"//third_party/protobuf:protobuf_lite",
]
}
executable("masque_server") {
testonly = true
sources = [ "src/quiche/quic/masque/masque_server_bin.cc" ]
configs += [ ":quiche_internal_config" ]
public_configs = [ ":quiche_config" ]
deps = [
":epoll_tool_support",
":quiche_tool_support",
"//net",
"//third_party/boringssl",
"//third_party/protobuf:protobuf_lite",
]
}
static_library("epoll_test_support") {
testonly = true
sources = io_test_support_srcs + io_test_support_hdrs
configs += [ ":quiche_internal_config" ]
public_configs = [ ":quiche_config" ]
deps = [
":epoll_tool_support",
":quiche_test_support",
":quiche_tool_support",
"//base",
"//net",
"//net:gtest_util",
"//testing/gmock",
"//testing/gtest",
]
}
}
static_library("quiche_test_support") {
testonly = true
# TODO(crbug.com/325102878): Remove once usage of the deprecated version of
# absl::HexStringToBytes have been removed.
cflags = [ "-Wno-deprecated-declarations" ]
sources = [
"overrides/quiche_platform_impl/quiche_expect_bug_impl.h",
"overrides/quiche_platform_impl/quiche_mock_log_impl.h",
"overrides/quiche_platform_impl/quiche_test_helpers_impl.cc",
"overrides/quiche_platform_impl/quiche_test_helpers_impl.h",
"overrides/quiche_platform_impl/quiche_test_impl.cc",
"overrides/quiche_platform_impl/quiche_test_impl.h",
"overrides/quiche_platform_impl/quiche_test_output_impl.cc",
"overrides/quiche_platform_impl/quiche_test_output_impl.h",
"src/quiche/common/platform/default/quiche_platform_impl/quiche_test_loopback_impl.cc",
"src/quiche/common/platform/default/quiche_platform_impl/quiche_test_loopback_impl.h",
] + quiche_test_support_srcs + quiche_test_support_hdrs
configs += [ ":quiche_internal_config" ]
public_configs = [ ":quiche_config" ]
deps = [
":quiche",
":quiche_tool_support",
"//base",
"//crypto:test_support",
"//net:quic_test_flags_utils",
"//net:test_support",
"//testing/gmock",
"//testing/gtest",
"//third_party/boringssl",
"//third_party/protobuf:protobuf_lite",
]
}
static_library("quiche_tool_support") {
testonly = true
sources = [
"overrides/quiche_platform_impl/quiche_command_line_flags_impl.cc",
"overrides/quiche_platform_impl/quiche_command_line_flags_impl.h",
"overrides/quiche_platform_impl/quiche_default_proof_providers_impl.cc",
"overrides/quiche_platform_impl/quiche_default_proof_providers_impl.h",
"overrides/quiche_platform_impl/quiche_system_event_loop_impl.h",
"src/quiche/common/platform/default/quiche_platform_impl/quiche_file_utils_impl.cc",
"src/quiche/common/platform/default/quiche_platform_impl/quiche_file_utils_impl.h",
] + quiche_tool_support_srcs + quiche_tool_support_hdrs
configs += [ ":quiche_internal_config" ]
public_configs = [ ":quiche_config" ]
deps = [
"//base",
"//net",
"//third_party/protobuf:protobuf_lite",
"//third_party/quic_trace:quic_trace_proto",
"//url",
]
}
# QUICHE-provided CLI tools that don't use epoll.
if (!is_ios) {
# The two libraries below, quic_client_core and quic_server_core, define
# mutually exclusive command-line flags, and thus any target depending
# directly on both will fail to build. Only executable targets should depend
# on those.
source_set("quic_client_core") {
testonly = true
# TODO(crbug.com/325102878): Remove once usage of the deprecated version of
# absl::HexStringToBytes have been removed.
cflags = [ "-Wno-deprecated-declarations" ]
sources = [
"src/quiche/quic/tools/quic_toy_client.cc",
"src/quiche/quic/tools/quic_toy_client.h",
]
configs += [ ":quiche_internal_config" ]
public_configs = [ ":quiche_config" ]
deps = [
"//net",
"//net:quic_test_tools",
"//net:simple_quic_tools",
]
}
source_set("quic_server_core") {
testonly = true
sources = [
"src/quiche/quic/tools/quic_toy_server.cc",
"src/quiche/quic/tools/quic_toy_server.h",
]
configs += [ ":quiche_internal_config" ]
public_configs = [ ":quiche_config" ]
deps = [
"//net",
"//net:simple_quic_tools",
]
}
executable("quic_packet_printer") {
testonly = true
# TODO(crbug.com/325102878): Remove once usage of the deprecated version of
# absl::HexStringToBytes have been removed.
cflags = [ "-Wno-deprecated-declarations" ]
sources = [ "src/quiche/quic/tools/quic_packet_printer_bin.cc" ]
configs += [ ":quiche_internal_config" ]
public_configs = [ ":quiche_config" ]
deps = [
"//base",
"//build/win:default_exe_manifest",
"//net",
"//net:simple_quic_tools",
"//third_party/boringssl",
"//third_party/protobuf:protobuf_lite",
]
}
executable("quic_crypto_message_printer") {
testonly = true
# TODO(crbug.com/325102878): Remove once usage of the deprecated version of
# absl::HexStringToBytes have been removed.
cflags = [ "-Wno-deprecated-declarations" ]
sources = [ "src/quiche/quic/tools/crypto_message_printer_bin.cc" ]
configs += [ ":quiche_internal_config" ]
public_configs = [ ":quiche_config" ]
deps = [
"//base",
"//build/win:default_exe_manifest",
"//net",
"//net:simple_quic_tools",
"//third_party/boringssl",
"//third_party/protobuf:protobuf_lite",
]
}
executable("quic_reject_reason_decoder") {
testonly = true
sources = [ "src/quiche/quic/tools/quic_reject_reason_decoder_bin.cc" ]
configs += [ ":quiche_internal_config" ]
public_configs = [ ":quiche_config" ]
deps = [
"//base",
"//build/win:default_exe_manifest",
"//net",
"//net:simple_quic_tools",
"//third_party/boringssl",
"//third_party/protobuf:protobuf_lite",
]
}
executable("qpack_offline_decoder") {
testonly = true
configs += [ ":quiche_internal_config" ]
public_configs = [ ":quiche_config" ]
sources = [ "src/quiche/quic/tools/qpack_offline_decoder_bin.cc" ]
deps = [
"//base",
"//net",
"//net:quic_test_tools",
"//net:simple_quic_tools",
"//testing/gmock",
]
}
}
bundle_data("test_data") {
visibility = [ ":quiche_tests" ]
testonly = true
sources = [
"src/quiche/common/platform/api/testdir/README.md",
"src/quiche/common/platform/api/testdir/a/b/c/d/e",
"src/quiche/common/platform/api/testdir/a/subdir/testfile",
"src/quiche/common/platform/api/testdir/a/z",
"src/quiche/common/platform/api/testdir/testfile",
]
outputs = [ "{{bundle_resources_dir}}/" +
"{{source_root_relative_dir}}/{{source_file_part}}" ]
}
source_set("quiche_tests") {
testonly = true
# TODO(crbug.com/325102878): Remove once usage of the deprecated version of
# absl::HexStringToBytes have been removed.
cflags = [ "-Wno-deprecated-declarations" ]
sources = [
"src/quiche/binary_http/binary_http_message_test.cc",
"src/quiche/blind_sign_auth/blind_sign_auth_test.cc",
"src/quiche/blind_sign_auth/cached_blind_sign_auth_test.cc",
"src/quiche/common/btree_scheduler_test.cc",
"src/quiche/common/capsule_test.cc",
"src/quiche/common/http/http_header_block_test.cc",
"src/quiche/common/http/http_header_storage_test.cc",
"src/quiche/common/masque/connect_ip_datagram_payload_test.cc",
"src/quiche/common/masque/connect_udp_datagram_payload_test.cc",
"src/quiche/common/platform/api/quiche_file_utils_test.cc",
"src/quiche/common/platform/api/quiche_hostname_utils_test.cc",
"src/quiche/common/platform/api/quiche_lower_case_string_test.cc",
"src/quiche/common/platform/api/quiche_mem_slice_test.cc",
"src/quiche/common/platform/api/quiche_reference_counted_test.cc",
"src/quiche/common/platform/api/quiche_stack_trace_test.cc",
"src/quiche/common/platform/api/quiche_time_utils_test.cc",
"src/quiche/common/platform/api/quiche_url_utils_test.cc",
"src/quiche/common/print_elements_test.cc",
"src/quiche/common/quiche_buffer_allocator_test.cc",
"src/quiche/common/quiche_callbacks_test.cc",
"src/quiche/common/quiche_circular_deque_test.cc",
"src/quiche/common/quiche_data_reader_test.cc",
"src/quiche/common/quiche_data_writer_test.cc",
"src/quiche/common/quiche_endian_test.cc",
"src/quiche/common/quiche_ip_address_test.cc",
"src/quiche/common/quiche_linked_hash_map_test.cc",
"src/quiche/common/quiche_mem_slice_storage_test.cc",
"src/quiche/common/quiche_random_test.cc",
"src/quiche/common/quiche_simple_arena_test.cc",
"src/quiche/common/quiche_text_utils_test.cc",
"src/quiche/common/simple_buffer_allocator_test.cc",
"src/quiche/common/structured_headers_generated_test.cc",
"src/quiche/common/structured_headers_test.cc",
"src/quiche/common/test_tools/mock_streams_test.cc",
"src/quiche/common/test_tools/quiche_test_utils_test.cc",
"src/quiche/common/wire_serialization_test.cc",
"src/quiche/http2/adapter/event_forwarder_test.cc",
"src/quiche/http2/adapter/header_validator_test.cc",
"src/quiche/http2/adapter/noop_header_validator_test.cc",
"src/quiche/http2/adapter/oghttp2_adapter_metadata_test.cc",
"src/quiche/http2/adapter/oghttp2_adapter_test.cc",
"src/quiche/http2/adapter/oghttp2_session_test.cc",
"src/quiche/http2/adapter/oghttp2_util_test.cc",
"src/quiche/http2/adapter/recording_http2_visitor_test.cc",
"src/quiche/http2/adapter/window_manager_test.cc",
"src/quiche/http2/core/array_output_buffer_test.cc",
"src/quiche/http2/core/priority_write_scheduler_test.cc",
"src/quiche/http2/core/spdy_alt_svc_wire_format_test.cc",
"src/quiche/http2/core/spdy_frame_builder_test.cc",
"src/quiche/http2/core/spdy_framer_test.cc",
"src/quiche/http2/core/spdy_protocol_test.cc",
"src/quiche/http2/decoder/decode_buffer_test.cc",
"src/quiche/http2/decoder/decode_http2_structures_test.cc",
"src/quiche/http2/decoder/http2_frame_decoder_test.cc",
"src/quiche/http2/decoder/http2_structure_decoder_test.cc",
"src/quiche/http2/decoder/payload_decoders/altsvc_payload_decoder_test.cc",
"src/quiche/http2/decoder/payload_decoders/continuation_payload_decoder_test.cc",
"src/quiche/http2/decoder/payload_decoders/data_payload_decoder_test.cc",
"src/quiche/http2/decoder/payload_decoders/goaway_payload_decoder_test.cc",
"src/quiche/http2/decoder/payload_decoders/headers_payload_decoder_test.cc",
"src/quiche/http2/decoder/payload_decoders/ping_payload_decoder_test.cc",
"src/quiche/http2/decoder/payload_decoders/priority_payload_decoder_test.cc",
"src/quiche/http2/decoder/payload_decoders/priority_update_payload_decoder_test.cc",
"src/quiche/http2/decoder/payload_decoders/push_promise_payload_decoder_test.cc",
"src/quiche/http2/decoder/payload_decoders/rst_stream_payload_decoder_test.cc",
"src/quiche/http2/decoder/payload_decoders/settings_payload_decoder_test.cc",
"src/quiche/http2/decoder/payload_decoders/unknown_payload_decoder_test.cc",
"src/quiche/http2/decoder/payload_decoders/window_update_payload_decoder_test.cc",
"src/quiche/http2/hpack/decoder/hpack_block_collector_test.cc",
"src/quiche/http2/hpack/decoder/hpack_block_decoder_test.cc",
"src/quiche/http2/hpack/decoder/hpack_decoder_state_test.cc",
"src/quiche/http2/hpack/decoder/hpack_decoder_string_buffer_test.cc",
"src/quiche/http2/hpack/decoder/hpack_decoder_tables_test.cc",
"src/quiche/http2/hpack/decoder/hpack_decoder_test.cc",
"src/quiche/http2/hpack/decoder/hpack_entry_collector_test.cc",
"src/quiche/http2/hpack/decoder/hpack_entry_decoder_test.cc",
"src/quiche/http2/hpack/decoder/hpack_entry_type_decoder_test.cc",
"src/quiche/http2/hpack/decoder/hpack_string_decoder_test.cc",
"src/quiche/http2/hpack/decoder/hpack_whole_entry_buffer_test.cc",
"src/quiche/http2/hpack/hpack_encoder_test.cc",
"src/quiche/http2/hpack/hpack_entry_test.cc",
"src/quiche/http2/hpack/hpack_header_table_test.cc",
"src/quiche/http2/hpack/hpack_output_stream_test.cc",
"src/quiche/http2/hpack/hpack_static_table_test.cc",
"src/quiche/http2/hpack/http2_hpack_constants_test.cc",
"src/quiche/http2/hpack/huffman/hpack_huffman_decoder_test.cc",
"src/quiche/http2/hpack/huffman/hpack_huffman_encoder_test.cc",
"src/quiche/http2/hpack/huffman/hpack_huffman_transcoder_test.cc",
"src/quiche/http2/hpack/varint/hpack_varint_decoder_test.cc",
"src/quiche/http2/hpack/varint/hpack_varint_encoder_test.cc",
"src/quiche/http2/hpack/varint/hpack_varint_round_trip_test.cc",
"src/quiche/http2/http2_constants_test.cc",
"src/quiche/http2/http2_structures_test.cc",
"src/quiche/http2/test_tools/hpack_block_builder_test.cc",
"src/quiche/http2/test_tools/hpack_example_test.cc",
"src/quiche/http2/test_tools/http2_frame_builder_test.cc",
"src/quiche/http2/test_tools/http2_random_test.cc",
"src/quiche/http2/test_tools/random_decoder_test_base_test.cc",
"src/quiche/oblivious_http/buffers/oblivious_http_integration_test.cc",
"src/quiche/oblivious_http/buffers/oblivious_http_request_test.cc",
"src/quiche/oblivious_http/buffers/oblivious_http_response_test.cc",
"src/quiche/oblivious_http/common/oblivious_http_header_key_config_test.cc",
"src/quiche/oblivious_http/oblivious_http_client_test.cc",
"src/quiche/oblivious_http/oblivious_http_gateway_test.cc",
"src/quiche/quic/core/congestion_control/bandwidth_sampler_test.cc",
"src/quiche/quic/core/congestion_control/bbr2_simulator_test.cc",
"src/quiche/quic/core/congestion_control/bbr_sender_test.cc",
"src/quiche/quic/core/congestion_control/cubic_bytes_test.cc",
"src/quiche/quic/core/congestion_control/general_loss_algorithm_test.cc",
"src/quiche/quic/core/congestion_control/hybrid_slow_start_test.cc",
"src/quiche/quic/core/congestion_control/pacing_sender_test.cc",
"src/quiche/quic/core/congestion_control/prr_sender_test.cc",
"src/quiche/quic/core/congestion_control/rtt_stats_test.cc",
"src/quiche/quic/core/congestion_control/send_algorithm_test.cc",
"src/quiche/quic/core/congestion_control/tcp_cubic_sender_bytes_test.cc",
"src/quiche/quic/core/congestion_control/uber_loss_algorithm_test.cc",
"src/quiche/quic/core/congestion_control/windowed_filter_test.cc",
"src/quiche/quic/core/crypto/aes_128_gcm_12_decrypter_test.cc",
"src/quiche/quic/core/crypto/aes_128_gcm_12_encrypter_test.cc",
"src/quiche/quic/core/crypto/aes_128_gcm_decrypter_test.cc",
"src/quiche/quic/core/crypto/aes_128_gcm_encrypter_test.cc",
"src/quiche/quic/core/crypto/aes_256_gcm_decrypter_test.cc",
"src/quiche/quic/core/crypto/aes_256_gcm_encrypter_test.cc",
"src/quiche/quic/core/crypto/cert_compressor_test.cc",
"src/quiche/quic/core/crypto/certificate_util_test.cc",
"src/quiche/quic/core/crypto/certificate_view_test.cc",
"src/quiche/quic/core/crypto/chacha20_poly1305_decrypter_test.cc",
"src/quiche/quic/core/crypto/chacha20_poly1305_encrypter_test.cc",
"src/quiche/quic/core/crypto/chacha20_poly1305_tls_decrypter_test.cc",
"src/quiche/quic/core/crypto/chacha20_poly1305_tls_encrypter_test.cc",
"src/quiche/quic/core/crypto/channel_id_test.cc",
"src/quiche/quic/core/crypto/client_proof_source_test.cc",
"src/quiche/quic/core/crypto/crypto_framer_test.cc",
"src/quiche/quic/core/crypto/crypto_handshake_message_test.cc",
"src/quiche/quic/core/crypto/crypto_secret_boxer_test.cc",
"src/quiche/quic/core/crypto/crypto_server_test.cc",
"src/quiche/quic/core/crypto/crypto_utils_test.cc",
"src/quiche/quic/core/crypto/curve25519_key_exchange_test.cc",
"src/quiche/quic/core/crypto/null_decrypter_test.cc",
"src/quiche/quic/core/crypto/null_encrypter_test.cc",
"src/quiche/quic/core/crypto/p256_key_exchange_test.cc",
"src/quiche/quic/core/crypto/proof_source_x509_test.cc",
"src/quiche/quic/core/crypto/quic_client_session_cache_test.cc",
"src/quiche/quic/core/crypto/quic_compressed_certs_cache_test.cc",
"src/quiche/quic/core/crypto/quic_crypto_client_config_test.cc",
"src/quiche/quic/core/crypto/quic_crypto_server_config_test.cc",
"src/quiche/quic/core/crypto/quic_hkdf_test.cc",
"src/quiche/quic/core/crypto/transport_parameters_test.cc",
"src/quiche/quic/core/crypto/web_transport_fingerprint_proof_verifier_test.cc",
"src/quiche/quic/core/deterministic_connection_id_generator_test.cc",
"src/quiche/quic/core/frames/quic_frames_test.cc",
"src/quiche/quic/core/http/http_decoder_test.cc",
"src/quiche/quic/core/http/http_encoder_test.cc",
"src/quiche/quic/core/http/http_frames_test.cc",
"src/quiche/quic/core/http/quic_header_list_test.cc",
"src/quiche/quic/core/http/quic_headers_stream_test.cc",
"src/quiche/quic/core/http/quic_receive_control_stream_test.cc",
"src/quiche/quic/core/http/quic_send_control_stream_test.cc",
"src/quiche/quic/core/http/quic_server_session_base_test.cc",
"src/quiche/quic/core/http/quic_spdy_session_test.cc",
"src/quiche/quic/core/http/quic_spdy_stream_body_manager_test.cc",
"src/quiche/quic/core/http/quic_spdy_stream_test.cc",
"src/quiche/quic/core/http/spdy_utils_test.cc",
"src/quiche/quic/core/http/web_transport_http3_test.cc",
"src/quiche/quic/core/internet_checksum_test.cc",
"src/quiche/quic/core/legacy_quic_stream_id_manager_test.cc",
"src/quiche/quic/core/packet_number_indexed_queue_test.cc",
"src/quiche/quic/core/qpack/qpack_blocking_manager_test.cc",
"src/quiche/quic/core/qpack/qpack_decoded_headers_accumulator_test.cc",
"src/quiche/quic/core/qpack/qpack_decoder_stream_receiver_test.cc",
"src/quiche/quic/core/qpack/qpack_decoder_stream_sender_test.cc",
"src/quiche/quic/core/qpack/qpack_decoder_test.cc",
"src/quiche/quic/core/qpack/qpack_encoder_stream_receiver_test.cc",
"src/quiche/quic/core/qpack/qpack_encoder_stream_sender_test.cc",
"src/quiche/quic/core/qpack/qpack_encoder_test.cc",
"src/quiche/quic/core/qpack/qpack_header_table_test.cc",
"src/quiche/quic/core/qpack/qpack_index_conversions_test.cc",
"src/quiche/quic/core/qpack/qpack_instruction_decoder_test.cc",
"src/quiche/quic/core/qpack/qpack_instruction_encoder_test.cc",
"src/quiche/quic/core/qpack/qpack_receive_stream_test.cc",
"src/quiche/quic/core/qpack/qpack_required_insert_count_test.cc",
"src/quiche/quic/core/qpack/qpack_round_trip_test.cc",
"src/quiche/quic/core/qpack/qpack_send_stream_test.cc",
"src/quiche/quic/core/qpack/qpack_static_table_test.cc",
"src/quiche/quic/core/qpack/value_splitting_header_list_test.cc",
"src/quiche/quic/core/quic_alarm_test.cc",
"src/quiche/quic/core/quic_arena_scoped_ptr_test.cc",
"src/quiche/quic/core/quic_bandwidth_test.cc",
"src/quiche/quic/core/quic_buffered_packet_store_test.cc",
"src/quiche/quic/core/quic_chaos_protector_test.cc",
"src/quiche/quic/core/quic_coalesced_packet_test.cc",
"src/quiche/quic/core/quic_config_test.cc",
"src/quiche/quic/core/quic_connection_context_test.cc",
"src/quiche/quic/core/quic_connection_id_manager_test.cc",
"src/quiche/quic/core/quic_connection_id_test.cc",
"src/quiche/quic/core/quic_connection_test.cc",
"src/quiche/quic/core/quic_control_frame_manager_test.cc",
"src/quiche/quic/core/quic_crypto_client_handshaker_test.cc",
"src/quiche/quic/core/quic_crypto_client_stream_test.cc",
"src/quiche/quic/core/quic_crypto_server_stream_test.cc",
"src/quiche/quic/core/quic_crypto_stream_test.cc",
"src/quiche/quic/core/quic_data_writer_test.cc",
"src/quiche/quic/core/quic_datagram_queue_test.cc",
"src/quiche/quic/core/quic_dispatcher_test.cc",
"src/quiche/quic/core/quic_error_codes_test.cc",
"src/quiche/quic/core/quic_flow_controller_test.cc",
"src/quiche/quic/core/quic_framer_test.cc",
"src/quiche/quic/core/quic_generic_session_test.cc",
"src/quiche/quic/core/quic_idle_network_detector_test.cc",
"src/quiche/quic/core/quic_interval_deque_test.cc",
"src/quiche/quic/core/quic_interval_set_test.cc",
"src/quiche/quic/core/quic_interval_test.cc",
"src/quiche/quic/core/quic_lru_cache_test.cc",
"src/quiche/quic/core/quic_network_blackhole_detector_test.cc",
"src/quiche/quic/core/quic_one_block_arena_test.cc",
"src/quiche/quic/core/quic_packet_creator_test.cc",
"src/quiche/quic/core/quic_packet_number_test.cc",
"src/quiche/quic/core/quic_packets_test.cc",
"src/quiche/quic/core/quic_path_validator_test.cc",
"src/quiche/quic/core/quic_ping_manager_test.cc",
"src/quiche/quic/core/quic_received_packet_manager_test.cc",
"src/quiche/quic/core/quic_sent_packet_manager_test.cc",
"src/quiche/quic/core/quic_server_id_test.cc",
"src/quiche/quic/core/quic_session_test.cc",
"src/quiche/quic/core/quic_socket_address_coder_test.cc",
"src/quiche/quic/core/quic_stream_id_manager_test.cc",
"src/quiche/quic/core/quic_stream_priority_test.cc",
"src/quiche/quic/core/quic_stream_send_buffer_test.cc",
"src/quiche/quic/core/quic_stream_sequencer_buffer_test.cc",
"src/quiche/quic/core/quic_stream_sequencer_test.cc",
"src/quiche/quic/core/quic_stream_test.cc",
"src/quiche/quic/core/quic_sustained_bandwidth_recorder_test.cc",
"src/quiche/quic/core/quic_tag_test.cc",
"src/quiche/quic/core/quic_time_accumulator_test.cc",
"src/quiche/quic/core/quic_time_test.cc",
"src/quiche/quic/core/quic_time_wait_list_manager_test.cc",
"src/quiche/quic/core/quic_trace_visitor_test.cc",
"src/quiche/quic/core/quic_unacked_packet_map_test.cc",
"src/quiche/quic/core/quic_utils_test.cc",
"src/quiche/quic/core/quic_version_manager_test.cc",
"src/quiche/quic/core/quic_versions_test.cc",
"src/quiche/quic/core/quic_write_blocked_list_test.cc",
"src/quiche/quic/core/tls_chlo_extractor_test.cc",
"src/quiche/quic/core/tls_client_handshaker_test.cc",
"src/quiche/quic/core/tls_server_handshaker_test.cc",
"src/quiche/quic/core/uber_quic_stream_id_manager_test.cc",
"src/quiche/quic/core/uber_received_packet_manager_test.cc",
"src/quiche/quic/platform/api/quic_socket_address_test.cc",
"src/quiche/quic/test_tools/crypto_test_utils_test.cc",
"src/quiche/quic/test_tools/quic_test_utils_test.cc",
"src/quiche/quic/test_tools/simple_session_notifier_test.cc",
"src/quiche/quic/test_tools/simulator/quic_endpoint_test.cc",
"src/quiche/quic/test_tools/simulator/simulator_test.cc",
"src/quiche/quic/test_tools/test_ip_packets_test.cc",
"src/quiche/quic/tools/connect_tunnel_test.cc",
"src/quiche/quic/tools/connect_udp_tunnel_test.cc",
"src/quiche/quic/tools/quic_memory_cache_backend_test.cc",
"src/quiche/quic/tools/quic_tcp_like_trace_converter_test.cc",
"src/quiche/quic/tools/simple_ticket_crypter_test.cc",
"src/quiche/spdy/core/hpack/hpack_decoder_adapter_test.cc",
"src/quiche/spdy/core/hpack/hpack_round_trip_test.cc",
"src/quiche/web_transport/encapsulated/encapsulated_web_transport_test.cc",
"src/quiche/web_transport/web_transport_headers_test.cc",
]
data = [ "src/quiche/common/platform/api/testdir/" ]
configs += [ ":quiche_internal_config" ]
public_configs = [ ":quiche_config" ]
deps = [
":blind_sign_auth",
":blind_sign_auth_test_support",
"//net",
"//net:quic_test_tools",
"//net:simple_quic_tools",
"//net:spdy_test_tools",
"//testing/gmock",
"//testing/gtest",
]
if (is_ios) {
deps += [ ":test_data" ]
}
public_deps = []
if (build_epoll_based_tools) {
sources += [
"overrides/quiche_platform_impl/quiche_command_line_flags_test.cc",
"src/quiche/quic/core/chlo_extractor_test.cc",
"src/quiche/quic/core/http/end_to_end_test.cc",
"src/quiche/quic/core/http/quic_spdy_client_session_test.cc",
"src/quiche/quic/core/http/quic_spdy_client_stream_test.cc",
"src/quiche/quic/core/http/quic_spdy_server_stream_base_test.cc",
"src/quiche/quic/core/io/event_loop_connecting_client_socket_test.cc",
"src/quiche/quic/core/io/quic_all_event_loops_test.cc",
"src/quiche/quic/core/io/quic_poll_event_loop_test.cc",
"src/quiche/quic/core/io/socket_test.cc",
"src/quiche/quic/tools/quic_default_client_test.cc",
"src/quiche/quic/tools/quic_server_test.cc",
"src/quiche/quic/tools/quic_simple_server_session_test.cc",
"src/quiche/quic/tools/quic_simple_server_stream_test.cc",
"src/quiche/quic/tools/quic_url_test.cc",
]
public_deps += [
":epoll_test_support",
":epoll_tool_support",
]
}
}
fuzzer_test("net_quic_framer_fuzzer") {
sources = [ "src/quiche/quic/test_tools/fuzzing/quic_framer_fuzzer.cc" ]
deps = [
"//net",
"//net:net_fuzzer_test_support",
"//net:quic_test_tools",
"//net:test_support",
"//net/data/ssl/certificates:generate_fuzzer_cert_includes",
]
}
fuzzer_test("net_quic_framer_process_data_packet_fuzzer") {
sources = [ "src/quiche/quic/test_tools/fuzzing/quic_framer_process_data_packet_fuzzer.cc" ]
deps = [
"//net",
"//net:net_fuzzer_test_support",
"//net:quic_test_tools",
"//net:test_support",
"//net/data/ssl/certificates:generate_fuzzer_cert_includes",
]
}
fuzzer_test("net_qpack_decoder_fuzzer") {
sources = [ "src/quiche/quic/core/qpack/fuzzer/qpack_decoder_fuzzer.cc" ]
deps = [
"//base",
"//net",
"//net:net_fuzzer_test_support",
"//net:quic_test_tools",
"//net:test_support",
]
}
fuzzer_test("net_qpack_encoder_stream_receiver_fuzzer") {
sources = [
"src/quiche/quic/core/qpack/fuzzer/qpack_encoder_stream_receiver_fuzzer.cc",
]
deps = [
"//base",
"//net",
"//net:net_fuzzer_test_support",
]
}
fuzzer_test("net_qpack_encoder_stream_sender_fuzzer") {
sources = [
"src/quiche/quic/core/qpack/fuzzer/qpack_encoder_stream_sender_fuzzer.cc",
]
deps = [
"//base",
"//net",
"//net:net_fuzzer_test_support",
"//net:quic_test_tools",
"//net:test_support",
]
}
fuzzer_test("net_qpack_round_trip_fuzzer") {
sources = [ "src/quiche/quic/core/qpack/fuzzer/qpack_round_trip_fuzzer.cc" ]
deps = [
"//base",
"//net",
"//net:net_fuzzer_test_support",
"//net:quic_test_tools",
"//net:test_support",
]
}
component("blind_sign_auth") {
sources = [
"src/quiche/blind_sign_auth/blind_sign_auth.cc",
"src/quiche/blind_sign_auth/blind_sign_auth.h",
"src/quiche/blind_sign_auth/blind_sign_auth_interface.h",
"src/quiche/blind_sign_auth/blind_sign_message_interface.h",
"src/quiche/blind_sign_auth/blind_sign_message_response.cc",
"src/quiche/blind_sign_auth/blind_sign_message_response.h",
"src/quiche/blind_sign_auth/cached_blind_sign_auth.cc",
"src/quiche/blind_sign_auth/cached_blind_sign_auth.h",
]
configs += [ ":quiche_internal_config" ]
public_configs = [ ":quiche_config" ]
deps = [
":quiche",
"//base",
"//third_party/abseil-cpp:absl",
"//third_party/anonymous_tokens:rsa_bssa_public_metadata_client",
"//third_party/boringssl",
"//url",
]
public_deps = [
":blind_sign_auth_proto",
"//third_party/anonymous_tokens:anonymous_tokens_rsa_bssa_client",
"//third_party/anonymous_tokens:crypto_utils",
"//third_party/anonymous_tokens:proto_utils",
"//third_party/anonymous_tokens:tokens_encodings",
]
defines = [ "IS_QUICHE_IMPL" ]
}
proto_library("blind_sign_auth_proto") {
visibility = [
":blind_sign_auth",
":blind_sign_auth_test_support",
":quiche",
":quiche_tests",
"//components/ip_protection/*",
]
sources = protobuf_blind_sign_auth
cc_generator_options = "lite=true,dllexport_decl=COMPONENT_EXPORT(QUICHE):"
cc_include = "base/component_export.h"
component_build_force_source_set = true
proto_in_dir = "src"
deps = [ "//base" ]
proto_deps = [ "//third_party/anonymous_tokens:anonymous_tokens_cc_proto" ]
proto_data_sources = [ "//third_party/anonymous_tokens/src/anonymous_tokens/proto/anonymous_tokens.proto" ]
import_dirs = [ "//third_party/anonymous_tokens/src/" ]
defines = [ "IS_QUICHE_IMPL" ]
extra_configs = [ "//build/config/compiler:wexit_time_destructors" ]
}
source_set("blind_sign_auth_test_support") {
visibility = [ ":quiche_tests" ]
testonly = true
sources = [
"src/quiche/blind_sign_auth/test_tools/mock_blind_sign_auth_interface.h",
"src/quiche/blind_sign_auth/test_tools/mock_blind_sign_message_interface.h",
]
configs += [ ":quiche_internal_config" ]
public_configs = [ ":quiche_config" ]
deps = [
":blind_sign_auth",
":quiche",
":quiche_test_support",
":quiche_tool_support",
]
public_deps =
[ "//third_party/anonymous_tokens:anonymous_tokens_test_support" ]
}
if (is_android) {
import("//build/config/android/rules.gni")
proto_java_library("blind_sign_auth_proto_java") {
visibility = [
"//components/ip_protection/*",
"//net/third_party/quiche/*",
]
proto_path = "src/"
sources = [
"src/quiche/blind_sign_auth/proto/any.proto",
"src/quiche/blind_sign_auth/proto/attestation.proto",
"src/quiche/blind_sign_auth/proto/auth_and_sign.proto",
"src/quiche/blind_sign_auth/proto/get_initial_data.proto",
"src/quiche/blind_sign_auth/proto/key_services.proto",
"src/quiche/blind_sign_auth/proto/proxy_layer.proto",
"src/quiche/blind_sign_auth/proto/public_metadata.proto",
]
deps = [ "//third_party/anonymous_tokens:anonymous_tokens_java_proto" ]
import_dirs = [ "//third_party/anonymous_tokens/src/" ]
}
}

View File

@ -1,7 +1,6 @@
# Copyright 2024 The Chromium Authors # Copyright 2024 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("//testing/libfuzzer/fuzzer_test.gni")
component("uri_template") { component("uri_template") {
sources = [ sources = [
@ -9,30 +8,9 @@ component("uri_template") {
"uri_template.h", "uri_template.h",
] ]
visibility = [ visibility = [
":uri_template_tests",
"//net:net_public_deps", "//net:net_public_deps",
"//net/third_party/quiche", "//net/third_party/quiche",
] ]
defines = [ "IS_URI_TEMPLATE_IMPL" ] defines = [ "IS_URI_TEMPLATE_IMPL" ]
public_deps = [ "//base" ] public_deps = [ "//base" ]
} }
source_set("uri_template_tests") {
testonly = true
sources = [ "uri_template_test.cc" ]
deps = [
":uri_template",
"//testing/gmock",
"//testing/gtest",
]
}
fuzzer_test("net_uri_template_fuzzer") {
sources = [ "uri_template_fuzzer.cc" ]
deps = [
"//base",
"//net",
"//net:net_fuzzer_test_support",
]
dict = "//net/data/fuzzer_dictionaries/net_uri_template_fuzzer.dict"
}

View File

@ -17,19 +17,3 @@ source_set("huffman_trie_generator_sources") {
] ]
deps = [ "//base" ] 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",
]
}

View File

@ -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") { executable("transport_security_state_generator") {
sources = [ "transport_security_state_generator.cc" ] sources = [ "transport_security_state_generator.cc" ]
deps = [ deps = [

View File

@ -2,8 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("//testing/libfuzzer/fuzzer_test.gni")
if (is_win) { if (is_win) {
import("//build/config/win/visual_studio_version.gni") 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" ]
}

View File

@ -134,7 +134,6 @@ source_set("gtest") {
# googletest only needs `absl`, but this makes gn check happier. # googletest only needs `absl`, but this makes gn check happier.
deps = [ "//third_party/abseil-cpp:absl_full" ] deps = [ "//third_party/abseil-cpp:absl_full" ]
public_deps = [ "//third_party/re2" ]
if (is_nacl || !build_with_chromium) { if (is_nacl || !build_with_chromium) {
defines += [ "GTEST_DISABLE_PRINT_STACK_TRACE" ] defines += [ "GTEST_DISABLE_PRINT_STACK_TRACE" ]
sources -= [ sources -= [

View File

@ -3,8 +3,6 @@
# found in the LICENSE file. # found in the LICENSE file.
import("//build/buildflag_header.gni") import("//build/buildflag_header.gni")
import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni")
import("features.gni") import("features.gni")
import("//build/config/cronet/config.gni") import("//build/config/cronet/config.gni")
@ -118,280 +116,3 @@ component("url") {
] ]
} }
} }
if (is_android || is_robolectric) {
generate_jni("url_jni_headers") {
sources = [ "android/java/src/org/chromium/url/IDNStringUtil.java" ]
if (!is_cronet_build) {
sources += [
"android/java/src/org/chromium/url/GURL.java",
"android/java/src/org/chromium/url/Origin.java",
"android/java/src/org/chromium/url/Parsed.java",
]
}
}
}
if (is_android && current_toolchain == default_toolchain) {
# TODO(agrieve): Remove alias once usages are removed.
java_group("gurl_java") {
deps = [ ":url_java" ]
}
android_library("url_java") {
sources = [ "android/java/src/org/chromium/url/IDNStringUtil.java" ]
srcjar_deps = [ ":url_jni_headers" ]
deps = [ "//third_party/jni_zero:jni_zero_java" ]
if (!is_cronet_build) {
sources += [
"android/java/src/org/chromium/url/GURL.java",
"android/java/src/org/chromium/url/Origin.java",
"android/java/src/org/chromium/url/Parsed.java",
"android/java/src/org/chromium/url/URI.java",
]
deps += [
"//base:base_java",
"//build/android:build_java",
"//mojo/public/java:bindings_java",
"//mojo/public/mojom/base:base_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",
"//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",
"url_canon_icu_test_helpers.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"
}
fuzzer_test("url_idna_icu_fuzzer") {
sources = [ "url_idna_icu_fuzzer.cc" ]
deps = [
":url",
"//third_party/icu:icuuc",
"//third_party/icu/fuzzers:fuzzer_support",
]
}
fuzzer_test("url_canon_icu_fuzzer") {
sources = [ "url_canon_icu_fuzzer.cc" ]
deps = [
":url",
":url_test_support",
"//third_party/icu:icuuc",
]
}
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 = [
":j_test_jni_headers($default_toolchain)",
":url",
"//base/test:test_support",
]
}
if (current_toolchain == default_toolchain) {
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 = [
":url_java",
"//base:base_java_test_support",
"//third_party/jni_zero:jni_zero_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 = [ ":url_java" ]
}
android_library("url_java_unit_tests") {
testonly = true
sources = [
"android/javatests/src/org/chromium/url/GURLJavaTest.java",
"android/javatests/src/org/chromium/url/OriginJavaTest.java",
]
deps = [
":android_test_helper_java",
":gurl_junit_test_support",
":url_java",
"//base:base_java",
"//base:base_java_test_support",
"//build/android:build_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/jni_zero:jni_zero_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",
]
}
}
}
# Use this in robolectric_binary() targets if you just need GURL and //base
# functionality. Otherwise, define a custom shared_library().
if (!is_cronet_build && target_os == "android") {
shared_library_with_jni("libgurl_robolectric") {
testonly = true
enable_target = is_robolectric
java_targets = [
":gurl_java",
":url_java",
]
deps = [ ":robolectric_jni_onload($robolectric_toolchain)" ]
}
if (is_robolectric) {
# Depend on this if you need to write a custom JNI_OnLoad()
source_set("gurl_test_init") {
testonly = true
sources = [
"android/gurl_test_init.cc",
"android/gurl_test_init.h",
]
deps = [ ":url" ]
}
# Depend on this if you do not need to write a custom JNI_OnLoad()
source_set("robolectric_jni_onload") {
testonly = true
sources = [ "android/robolectric_jni_onload.cc" ]
deps = [
":gurl_test_init",
"//base",
]
# Make jni.h available.
configs += [ "//third_party/jdk" ]
}
}
}