blob: 980b69230c07db1c8ffe9a83e7fd20efa04575d2 [file] [log] [blame]
[email protected]4625ade2014-04-15 19:26:441# Copyright (c) 2013 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
mefff34b822016-01-11 15:28:085import("//build/buildflag_header.gni")
slan77bdc2e62015-09-21 17:56:266import("//build/config/chromecast_build.gni")
brettw4cab0f12015-09-14 21:40:017import("//build/config/compiler/compiler.gni")
[email protected]4625ade2014-04-15 19:26:448import("//build/config/crypto.gni")
9import("//build/config/features.gni")
10import("//build/config/ui.gni")
sdefresneeb265862016-09-08 14:27:1211import("//net/features.gni")
eromane6264fd2016-03-02 22:46:3012import("//testing/libfuzzer/fuzzer_test.gni")
qsrfb5251d12015-01-21 15:57:2213import("//testing/test.gni")
rockot9c67e5f2015-03-12 20:01:2114import("//third_party/icu/config.gni")
rtennetib6f1c0d2015-04-03 17:52:0615import("//third_party/protobuf/proto_library.gni")
tfarinae597851a2015-10-06 23:14:4116import("//tools/grit/grit_rule.gni")
kapishnikovabe280e2016-04-14 19:07:1617import("//url/features.gni")
machenbachd65ec5c2016-07-22 09:05:2318import("//v8/gni/v8.gni")
[email protected]26046b52014-07-16 00:11:0319
[email protected]4625ade2014-04-15 19:26:4420if (is_android) {
21 import("//build/config/android/config.gni")
[email protected]ef0eb442014-05-15 09:32:1822 import("//build/config/android/rules.gni")
[email protected]4625ade2014-04-15 19:26:4423} else if (is_mac) {
24 import("//build/config/mac/mac_sdk.gni")
25}
26
27# The list of net files is kept in net.gypi. Read it.
scottmg34fb7e52014-12-03 23:27:2428gypi_values = exec_script("//build/gypi_to_gn.py",
29 [ rebase_path("net.gypi") ],
30 "scope",
31 [ "net.gypi" ])
[email protected]4625ade2014-04-15 19:26:4432
[email protected]4625ade2014-04-15 19:26:4433# The way the cache uses mmap() is inefficient on some Android devices. If
34# this flag is set, we hackily avoid using mmap() in the disk cache. We are
35# pretty confident that mmap-ing the index would not hurt any existing x86
36# android devices, but we cannot be so sure about the variety of ARM devices.
37# So enable it for x86 only for now.
dpranke43276212015-02-20 02:55:1938posix_avoid_mmap = is_android && current_cpu != "x86"
[email protected]4625ade2014-04-15 19:26:4439
[email protected]8a3f8242014-06-05 18:05:1240use_v8_in_net = !is_ios
[email protected]4625ade2014-04-15 19:26:4441enable_built_in_dns = !is_ios
42
[email protected]4625ade2014-04-15 19:26:4443config("net_config") {
44 defines = []
45 if (posix_avoid_mmap) {
46 defines += [ "POSIX_AVOID_MMAP" ]
47 }
[email protected]02494ec2014-05-07 15:05:2948 if (disable_file_support) {
49 defines += [ "DISABLE_FILE_SUPPORT" ]
50 }
tfarinae7c8c3c2015-11-04 15:09:5551 if (disable_ftp_support) {
52 defines += [ "DISABLE_FTP_SUPPORT=1" ]
53 }
mkwst0cb69fc2016-06-21 17:46:2454 if (enable_websockets) {
55 defines += [ "ENABLE_WEBSOCKETS" ]
56 }
[email protected]4625ade2014-04-15 19:26:4457}
58
xunjieli905496a2015-08-31 15:51:1759config("net_internal_config") {
[email protected]8603c5de2014-04-16 20:34:3160 defines = [
[email protected]8603c5de2014-04-16 20:34:3161 "DLOPEN_KERBEROS",
scottmg34fb7e52014-12-03 23:27:2462 "NET_IMPLEMENTATION",
[email protected]8603c5de2014-04-16 20:34:3163 ]
dpranke43276212015-02-20 02:55:1964
[email protected]4625ade2014-04-15 19:26:4465 if (use_kerberos) {
66 defines += [ "USE_KERBEROS" ]
67 if (is_android) {
xunjieli905496a2015-08-31 15:51:1768 include_dirs = [ "/usr/include/kerberosV" ]
[email protected]4625ade2014-04-15 19:26:4469 }
[email protected]4625ade2014-04-15 19:26:4470 }
71
72 if (enable_built_in_dns) {
73 defines += [ "ENABLE_BUILT_IN_DNS" ]
xunjieli905496a2015-08-31 15:51:1774 }
75}
76
kapishnikovabe280e2016-04-14 19:07:1677net_configs = [
xunjieli905496a2015-08-31 15:51:1778 ":net_internal_config",
79 "//build/config:precompiled_headers",
80
81 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
82 "//build/config/compiler:no_size_t_to_int_warning",
rsesek99679aa2016-06-28 21:24:1783 "//build/config/compiler:wexit_time_destructors",
xunjieli905496a2015-08-31 15:51:1784]
85
kapishnikovabe280e2016-04-14 19:07:1686if (use_glib && use_gconf && !is_chromeos) {
agrieve95ba4442016-04-25 15:47:1387 net_configs += [ "//build/config/linux/gconf" ]
kapishnikovabe280e2016-04-14 19:07:1688}
xunjieli905496a2015-08-31 15:51:1789
kapishnikovabe280e2016-04-14 19:07:1690if (is_linux) {
91 net_configs += [ "//build/config/linux:libresolv" ]
xunjieli905496a2015-08-31 15:51:1792}
93
94component("net") {
kapishnikovabe280e2016-04-14 19:07:1695 sources = gypi_values.net_nacl_common_sources
96 net_unfiltered_sources = []
97
98 deps = [
99 ":net_resources",
100 "//base",
101 "//net/base/registry_controlled_domains",
102 "//third_party/protobuf:protobuf_lite",
103 "//url:url_features",
104 ]
105
106 public_deps = [
107 ":net_quic_proto",
108 "//crypto",
109 "//crypto:platform",
110 ]
111
112 if (!is_nacl) {
113 sources += gypi_values.net_non_nacl_sources
114
115 deps += [
116 "//base/third_party/dynamic_annotations",
117 "//components/prefs",
118 "//sdch",
119 "//third_party/zlib",
120 ]
121
122 if (!use_kerberos) {
123 sources -= [
124 "http/http_auth_handler_negotiate.cc",
125 "http/http_auth_handler_negotiate.h",
126 ]
127 }
128
129 if (is_posix) {
130 if (posix_avoid_mmap) {
131 sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ]
132 } else {
133 sources -= [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ]
134 }
135 }
136
137 if (!enable_built_in_dns) {
138 sources -= [
139 "dns/address_sorter_posix.cc",
140 "dns/address_sorter_posix.h",
141 "dns/dns_client.cc",
142 ]
143 }
144
kapishnikovabe280e2016-04-14 19:07:16145 if (!use_openssl_certs) {
146 sources -= [
147 "base/crypto_module_openssl.cc",
148 "base/keygen_handler_openssl.cc",
149 "base/openssl_private_key_store.h",
150 "base/openssl_private_key_store_memory.cc",
151 "cert/cert_database_openssl.cc",
152 "cert/cert_verify_proc_openssl.cc",
153 "cert/cert_verify_proc_openssl.h",
154 "cert/test_root_certs_openssl.cc",
155 "cert/x509_certificate_openssl.cc",
156 "ssl/openssl_client_key_store.cc",
157 "ssl/openssl_client_key_store.h",
158 ]
159 if (is_android) {
160 sources -= [ "base/openssl_private_key_store_android.cc" ]
161 }
162 } else {
163 if (is_android) {
164 # Android doesn't use these even when using OpenSSL.
165 sources -= [
166 "base/openssl_private_key_store_memory.cc",
167 "cert/cert_database_openssl.cc",
168 "cert/cert_verify_proc_openssl.cc",
169 "cert/test_root_certs_openssl.cc",
170 ]
171 }
172 }
173
174 if (!use_kerberos || is_android) {
175 sources -= [
176 "http/http_auth_gssapi_posix.cc",
177 "http/http_auth_gssapi_posix.h",
178 ]
179 }
180
mostynb75e8d632016-08-02 16:46:53181 if (use_gio) {
dsinclair8490e052016-05-04 15:33:33182 deps += [ "//build/linux/libgio" ]
kapishnikovabe280e2016-04-14 19:07:16183 }
184
185 if (!use_nss_certs) {
186 sources -= [
187 "base/crypto_module_nss.cc",
188 "base/keygen_handler_nss.cc",
189 "cert/cert_database_nss.cc",
mattm9c63d442016-09-03 00:45:51190 "cert/internal/trust_store_nss.cc",
191 "cert/internal/trust_store_nss.h",
kapishnikovabe280e2016-04-14 19:07:16192 "cert/nss_cert_database.cc",
193 "cert/nss_cert_database.h",
194 "cert/x509_certificate_nss.cc",
195 "ssl/client_cert_store_nss.cc",
196 "ssl/client_cert_store_nss.h",
197 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
198 "third_party/mozilla_security_manager/nsKeygenHandler.h",
199 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
200 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
201 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
202 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
203 ]
204 if (is_chromeos) {
205 # These were already removed on non-ChromeOS.
206 sources -= [
207 "cert/nss_cert_database_chromeos.cc",
208 "cert/nss_cert_database_chromeos.h",
209 "cert/nss_profile_filter_chromeos.cc",
210 "cert/nss_profile_filter_chromeos.h",
211 ]
212 }
213 sources -= [
214 "ssl/client_key_store.cc",
215 "ssl/client_key_store.h",
216 "ssl/ssl_platform_key_nss.cc",
217 ]
svaldez2135be52016-04-20 16:34:53218 } else {
davidben8d569f52016-07-29 16:03:18219 sources += [
220 "third_party/nss/ssl/cmpcert.cc",
221 "third_party/nss/ssl/cmpcert.h",
222 ]
kapishnikovabe280e2016-04-14 19:07:16223 }
224
svaldez2135be52016-04-20 16:34:53225 if (!use_nss_certs) {
kapishnikovabe280e2016-04-14 19:07:16226 # These files are part of the partial implementation of NSS for
227 # cert verification, so keep them in that case.
228 sources -= [
229 "cert/cert_verify_proc_nss.cc",
230 "cert/cert_verify_proc_nss.h",
231 "cert/test_root_certs_nss.cc",
svaldez2135be52016-04-20 16:34:53232 "cert/x509_util_nss.cc",
kapishnikovabe280e2016-04-14 19:07:16233 "cert_net/nss_ocsp.cc",
234 "cert_net/nss_ocsp.h",
235 ]
236 }
237
kapishnikovabe280e2016-04-14 19:07:16238 if (is_chromecast && use_nss_certs) {
239 sources += [ "ssl/ssl_platform_key_chromecast.cc" ]
240 sources -= [ "ssl/ssl_platform_key_nss.cc" ]
241 }
242
243 if (!enable_mdns) {
244 sources -= [
245 "dns/mdns_cache.cc",
246 "dns/mdns_cache.h",
247 "dns/mdns_client.cc",
248 "dns/mdns_client.h",
249 "dns/mdns_client_impl.cc",
250 "dns/mdns_client_impl.h",
kapishnikovabe280e2016-04-14 19:07:16251 ]
252 }
253
254 if (is_win) {
255 sources -= [ "http/http_auth_handler_ntlm_portable.cc" ]
256 } else { # !is_win
257 sources -= [
258 "base/winsock_init.cc",
259 "base/winsock_init.h",
260 "base/winsock_util.cc",
261 "base/winsock_util.h",
262 "proxy/proxy_resolver_winhttp.cc",
263 "proxy/proxy_resolver_winhttp.h",
264 ]
265 }
266
267 if (is_ios) {
268 # Add back some sources that were otherwise filtered out.
269 # iOS needs some Mac files.
270 net_unfiltered_sources += [
271 "base/mac/url_conversions.h",
272 "base/mac/url_conversions.mm",
273 "base/network_change_notifier_mac.cc",
274 "base/network_config_watcher_mac.cc",
275 "base/network_interfaces_mac.cc",
276 "base/network_interfaces_mac.h",
277 "base/platform_mime_util_mac.mm",
svaldez2135be52016-04-20 16:34:53278 "cert/test_root_certs_mac.cc",
kapishnikovabe280e2016-04-14 19:07:16279 "proxy/proxy_resolver_mac.cc",
280 "proxy/proxy_server_mac.cc",
281 ]
282
283 sources -= [ "disk_cache/blockfile/file_posix.cc" ]
284 }
285
kapishnikovabe280e2016-04-14 19:07:16286 if (is_ios || is_mac) {
287 sources += gypi_values.net_base_mac_ios_sources
288 }
289
290 if (is_android) {
291 deps += [ ":net_jni_headers" ]
292
293 # Add some Linux sources that were excluded by the filter, but which
294 # are needed.
295 net_unfiltered_sources += [
296 "base/address_tracker_linux.cc",
297 "base/address_tracker_linux.h",
298 "base/network_interfaces_linux.cc",
299 "base/network_interfaces_linux.h",
300 "base/platform_mime_util_linux.cc",
301 ]
302 }
303 } else {
304 public_deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
305 }
xunjieli905496a2015-08-31 15:51:17306
307 # Add back some sources that were otherwise filtered out.
308 set_sources_assignment_filter([])
kapishnikovabe280e2016-04-14 19:07:16309 sources += net_unfiltered_sources
xunjieli905496a2015-08-31 15:51:17310 set_sources_assignment_filter(sources_assignment_filter)
311
312 cflags = []
kapishnikovabe280e2016-04-14 19:07:16313 configs += net_configs
xunjieli905496a2015-08-31 15:51:17314 public_configs = [ ":net_config" ]
315
kapishnikovabe280e2016-04-14 19:07:16316 public_deps += [ "//url" ]
[email protected]4625ade2014-04-15 19:26:44317
318 if (is_mac) {
[email protected]4625ade2014-04-15 19:26:44319 libs = [
rsesek02aa51c2016-05-11 02:13:57320 "CFNetwork.framework",
321 "CoreServices.framework",
[email protected]ab9ce6e2014-04-17 20:33:19322 "Foundation.framework",
323 "Security.framework",
324 "SystemConfiguration.framework",
325 "resolv",
[email protected]4625ade2014-04-15 19:26:44326 ]
327 }
328
329 if (is_ios) {
[email protected]4625ade2014-04-15 19:26:44330 libs = [
[email protected]ab9ce6e2014-04-17 20:33:19331 "CFNetwork.framework",
332 "MobileCoreServices.framework",
333 "Security.framework",
334 "SystemConfiguration.framework",
335 "resolv",
[email protected]4625ade2014-04-15 19:26:44336 ]
xunjieli06d93982015-08-27 17:13:02337 }
xunjieli4c8c6922015-08-27 16:02:40338
jam5332a632016-04-01 22:36:05339 if (is_win) {
340 libs = [
341 "crypt32.lib",
342 "dhcpcsvc.lib",
343 "iphlpapi.lib",
davidben62399192016-09-13 01:54:22344 "ncrypt.lib",
jam5332a632016-04-01 22:36:05345 "rpcrt4.lib",
346 "secur32.lib",
347 "urlmon.lib",
348 "winhttp.lib",
349 ]
350 }
351
sergeyu99d83f92015-09-14 23:03:33352 if (!is_nacl) {
353 if (!disable_file_support) {
354 sources += gypi_values.net_file_support_sources
355 }
xunjieli06d93982015-08-27 17:13:02356
sergeyu99d83f92015-09-14 23:03:33357 if (!disable_ftp_support) {
358 sources += gypi_values.net_ftp_support_sources
359 }
xunjieli905496a2015-08-31 15:51:17360
sergeyu99d83f92015-09-14 23:03:33361 if (enable_websockets) {
362 sources += gypi_values.net_websockets_sources
363 }
xunjieli905496a2015-08-31 15:51:17364
sergeyu99d83f92015-09-14 23:03:33365 # ICU support.
kapishnikovabe280e2016-04-14 19:07:16366 if (use_platform_icu_alternatives) {
367 if (is_android) {
368 # Use ICU alternative on Android.
torned8b7d9252016-08-04 19:41:45369 sources += [ "base/net_string_util_icu_alternatives_android.cc" ]
kapishnikovabe280e2016-04-14 19:07:16370 deps += [ ":net_jni_headers" ]
371 } else if (is_ios) {
372 # Use ICU alternative on iOS.
373 sources += [ "base/net_string_util_icu_alternatives_ios.mm" ]
374 } else {
375 assert(false,
376 "ICU alternative is not implemented for platform: " + target_os)
377 }
378 } else {
379 # Use ICU.
380 deps += [
381 "//base:i18n",
382 "//third_party/icu",
383 ]
384 sources += [
385 "base/filename_util_icu.cc",
386 "base/net_string_util_icu.cc",
387 ]
388 }
eustasfbec9132015-12-30 14:56:51389
390 # Brotli support.
kapishnikovabe280e2016-04-14 19:07:16391 if (!disable_brotli_filter) {
392 sources += [ "filter/brotli_filter.cc" ]
xunjieli084a9292016-09-23 18:15:04393 sources += [ "filter/brotli_source_stream.cc" ]
kapishnikovabe280e2016-04-14 19:07:16394 deps += [ "//third_party/brotli" ]
395 } else {
396 sources += [ "filter/brotli_filter_disabled.cc" ]
xunjieli084a9292016-09-23 18:15:04397 sources += [ "filter/brotli_source_stream_disabled.cc" ]
kapishnikovabe280e2016-04-14 19:07:16398 }
[email protected]85191ed2014-05-15 00:41:49399 }
[email protected]4625ade2014-04-15 19:26:44400}
401
402grit("net_resources") {
403 source = "base/net_resources.grd"
[email protected]7ae52902014-08-18 22:36:01404 use_qualified_include = true
[email protected]b89c53842014-07-23 16:32:32405 outputs = [
406 "grit/net_resources.h",
407 "net_resources.pak",
[email protected]b89c53842014-07-23 16:32:32408 ]
[email protected]4625ade2014-04-15 19:26:44409}
410
rtennetib6f1c0d2015-04-03 17:52:06411proto_library("net_quic_proto") {
kapishnikovabe280e2016-04-14 19:07:16412 visibility = [ ":net" ]
brettw2e7db0a2015-04-24 22:59:17413
rtennetib6f1c0d2015-04-03 17:52:06414 sources = [
rchd4db7c152016-07-29 21:58:12415 "quic/core/proto/cached_network_parameters.proto",
416 "quic/core/proto/source_address_token.proto",
rtennetib6f1c0d2015-04-03 17:52:06417 ]
418 cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:"
419 cc_include = "net/base/net_export.h"
brettw7ef80452016-06-30 00:43:18420 component_build_force_source_set = true
rtennetib6f1c0d2015-04-03 17:52:06421
422 defines = [ "NET_IMPLEMENTATION" ]
423
424 extra_configs = [ "//build/config/compiler:wexit_time_destructors" ]
425}
426
Brett Wilson83fd4242014-09-02 19:45:33427static_library("extras") {
mef327a8e42014-08-29 17:10:03428 sources = gypi_values.net_extras_sources
429 configs += [ "//build/config/compiler:wexit_time_destructors" ]
430 deps = [
431 ":net",
brettwbc44c0a92015-02-20 22:30:39432 "//base",
mef327a8e42014-08-29 17:10:03433 "//sql:sql",
434 ]
435}
436
[email protected]8a3f8242014-06-05 18:05:12437static_library("http_server") {
[email protected]4625ade2014-04-15 19:26:44438 sources = [
439 "server/http_connection.cc",
440 "server/http_connection.h",
441 "server/http_server.cc",
442 "server/http_server.h",
443 "server/http_server_request_info.cc",
444 "server/http_server_request_info.h",
445 "server/http_server_response_info.cc",
446 "server/http_server_response_info.h",
447 "server/web_socket.cc",
448 "server/web_socket.h",
dgozmana6e70092014-12-12 14:46:21449 "server/web_socket_encoder.cc",
450 "server/web_socket_encoder.h",
[email protected]4625ade2014-04-15 19:26:44451 ]
jambc6cc8e2014-11-14 17:56:29452 configs += [
brettwd1c719a2015-02-19 23:17:04453 "//build/config/compiler:no_size_t_to_int_warning",
jambc6cc8e2014-11-14 17:56:29454 "//build/config/compiler:wexit_time_destructors",
jambc6cc8e2014-11-14 17:56:29455 ]
[email protected]4625ade2014-04-15 19:26:44456 deps = [
457 ":net",
458 "//base",
459 ]
460}
461
sdefresne3001f172016-03-16 10:30:03462if (!is_ios) {
463 executable("dump_cache") {
464 testonly = true
465 sources = [
466 "tools/dump_cache/dump_cache.cc",
467 "tools/dump_cache/dump_files.cc",
468 "tools/dump_cache/dump_files.h",
469 ]
[email protected]4625ade2014-04-15 19:26:44470
sdefresne3001f172016-03-16 10:30:03471 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
472 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31473
sdefresne3001f172016-03-16 10:30:03474 deps = [
475 ":net",
476 ":test_support",
477 "//base",
478 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07479 "//build/win:default_exe_manifest",
sdefresne3001f172016-03-16 10:30:03480 ]
481 }
[email protected]8603c5de2014-04-16 20:34:31482}
483
sdefresneb0a31642016-03-18 11:04:45484bundle_data("test_support_bundle_data") {
sdefresne04f91142016-04-21 08:41:59485 visibility = [ ":test_support" ]
sdefresneb0a31642016-03-18 11:04:45486 testonly = true
sdefresne04f91142016-04-21 08:41:59487 sources = gypi_values.net_test_support_data_sources
sdefresneb0a31642016-03-18 11:04:45488 outputs = [
489 "{{bundle_resources_dir}}/" +
490 "{{source_root_relative_dir}}/{{source_file_part}}",
491 ]
492}
493
brettw3871f522016-07-14 22:08:34494static_library("test_support") {
Brett Wilson8f80ad0b2014-09-08 19:50:24495 testonly = true
[email protected]8603c5de2014-04-16 20:34:31496 sources = [
[email protected]8603c5de2014-04-16 20:34:31497 "base/load_timing_info_test_util.cc",
498 "base/load_timing_info_test_util.h",
499 "base/mock_file_stream.cc",
500 "base/mock_file_stream.h",
501 "base/test_completion_callback.cc",
502 "base/test_completion_callback.h",
[email protected]8603c5de2014-04-16 20:34:31503 "cert/mock_cert_verifier.cc",
504 "cert/mock_cert_verifier.h",
ryanchung987b2ff2016-02-19 00:17:12505 "cert/mock_client_cert_verifier.cc",
506 "cert/mock_client_cert_verifier.h",
[email protected]8603c5de2014-04-16 20:34:31507 "cookies/cookie_monster_store_test.cc",
508 "cookies/cookie_monster_store_test.h",
509 "cookies/cookie_store_test_callbacks.cc",
510 "cookies/cookie_store_test_callbacks.h",
511 "cookies/cookie_store_test_helpers.cc",
512 "cookies/cookie_store_test_helpers.h",
drogerfd8b2772015-12-04 14:34:56513 "cookies/cookie_store_unittest.h",
[email protected]8603c5de2014-04-16 20:34:31514 "disk_cache/disk_cache_test_base.cc",
515 "disk_cache/disk_cache_test_base.h",
516 "disk_cache/disk_cache_test_util.cc",
517 "disk_cache/disk_cache_test_util.h",
518 "dns/dns_test_util.cc",
519 "dns/dns_test_util.h",
520 "dns/mock_host_resolver.cc",
521 "dns/mock_host_resolver.h",
522 "dns/mock_mdns_socket_factory.cc",
523 "dns/mock_mdns_socket_factory.h",
zhongyi3c412982016-06-18 00:34:30524 "http/http_stream_factory_test_util.cc",
525 "http/http_stream_factory_test_util.h",
[email protected]8a3f8242014-06-05 18:05:12526 "http/http_transaction_test_util.cc",
527 "http/http_transaction_test_util.h",
vishal.b62985ca92015-04-17 08:45:51528 "log/test_net_log.cc",
529 "log/test_net_log.h",
mmenke43758e62015-05-04 21:09:46530 "log/test_net_log_entry.cc",
531 "log/test_net_log_entry.h",
mmenke0034c542015-05-05 22:34:59532 "log/test_net_log_util.cc",
mmenke43758e62015-05-04 21:09:46533 "log/test_net_log_util.h",
[email protected]8603c5de2014-04-16 20:34:31534 "proxy/mock_proxy_resolver.cc",
535 "proxy/mock_proxy_resolver.h",
536 "proxy/mock_proxy_script_fetcher.cc",
537 "proxy/mock_proxy_script_fetcher.h",
538 "proxy/proxy_config_service_common_unittest.cc",
539 "proxy/proxy_config_service_common_unittest.h",
540 "socket/socket_test_util.cc",
541 "socket/socket_test_util.h",
542 "test/cert_test_util.cc",
543 "test/cert_test_util.h",
[email protected]83e1ae32014-07-18 10:57:07544 "test/cert_test_util_nss.cc",
nharper2e171cf2015-06-01 20:29:23545 "test/channel_id_test_util.cc",
546 "test/channel_id_test_util.h",
[email protected]8603c5de2014-04-16 20:34:31547 "test/ct_test_util.cc",
548 "test/ct_test_util.h",
svaldez7d25c562015-10-30 19:09:45549 "test/embedded_test_server/default_handlers.cc",
550 "test/embedded_test_server/default_handlers.h",
[email protected]8603c5de2014-04-16 20:34:31551 "test/embedded_test_server/embedded_test_server.cc",
552 "test/embedded_test_server/embedded_test_server.h",
553 "test/embedded_test_server/http_connection.cc",
554 "test/embedded_test_server/http_connection.h",
555 "test/embedded_test_server/http_request.cc",
556 "test/embedded_test_server/http_request.h",
557 "test/embedded_test_server/http_response.cc",
558 "test/embedded_test_server/http_response.h",
svaldez6e7e82a22015-10-28 19:39:53559 "test/embedded_test_server/request_handler_util.cc",
560 "test/embedded_test_server/request_handler_util.h",
sammc6ac3fe52015-02-25 06:00:28561 "test/event_waiter.h",
johnme36ae5802016-05-10 15:46:24562 "test/gtest_util.h",
[email protected]8603c5de2014-04-16 20:34:31563 "test/net_test_suite.cc",
564 "test/net_test_suite.h",
565 "test/python_utils.cc",
566 "test/python_utils.h",
johnme36ae5802016-05-10 15:46:24567 "test/scoped_disable_exit_on_dfatal.cc",
568 "test/scoped_disable_exit_on_dfatal.h",
brettw6315e032015-11-27 18:38:36569 "test/test_certificate_data.h",
rsleevia69c79a2016-06-22 03:28:43570 "test/test_data_directory.cc",
571 "test/test_data_directory.h",
sherouk51b4b098b2015-08-10 09:00:43572 "test/url_request/ssl_certificate_error_job.cc",
573 "test/url_request/ssl_certificate_error_job.h",
Brett Wilson32ce17a2014-11-10 17:45:30574 "test/url_request/url_request_failed_job.cc",
575 "test/url_request/url_request_failed_job.h",
xunjieli5d1f9892016-05-18 20:44:34576 "test/url_request/url_request_hanging_read_job.cc",
577 "test/url_request/url_request_hanging_read_job.h",
mef3e826cf2014-12-13 18:40:40578 "test/url_request/url_request_mock_data_job.cc",
579 "test/url_request/url_request_mock_data_job.h",
jam8e45cd72015-01-20 16:33:44580 "test/url_request/url_request_slow_download_job.cc",
581 "test/url_request/url_request_slow_download_job.h",
[email protected]8603c5de2014-04-16 20:34:31582 "url_request/test_url_fetcher_factory.cc",
583 "url_request/test_url_fetcher_factory.h",
584 "url_request/url_request_test_util.cc",
585 "url_request/url_request_test_util.h",
586 ]
sherouk3eee4a82015-09-01 10:42:33587 if (!is_ios) {
588 sources += [
589 "test/spawned_test_server/base_test_server.cc",
590 "test/spawned_test_server/base_test_server.h",
591 "test/spawned_test_server/local_test_server.cc",
592 "test/spawned_test_server/local_test_server.h",
593 "test/spawned_test_server/local_test_server_posix.cc",
594 "test/spawned_test_server/local_test_server_win.cc",
595 "test/spawned_test_server/spawned_test_server.h",
596 ]
597 }
[email protected]8603c5de2014-04-16 20:34:31598
brettwbc8b2a22015-07-28 18:24:42599 configs += [
600 "//build/config:precompiled_headers",
601
602 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
603 "//build/config/compiler:no_size_t_to_int_warning",
604 ]
[email protected]8603c5de2014-04-16 20:34:31605
Brett Wilsone53895272014-09-23 23:41:46606 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31607 "//base",
608 "//base/test:test_support",
[email protected]22fe91d2014-08-12 17:07:12609 "//crypto",
[email protected]59ff2d42014-04-22 22:25:23610 "//net",
[email protected]8603c5de2014-04-16 20:34:31611 "//net/tools/tld_cleanup",
612 "//testing/gmock",
613 "//testing/gtest",
614 "//url",
615 ]
616
rsesek7d4ab4bc2016-07-22 17:35:13617 deps = []
sdefresne04f91142016-04-21 08:41:59618
jbudorick944eb922016-06-20 15:38:30619 data = [
620 "data/",
621 ]
622
rsesek7d4ab4bc2016-07-22 17:35:13623 if (is_ios) {
624 deps += [ ":test_support_bundle_data" ]
625 } else {
jamb533b7e2015-03-04 17:12:05626 public_deps += [ "//third_party/protobuf:py_proto" ]
627 }
628
svaldez2135be52016-04-20 16:34:53629 if (use_nss_certs) {
scottmg34fb7e52014-12-03 23:27:24630 public_deps += [ "//crypto:platform" ]
[email protected]8603c5de2014-04-16 20:34:31631 }
632
sherouk3eee4a82015-09-01 10:42:33633 if (is_android) {
634 sources += [
[email protected]8603c5de2014-04-16 20:34:31635 "test/spawned_test_server/remote_test_server.cc",
636 "test/spawned_test_server/remote_test_server.h",
637 "test/spawned_test_server/spawner_communicator.cc",
638 "test/spawned_test_server/spawner_communicator.h",
639 ]
640 }
641
642 if (use_v8_in_net) {
Brett Wilsone53895272014-09-23 23:41:46643 public_deps += [ ":net_with_v8" ]
[email protected]8603c5de2014-04-16 20:34:31644 }
645
646 if (!enable_mdns) {
647 sources -= [
648 "dns/mock_mdns_socket_factory.cc",
649 "dns/mock_mdns_socket_factory.h",
650 ]
651 }
652
davidben15d69d482014-09-29 18:24:08653 if (!use_nss_certs) {
scottmg34fb7e52014-12-03 23:27:24654 sources -= [ "test/cert_test_util_nss.cc" ]
[email protected]83e1ae32014-07-18 10:57:07655 }
xunjielia6888202015-04-14 21:34:25656
657 if (!disable_file_support) {
658 sources += [
659 "test/url_request/url_request_mock_http_job.cc",
660 "test/url_request/url_request_mock_http_job.h",
661 "url_request/test_url_request_interceptor.cc",
662 "url_request/test_url_request_interceptor.h",
663 ]
664 }
[email protected]8603c5de2014-04-16 20:34:31665}
666
[email protected]ceeaac792014-06-25 05:14:43667source_set("balsa") {
668 sources = [
669 "tools/balsa/balsa_enums.h",
670 "tools/balsa/balsa_frame.cc",
671 "tools/balsa/balsa_frame.h",
672 "tools/balsa/balsa_headers.cc",
673 "tools/balsa/balsa_headers.h",
674 "tools/balsa/balsa_headers_token_utils.cc",
675 "tools/balsa/balsa_headers_token_utils.h",
676 "tools/balsa/balsa_visitor_interface.h",
677 "tools/balsa/http_message_constants.cc",
678 "tools/balsa/http_message_constants.h",
679 "tools/balsa/noop_balsa_visitor.h",
680 "tools/balsa/simple_buffer.cc",
681 "tools/balsa/simple_buffer.h",
[email protected]ceeaac792014-06-25 05:14:43682 "tools/balsa/string_piece_utils.h",
rtennetie0ee6eb2015-05-01 00:55:09683 "tools/quic/spdy_balsa_utils.cc",
684 "tools/quic/spdy_balsa_utils.h",
[email protected]ceeaac792014-06-25 05:14:43685 ]
686 deps = [
687 ":net",
688 "//base",
[email protected]22fe91d2014-08-12 17:07:12689 "//url",
[email protected]ceeaac792014-06-25 05:14:43690 ]
691}
692
[email protected]8603c5de2014-04-16 20:34:31693if (use_v8_in_net) {
694 component("net_with_v8") {
695 sources = [
696 "proxy/proxy_resolver_v8.cc",
697 "proxy/proxy_resolver_v8.h",
698 "proxy/proxy_resolver_v8_tracing.cc",
699 "proxy/proxy_resolver_v8_tracing.h",
sammcf2d1ea02015-06-29 02:58:47700 "proxy/proxy_resolver_v8_tracing_wrapper.cc",
701 "proxy/proxy_resolver_v8_tracing_wrapper.h",
[email protected]8603c5de2014-04-16 20:34:31702 "proxy/proxy_service_v8.cc",
703 "proxy/proxy_service_v8.h",
704 ]
705
706 defines = [ "NET_IMPLEMENTATION" ]
dprankea22b0732015-10-21 21:15:11707
[email protected]8603c5de2014-04-16 20:34:31708 configs += [
brettwd1c719a2015-02-19 23:17:04709 "//build/config/compiler:no_size_t_to_int_warning",
[email protected]8603c5de2014-04-16 20:34:31710 "//build/config/compiler:wexit_time_destructors",
dprankea22b0732015-10-21 21:15:11711 "//v8:external_startup_data",
[email protected]8603c5de2014-04-16 20:34:31712 ]
713
Brett Wilsone53895272014-09-23 23:41:46714 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31715 ":net",
Brett Wilsone53895272014-09-23 23:41:46716 ]
717 deps = [
[email protected]8603c5de2014-04-16 20:34:31718 "//base",
719 "//gin",
720 "//url",
721 "//v8",
722 ]
723 }
724}
725
amistry7e6ebfdc82015-02-13 04:19:11726if (use_v8_in_net && !is_android) {
727 source_set("net_browser_services") {
728 sources = [
729 "dns/mojo_host_resolver_impl.cc",
730 "dns/mojo_host_resolver_impl.h",
amistry6e1ed1b2015-03-12 05:24:01731 "proxy/in_process_mojo_proxy_resolver_factory.cc",
732 "proxy/in_process_mojo_proxy_resolver_factory.h",
sammc1d5df4d2015-05-05 05:06:17733 "proxy/mojo_proxy_resolver_factory.h",
eromandcacef22015-06-01 19:36:35734 "proxy/proxy_resolver_factory_mojo.cc",
735 "proxy/proxy_resolver_factory_mojo.h",
amistry6e1ed1b2015-03-12 05:24:01736 "proxy/proxy_service_mojo.cc",
737 "proxy/proxy_service_mojo.h",
amistry7e6ebfdc82015-02-13 04:19:11738 ]
739
740 public_deps = [
741 ":mojo_type_converters",
tfarina8ac4d17f2015-12-16 02:11:11742 ":net_with_v8",
brettwbc44c0a92015-02-20 22:30:39743 "//base",
amistry07ff1402015-03-10 07:34:07744 "//mojo/common",
rockot85dce0862015-11-13 01:33:59745 "//mojo/public/cpp/bindings",
amistry7e6ebfdc82015-02-13 04:19:11746 "//net/interfaces",
amistry6e1ed1b2015-03-12 05:24:01747
748 # NOTE(amistry): As long as we support in-process Mojo v8 PAC, we need
749 # this dependency since in_process_mojo_proxy_resolver_factory creates
750 # the utility process side Mojo services in the browser process.
751 # Ultimately, this will go away when we only support out-of-process.
752 ":net_utility_services",
amistry7e6ebfdc82015-02-13 04:19:11753 ]
754 }
755
756 source_set("mojo_type_converters") {
757 sources = [
amistry7ec58112015-02-26 06:03:00758 "dns/mojo_host_type_converters.cc",
759 "dns/mojo_host_type_converters.h",
760 "proxy/mojo_proxy_type_converters.cc",
761 "proxy/mojo_proxy_type_converters.h",
amistry7e6ebfdc82015-02-13 04:19:11762 ]
763
764 public_deps = [
765 ":net",
tfarina8ac4d17f2015-12-16 02:11:11766 "//base",
rockot85dce0862015-11-13 01:33:59767 "//mojo/public/cpp/bindings",
amistry7e6ebfdc82015-02-13 04:19:11768 "//net/interfaces",
amistry7e6ebfdc82015-02-13 04:19:11769 ]
770 }
sammc5403aa1d2015-02-25 04:59:21771
772 source_set("net_utility_services") {
773 sources = [
sammc6ac3fe52015-02-25 06:00:28774 "dns/host_resolver_mojo.cc",
775 "dns/host_resolver_mojo.h",
sammc352f7492015-02-25 09:45:24776 "proxy/mojo_proxy_resolver_factory_impl.cc",
777 "proxy/mojo_proxy_resolver_factory_impl.h",
sammc5403aa1d2015-02-25 04:59:21778 "proxy/mojo_proxy_resolver_impl.cc",
779 "proxy/mojo_proxy_resolver_impl.h",
sammca3242c92015-07-10 02:38:51780 "proxy/mojo_proxy_resolver_v8_tracing_bindings.h",
sammc5403aa1d2015-02-25 04:59:21781 ]
782
rockot9509ec82015-04-14 02:50:56783 deps = [
784 ":net_with_v8",
tfarina8ac4d17f2015-12-16 02:11:11785 "//base",
rockot9509ec82015-04-14 02:50:56786 ]
787
sammc5403aa1d2015-02-25 04:59:21788 public_deps = [
789 ":mojo_type_converters",
790 ":net",
791 "//mojo/common",
rockot85dce0862015-11-13 01:33:59792 "//mojo/public/cpp/bindings",
sammc5403aa1d2015-02-25 04:59:21793 "//net/interfaces",
sammc5403aa1d2015-02-25 04:59:21794 ]
795 }
amistry7e6ebfdc82015-02-13 04:19:11796}
797
[email protected]8603c5de2014-04-16 20:34:31798if (!is_ios && !is_android) {
mattm36d89682016-06-08 22:22:40799 executable("cert_verify_tool") {
800 testonly = true
801 sources = [
802 "tools/cert_verify_tool/cert_verify_tool.cc",
803 "tools/cert_verify_tool/cert_verify_tool_util.cc",
804 "tools/cert_verify_tool/cert_verify_tool_util.h",
805 "tools/cert_verify_tool/verify_using_cert_verify_proc.cc",
806 "tools/cert_verify_tool/verify_using_cert_verify_proc.h",
mattm3c66edc2016-07-13 22:40:42807 "tools/cert_verify_tool/verify_using_path_builder.cc",
808 "tools/cert_verify_tool/verify_using_path_builder.h",
mattm36d89682016-06-08 22:22:40809 ]
810
811 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
812 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
813 deps = [
814 ":net",
815 ":test_support",
816 "//base",
817 "//build/config/sanitizers:deps",
818 "//build/win:default_exe_manifest",
819 ]
820 }
821
[email protected]8603c5de2014-04-16 20:34:31822 executable("crash_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24823 testonly = true
scottmg34fb7e52014-12-03 23:27:24824 sources = [
825 "tools/crash_cache/crash_cache.cc",
826 ]
dpranke43276212015-02-20 02:55:19827
brettwd1c719a2015-02-19 23:17:04828 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
829 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31830 deps = [
831 ":net",
[email protected]b2b2bf52014-05-28 20:26:57832 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31833 "//base",
brettwba7a73d2015-08-31 22:17:39834 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07835 "//build/win:default_exe_manifest",
[email protected]8603c5de2014-04-16 20:34:31836 ]
837 }
838
839 executable("crl_set_dump") {
Brett Wilson8f80ad0b2014-09-08 19:50:24840 testonly = true
scottmg34fb7e52014-12-03 23:27:24841 sources = [
842 "tools/crl_set_dump/crl_set_dump.cc",
843 ]
dpranke43276212015-02-20 02:55:19844
brettwd1c719a2015-02-19 23:17:04845 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
846 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31847 deps = [
848 ":net",
849 "//base",
brettwba7a73d2015-08-31 22:17:39850 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07851 "//build/win:default_exe_manifest",
[email protected]8603c5de2014-04-16 20:34:31852 ]
853 }
854
855 executable("dns_fuzz_stub") {
Brett Wilson8f80ad0b2014-09-08 19:50:24856 testonly = true
scottmg34fb7e52014-12-03 23:27:24857 sources = [
858 "tools/dns_fuzz_stub/dns_fuzz_stub.cc",
859 ]
dpranke43276212015-02-20 02:55:19860
brettwd1c719a2015-02-19 23:17:04861 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
862 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31863 deps = [
864 ":net",
865 "//base",
brettwba7a73d2015-08-31 22:17:39866 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07867 "//build/win:default_exe_manifest",
[email protected]8603c5de2014-04-16 20:34:31868 ]
869 }
870
871 executable("gdig") {
Brett Wilson8f80ad0b2014-09-08 19:50:24872 testonly = true
[email protected]8603c5de2014-04-16 20:34:31873 sources = [
874 "tools/gdig/file_net_log.cc",
875 "tools/gdig/gdig.cc",
876 ]
877 deps = [
878 ":net",
879 "//base",
brettwba7a73d2015-08-31 22:17:39880 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07881 "//build/win:default_exe_manifest",
[email protected]8603c5de2014-04-16 20:34:31882 ]
883 }
884
885 executable("get_server_time") {
Brett Wilson8f80ad0b2014-09-08 19:50:24886 testonly = true
scottmg34fb7e52014-12-03 23:27:24887 sources = [
888 "tools/get_server_time/get_server_time.cc",
889 ]
dpranke43276212015-02-20 02:55:19890
brettwd1c719a2015-02-19 23:17:04891 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
892 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31893 deps = [
894 ":net",
895 "//base",
896 "//base:i18n",
brettwba7a73d2015-08-31 22:17:39897 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07898 "//build/win:default_exe_manifest",
[email protected]8603c5de2014-04-16 20:34:31899 "//url",
900 ]
901 }
902
rockot9c67e5f2015-03-12 20:01:21903 executable("hpack_example_generator") {
904 testonly = true
905 sources = [
906 "spdy/fuzzing/hpack_example_generator.cc",
907 ]
908
909 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
910 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
911 deps = [
rockot9c67e5f2015-03-12 20:01:21912 ":net",
brettwba7a73d2015-08-31 22:17:39913 "//base",
914 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07915 "//build/win:default_exe_manifest",
rockot9c67e5f2015-03-12 20:01:21916 ]
917 }
918
919 executable("hpack_fuzz_mutator") {
920 testonly = true
921 sources = [
922 "spdy/fuzzing/hpack_fuzz_mutator.cc",
923 ]
924
925 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
926 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
927 deps = [
rockot9c67e5f2015-03-12 20:01:21928 ":net",
brettwba7a73d2015-08-31 22:17:39929 "//base",
930 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07931 "//build/win:default_exe_manifest",
rockot9c67e5f2015-03-12 20:01:21932 ]
933 }
934
935 executable("hpack_fuzz_wrapper") {
936 testonly = true
937 sources = [
938 "spdy/fuzzing/hpack_fuzz_wrapper.cc",
939 ]
940
941 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
942 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
943 deps = [
rockot9c67e5f2015-03-12 20:01:21944 ":net",
brettwba7a73d2015-08-31 22:17:39945 "//base",
946 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07947 "//build/win:default_exe_manifest",
rockot9c67e5f2015-03-12 20:01:21948 ]
949 }
950
[email protected]8603c5de2014-04-16 20:34:31951 if (use_v8_in_net) {
952 executable("net_watcher") {
Brett Wilson8f80ad0b2014-09-08 19:50:24953 testonly = true
scottmg34fb7e52014-12-03 23:27:24954 sources = [
955 "tools/net_watcher/net_watcher.cc",
956 ]
[email protected]8603c5de2014-04-16 20:34:31957 deps = [
958 ":net",
959 ":net_with_v8",
960 "//base",
brettwba7a73d2015-08-31 22:17:39961 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07962 "//build/win:default_exe_manifest",
[email protected]8603c5de2014-04-16 20:34:31963 ]
[email protected]8603c5de2014-04-16 20:34:31964 }
965 }
966
967 executable("run_testserver") {
Brett Wilson8f80ad0b2014-09-08 19:50:24968 testonly = true
scottmg34fb7e52014-12-03 23:27:24969 sources = [
970 "tools/testserver/run_testserver.cc",
971 ]
[email protected]8603c5de2014-04-16 20:34:31972 deps = [
[email protected]b2b2bf52014-05-28 20:26:57973 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31974 "//base",
975 "//base/test:test_support",
brettwba7a73d2015-08-31 22:17:39976 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07977 "//build/win:default_exe_manifest",
[email protected]8603c5de2014-04-16 20:34:31978 "//testing/gtest",
979 ]
980 }
981
982 executable("stress_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24983 testonly = true
scottmg34fb7e52014-12-03 23:27:24984 sources = [
rvargase23fcf652015-03-04 19:59:22985 "tools/stress_cache/stress_cache.cc",
scottmg34fb7e52014-12-03 23:27:24986 ]
dpranke43276212015-02-20 02:55:19987
brettwd1c719a2015-02-19 23:17:04988 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
989 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31990 deps = [
991 ":net",
[email protected]b2b2bf52014-05-28 20:26:57992 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31993 "//base",
brettwba7a73d2015-08-31 22:17:39994 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07995 "//build/win:default_exe_manifest",
[email protected]8603c5de2014-04-16 20:34:31996 ]
997 }
998
999 executable("tld_cleanup") {
scottmg34fb7e52014-12-03 23:27:241000 sources = [
1001 "tools/tld_cleanup/tld_cleanup.cc",
1002 ]
dpranke43276212015-02-20 02:55:191003
brettwd1c719a2015-02-19 23:17:041004 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1005 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:311006 deps = [
1007 "//base",
1008 "//base:i18n",
brettwba7a73d2015-08-31 22:17:391009 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:071010 "//build/win:default_exe_manifest",
[email protected]8603c5de2014-04-16 20:34:311011 "//net/tools/tld_cleanup",
1012 ]
1013 }
1014}
1015
gabadie0774bee2016-05-12 14:02:581016if (is_linux || is_mac) {
gabadie64af64a2016-03-29 16:36:421017 executable("cachetool") {
1018 testonly = true
1019 sources = [
1020 "tools/cachetool/cachetool.cc",
1021 ]
1022 deps = [
1023 ":net",
1024 ":test_support",
1025 "//base",
1026 ]
1027 }
1028
1029 executable("content_decoder_tool") {
1030 testonly = true
1031 sources = [
1032 "filter/mock_filter_context.cc",
1033 "filter/mock_filter_context.h",
1034 "tools/content_decoder_tool/content_decoder_tool.cc",
1035 ]
1036 deps = [
1037 ":net",
1038 ":test_support",
1039 "//base",
1040 "//url",
1041 ]
1042 }
gabadie0774bee2016-05-12 14:02:581043}
gabadie64af64a2016-03-29 16:36:421044
gabadie0774bee2016-05-12 14:02:581045if (is_linux) {
[email protected]8a3f8242014-06-05 18:05:121046 static_library("epoll_server") {
[email protected]8603c5de2014-04-16 20:34:311047 sources = [
1048 "tools/epoll_server/epoll_server.cc",
1049 "tools/epoll_server/epoll_server.h",
1050 ]
1051 deps = [
1052 ":net",
1053 "//base",
1054 ]
1055 }
1056
rch216445c2015-03-27 00:23:281057 source_set("epoll_quic_tools") {
[email protected]8603c5de2014-04-16 20:34:311058 sources = [
1059 "tools/quic/quic_client.cc",
1060 "tools/quic/quic_client.h",
[email protected]8603c5de2014-04-16 20:34:311061 "tools/quic/quic_default_packet_writer.cc",
1062 "tools/quic/quic_default_packet_writer.h",
rch16c74d1d2016-04-22 06:14:071063 "tools/quic/quic_epoll_alarm_factory.cc",
1064 "tools/quic/quic_epoll_alarm_factory.h",
[email protected]8603c5de2014-04-16 20:34:311065 "tools/quic/quic_epoll_clock.cc",
1066 "tools/quic/quic_epoll_clock.h",
1067 "tools/quic/quic_epoll_connection_helper.cc",
1068 "tools/quic/quic_epoll_connection_helper.h",
rtennetifb3fa6c2015-03-16 23:04:551069 "tools/quic/quic_packet_reader.cc",
1070 "tools/quic/quic_packet_reader.h",
[email protected]8603c5de2014-04-16 20:34:311071 "tools/quic/quic_packet_writer_wrapper.cc",
1072 "tools/quic/quic_packet_writer_wrapper.h",
1073 "tools/quic/quic_server.cc",
1074 "tools/quic/quic_server.h",
[email protected]8603c5de2014-04-16 20:34:311075 "tools/quic/quic_socket_utils.cc",
1076 "tools/quic/quic_socket_utils.h",
[email protected]8603c5de2014-04-16 20:34:311077 ]
1078 deps = [
1079 ":balsa",
1080 ":epoll_server",
1081 ":net",
tfarina8ac4d17f2015-12-16 02:11:111082 ":simple_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311083 "//base",
1084 "//base/third_party/dynamic_annotations",
1085 "//crypto",
[email protected]edfd0f42014-07-22 18:20:371086 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311087 "//url",
1088 ]
1089 }
1090
rch216445c2015-03-27 00:23:281091 executable("epoll_quic_client") {
scottmg34fb7e52014-12-03 23:27:241092 sources = [
1093 "tools/quic/quic_client_bin.cc",
1094 ]
[email protected]8603c5de2014-04-16 20:34:311095 deps = [
brettwbc44c0a92015-02-20 22:30:391096 ":balsa",
rch216445c2015-03-27 00:23:281097 ":epoll_quic_tools",
agrieved7a71c882015-11-20 19:53:281098 ":epoll_server",
rch216445c2015-03-27 00:23:281099 ":net",
1100 ":simple_quic_tools",
1101 "//base",
brettwba7a73d2015-08-31 22:17:391102 "//build/config/sanitizers:deps",
rch216445c2015-03-27 00:23:281103 "//third_party/boringssl",
1104 ]
1105 }
1106
1107 executable("epoll_quic_server") {
1108 sources = [
1109 "tools/quic/quic_server_bin.cc",
1110 ]
1111 deps = [
1112 ":balsa",
rch216445c2015-03-27 00:23:281113 ":epoll_quic_tools",
agrieved7a71c882015-11-20 19:53:281114 ":epoll_server",
[email protected]8603c5de2014-04-16 20:34:311115 ":net",
rchda78df5a2015-03-22 05:16:371116 ":simple_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311117 "//base",
brettwba7a73d2015-08-31 22:17:391118 "//build/config/sanitizers:deps",
[email protected]edfd0f42014-07-22 18:20:371119 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311120 ]
1121 }
[email protected]8603c5de2014-04-16 20:34:311122}
1123
[email protected]ef0eb442014-05-15 09:32:181124if (is_android) {
1125 generate_jni("net_jni_headers") {
1126 sources = [
tbansalc04b7aa2016-07-02 06:54:371127 "android/java/src/org/chromium/net/AndroidCellularSignalStrength.java",
[email protected]ef0eb442014-05-15 09:32:181128 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
1129 "android/java/src/org/chromium/net/AndroidKeyStore.java",
1130 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java",
tbansal59a1ddc2015-09-14 17:35:011131 "android/java/src/org/chromium/net/AndroidTrafficStats.java",
[email protected]ef0eb442014-05-15 09:32:181132 "android/java/src/org/chromium/net/GURLUtils.java",
aberentec894a52015-07-09 14:45:531133 "android/java/src/org/chromium/net/HttpNegotiateAuthenticator.java",
xunjieli905496a2015-08-31 15:51:171134 "android/java/src/org/chromium/net/NetStringUtil.java",
[email protected]ef0eb442014-05-15 09:32:181135 "android/java/src/org/chromium/net/NetworkChangeNotifier.java",
1136 "android/java/src/org/chromium/net/ProxyChangeListener.java",
1137 "android/java/src/org/chromium/net/X509Util.java",
1138 ]
1139 jni_package = "net"
1140 }
cjhopmandad5f4272014-09-05 01:00:551141 generate_jni("net_test_jni_headers") {
1142 sources = [
1143 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java",
aberentec894a52015-07-09 14:45:531144 "test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticator.java",
jbudorickccffb982015-12-22 01:21:351145 "test/android/javatests/src/org/chromium/net/test/EmbeddedTestServerImpl.java",
cjhopmandad5f4272014-09-05 01:00:551146 ]
brettwcdccaf02015-07-27 16:27:091147 jni_package = "net/test"
cjhopmandad5f4272014-09-05 01:00:551148 }
[email protected]ef0eb442014-05-15 09:32:181149}
[email protected]8603c5de2014-04-16 20:34:311150
1151if (is_android || is_linux) {
1152 executable("disk_cache_memory_test") {
Brett Wilson8f80ad0b2014-09-08 19:50:241153 testonly = true
scottmg34fb7e52014-12-03 23:27:241154 sources = [
1155 "tools/disk_cache_memory_test/disk_cache_memory_test.cc",
1156 ]
[email protected]8603c5de2014-04-16 20:34:311157 deps = [
1158 ":net",
1159 "//base",
brettwba7a73d2015-08-31 22:17:391160 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311161 ]
1162 }
1163}
[email protected]8a3f8242014-06-05 18:05:121164
rch47ad01f2015-03-20 21:17:231165source_set("simple_quic_tools") {
rcha9d12ce12015-03-19 23:06:491166 sources = [
ckrasica7fd1242016-05-14 20:36:011167 "tools/quic/chlo_extractor.cc",
1168 "tools/quic/chlo_extractor.h",
rtennetid67b3a722015-08-18 05:15:311169 "tools/quic/quic_client_base.cc",
1170 "tools/quic/quic_client_base.h",
rched113b22015-03-26 04:54:051171 "tools/quic/quic_client_session.cc",
1172 "tools/quic/quic_client_session.h",
rchc99f380c2015-03-26 19:50:561173 "tools/quic/quic_dispatcher.cc",
1174 "tools/quic/quic_dispatcher.h",
rch0e945472015-03-26 15:19:211175 "tools/quic/quic_in_memory_cache.cc",
1176 "tools/quic/quic_in_memory_cache.h",
rchc99f380c2015-03-26 19:50:561177 "tools/quic/quic_per_connection_packet_writer.cc",
1178 "tools/quic/quic_per_connection_packet_writer.h",
brettw25ca8922016-03-18 22:59:581179 "tools/quic/quic_process_packet_interface.h",
rcha9d12ce12015-03-19 23:06:491180 "tools/quic/quic_simple_client.cc",
1181 "tools/quic/quic_simple_client.h",
ianswett6c7b7ed2016-09-13 19:35:271182 "tools/quic/quic_simple_crypto_server_stream_helper.cc",
1183 "tools/quic/quic_simple_crypto_server_stream_helper.h",
alyssara473d6f2016-08-04 16:54:041184 "tools/quic/quic_simple_dispatcher.cc",
1185 "tools/quic/quic_simple_dispatcher.h",
rch216445c2015-03-27 00:23:281186 "tools/quic/quic_simple_per_connection_packet_writer.cc",
1187 "tools/quic/quic_simple_per_connection_packet_writer.h",
1188 "tools/quic/quic_simple_server.cc",
1189 "tools/quic/quic_simple_server.h",
1190 "tools/quic/quic_simple_server_packet_writer.cc",
1191 "tools/quic/quic_simple_server_packet_writer.h",
jokulikc971baf92016-01-06 00:36:391192 "tools/quic/quic_simple_server_session.cc",
1193 "tools/quic/quic_simple_server_session.h",
mpwb5c8da92016-06-05 20:07:311194 "tools/quic/quic_simple_server_session_helper.cc",
1195 "tools/quic/quic_simple_server_session_helper.h",
danzhb7551342015-12-18 02:06:401196 "tools/quic/quic_simple_server_stream.cc",
1197 "tools/quic/quic_simple_server_stream.h",
rched113b22015-03-26 04:54:051198 "tools/quic/quic_spdy_client_stream.cc",
1199 "tools/quic/quic_spdy_client_stream.h",
rch0e945472015-03-26 15:19:211200 "tools/quic/quic_time_wait_list_manager.cc",
1201 "tools/quic/quic_time_wait_list_manager.h",
jrid04ea362016-06-23 03:07:371202 "tools/quic/stateless_rejector.cc",
1203 "tools/quic/stateless_rejector.h",
rchda78df5a2015-03-22 05:16:371204 "tools/quic/synchronous_host_resolver.cc",
1205 "tools/quic/synchronous_host_resolver.h",
rcha9d12ce12015-03-19 23:06:491206 ]
1207 deps = [
tfarina8ac4d17f2015-12-16 02:11:111208 ":balsa",
rcha9d12ce12015-03-19 23:06:491209 ":net",
1210 "//base",
rch47ad01f2015-03-20 21:17:231211 "//base/third_party/dynamic_annotations",
1212 "//url",
1213 ]
1214}
1215
ricea7afa5232015-12-01 20:55:231216action_foreach("stale_while_revalidate_experiment_domains_dafsa") {
1217 script = "//net/tools/dafsa/make_dafsa.py"
1218 sources = [
1219 "base/stale_while_revalidate_experiment_domains.gperf",
1220 ]
1221 outputs = [
1222 "${target_gen_dir}/base/{{source_name_part}}-inc.cc",
1223 ]
1224 args = [
1225 "{{source}}",
1226 rebase_path("${target_gen_dir}/base/{{source_name_part}}-inc.cc",
1227 root_build_dir),
1228 ]
1229}
1230
1231source_set("stale_while_revalidate_experiment_domains") {
1232 sources = [
1233 "base/stale_while_revalidate_experiment_domains.cc",
1234 "base/stale_while_revalidate_experiment_domains.h",
1235 ]
1236 deps = [
1237 ":net",
1238 ":stale_while_revalidate_experiment_domains_dafsa",
1239 "//base",
1240 ]
kapishnikovabe280e2016-04-14 19:07:161241 configs += net_configs
ricea7afa5232015-12-01 20:55:231242}
1243
sherouk51b4b098b2015-08-10 09:00:431244if (!is_ios) {
1245 executable("quic_client") {
1246 sources = [
1247 "tools/quic/quic_simple_client_bin.cc",
1248 ]
1249 deps = [
1250 ":net",
1251 ":simple_quic_tools",
1252 "//base",
brettwba7a73d2015-08-31 22:17:391253 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:071254 "//build/win:default_exe_manifest",
sherouk51b4b098b2015-08-10 09:00:431255 "//url",
1256 ]
1257 }
1258 executable("quic_server") {
1259 sources = [
1260 "tools/quic/quic_simple_server_bin.cc",
1261 ]
1262 deps = [
1263 ":net",
1264 ":simple_quic_tools",
1265 "//base",
brettwba7a73d2015-08-31 22:17:391266 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:071267 "//build/win:default_exe_manifest",
sherouk51b4b098b2015-08-10 09:00:431268 "//third_party/boringssl",
1269 "//third_party/protobuf:protobuf_lite",
1270 ]
1271 }
rchf80f62d12016-05-11 00:47:311272 executable("quic_packet_printer") {
1273 sources = [
1274 "tools/quic/quic_packet_printer_bin.cc",
1275 ]
1276 deps = [
1277 ":net",
1278 ":simple_quic_tools",
1279 "//base",
1280 "//build/config/sanitizers:deps",
1281 "//build/win:default_exe_manifest",
1282 "//third_party/boringssl",
1283 "//third_party/protobuf:protobuf_lite",
1284 ]
1285 }
mpwbbea85d2016-08-27 14:39:211286 executable("quic_reject_reason_decoder") {
1287 sources = [
1288 "tools/quic/quic_reject_reason_decoder_bin.cc",
1289 ]
1290 deps = [
1291 ":net",
1292 ":simple_quic_tools",
1293 "//base",
1294 "//build/config/sanitizers:deps",
1295 "//build/win:default_exe_manifest",
1296 "//third_party/boringssl",
1297 "//third_party/protobuf:protobuf_lite",
1298 ]
1299 }
danzh1401f0a2016-05-19 13:41:101300 executable("crypto_message_printer") {
1301 sources = [
1302 "tools/quic/crypto_message_printer_bin.cc",
1303 ]
1304 deps = [
1305 ":net",
1306 "//base",
1307 "//build/config/sanitizers:deps",
1308 "//build/win:default_exe_manifest",
1309 ]
1310 }
rch216445c2015-03-27 00:23:281311}
1312
sdefresneb0a31642016-03-18 11:04:451313bundle_data("net_unittests_bundle_data") {
1314 testonly = true
sdefresne04f91142016-04-21 08:41:591315 sources = gypi_values.net_unittests_data_sources
sdefresneb0a31642016-03-18 11:04:451316 outputs = [
1317 "{{bundle_resources_dir}}/" +
1318 "{{source_root_relative_dir}}/{{source_file_part}}",
1319 ]
1320}
1321
dpranke64df2832015-07-31 22:33:361322test("net_unittests") {
1323 sources = gypi_values.net_test_sources
1324
1325 configs += [
1326 "//build/config:precompiled_headers",
1327
1328 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1329 "//build/config/compiler:no_size_t_to_int_warning",
1330 ]
1331 defines = []
1332
1333 deps = [
1334 ":balsa",
1335 ":extras",
dpranke64df2832015-07-31 22:33:361336 ":net",
1337 ":simple_quic_tools",
ricea7afa5232015-12-01 20:55:231338 ":stale_while_revalidate_experiment_domains",
dpranke64df2832015-07-31 22:33:361339 ":test_support",
1340 "//base",
1341 "//base:i18n",
dpranke64df2832015-07-31 22:33:361342 "//base/third_party/dynamic_annotations",
1343 "//crypto",
1344 "//crypto:platform",
1345 "//crypto:test_support",
dpranke64df2832015-07-31 22:33:361346 "//net/base/registry_controlled_domains",
1347 "//sql",
1348 "//testing/gmock",
1349 "//testing/gtest",
1350 "//third_party/zlib",
1351 "//url",
kapishnikovabe280e2016-04-14 19:07:161352 "//url:url_features",
dpranke64df2832015-07-31 22:33:361353 ]
1354
jbudorick944eb922016-06-20 15:38:301355 data = []
svaldez2135be52016-04-20 16:34:531356 data_deps = [
1357 "third_party/nist-pkits/",
1358 ]
dpranke64df2832015-07-31 22:33:361359
1360 if (is_linux || is_mac || is_win) {
1361 deps += [
1362 "//third_party/pyftpdlib/",
1363 "//third_party/pywebsocket/",
1364 "//third_party/tlslite/",
1365 ]
mattm6586b432016-02-12 04:52:391366 data_deps += [
dpranke64df2832015-07-31 22:33:361367 "//third_party/pyftpdlib/",
1368 "//third_party/pywebsocket/",
1369 "//third_party/tlslite/",
1370 ]
1371 data += [
1372 "tools/testserver/",
1373 "//third_party/pyftpdlib/",
1374 "//third_party/pywebsocket/",
1375 "//third_party/tlslite/",
1376 "$root_out_dir/pyproto/google/",
dprankef497c7962015-07-31 19:46:231377 ]
1378 }
1379
dpranke64df2832015-07-31 22:33:361380 if (is_desktop_linux) {
1381 deps += [ ":epoll_quic_tools" ]
1382 }
1383 if (is_linux) {
1384 sources += gypi_values.net_linux_test_sources
1385 deps += [
1386 ":epoll_quic_tools",
1387 ":epoll_server",
brettwbc8b2a22015-07-28 18:24:421388 ]
dpranke64df2832015-07-31 22:33:361389 }
[email protected]8a3f8242014-06-05 18:05:121390
dpranke64df2832015-07-31 22:33:361391 if (is_mac || is_ios) {
1392 sources += gypi_values.net_base_test_mac_ios_sources
1393 }
1394
mattmaf868e72016-09-23 23:25:201395 if (is_mac) {
1396 libs = [ "Security.framework" ]
1397 }
1398
dpranke64df2832015-07-31 22:33:361399 if (is_chromeos) {
1400 sources -= [ "proxy/proxy_config_service_linux_unittest.cc" ]
1401 }
1402
1403 if (v8_use_external_startup_data) {
1404 deps += [ "//gin" ]
1405 }
1406
1407 if (!use_nss_certs) {
1408 sources -= [
mattm9c63d442016-09-03 00:45:511409 "cert/internal/trust_store_nss_unittest.cc",
dpranke64df2832015-07-31 22:33:361410 "cert/nss_cert_database_unittest.cc",
1411 "ssl/client_cert_store_nss_unittest.cc",
[email protected]8a3f8242014-06-05 18:05:121412 ]
dpranke64df2832015-07-31 22:33:361413 if (is_chromeos) { # Already removed for all non-ChromeOS builds.
davidben2bcbc6b2015-04-22 02:36:411414 sources -= [
dpranke64df2832015-07-31 22:33:361415 "cert/nss_cert_database_chromeos_unittest.cc",
1416 "cert/nss_profile_filter_chromeos_unittest.cc",
davidben2bcbc6b2015-04-22 02:36:411417 ]
brettw43ae0e12015-07-14 22:12:361418 }
[email protected]8a3f8242014-06-05 18:05:121419 }
dpranke64df2832015-07-31 22:33:361420
dpranke64df2832015-07-31 22:33:361421 if (use_kerberos) {
1422 defines += [ "USE_KERBEROS" ]
1423 }
1424
1425 # These are excluded on Android, because the actual Kerberos support, which
1426 # these test, is in a separate app on Android.
1427 if (!use_kerberos || is_android) {
1428 sources -= [
1429 "http/http_auth_gssapi_posix_unittest.cc",
1430 "http/mock_gssapi_library_posix.cc",
1431 "http/mock_gssapi_library_posix.h",
1432 ]
1433 }
1434 if (!use_kerberos) {
1435 sources -= [ "http/http_auth_handler_negotiate_unittest.cc" ]
1436 }
1437
svaldez2135be52016-04-20 16:34:531438 if (!use_nss_certs) {
svaldeza1714ab2016-03-18 20:47:531439 # Only include this test when using NSS for cert verification.
dpranke64df2832015-07-31 22:33:361440 sources -= [ "cert_net/nss_ocsp_unittest.cc" ]
1441 }
1442
1443 if (!use_openssl_certs) {
1444 sources -= [ "ssl/openssl_client_key_store_unittest.cc" ]
1445 }
1446
jbudorick1273a842016-04-01 19:50:051447 if (enable_websockets) {
1448 sources += gypi_values.net_websockets_test_sources
1449 deps += [ ":http_server" ]
dpranke64df2832015-07-31 22:33:361450 }
1451
1452 if (disable_file_support) {
1453 sources -= [
1454 "base/directory_lister_unittest.cc",
Thiago Farinad673bb122016-01-06 23:18:161455 "base/directory_listing_unittest.cc",
shahriar.rostamia8c06daf2016-02-12 00:07:041456 "url_request/url_request_file_dir_job_unittest.cc",
dpranke64df2832015-07-31 22:33:361457 "url_request/url_request_file_job_unittest.cc",
1458 ]
1459 }
1460
1461 if (disable_ftp_support) {
1462 sources -= [
1463 "ftp/ftp_auth_cache_unittest.cc",
1464 "ftp/ftp_ctrl_response_buffer_unittest.cc",
1465 "ftp/ftp_directory_listing_parser_ls_unittest.cc",
dpranke64df2832015-07-31 22:33:361466 "ftp/ftp_directory_listing_parser_unittest.cc",
1467 "ftp/ftp_directory_listing_parser_unittest.h",
1468 "ftp/ftp_directory_listing_parser_vms_unittest.cc",
1469 "ftp/ftp_directory_listing_parser_windows_unittest.cc",
1470 "ftp/ftp_network_transaction_unittest.cc",
1471 "ftp/ftp_util_unittest.cc",
1472 "url_request/url_request_ftp_job_unittest.cc",
1473 ]
1474 }
1475
1476 if (!enable_built_in_dns) {
1477 sources -= [
1478 "dns/address_sorter_posix_unittest.cc",
1479 "dns/address_sorter_unittest.cc",
1480 ]
1481 }
1482
xunjieli905496a2015-08-31 15:51:171483 if (use_v8_in_net) {
dpranke64df2832015-07-31 22:33:361484 deps += [ ":net_with_v8" ]
1485 } else {
1486 sources -= [
1487 "proxy/proxy_resolver_v8_tracing_unittest.cc",
1488 "proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc",
1489 "proxy/proxy_resolver_v8_unittest.cc",
1490 ]
1491 }
1492
1493 if (use_v8_in_net && !is_android) {
1494 deps += [
1495 ":net_browser_services",
1496 ":net_utility_services",
rockotc637caf9b2016-02-10 09:57:081497 "//mojo/edk/system",
dpranke64df2832015-07-31 22:33:361498 ]
1499 } else {
1500 sources -= [
1501 "dns/host_resolver_mojo_unittest.cc",
1502 "dns/mojo_host_resolver_impl_unittest.cc",
1503 "proxy/mojo_proxy_resolver_factory_impl_unittest.cc",
1504 "proxy/mojo_proxy_resolver_impl_unittest.cc",
1505 "proxy/mojo_proxy_resolver_v8_tracing_bindings_unittest.cc",
1506 "proxy/proxy_resolver_factory_mojo_unittest.cc",
1507 "proxy/proxy_service_mojo_unittest.cc",
1508 ]
1509 }
1510
1511 if (!enable_mdns) {
1512 sources -= [
1513 "dns/mdns_cache_unittest.cc",
1514 "dns/mdns_client_unittest.cc",
dpranke64df2832015-07-31 22:33:361515 ]
1516 }
1517
1518 if (is_ios) {
dpranke64df2832015-07-31 22:33:361519 sources -= [
1520 # TODO(droger): The following tests are disabled because the
1521 # implementation is missing or incomplete.
1522 # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS.
1523 "base/keygen_handler_unittest.cc",
1524 "disk_cache/backend_unittest.cc",
1525 "disk_cache/blockfile/block_files_unittest.cc",
1526
1527 # Need to read input data files.
1528 "filter/gzip_filter_unittest.cc",
1529 "socket/ssl_server_socket_unittest.cc",
1530 "spdy/fuzzing/hpack_fuzz_util_test.cc",
1531
1532 # Need TestServer.
1533 "cert_net/cert_net_fetcher_impl_unittest.cc",
1534 "proxy/proxy_script_fetcher_impl_unittest.cc",
1535 "socket/ssl_client_socket_unittest.cc",
1536 "url_request/url_fetcher_impl_unittest.cc",
1537 "url_request/url_request_context_builder_unittest.cc",
1538
1539 # Needs GetAppOutput().
1540 "test/python_utils_unittest.cc",
1541
1542 # The following tests are disabled because they don't apply to
1543 # iOS.
1544 # OS is not "linux" or "freebsd" or "openbsd".
1545 "socket/unix_domain_client_socket_posix_unittest.cc",
1546 "socket/unix_domain_server_socket_posix_unittest.cc",
dpranke64df2832015-07-31 22:33:361547 ]
rsesek7d4ab4bc2016-07-22 17:35:131548
1549 bundle_deps = [ ":net_unittests_bundle_data" ]
dpranke64df2832015-07-31 22:33:361550 }
1551
kapishnikovabe280e2016-04-14 19:07:161552 # Unit tests that aren't supported by the current ICU alternatives on Android.
1553 if (is_android && use_platform_icu_alternatives) {
1554 sources -= [
1555 "base/filename_util_unittest.cc",
1556 "base/url_util_unittest.cc",
1557 "cert/x509_certificate_unittest.cc",
1558 "proxy/proxy_resolver_v8_unittest.cc",
1559 "url_request/url_request_job_unittest.cc",
1560 ]
1561 }
1562
1563 # Unit tests that are not supported by the current ICU alternatives on iOS.
1564 if (is_ios && use_platform_icu_alternatives) {
1565 sources -= [
1566 "base/filename_util_unittest.cc",
1567 "base/url_util_unittest.cc",
1568 "cert/x509_certificate_unittest.cc",
1569 "http/http_auth_handler_basic_unittest.cc",
1570 "http/http_auth_handler_digest_unittest.cc",
1571 "http/http_auth_handler_factory_unittest.cc",
1572 "http/http_auth_unittest.cc",
1573 "http/http_content_disposition_unittest.cc",
1574 "http/http_network_transaction_unittest.cc",
1575 "http/http_proxy_client_socket_pool_unittest.cc",
1576 "socket/ssl_client_socket_pool_unittest.cc",
1577 "spdy/spdy_network_transaction_unittest.cc",
1578 "spdy/spdy_proxy_client_socket_unittest.cc",
1579 "url_request/url_request_job_unittest.cc",
1580 "url_request/url_request_unittest.cc",
1581 ]
1582 }
1583
1584 # Exclude brotli test if the support for brotli is disabled.
1585 # Also, exclude the test from iOS for now (needs to read input data files).
1586 if (disable_brotli_filter || is_ios) {
1587 sources -= [ "filter/brotli_filter_unittest.cc" ]
xunjieli084a9292016-09-23 18:15:041588 sources -= [ "filter/brotli_source_stream_unittest.cc" ]
kapishnikovabe280e2016-04-14 19:07:161589 }
1590
dpranke64df2832015-07-31 22:33:361591 if (is_android) {
agrieve732db3a2016-04-26 19:18:191592 data_deps += [ "//net/tools/testserver:testserver_py" ]
agrieve97176362015-12-01 16:36:191593 deps += [
1594 ":net_test_jni_headers",
agrievea5517aa2015-10-23 03:03:451595 "//base:base_java_unittest_support",
1596 "//net/android:net_java",
agrievea5517aa2015-10-23 03:03:451597 "//net/android:net_java_test_support",
agrieve97176362015-12-01 16:36:191598 "//net/android:net_javatests",
agrievea5517aa2015-10-23 03:03:451599 "//net/android:net_unittests_apk_resources",
agrieve97176362015-12-01 16:36:191600
1601 # TODO(mmenke): This depends on test_support_base, which depends on
1602 # icu. Figure out a way to remove that dependency.
1603 "//testing/android/native_test:native_test_native_code",
pkotwicz8c7027d2015-11-11 06:30:071604 "//v8:v8_external_startup_data_assets",
agrievea5517aa2015-10-23 03:03:451605 ]
1606 android_manifest = "//net/android/unittest_support/AndroidManifest.xml"
dpranke64df2832015-07-31 22:33:361607 set_sources_assignment_filter([])
1608 sources += [ "base/address_tracker_linux_unittest.cc" ]
1609 set_sources_assignment_filter(sources_assignment_filter)
agrieve3ac557f02016-04-12 15:52:001610 shard_timeout = 300
dpranke64df2832015-07-31 22:33:361611 }
1612
dpranke64df2832015-07-31 22:33:361613 # Symbols for crashes when running tests on swarming.
1614 if (symbol_level > 0) {
1615 if (is_win) {
1616 data += [ "$root_out_dir/net_unittests.exe.pdb" ]
1617 } else if (is_mac) {
dprankede2945b82016-04-15 22:14:131618 # TODO(crbug.com/330301): make this conditional on mac_strip_release.
1619 # data += [ "$root_out_dir/net_unittests.dSYM/" ]
dpranke64df2832015-07-31 22:33:361620 }
1621 }
maksim.sisovc69619d2016-05-20 19:23:551622
1623 if (is_win) {
mmenke91c17162016-06-02 16:03:231624 libs = [ "iphlpapi.lib" ]
maksim.sisovc69619d2016-05-20 19:23:551625 }
dpranke64df2832015-07-31 22:33:361626}
1627
1628# !is_android && !is_win && !is_mac
sdefresne3001f172016-03-16 10:30:031629if (!is_ios) {
1630 # TODO(crbug.com/594965): this should be converted to "app" template and
1631 # enabled on iOS too.
1632 executable("net_perftests") {
1633 testonly = true
1634 sources = [
1635 "base/mime_sniffer_perftest.cc",
1636 "cookies/cookie_monster_perftest.cc",
gavinpc28fe1122016-05-13 17:49:051637 "disk_cache/disk_cache_perftest.cc",
sdefresne3001f172016-03-16 10:30:031638 "extras/sqlite/sqlite_persistent_cookie_store_perftest.cc",
1639 "proxy/proxy_resolver_perftest.cc",
1640 "udp/udp_socket_perftest.cc",
1641 ]
[email protected]8a3f8242014-06-05 18:05:121642
sdefresne3001f172016-03-16 10:30:031643 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1644 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
1645 deps = [
1646 ":extras",
1647 ":net",
1648 ":test_support",
1649 "//base",
1650 "//base:i18n",
1651 "//base/test:test_support_perf",
1652 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:071653 "//build/win:default_exe_manifest",
sdefresne3001f172016-03-16 10:30:031654 "//testing/gtest",
1655 "//url",
1656 ]
rockot9c67e5f2015-03-12 20:01:211657
sdefresne3001f172016-03-16 10:30:031658 if (enable_websockets) {
1659 sources += [ "websockets/websocket_frame_perftest.cc" ]
1660 }
rockot9c67e5f2015-03-12 20:01:211661
sdefresne3001f172016-03-16 10:30:031662 if (use_v8_in_net) {
1663 deps += [ ":net_with_v8" ]
1664 } else {
1665 sources -= [ "proxy/proxy_resolver_perftest.cc" ]
1666 }
rockot9c67e5f2015-03-12 20:01:211667 }
rockot9c67e5f2015-03-12 20:01:211668}
mefff34b822016-01-11 15:28:081669
eromanfe8659e2016-03-02 23:47:021670# Fuzzers
1671
mmenke35a30012016-07-15 19:20:121672# This has a global (InitGlobals) that must always be linked in, so
1673# must be a source set instead of a static library.
1674source_set("net_fuzzer_test_support") {
eroman02b4fe562016-03-04 12:15:161675 testonly = true
1676
1677 sources = [
csharrison37ef9852016-08-23 19:00:191678 "base/fuzzer_test_support.cc",
mmenke99b57172016-04-14 20:44:331679 "socket/fuzzed_socket.cc",
1680 "socket/fuzzed_socket.h",
mmenkec951d412016-04-28 19:05:221681 "socket/fuzzed_socket_factory.cc",
1682 "socket/fuzzed_socket_factory.h",
mmenke91c17162016-06-02 16:03:231683 "udp/fuzzed_datagram_client_socket.cc",
1684 "udp/fuzzed_datagram_client_socket.h",
eroman02b4fe562016-03-04 12:15:161685 ]
csharrisonf30fc95f2016-08-19 21:43:441686 public_deps = [
1687 "//base/test:test_support",
1688 ]
eroman02b4fe562016-03-04 12:15:161689 deps = [
1690 "//base",
1691 "//base:i18n",
mmenke99b57172016-04-14 20:44:331692 "//net",
eroman02b4fe562016-03-04 12:15:161693 ]
1694}
1695
csharrisonaa314dc2016-04-29 20:15:371696fuzzer_test("net_data_job_fuzzer") {
1697 sources = [
1698 "url_request/url_request_data_job_fuzzer.cc",
1699 ]
1700 deps = [
1701 ":net_fuzzer_test_support",
1702 ":test_support",
1703 "//base",
1704 "//net",
1705 ]
1706}
1707
mmenke5552a6a2016-03-28 23:11:591708fuzzer_test("net_mime_sniffer_fuzzer") {
1709 sources = [
1710 "base/mime_sniffer_fuzzer.cc",
1711 ]
1712 deps = [
1713 ":net_fuzzer_test_support",
1714 "//base",
1715 "//net",
1716 ]
mmoroz4a561d32016-07-07 17:45:121717 dict = "data/fuzzer_dictionaries/net_mime_sniffer_fuzzer.dict"
mmenke5552a6a2016-03-28 23:11:591718}
1719
mmoroz565e8df22016-03-04 18:17:201720fuzzer_test("net_parse_proxy_list_pac_fuzzer") {
eromane6264fd2016-03-02 22:46:301721 sources = [
1722 "proxy/parse_proxy_list_pac_fuzzer.cc",
1723 ]
1724 deps = [
eroman02b4fe562016-03-04 12:15:161725 ":net_fuzzer_test_support",
eromane6264fd2016-03-02 22:46:301726 "//net",
1727 ]
1728}
1729
mmoroz565e8df22016-03-04 18:17:201730fuzzer_test("net_parse_proxy_list_fuzzer") {
eromane6264fd2016-03-02 22:46:301731 sources = [
1732 "proxy/parse_proxy_list_fuzzer.cc",
1733 ]
1734 deps = [
eroman02b4fe562016-03-04 12:15:161735 ":net_fuzzer_test_support",
eromane6264fd2016-03-02 22:46:301736 "//net",
1737 ]
1738}
1739
mmoroz565e8df22016-03-04 18:17:201740fuzzer_test("net_parse_proxy_bypass_rules_fuzzer") {
eromane6264fd2016-03-02 22:46:301741 sources = [
1742 "proxy/parse_proxy_bypass_rules_fuzzer.cc",
1743 ]
1744 deps = [
eroman02b4fe562016-03-04 12:15:161745 ":net_fuzzer_test_support",
eromane6264fd2016-03-02 22:46:301746 "//net",
1747 ]
1748}
1749
mmoroz565e8df22016-03-04 18:17:201750fuzzer_test("net_parse_proxy_rules_fuzzer") {
eromane6264fd2016-03-02 22:46:301751 sources = [
1752 "proxy/parse_proxy_rules_fuzzer.cc",
1753 ]
1754 deps = [
eroman02b4fe562016-03-04 12:15:161755 ":net_fuzzer_test_support",
eromane6264fd2016-03-02 22:46:301756 "//net",
1757 ]
metzman31db75e2016-08-03 22:33:271758 dict = "data/fuzzer_dictionaries/net_parse_proxy_bypass_rules_fuzzer.dict"
eromane6264fd2016-03-02 22:46:301759}
1760
mmoroz565e8df22016-03-04 18:17:201761fuzzer_test("net_parse_data_url_fuzzer") {
eromane6264fd2016-03-02 22:46:301762 sources = [
1763 "base/parse_data_url_fuzzer.cc",
1764 ]
1765 deps = [
eroman02b4fe562016-03-04 12:15:161766 ":net_fuzzer_test_support",
eromane6264fd2016-03-02 22:46:301767 "//base",
1768 "//net",
1769 ]
mmoroz4a561d32016-07-07 17:45:121770 dict = "data/fuzzer_dictionaries/net_parse_data_url_fuzzer.dict"
eromane6264fd2016-03-02 22:46:301771}
1772
mmoroz565e8df22016-03-04 18:17:201773fuzzer_test("net_parse_ip_pattern_fuzzer") {
eromane6264fd2016-03-02 22:46:301774 sources = [
1775 "base/parse_ip_pattern_fuzzer.cc",
1776 ]
1777 deps = [
eroman02b4fe562016-03-04 12:15:161778 ":net_fuzzer_test_support",
eromane6264fd2016-03-02 22:46:301779 "//net",
1780 ]
1781}
1782
mmoroz565e8df22016-03-04 18:17:201783fuzzer_test("net_get_domain_and_registry_fuzzer") {
eromane6264fd2016-03-02 22:46:301784 sources = [
1785 "base/registry_controlled_domains/get_domain_and_registry_fuzzer.cc",
1786 ]
1787 deps = [
eroman02b4fe562016-03-04 12:15:161788 ":net_fuzzer_test_support",
eromane6264fd2016-03-02 22:46:301789 "//base",
eromane6264fd2016-03-02 22:46:301790 "//net",
1791 ]
mmoroz4a561d32016-07-07 17:45:121792 dict = "data/fuzzer_dictionaries/net_get_domain_and_registry_fuzzer.dict"
eromane6264fd2016-03-02 22:46:301793}
1794
mattmafe43b82016-04-28 20:40:541795fuzzer_test("net_cert_verify_name_match_fuzzer") {
1796 sources = [
1797 "cert/internal/verify_name_match_fuzzer.cc",
1798 ]
1799 deps = [
1800 ":net_fuzzer_test_support",
1801 "//base",
1802 "//net",
1803 ]
1804}
1805
mattm2c637da42016-04-28 02:55:591806fuzzer_test("net_cert_normalize_name_fuzzer") {
1807 sources = [
1808 "cert/internal/verify_name_match_normalizename_fuzzer.cc",
1809 ]
1810 deps = [
1811 "//base",
1812 "//net",
1813 ]
1814}
1815
mattmafe43b82016-04-28 20:40:541816fuzzer_test("net_cert_verify_name_in_subtree_fuzzer") {
1817 sources = [
1818 "cert/internal/verify_name_match_verifynameinsubtree_fuzzer.cc",
1819 ]
1820 deps = [
1821 ":net_fuzzer_test_support",
1822 "//base",
1823 "//net",
1824 ]
1825}
1826
nharper85d3b6f2016-04-28 20:58:191827fuzzer_test("net_cert_parse_certificate_fuzzer") {
1828 sources = [
1829 "cert/internal/parse_certificate_fuzzer.cc",
1830 ]
1831 deps = [
1832 "//base",
1833 "//net",
1834 ]
1835}
1836
mmoroz565e8df22016-03-04 18:17:201837fuzzer_test("net_parse_cookie_line_fuzzer") {
eromane6264fd2016-03-02 22:46:301838 sources = [
1839 "cookies/parse_cookie_line_fuzzer.cc",
1840 ]
1841 deps = [
eroman02b4fe562016-03-04 12:15:161842 ":net_fuzzer_test_support",
eromane6264fd2016-03-02 22:46:301843 "//net",
1844 ]
1845}
1846
mmoroz565e8df22016-03-04 18:17:201847fuzzer_test("net_dns_record_fuzzer") {
eromanfe8659e2016-03-02 23:47:021848 sources = [
1849 "dns/dns_record_fuzzer.cc",
1850 ]
1851 deps = [
eroman02b4fe562016-03-04 12:15:161852 ":net_fuzzer_test_support",
eromanfe8659e2016-03-02 23:47:021853 "//base",
1854 "//net",
1855 ]
mmoroz4a561d32016-07-07 17:45:121856 dict = "data/fuzzer_dictionaries/net_dns_record_fuzzer.dict"
eromanfe8659e2016-03-02 23:47:021857}
1858
zhongyi273af9f2016-04-28 18:46:341859fuzzer_test("net_dns_hosts_parse_fuzzer") {
1860 sources = [
1861 "dns/dns_hosts_parse_fuzzer.cc",
1862 ]
1863 deps = [
1864 ":net_fuzzer_test_support",
1865 "//base",
1866 "//net",
1867 ]
mmoroz4a561d32016-07-07 17:45:121868 dict = "data/fuzzer_dictionaries/net_dns_hosts_parse_fuzzer.dict"
zhongyi273af9f2016-04-28 18:46:341869}
1870
mmenke91c17162016-06-02 16:03:231871fuzzer_test("net_host_resolver_impl_fuzzer") {
1872 sources = [
1873 "dns/fuzzed_host_resolver.cc",
1874 "dns/fuzzed_host_resolver.h",
1875 "dns/host_resolver_impl_fuzzer.cc",
1876 ]
1877 deps = [
1878 ":net_fuzzer_test_support",
1879 ":test_support",
1880 "//base",
1881 "//net",
1882 ]
mmoroz4a561d32016-07-07 17:45:121883 dict = "data/fuzzer_dictionaries/net_host_resolver_impl_fuzzer.dict"
mmenke91c17162016-06-02 16:03:231884}
1885
mmenke44e8e9c2016-03-29 18:38:571886fuzzer_test("net_http_stream_parser_fuzzer") {
1887 sources = [
1888 "http/http_stream_parser_fuzzer.cc",
1889 ]
1890 deps = [
1891 ":net_fuzzer_test_support",
1892 ":test_support",
1893 "//base",
1894 "//net",
1895 ]
mmoroz4a561d32016-07-07 17:45:121896 dict = "data/fuzzer_dictionaries/net_http_stream_parser_fuzzer.dict"
mmenke44e8e9c2016-03-29 18:38:571897}
1898
mmoroz565e8df22016-03-04 18:17:201899fuzzer_test("net_ftp_ctrl_response_fuzzer") {
eromanfe8659e2016-03-02 23:47:021900 sources = [
1901 "ftp/ftp_ctrl_response_fuzzer.cc",
1902 ]
1903 deps = [
eroman02b4fe562016-03-04 12:15:161904 ":net_fuzzer_test_support",
eromanfe8659e2016-03-02 23:47:021905 "//base",
1906 "//net",
1907 ]
1908}
1909
mmoroz565e8df22016-03-04 18:17:201910fuzzer_test("net_ftp_directory_listing_fuzzer") {
eromanfe8659e2016-03-02 23:47:021911 sources = [
1912 "ftp/ftp_directory_listing_fuzzer.cc",
1913 ]
1914 deps = [
eroman02b4fe562016-03-04 12:15:161915 ":net_fuzzer_test_support",
eromanfe8659e2016-03-02 23:47:021916 "//base",
eromanfe8659e2016-03-02 23:47:021917 "//net",
1918 ]
1919}
1920
mmoroz565e8df22016-03-04 18:17:201921fuzzer_test("net_unescape_url_component_fuzzer") {
eromanfe8659e2016-03-02 23:47:021922 sources = [
1923 "base/unescape_url_component_fuzzer.cc",
1924 ]
1925 deps = [
eroman02b4fe562016-03-04 12:15:161926 ":net_fuzzer_test_support",
eromanfe8659e2016-03-02 23:47:021927 "//base",
1928 "//net",
1929 ]
mmoroz34eb0082016-03-11 14:32:011930 dict = "base/unescape_url_component_fuzzer.dict"
mmoroz062a4a62016-04-12 09:02:331931 libfuzzer_options = [ "max_len = 2048" ]
eromanfe8659e2016-03-02 23:47:021932}
1933
ricea7b870e72016-09-01 04:41:041934fuzzer_test("net_websocket_deflate_stream_fuzzer") {
1935 sources = [
1936 "websockets/websocket_deflate_stream_fuzzer.cc",
1937 ]
1938 deps = [
1939 ":net_fuzzer_test_support",
1940 "//net",
1941 ]
1942 dict = "data/fuzzer_dictionaries/net_websocket_frame_parser_fuzzer.dict"
1943 libfuzzer_options = [ "max_len=512" ]
1944}
1945
riceaf9dcc092016-09-13 12:42:001946fuzzer_test("net_websocket_extension_parser_fuzzer") {
1947 sources = [
1948 "websockets/websocket_extension_parser_fuzzer.cc",
1949 ]
1950 deps = [
1951 ":net_fuzzer_test_support",
1952 "//net",
1953 ]
1954 dict = "data/fuzzer_dictionaries/net_websocket_extension_parser_fuzzer.dict"
1955 libfuzzer_options = [ "max_len = 256" ]
1956}
1957
mmoroz565e8df22016-03-04 18:17:201958fuzzer_test("net_websocket_frame_parser_fuzzer") {
eromanfe8659e2016-03-02 23:47:021959 sources = [
1960 "websockets/websocket_frame_parser_fuzzer.cc",
1961 ]
1962 deps = [
eroman02b4fe562016-03-04 12:15:161963 ":net_fuzzer_test_support",
eromanfe8659e2016-03-02 23:47:021964 "//net",
1965 ]
mmoroz4a561d32016-07-07 17:45:121966 dict = "data/fuzzer_dictionaries/net_websocket_frame_parser_fuzzer.dict"
ricea105ae612016-09-08 08:00:071967 libfuzzer_options = [ "max_len=256" ]
eromanfe8659e2016-03-02 23:47:021968}
1969
mmoroz565e8df22016-03-04 18:17:201970fuzzer_test("net_http_chunked_decoder_fuzzer") {
eromanfe8659e2016-03-02 23:47:021971 sources = [
1972 "http/http_chunked_decoder_fuzzer.cc",
1973 ]
1974 deps = [
eroman02b4fe562016-03-04 12:15:161975 ":net_fuzzer_test_support",
eromanfe8659e2016-03-02 23:47:021976 "//net",
1977 ]
1978}
1979
mmenke8e9314bc2016-04-15 21:45:021980fuzzer_test("net_http_proxy_client_socket_fuzzer") {
1981 sources = [
1982 "http/http_proxy_client_socket_fuzzer.cc",
1983 ]
1984 deps = [
1985 ":net_fuzzer_test_support",
1986 ":test_support",
1987 "//base",
1988 "//net",
1989 ]
mmoroz4a561d32016-07-07 17:45:121990 dict = "data/fuzzer_dictionaries/net_http_proxy_client_socket_fuzzer.dict"
mmenke8e9314bc2016-04-15 21:45:021991}
1992
mmoroz9299ef9b2016-09-01 17:37:091993fuzzer_test("net_parse_url_hostname_to_address_fuzzer") {
1994 sources = [
1995 "base/parse_url_hostname_to_address_fuzzer.cc",
1996 ]
1997 deps = [
1998 ":net_fuzzer_test_support",
1999 "//base",
2000 "//net",
2001 ]
2002 libfuzzer_options = [ "max_len=512" ]
2003 seed_corpus = "data/fuzzer_data/hostnames/"
2004}
2005
mmoroz565e8df22016-03-04 18:17:202006fuzzer_test("net_quic_crypto_framer_parse_message_fuzzer") {
eromanfe8659e2016-03-02 23:47:022007 sources = [
rchd4db7c152016-07-29 21:58:122008 "quic/core/quic_crypto_framer_parse_message_fuzzer.cc",
eromanfe8659e2016-03-02 23:47:022009 ]
2010 deps = [
eroman02b4fe562016-03-04 12:15:162011 ":net_fuzzer_test_support",
eromanfe8659e2016-03-02 23:47:022012 "//base",
2013 "//net",
2014 ]
2015}
mmenke99b57172016-04-14 20:44:332016
2017fuzzer_test("net_socks_client_socket_fuzzer") {
2018 sources = [
2019 "socket/socks_client_socket_fuzzer.cc",
2020 ]
2021 deps = [
2022 ":net_fuzzer_test_support",
2023 ":test_support",
2024 "//base",
2025 "//net",
2026 ]
2027}
2028
2029fuzzer_test("net_socks5_client_socket_fuzzer") {
2030 sources = [
2031 "socket/socks5_client_socket_fuzzer.cc",
2032 ]
2033 deps = [
2034 ":net_fuzzer_test_support",
2035 ":test_support",
2036 "//base",
2037 "//net",
2038 ]
2039}
mmenkec951d412016-04-28 19:05:222040
2041fuzzer_test("net_url_request_fuzzer") {
2042 sources = [
2043 "url_request/url_request_fuzzer.cc",
2044 ]
2045 deps = [
2046 ":net_fuzzer_test_support",
2047 ":test_support",
2048 "//base",
2049 "//net",
2050 ]
mmoroz4a561d32016-07-07 17:45:122051 dict = "data/fuzzer_dictionaries/net_url_request_fuzzer.dict"
mmenkec951d412016-04-28 19:05:222052}
csharrison88d2a612016-09-09 16:58:542053
2054fuzzer_test("net_auth_challenge_tokenizer_fuzzer") {
2055 sources = [
2056 "http/http_auth_challenge_tokenizer_fuzzer.cc",
2057 ]
2058 deps = [
2059 ":net_fuzzer_test_support",
2060 ":test_support",
2061 "//base",
2062 "//net",
2063 ]
2064}