blob: 74d0c670c777f5cc5669c0288ae9cbc522bba85f [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
slan77bdc2e62015-09-21 17:56:265import("//build/config/chromecast_build.gni")
brettw4cab0f12015-09-14 21:40:016import("//build/config/compiler/compiler.gni")
[email protected]4625ade2014-04-15 19:26:447import("//build/config/crypto.gni")
8import("//build/config/features.gni")
9import("//build/config/ui.gni")
dpranked4da5ab42015-10-13 06:20:3310import("//build_overrides/v8.gni")
qsrfb5251d12015-01-21 15:57:2211import("//testing/test.gni")
rockot9c67e5f2015-03-12 20:01:2112import("//third_party/icu/config.gni")
rtennetib6f1c0d2015-04-03 17:52:0613import("//third_party/protobuf/proto_library.gni")
tfarinae597851a2015-10-06 23:14:4114import("//tools/grit/grit_rule.gni")
[email protected]26046b52014-07-16 00:11:0315
[email protected]4625ade2014-04-15 19:26:4416if (is_android) {
17 import("//build/config/android/config.gni")
[email protected]ef0eb442014-05-15 09:32:1818 import("//build/config/android/rules.gni")
[email protected]4625ade2014-04-15 19:26:4419} else if (is_mac) {
20 import("//build/config/mac/mac_sdk.gni")
21}
22
23# The list of net files is kept in net.gypi. Read it.
scottmg34fb7e52014-12-03 23:27:2424gypi_values = exec_script("//build/gypi_to_gn.py",
25 [ rebase_path("net.gypi") ],
26 "scope",
27 [ "net.gypi" ])
[email protected]4625ade2014-04-15 19:26:4428
skyostila5574572015-11-11 16:24:2529# Disable Kerberos on ChromeOS, iOS, Chromecast and headless, at least for now.
slan77bdc2e62015-09-21 17:56:2630# It needs configuration (krb5.conf and so on).
skyostila5574572015-11-11 16:24:2531use_kerberos = !is_chromeos && !is_ios && !is_chromecast && !is_headless
[email protected]4625ade2014-04-15 19:26:4432
33# 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
40# WebSockets and socket stream code are used everywhere except iOS.
41enable_websockets = !is_ios
[email protected]8a3f8242014-06-05 18:05:1242use_v8_in_net = !is_ios
[email protected]4625ade2014-04-15 19:26:4443enable_built_in_dns = !is_ios
[email protected]8a3f8242014-06-05 18:05:1244disable_ftp_support = is_ios
[email protected]4625ade2014-04-15 19:26:4445
[email protected]384dab92014-06-04 20:26:0846declare_args() {
47 # Disables support for file URLs. File URL support requires use of icu.
48 disable_file_support = false
49}
[email protected]02494ec2014-05-07 15:05:2950
[email protected]4625ade2014-04-15 19:26:4451config("net_config") {
52 defines = []
53 if (posix_avoid_mmap) {
54 defines += [ "POSIX_AVOID_MMAP" ]
55 }
[email protected]02494ec2014-05-07 15:05:2956 if (disable_file_support) {
57 defines += [ "DISABLE_FILE_SUPPORT" ]
58 }
tfarinae7c8c3c2015-11-04 15:09:5559 if (disable_ftp_support) {
60 defines += [ "DISABLE_FTP_SUPPORT=1" ]
61 }
[email protected]4625ade2014-04-15 19:26:4462}
63
xunjieli905496a2015-08-31 15:51:1764# net_internal_config is shared with net and net_small.
65config("net_internal_config") {
[email protected]8603c5de2014-04-16 20:34:3166 defines = [
ellyjonesc7a5c502015-06-26 18:55:2067 # TODO(GYP) Note that the GYP file supports linux_link_kerberos (defaults to
[email protected]8603c5de2014-04-16 20:34:3168 # 0) which implies that we run pkg_config on kerberos and link to that
69 # rather than setting this define which will dynamically open it. That
70 # doesn't seem to be set in the regular builds, so we're skipping this
71 # capability here.
72 "DLOPEN_KERBEROS",
scottmg34fb7e52014-12-03 23:27:2473 "NET_IMPLEMENTATION",
[email protected]8603c5de2014-04-16 20:34:3174 ]
dpranke43276212015-02-20 02:55:1975
[email protected]4625ade2014-04-15 19:26:4476 if (use_kerberos) {
77 defines += [ "USE_KERBEROS" ]
78 if (is_android) {
xunjieli905496a2015-08-31 15:51:1779 include_dirs = [ "/usr/include/kerberosV" ]
[email protected]4625ade2014-04-15 19:26:4480 }
[email protected]4625ade2014-04-15 19:26:4481 }
82
83 if (enable_built_in_dns) {
84 defines += [ "ENABLE_BUILT_IN_DNS" ]
xunjieli905496a2015-08-31 15:51:1785 }
86}
87
88# net_shared_* are settings shared between net and net_small
sergeyu99d83f92015-09-14 23:03:3389net_shared_sources = gypi_values.net_nacl_common_sources
xunjieli905496a2015-08-31 15:51:1790
91net_shared_unfiltered_sources = []
92
93net_shared_configs = [
94 ":net_internal_config",
95 "//build/config:precompiled_headers",
96
97 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
98 "//build/config/compiler:no_size_t_to_int_warning",
99]
100
101net_shared_public_deps = [
102 ":net_quic_proto",
103 "//crypto",
104 "//crypto:platform",
105]
106
107net_shared_deps = [
108 ":net_resources",
109 "//base",
xunjieli905496a2015-08-31 15:51:17110 "//net/base/registry_controlled_domains",
xunjieli905496a2015-08-31 15:51:17111 "//third_party/protobuf:protobuf_lite",
xunjieli905496a2015-08-31 15:51:17112]
113
sergeyu99d83f92015-09-14 23:03:33114if (!is_nacl) {
115 net_shared_sources += gypi_values.net_non_nacl_sources
xunjieli905496a2015-08-31 15:51:17116
sergeyu99d83f92015-09-14 23:03:33117 net_shared_deps += [
118 "//base:prefs",
119 "//base/third_party/dynamic_annotations",
120 "//sdch",
121 "//third_party/zlib",
122 ]
123
124 if (!use_kerberos) {
125 net_shared_sources -= [
126 "http/http_auth_gssapi_posix.cc",
127 "http/http_auth_gssapi_posix.h",
128 "http/http_auth_handler_negotiate.cc",
129 "http/http_auth_handler_negotiate.h",
130 ]
131 }
132
133 if (is_posix) {
134 if (posix_avoid_mmap) {
135 net_shared_sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ]
136 } else {
137 net_shared_sources -=
138 [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ]
139 }
140 }
141
142 if (!enable_built_in_dns) {
143 net_shared_sources -= [
144 "dns/address_sorter_posix.cc",
145 "dns/address_sorter_posix.h",
146 "dns/dns_client.cc",
147 ]
148 }
149
150 if (use_openssl) {
151 net_shared_sources -= [
152 "base/nss_memio.c",
153 "base/nss_memio.h",
154 "cert/ct_log_verifier_nss.cc",
155 "cert/ct_objects_extractor_nss.cc",
156 "cert/jwk_serializer_nss.cc",
157 "cert/scoped_nss_types.h",
158 "cert/x509_util_nss.cc",
159 "quic/crypto/aead_base_decrypter_nss.cc",
160 "quic/crypto/aead_base_encrypter_nss.cc",
161 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc",
162 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc",
163 "quic/crypto/chacha20_poly1305_decrypter_nss.cc",
164 "quic/crypto/chacha20_poly1305_encrypter_nss.cc",
165 "quic/crypto/channel_id_nss.cc",
166 "quic/crypto/p256_key_exchange_nss.cc",
167 "quic/crypto/proof_source_chromium_nss.cc",
168 "socket/nss_ssl_util.cc",
169 "socket/nss_ssl_util.h",
170 "socket/ssl_client_socket_nss.cc",
171 "socket/ssl_client_socket_nss.h",
172 "socket/ssl_server_socket_nss.cc",
173 "socket/ssl_server_socket_nss.h",
174 ]
175 if (is_ios) {
176 # Always removed for !ios below.
177 net_shared_sources -= [
178 "cert/cert_verify_proc_nss.cc",
179 "cert/cert_verify_proc_nss.h",
180 ]
181 }
sergeyu99d83f92015-09-14 23:03:33182 if (!use_nss_certs && !is_ios) {
183 net_shared_sources -= [ "cert/x509_util_nss.h" ]
184 }
[email protected]4625ade2014-04-15 19:26:44185 } else {
xunjieli905496a2015-08-31 15:51:17186 net_shared_sources -= [
sergeyu99d83f92015-09-14 23:03:33187 "cert/ct_log_verifier_openssl.cc",
188 "cert/ct_objects_extractor_openssl.cc",
189 "cert/jwk_serializer_openssl.cc",
190 "cert/x509_util_openssl.cc",
191 "cert/x509_util_openssl.h",
192 "quic/crypto/aead_base_decrypter_openssl.cc",
193 "quic/crypto/aead_base_encrypter_openssl.cc",
194 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc",
195 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc",
196 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc",
197 "quic/crypto/chacha20_poly1305_encrypter_openssl.cc",
198 "quic/crypto/channel_id_openssl.cc",
199 "quic/crypto/p256_key_exchange_openssl.cc",
200 "quic/crypto/proof_source_chromium_openssl.cc",
201 "quic/crypto/scoped_evp_aead_ctx.cc",
202 "quic/crypto/scoped_evp_aead_ctx.h",
203 "socket/ssl_client_socket_openssl.cc",
204 "socket/ssl_client_socket_openssl.h",
205 "socket/ssl_server_socket_openssl.cc",
206 "socket/ssl_server_socket_openssl.h",
207 "ssl/openssl_ssl_util.cc",
208 "ssl/openssl_ssl_util.h",
209 "ssl/ssl_client_session_cache_openssl.cc",
210 "ssl/ssl_client_session_cache_openssl.h",
davidben2a811e4e2015-12-01 10:49:34211 "ssl/ssl_key_logger.cc",
212 "ssl/ssl_key_logger.h",
sergeyu99d83f92015-09-14 23:03:33213 "ssl/ssl_platform_key.h",
svaldez7872fd02015-11-19 21:10:54214 "ssl/ssl_platform_key_task_runner.cc",
215 "ssl/ssl_platform_key_task_runner.h",
sergeyu99d83f92015-09-14 23:03:33216 "ssl/threaded_ssl_private_key.cc",
217 "ssl/threaded_ssl_private_key.h",
[email protected]4625ade2014-04-15 19:26:44218 ]
219 }
sergeyu99d83f92015-09-14 23:03:33220
221 if (!use_openssl_certs) {
xunjieli905496a2015-08-31 15:51:17222 net_shared_sources -= [
sergeyu99d83f92015-09-14 23:03:33223 "base/crypto_module_openssl.cc",
224 "base/keygen_handler_openssl.cc",
225 "base/openssl_private_key_store.h",
226 "base/openssl_private_key_store_memory.cc",
227 "cert/cert_database_openssl.cc",
228 "cert/cert_verify_proc_openssl.cc",
229 "cert/cert_verify_proc_openssl.h",
230 "cert/test_root_certs_openssl.cc",
231 "cert/x509_certificate_openssl.cc",
232 "ssl/openssl_client_key_store.cc",
233 "ssl/openssl_client_key_store.h",
xunjieli06d93982015-08-27 17:13:02234 ]
sergeyu99d83f92015-09-14 23:03:33235 if (is_android) {
236 net_shared_sources -= [ "base/openssl_private_key_store_android.cc" ]
237 }
238 } else {
239 if (is_android) {
240 # Android doesn't use these even when using OpenSSL.
241 net_shared_sources -= [
242 "base/openssl_private_key_store_memory.cc",
243 "cert/cert_database_openssl.cc",
244 "cert/cert_verify_proc_openssl.cc",
245 "cert/test_root_certs_openssl.cc",
agrievea5517aa2015-10-23 03:03:45246 "http/http_auth_gssapi_posix.cc",
247 "http/http_auth_gssapi_posix.h",
sergeyu99d83f92015-09-14 23:03:33248 ]
249 }
[email protected]4625ade2014-04-15 19:26:44250 }
sergeyu99d83f92015-09-14 23:03:33251
mostynbbf5e6cc2015-10-21 07:53:31252 if (use_glib && use_gconf && !is_chromeos) {
sergeyu99d83f92015-09-14 23:03:33253 net_shared_configs += [ "//build/config/linux:gconf" ]
254 net_shared_deps += [ "//build/linux:gio" ]
255 }
256
257 if (is_linux) {
258 net_shared_configs += [ "//build/config/linux:libresolv" ]
259 }
260
261 if (!use_nss_certs) {
262 net_shared_sources -= [
263 "base/crypto_module_nss.cc",
264 "base/keygen_handler_nss.cc",
265 "cert/cert_database_nss.cc",
266 "cert/nss_cert_database.cc",
267 "cert/nss_cert_database.h",
268 "cert/x509_certificate_nss.cc",
269 "ssl/client_cert_store_nss.cc",
270 "ssl/client_cert_store_nss.h",
271 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
272 "third_party/mozilla_security_manager/nsKeygenHandler.h",
273 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
274 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
275 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
276 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
277 ]
278 if (!is_ios) {
279 # These files are part of the partial implementation of NSS on iOS so
280 # keep them in that case (even though use_nss_certs is not set).
281 net_shared_sources -= [
282 "cert/cert_verify_proc_nss.cc",
283 "cert/cert_verify_proc_nss.h",
284 "cert/test_root_certs_nss.cc",
285 "cert/x509_util_nss_certs.cc",
286 "cert_net/nss_ocsp.cc",
287 "cert_net/nss_ocsp.h",
288 ]
289 }
290 if (is_chromeos) {
291 # These were already removed on non-ChromeOS.
292 net_shared_sources -= [
293 "cert/nss_cert_database_chromeos.cc",
294 "cert/nss_cert_database_chromeos.h",
295 "cert/nss_profile_filter_chromeos.cc",
296 "cert/nss_profile_filter_chromeos.h",
297 ]
298 }
xunjieli905496a2015-08-31 15:51:17299 net_shared_sources -= [
pneubeckabe6e9d12015-08-26 08:47:11300 "ssl/client_key_store.cc",
301 "ssl/client_key_store.h",
302 "ssl/ssl_platform_key_nss.cc",
303 ]
sergeyu99d83f92015-09-14 23:03:33304 } else if (use_openssl) {
305 # client_cert_store_nss.c requires NSS_CmpCertChainWCANames from NSS's
306 # libssl, but our bundled copy is not built in OpenSSL ports. Pull that file
307 # in directly.
308 net_shared_sources += [ "third_party/nss/ssl/cmpcert.c" ]
[email protected]4625ade2014-04-15 19:26:44309 }
310
sergeyu99d83f92015-09-14 23:03:33311 if (!enable_mdns) {
312 net_shared_sources -= [
313 "dns/mdns_cache.cc",
314 "dns/mdns_cache.h",
315 "dns/mdns_client.cc",
316 "dns/mdns_client.h",
317 "dns/mdns_client_impl.cc",
318 "dns/mdns_client_impl.h",
319 "dns/record_parsed.cc",
320 "dns/record_parsed.h",
321 "dns/record_rdata.cc",
322 "dns/record_rdata.h",
323 ]
324 }
325
326 if (is_win) {
327 net_shared_sources -= [ "http/http_auth_handler_ntlm_portable.cc" ]
328 } else { # !is_win
329 net_shared_sources -= [
330 "base/winsock_init.cc",
331 "base/winsock_init.h",
332 "base/winsock_util.cc",
333 "base/winsock_util.h",
334 "proxy/proxy_resolver_winhttp.cc",
335 "proxy/proxy_resolver_winhttp.h",
336 ]
337 }
338
339 if (is_ios) {
340 # Add back some sources that were otherwise filtered out. iOS needs some Mac
341 # files.
342 net_shared_unfiltered_sources += [
343 "base/mac/url_conversions.h",
344 "base/mac/url_conversions.mm",
345 "base/network_change_notifier_mac.cc",
346 "base/network_config_watcher_mac.cc",
347 "base/network_interfaces_mac.cc",
348 "base/network_interfaces_mac.h",
349 "base/platform_mime_util_mac.mm",
350 "proxy/proxy_resolver_mac.cc",
351 "proxy/proxy_server_mac.cc",
352 ]
353
354 net_shared_sources -= [ "disk_cache/blockfile/file_posix.cc" ]
355 net_shared_deps += [
356 "//third_party/nss:nspr",
357 "//third_party/nss",
358 "//net/third_party/nss/ssl:libssl",
359 ]
360 }
361
362 if (is_ios || is_mac) {
363 net_shared_sources += gypi_values.net_base_mac_ios_sources
364 }
365
xunjieli905496a2015-08-31 15:51:17366 if (is_android) {
sergeyu99d83f92015-09-14 23:03:33367 net_shared_deps += [ ":net_jni_headers" ]
368
369 # Add some Linux sources that were excluded by the filter, but which
370 # are needed.
371 net_shared_unfiltered_sources += [
372 "base/address_tracker_linux.cc",
373 "base/address_tracker_linux.h",
374 "base/network_interfaces_linux.cc",
375 "base/network_interfaces_linux.h",
376 "base/platform_mime_util_linux.cc",
377 ]
xunjieli905496a2015-08-31 15:51:17378 }
379} else {
sergeyu99d83f92015-09-14 23:03:33380 net_shared_public_deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
xunjieli905496a2015-08-31 15:51:17381}
382
383component("net") {
384 sources = net_shared_sources
385
386 # Add back some sources that were otherwise filtered out.
387 set_sources_assignment_filter([])
388 sources += net_shared_unfiltered_sources
389 set_sources_assignment_filter(sources_assignment_filter)
390
391 cflags = []
392 configs += net_shared_configs
393 public_configs = [ ":net_config" ]
394
395 public_deps = net_shared_public_deps + [ "//url" ]
396 deps = net_shared_deps
[email protected]4625ade2014-04-15 19:26:44397
398 if (is_mac) {
[email protected]4625ade2014-04-15 19:26:44399 libs = [
[email protected]ab9ce6e2014-04-17 20:33:19400 "Foundation.framework",
401 "Security.framework",
402 "SystemConfiguration.framework",
403 "resolv",
[email protected]4625ade2014-04-15 19:26:44404 ]
405 }
406
407 if (is_ios) {
[email protected]4625ade2014-04-15 19:26:44408 libs = [
[email protected]ab9ce6e2014-04-17 20:33:19409 "CFNetwork.framework",
410 "MobileCoreServices.framework",
411 "Security.framework",
412 "SystemConfiguration.framework",
413 "resolv",
[email protected]4625ade2014-04-15 19:26:44414 ]
xunjieli06d93982015-08-27 17:13:02415 }
xunjieli4c8c6922015-08-27 16:02:40416
sergeyu99d83f92015-09-14 23:03:33417 if (!is_nacl) {
418 if (!disable_file_support) {
419 sources += gypi_values.net_file_support_sources
420 }
xunjieli06d93982015-08-27 17:13:02421
sergeyu99d83f92015-09-14 23:03:33422 if (!disable_ftp_support) {
423 sources += gypi_values.net_ftp_support_sources
424 }
xunjieli905496a2015-08-31 15:51:17425
sergeyu99d83f92015-09-14 23:03:33426 if (enable_websockets) {
427 sources += gypi_values.net_websockets_sources
428 }
xunjieli905496a2015-08-31 15:51:17429
sergeyu99d83f92015-09-14 23:03:33430 # ICU support.
431 deps += [
432 "//base:i18n",
433 "//third_party/icu",
434 ]
435 sources += [
436 "base/filename_util_icu.cc",
437 "base/net_string_util_icu.cc",
438 "base/net_util_icu.cc",
439 ]
440 }
xunjieli905496a2015-08-31 15:51:17441}
442
443if (is_android) {
444 # Same as net, but with ICU, file, ftp, and websocket support stripped.
445 component("net_small") {
446 sources = net_shared_sources
447
448 # Add back some sources that were otherwise filtered out.
xunjieli06d93982015-08-27 17:13:02449 set_sources_assignment_filter([])
xunjieli905496a2015-08-31 15:51:17450 sources += net_shared_unfiltered_sources
xunjieli06d93982015-08-27 17:13:02451 set_sources_assignment_filter(sources_assignment_filter)
xunjieli06d93982015-08-27 17:13:02452
xunjieli905496a2015-08-31 15:51:17453 cflags = []
454 defines = []
455 configs += net_shared_configs
456 public_configs = [ ":net_config" ]
457
458 public_deps = net_shared_public_deps +
459 [ "//url:url_lib_use_icu_alternatives_on_android" ]
460 deps = net_shared_deps + [ ":net_jni_headers" ]
461
462 defines += [
463 "DISABLE_FILE_SUPPORT",
464 "DISABLE_FTP_SUPPORT",
465 "USE_ICU_ALTERNATIVES_ON_ANDROID=1",
466 ]
467
468 # Use ICU alternative on Android.
[email protected]85191ed2014-05-15 00:41:49469 sources += [
470 "base/net_string_util_icu_alternatives_android.cc",
471 "base/net_string_util_icu_alternatives_android.h",
472 ]
473 }
[email protected]4625ade2014-04-15 19:26:44474}
475
476grit("net_resources") {
477 source = "base/net_resources.grd"
[email protected]7ae52902014-08-18 22:36:01478 use_qualified_include = true
[email protected]b89c53842014-07-23 16:32:32479 outputs = [
480 "grit/net_resources.h",
481 "net_resources.pak",
[email protected]b89c53842014-07-23 16:32:32482 ]
[email protected]4625ade2014-04-15 19:26:44483}
484
rtennetib6f1c0d2015-04-03 17:52:06485proto_library("net_quic_proto") {
xunjieli905496a2015-08-31 15:51:17486 visibility = [
487 ":net",
488 ":net_small",
489 ]
brettw2e7db0a2015-04-24 22:59:17490
rtennetib6f1c0d2015-04-03 17:52:06491 sources = [
492 "quic/proto/cached_network_parameters.proto",
493 "quic/proto/source_address_token.proto",
494 ]
495 cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:"
496 cc_include = "net/base/net_export.h"
497
498 defines = [ "NET_IMPLEMENTATION" ]
499
500 extra_configs = [ "//build/config/compiler:wexit_time_destructors" ]
501}
502
Brett Wilson83fd4242014-09-02 19:45:33503static_library("extras") {
mef327a8e42014-08-29 17:10:03504 sources = gypi_values.net_extras_sources
505 configs += [ "//build/config/compiler:wexit_time_destructors" ]
506 deps = [
507 ":net",
brettwbc44c0a92015-02-20 22:30:39508 "//base",
mef327a8e42014-08-29 17:10:03509 "//sql:sql",
510 ]
511}
512
[email protected]8a3f8242014-06-05 18:05:12513static_library("http_server") {
[email protected]4625ade2014-04-15 19:26:44514 sources = [
515 "server/http_connection.cc",
516 "server/http_connection.h",
517 "server/http_server.cc",
518 "server/http_server.h",
519 "server/http_server_request_info.cc",
520 "server/http_server_request_info.h",
521 "server/http_server_response_info.cc",
522 "server/http_server_response_info.h",
523 "server/web_socket.cc",
524 "server/web_socket.h",
dgozmana6e70092014-12-12 14:46:21525 "server/web_socket_encoder.cc",
526 "server/web_socket_encoder.h",
[email protected]4625ade2014-04-15 19:26:44527 ]
jambc6cc8e2014-11-14 17:56:29528 configs += [
brettwd1c719a2015-02-19 23:17:04529 "//build/config/compiler:no_size_t_to_int_warning",
jambc6cc8e2014-11-14 17:56:29530 "//build/config/compiler:wexit_time_destructors",
jambc6cc8e2014-11-14 17:56:29531 ]
[email protected]4625ade2014-04-15 19:26:44532 deps = [
533 ":net",
534 "//base",
535 ]
536}
537
[email protected]8603c5de2014-04-16 20:34:31538executable("dump_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24539 testonly = true
[email protected]8603c5de2014-04-16 20:34:31540 sources = [
[email protected]8603c5de2014-04-16 20:34:31541 "tools/dump_cache/dump_cache.cc",
542 "tools/dump_cache/dump_files.cc",
543 "tools/dump_cache/dump_files.h",
[email protected]8603c5de2014-04-16 20:34:31544 ]
[email protected]4625ade2014-04-15 19:26:44545
brettwd1c719a2015-02-19 23:17:04546 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
547 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31548
549 deps = [
[email protected]8603c5de2014-04-16 20:34:31550 ":net",
[email protected]b2b2bf52014-05-28 20:26:57551 ":test_support",
brettwba7a73d2015-08-31 22:17:39552 "//base",
553 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31554 ]
555}
556
[email protected]b2b2bf52014-05-28 20:26:57557source_set("test_support") {
Brett Wilson8f80ad0b2014-09-08 19:50:24558 testonly = true
[email protected]8603c5de2014-04-16 20:34:31559 sources = [
[email protected]8603c5de2014-04-16 20:34:31560 "base/load_timing_info_test_util.cc",
561 "base/load_timing_info_test_util.h",
562 "base/mock_file_stream.cc",
563 "base/mock_file_stream.h",
564 "base/test_completion_callback.cc",
565 "base/test_completion_callback.h",
566 "base/test_data_directory.cc",
567 "base/test_data_directory.h",
568 "cert/mock_cert_verifier.cc",
569 "cert/mock_cert_verifier.h",
570 "cookies/cookie_monster_store_test.cc",
571 "cookies/cookie_monster_store_test.h",
572 "cookies/cookie_store_test_callbacks.cc",
573 "cookies/cookie_store_test_callbacks.h",
574 "cookies/cookie_store_test_helpers.cc",
575 "cookies/cookie_store_test_helpers.h",
576 "disk_cache/disk_cache_test_base.cc",
577 "disk_cache/disk_cache_test_base.h",
578 "disk_cache/disk_cache_test_util.cc",
579 "disk_cache/disk_cache_test_util.h",
580 "dns/dns_test_util.cc",
581 "dns/dns_test_util.h",
582 "dns/mock_host_resolver.cc",
583 "dns/mock_host_resolver.h",
584 "dns/mock_mdns_socket_factory.cc",
585 "dns/mock_mdns_socket_factory.h",
[email protected]8a3f8242014-06-05 18:05:12586 "http/http_transaction_test_util.cc",
587 "http/http_transaction_test_util.h",
vishal.b62985ca92015-04-17 08:45:51588 "log/test_net_log.cc",
589 "log/test_net_log.h",
mmenke43758e62015-05-04 21:09:46590 "log/test_net_log_entry.cc",
591 "log/test_net_log_entry.h",
mmenke0034c542015-05-05 22:34:59592 "log/test_net_log_util.cc",
mmenke43758e62015-05-04 21:09:46593 "log/test_net_log_util.h",
[email protected]8603c5de2014-04-16 20:34:31594 "proxy/mock_proxy_resolver.cc",
595 "proxy/mock_proxy_resolver.h",
596 "proxy/mock_proxy_script_fetcher.cc",
597 "proxy/mock_proxy_script_fetcher.h",
598 "proxy/proxy_config_service_common_unittest.cc",
599 "proxy/proxy_config_service_common_unittest.h",
600 "socket/socket_test_util.cc",
601 "socket/socket_test_util.h",
602 "test/cert_test_util.cc",
603 "test/cert_test_util.h",
[email protected]83e1ae32014-07-18 10:57:07604 "test/cert_test_util_nss.cc",
nharper2e171cf2015-06-01 20:29:23605 "test/channel_id_test_util.cc",
606 "test/channel_id_test_util.h",
[email protected]8603c5de2014-04-16 20:34:31607 "test/ct_test_util.cc",
608 "test/ct_test_util.h",
svaldez7d25c562015-10-30 19:09:45609 "test/embedded_test_server/default_handlers.cc",
610 "test/embedded_test_server/default_handlers.h",
[email protected]8603c5de2014-04-16 20:34:31611 "test/embedded_test_server/embedded_test_server.cc",
612 "test/embedded_test_server/embedded_test_server.h",
613 "test/embedded_test_server/http_connection.cc",
614 "test/embedded_test_server/http_connection.h",
615 "test/embedded_test_server/http_request.cc",
616 "test/embedded_test_server/http_request.h",
617 "test/embedded_test_server/http_response.cc",
618 "test/embedded_test_server/http_response.h",
svaldez6e7e82a22015-10-28 19:39:53619 "test/embedded_test_server/request_handler_util.cc",
620 "test/embedded_test_server/request_handler_util.h",
sammc6ac3fe52015-02-25 06:00:28621 "test/event_waiter.h",
[email protected]8603c5de2014-04-16 20:34:31622 "test/net_test_suite.cc",
623 "test/net_test_suite.h",
624 "test/python_utils.cc",
625 "test/python_utils.h",
brettw6315e032015-11-27 18:38:36626 "test/test_certificate_data.h",
sherouk51b4b098b2015-08-10 09:00:43627 "test/url_request/ssl_certificate_error_job.cc",
628 "test/url_request/ssl_certificate_error_job.h",
Brett Wilson32ce17a2014-11-10 17:45:30629 "test/url_request/url_request_failed_job.cc",
630 "test/url_request/url_request_failed_job.h",
mef3e826cf2014-12-13 18:40:40631 "test/url_request/url_request_mock_data_job.cc",
632 "test/url_request/url_request_mock_data_job.h",
jam8e45cd72015-01-20 16:33:44633 "test/url_request/url_request_slow_download_job.cc",
634 "test/url_request/url_request_slow_download_job.h",
[email protected]8603c5de2014-04-16 20:34:31635 "url_request/test_url_fetcher_factory.cc",
636 "url_request/test_url_fetcher_factory.h",
637 "url_request/url_request_test_util.cc",
638 "url_request/url_request_test_util.h",
639 ]
sherouk3eee4a82015-09-01 10:42:33640 if (!is_ios) {
641 sources += [
642 "test/spawned_test_server/base_test_server.cc",
643 "test/spawned_test_server/base_test_server.h",
644 "test/spawned_test_server/local_test_server.cc",
645 "test/spawned_test_server/local_test_server.h",
646 "test/spawned_test_server/local_test_server_posix.cc",
647 "test/spawned_test_server/local_test_server_win.cc",
648 "test/spawned_test_server/spawned_test_server.h",
649 ]
650 }
[email protected]8603c5de2014-04-16 20:34:31651
brettwbc8b2a22015-07-28 18:24:42652 configs += [
653 "//build/config:precompiled_headers",
654
655 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
656 "//build/config/compiler:no_size_t_to_int_warning",
657 ]
[email protected]8603c5de2014-04-16 20:34:31658
Brett Wilsone53895272014-09-23 23:41:46659 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31660 "//base",
661 "//base/test:test_support",
[email protected]22fe91d2014-08-12 17:07:12662 "//crypto",
[email protected]59ff2d42014-04-22 22:25:23663 "//net",
[email protected]8603c5de2014-04-16 20:34:31664 "//net/tools/tld_cleanup",
665 "//testing/gmock",
666 "//testing/gtest",
667 "//url",
668 ]
669
jamb533b7e2015-03-04 17:12:05670 if (!is_ios) {
671 public_deps += [ "//third_party/protobuf:py_proto" ]
672 }
673
davidben4a644b02015-07-01 19:34:55674 if (use_nss_certs || is_ios) {
scottmg34fb7e52014-12-03 23:27:24675 public_deps += [ "//crypto:platform" ]
[email protected]8603c5de2014-04-16 20:34:31676 }
677
sherouk3eee4a82015-09-01 10:42:33678 if (is_android) {
679 sources += [
[email protected]8603c5de2014-04-16 20:34:31680 "test/spawned_test_server/remote_test_server.cc",
681 "test/spawned_test_server/remote_test_server.h",
682 "test/spawned_test_server/spawner_communicator.cc",
683 "test/spawned_test_server/spawner_communicator.h",
684 ]
685 }
686
687 if (use_v8_in_net) {
Brett Wilsone53895272014-09-23 23:41:46688 public_deps += [ ":net_with_v8" ]
[email protected]8603c5de2014-04-16 20:34:31689 }
690
691 if (!enable_mdns) {
692 sources -= [
693 "dns/mock_mdns_socket_factory.cc",
694 "dns/mock_mdns_socket_factory.h",
695 ]
696 }
697
davidben15d69d482014-09-29 18:24:08698 if (!use_nss_certs) {
scottmg34fb7e52014-12-03 23:27:24699 sources -= [ "test/cert_test_util_nss.cc" ]
[email protected]83e1ae32014-07-18 10:57:07700 }
xunjielia6888202015-04-14 21:34:25701
702 if (!disable_file_support) {
703 sources += [
704 "test/url_request/url_request_mock_http_job.cc",
705 "test/url_request/url_request_mock_http_job.h",
706 "url_request/test_url_request_interceptor.cc",
707 "url_request/test_url_request_interceptor.h",
708 ]
709 }
[email protected]8603c5de2014-04-16 20:34:31710}
711
[email protected]ceeaac792014-06-25 05:14:43712source_set("balsa") {
713 sources = [
714 "tools/balsa/balsa_enums.h",
715 "tools/balsa/balsa_frame.cc",
716 "tools/balsa/balsa_frame.h",
717 "tools/balsa/balsa_headers.cc",
718 "tools/balsa/balsa_headers.h",
719 "tools/balsa/balsa_headers_token_utils.cc",
720 "tools/balsa/balsa_headers_token_utils.h",
721 "tools/balsa/balsa_visitor_interface.h",
722 "tools/balsa/http_message_constants.cc",
723 "tools/balsa/http_message_constants.h",
724 "tools/balsa/noop_balsa_visitor.h",
725 "tools/balsa/simple_buffer.cc",
726 "tools/balsa/simple_buffer.h",
727 "tools/balsa/split.cc",
728 "tools/balsa/split.h",
729 "tools/balsa/string_piece_utils.h",
rtennetie0ee6eb2015-05-01 00:55:09730 "tools/quic/spdy_balsa_utils.cc",
731 "tools/quic/spdy_balsa_utils.h",
[email protected]ceeaac792014-06-25 05:14:43732 ]
733 deps = [
734 ":net",
735 "//base",
[email protected]22fe91d2014-08-12 17:07:12736 "//url",
[email protected]ceeaac792014-06-25 05:14:43737 ]
738}
739
[email protected]8603c5de2014-04-16 20:34:31740if (use_v8_in_net) {
741 component("net_with_v8") {
742 sources = [
743 "proxy/proxy_resolver_v8.cc",
744 "proxy/proxy_resolver_v8.h",
745 "proxy/proxy_resolver_v8_tracing.cc",
746 "proxy/proxy_resolver_v8_tracing.h",
sammcf2d1ea02015-06-29 02:58:47747 "proxy/proxy_resolver_v8_tracing_wrapper.cc",
748 "proxy/proxy_resolver_v8_tracing_wrapper.h",
[email protected]8603c5de2014-04-16 20:34:31749 "proxy/proxy_service_v8.cc",
750 "proxy/proxy_service_v8.h",
751 ]
752
753 defines = [ "NET_IMPLEMENTATION" ]
dprankea22b0732015-10-21 21:15:11754
[email protected]8603c5de2014-04-16 20:34:31755 configs += [
brettwd1c719a2015-02-19 23:17:04756 "//build/config/compiler:no_size_t_to_int_warning",
[email protected]8603c5de2014-04-16 20:34:31757 "//build/config/compiler:wexit_time_destructors",
dprankea22b0732015-10-21 21:15:11758 "//v8:external_startup_data",
[email protected]8603c5de2014-04-16 20:34:31759 ]
760
Brett Wilsone53895272014-09-23 23:41:46761 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31762 ":net",
Brett Wilsone53895272014-09-23 23:41:46763 ]
764 deps = [
[email protected]8603c5de2014-04-16 20:34:31765 "//base",
766 "//gin",
767 "//url",
768 "//v8",
769 ]
770 }
771}
772
amistry7e6ebfdc82015-02-13 04:19:11773if (use_v8_in_net && !is_android) {
774 source_set("net_browser_services") {
775 sources = [
776 "dns/mojo_host_resolver_impl.cc",
777 "dns/mojo_host_resolver_impl.h",
amistry6e1ed1b2015-03-12 05:24:01778 "proxy/in_process_mojo_proxy_resolver_factory.cc",
779 "proxy/in_process_mojo_proxy_resolver_factory.h",
sammc1d5df4d2015-05-05 05:06:17780 "proxy/mojo_proxy_resolver_factory.h",
eromandcacef22015-06-01 19:36:35781 "proxy/proxy_resolver_factory_mojo.cc",
782 "proxy/proxy_resolver_factory_mojo.h",
amistry6e1ed1b2015-03-12 05:24:01783 "proxy/proxy_service_mojo.cc",
784 "proxy/proxy_service_mojo.h",
amistry7e6ebfdc82015-02-13 04:19:11785 ]
786
787 public_deps = [
788 ":mojo_type_converters",
789 ":net",
brettwbc44c0a92015-02-20 22:30:39790 "//base",
amistry07ff1402015-03-10 07:34:07791 "//mojo/common",
rockot85dce0862015-11-13 01:33:59792 "//mojo/public/cpp/bindings",
amistry7e6ebfdc82015-02-13 04:19:11793 "//net/interfaces",
amistry6e1ed1b2015-03-12 05:24:01794
795 # NOTE(amistry): As long as we support in-process Mojo v8 PAC, we need
796 # this dependency since in_process_mojo_proxy_resolver_factory creates
797 # the utility process side Mojo services in the browser process.
798 # Ultimately, this will go away when we only support out-of-process.
799 ":net_utility_services",
amistry7e6ebfdc82015-02-13 04:19:11800 ]
801 }
802
803 source_set("mojo_type_converters") {
804 sources = [
amistry7ec58112015-02-26 06:03:00805 "dns/mojo_host_type_converters.cc",
806 "dns/mojo_host_type_converters.h",
807 "proxy/mojo_proxy_type_converters.cc",
808 "proxy/mojo_proxy_type_converters.h",
amistry7e6ebfdc82015-02-13 04:19:11809 ]
810
811 public_deps = [
812 ":net",
rockot85dce0862015-11-13 01:33:59813 "//mojo/public/cpp/bindings",
amistry7e6ebfdc82015-02-13 04:19:11814 "//net/interfaces",
amistry7e6ebfdc82015-02-13 04:19:11815 ]
816 }
sammc5403aa1d2015-02-25 04:59:21817
818 source_set("net_utility_services") {
819 sources = [
sammc6ac3fe52015-02-25 06:00:28820 "dns/host_resolver_mojo.cc",
821 "dns/host_resolver_mojo.h",
sammc352f7492015-02-25 09:45:24822 "proxy/mojo_proxy_resolver_factory_impl.cc",
823 "proxy/mojo_proxy_resolver_factory_impl.h",
sammc5403aa1d2015-02-25 04:59:21824 "proxy/mojo_proxy_resolver_impl.cc",
825 "proxy/mojo_proxy_resolver_impl.h",
sammca3242c92015-07-10 02:38:51826 "proxy/mojo_proxy_resolver_v8_tracing_bindings.h",
sammc5403aa1d2015-02-25 04:59:21827 ]
828
rockot9509ec82015-04-14 02:50:56829 deps = [
830 ":net_with_v8",
831 ]
832
sammc5403aa1d2015-02-25 04:59:21833 public_deps = [
834 ":mojo_type_converters",
835 ":net",
836 "//mojo/common",
rockot85dce0862015-11-13 01:33:59837 "//mojo/public/cpp/bindings",
sammc5403aa1d2015-02-25 04:59:21838 "//net/interfaces",
sammc5403aa1d2015-02-25 04:59:21839 ]
840 }
amistry7e6ebfdc82015-02-13 04:19:11841}
842
[email protected]8603c5de2014-04-16 20:34:31843if (!is_ios && !is_android) {
844 executable("crash_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24845 testonly = true
scottmg34fb7e52014-12-03 23:27:24846 sources = [
847 "tools/crash_cache/crash_cache.cc",
848 ]
dpranke43276212015-02-20 02:55:19849
brettwd1c719a2015-02-19 23:17:04850 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
851 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31852 deps = [
853 ":net",
[email protected]b2b2bf52014-05-28 20:26:57854 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31855 "//base",
brettwba7a73d2015-08-31 22:17:39856 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31857 ]
858 }
859
860 executable("crl_set_dump") {
Brett Wilson8f80ad0b2014-09-08 19:50:24861 testonly = true
scottmg34fb7e52014-12-03 23:27:24862 sources = [
863 "tools/crl_set_dump/crl_set_dump.cc",
864 ]
dpranke43276212015-02-20 02:55:19865
brettwd1c719a2015-02-19 23:17:04866 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
867 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31868 deps = [
869 ":net",
870 "//base",
brettwba7a73d2015-08-31 22:17:39871 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31872 ]
873 }
874
875 executable("dns_fuzz_stub") {
Brett Wilson8f80ad0b2014-09-08 19:50:24876 testonly = true
scottmg34fb7e52014-12-03 23:27:24877 sources = [
878 "tools/dns_fuzz_stub/dns_fuzz_stub.cc",
879 ]
dpranke43276212015-02-20 02:55:19880
brettwd1c719a2015-02-19 23:17:04881 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
882 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31883 deps = [
884 ":net",
885 "//base",
brettwba7a73d2015-08-31 22:17:39886 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31887 ]
888 }
889
890 executable("gdig") {
Brett Wilson8f80ad0b2014-09-08 19:50:24891 testonly = true
[email protected]8603c5de2014-04-16 20:34:31892 sources = [
893 "tools/gdig/file_net_log.cc",
894 "tools/gdig/gdig.cc",
895 ]
896 deps = [
897 ":net",
898 "//base",
brettwba7a73d2015-08-31 22:17:39899 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31900 ]
901 }
902
903 executable("get_server_time") {
Brett Wilson8f80ad0b2014-09-08 19:50:24904 testonly = true
scottmg34fb7e52014-12-03 23:27:24905 sources = [
906 "tools/get_server_time/get_server_time.cc",
907 ]
dpranke43276212015-02-20 02:55:19908
brettwd1c719a2015-02-19 23:17:04909 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
910 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31911 deps = [
912 ":net",
913 "//base",
914 "//base:i18n",
brettwba7a73d2015-08-31 22:17:39915 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31916 "//url",
917 ]
918 }
919
rockot9c67e5f2015-03-12 20:01:21920 executable("hpack_example_generator") {
921 testonly = true
922 sources = [
923 "spdy/fuzzing/hpack_example_generator.cc",
924 ]
925
926 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
927 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
928 deps = [
rockot9c67e5f2015-03-12 20:01:21929 ":net",
brettwba7a73d2015-08-31 22:17:39930 "//base",
931 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:21932 ]
933 }
934
935 executable("hpack_fuzz_mutator") {
936 testonly = true
937 sources = [
938 "spdy/fuzzing/hpack_fuzz_mutator.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",
rockot9c67e5f2015-03-12 20:01:21947 ]
948 }
949
950 executable("hpack_fuzz_wrapper") {
951 testonly = true
952 sources = [
953 "spdy/fuzzing/hpack_fuzz_wrapper.cc",
954 ]
955
956 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
957 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
958 deps = [
rockot9c67e5f2015-03-12 20:01:21959 ":net",
brettwba7a73d2015-08-31 22:17:39960 "//base",
961 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:21962 ]
963 }
964
[email protected]8603c5de2014-04-16 20:34:31965 if (use_v8_in_net) {
966 executable("net_watcher") {
Brett Wilson8f80ad0b2014-09-08 19:50:24967 testonly = true
scottmg34fb7e52014-12-03 23:27:24968 sources = [
969 "tools/net_watcher/net_watcher.cc",
970 ]
[email protected]8603c5de2014-04-16 20:34:31971 deps = [
972 ":net",
973 ":net_with_v8",
974 "//base",
brettwba7a73d2015-08-31 22:17:39975 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31976 ]
977
mostynbbf5e6cc2015-10-21 07:53:31978 if (is_desktop_linux && use_gconf && use_glib) {
xunjieli905496a2015-08-31 15:51:17979 configs += [
980 "//build/config/linux:gconf",
981 "//build/config/linux:glib",
982 ]
dprankead0c1f42015-08-28 21:48:04983 deps += [ "//build/linux:gio" ]
[email protected]8603c5de2014-04-16 20:34:31984 }
985 }
986 }
987
988 executable("run_testserver") {
Brett Wilson8f80ad0b2014-09-08 19:50:24989 testonly = true
scottmg34fb7e52014-12-03 23:27:24990 sources = [
991 "tools/testserver/run_testserver.cc",
992 ]
[email protected]8603c5de2014-04-16 20:34:31993 deps = [
[email protected]b2b2bf52014-05-28 20:26:57994 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31995 "//base",
996 "//base/test:test_support",
brettwba7a73d2015-08-31 22:17:39997 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31998 "//testing/gtest",
999 ]
1000 }
1001
1002 executable("stress_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:241003 testonly = true
scottmg34fb7e52014-12-03 23:27:241004 sources = [
rvargase23fcf652015-03-04 19:59:221005 "tools/stress_cache/stress_cache.cc",
scottmg34fb7e52014-12-03 23:27:241006 ]
dpranke43276212015-02-20 02:55:191007
brettwd1c719a2015-02-19 23:17:041008 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1009 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:311010 deps = [
1011 ":net",
[email protected]b2b2bf52014-05-28 20:26:571012 ":test_support",
[email protected]8603c5de2014-04-16 20:34:311013 "//base",
brettwba7a73d2015-08-31 22:17:391014 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311015 ]
1016 }
1017
1018 executable("tld_cleanup") {
scottmg34fb7e52014-12-03 23:27:241019 sources = [
1020 "tools/tld_cleanup/tld_cleanup.cc",
1021 ]
dpranke43276212015-02-20 02:55:191022
brettwd1c719a2015-02-19 23:17:041023 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1024 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:311025 deps = [
1026 "//base",
1027 "//base:i18n",
brettwba7a73d2015-08-31 22:17:391028 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311029 "//net/tools/tld_cleanup",
1030 ]
1031 }
1032}
1033
rch6983a3f2015-03-30 03:47:281034if (is_linux) {
[email protected]8a3f8242014-06-05 18:05:121035 static_library("epoll_server") {
[email protected]8603c5de2014-04-16 20:34:311036 sources = [
1037 "tools/epoll_server/epoll_server.cc",
1038 "tools/epoll_server/epoll_server.h",
1039 ]
1040 deps = [
1041 ":net",
1042 "//base",
1043 ]
1044 }
1045
[email protected]8a3f8242014-06-05 18:05:121046 static_library("flip_in_mem_edsm_server_base") {
Brett Wilson8f80ad0b2014-09-08 19:50:241047 testonly = true
[email protected]8603c5de2014-04-16 20:34:311048 sources = [
[email protected]8603c5de2014-04-16 20:34:311049 "tools/flip_server/acceptor_thread.cc",
satorux933fc7a2015-02-13 07:09:101050 "tools/flip_server/acceptor_thread.h",
1051 "tools/flip_server/constants.h",
[email protected]8603c5de2014-04-16 20:34:311052 "tools/flip_server/create_listener.cc",
1053 "tools/flip_server/create_listener.h",
[email protected]8603c5de2014-04-16 20:34:311054 "tools/flip_server/flip_config.cc",
1055 "tools/flip_server/flip_config.h",
1056 "tools/flip_server/http_interface.cc",
1057 "tools/flip_server/http_interface.h",
[email protected]8603c5de2014-04-16 20:34:311058 "tools/flip_server/mem_cache.cc",
satorux933fc7a2015-02-13 07:09:101059 "tools/flip_server/mem_cache.h",
[email protected]8603c5de2014-04-16 20:34:311060 "tools/flip_server/output_ordering.cc",
1061 "tools/flip_server/output_ordering.h",
1062 "tools/flip_server/ring_buffer.cc",
1063 "tools/flip_server/ring_buffer.h",
1064 "tools/flip_server/sm_connection.cc",
1065 "tools/flip_server/sm_connection.h",
1066 "tools/flip_server/sm_interface.h",
[email protected]8603c5de2014-04-16 20:34:311067 "tools/flip_server/spdy_interface.cc",
1068 "tools/flip_server/spdy_interface.h",
satorux933fc7a2015-02-13 07:09:101069 "tools/flip_server/spdy_ssl.cc",
1070 "tools/flip_server/spdy_ssl.h",
[email protected]8603c5de2014-04-16 20:34:311071 "tools/flip_server/spdy_util.cc",
1072 "tools/flip_server/spdy_util.h",
1073 "tools/flip_server/streamer_interface.cc",
1074 "tools/flip_server/streamer_interface.h",
rvargas145310f2015-08-14 18:09:041075 "tools/flip_server/url_to_filename_encoder.cc",
1076 "tools/flip_server/url_to_filename_encoder.h",
1077 "tools/flip_server/url_utilities.cc",
1078 "tools/flip_server/url_utilities.h",
[email protected]8603c5de2014-04-16 20:34:311079 ]
1080 deps = [
1081 ":balsa",
1082 ":epoll_server",
1083 ":net",
1084 "//base",
[email protected]edfd0f42014-07-22 18:20:371085 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311086 ]
1087 }
1088
1089 executable("flip_in_mem_edsm_server_unittests") {
Brett Wilson8f80ad0b2014-09-08 19:50:241090 testonly = true
[email protected]8603c5de2014-04-16 20:34:311091 sources = [
1092 "tools/flip_server/flip_test_utils.cc",
1093 "tools/flip_server/flip_test_utils.h",
1094 "tools/flip_server/http_interface_test.cc",
1095 "tools/flip_server/mem_cache_test.cc",
1096 "tools/flip_server/run_all_tests.cc",
1097 "tools/flip_server/spdy_interface_test.cc",
rvargas145310f2015-08-14 18:09:041098 "tools/flip_server/url_to_filename_encoder_unittest.cc",
1099 "tools/flip_server/url_utilities_unittest.cc",
[email protected]8603c5de2014-04-16 20:34:311100 ]
1101 deps = [
brettwbc44c0a92015-02-20 22:30:391102 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311103 ":flip_in_mem_edsm_server_base",
1104 ":net",
[email protected]b2b2bf52014-05-28 20:26:571105 ":test_support",
brettwba7a73d2015-08-31 22:17:391106 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311107 "//testing/gmock",
agrieved7a71c882015-11-20 19:53:281108 "//testing/gtest",
[email protected]edfd0f42014-07-22 18:20:371109 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311110 ]
1111 }
1112
1113 executable("flip_in_mem_edsm_server") {
Brett Wilson8f80ad0b2014-09-08 19:50:241114 testonly = true
scottmg34fb7e52014-12-03 23:27:241115 sources = [
1116 "tools/flip_server/flip_in_mem_edsm_server.cc",
1117 ]
[email protected]8603c5de2014-04-16 20:34:311118 deps = [
brettwbc44c0a92015-02-20 22:30:391119 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311120 ":flip_in_mem_edsm_server_base",
1121 ":net",
1122 "//base",
brettwba7a73d2015-08-31 22:17:391123 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311124 ]
1125 }
1126
rch216445c2015-03-27 00:23:281127 source_set("epoll_quic_tools") {
[email protected]8603c5de2014-04-16 20:34:311128 sources = [
1129 "tools/quic/quic_client.cc",
1130 "tools/quic/quic_client.h",
[email protected]8603c5de2014-04-16 20:34:311131 "tools/quic/quic_default_packet_writer.cc",
1132 "tools/quic/quic_default_packet_writer.h",
[email protected]8603c5de2014-04-16 20:34:311133 "tools/quic/quic_epoll_clock.cc",
1134 "tools/quic/quic_epoll_clock.h",
1135 "tools/quic/quic_epoll_connection_helper.cc",
1136 "tools/quic/quic_epoll_connection_helper.h",
rtennetifb3fa6c2015-03-16 23:04:551137 "tools/quic/quic_packet_reader.cc",
1138 "tools/quic/quic_packet_reader.h",
[email protected]8603c5de2014-04-16 20:34:311139 "tools/quic/quic_packet_writer_wrapper.cc",
1140 "tools/quic/quic_packet_writer_wrapper.h",
1141 "tools/quic/quic_server.cc",
1142 "tools/quic/quic_server.h",
[email protected]8603c5de2014-04-16 20:34:311143 "tools/quic/quic_socket_utils.cc",
1144 "tools/quic/quic_socket_utils.h",
[email protected]8603c5de2014-04-16 20:34:311145 ]
1146 deps = [
1147 ":balsa",
1148 ":epoll_server",
1149 ":net",
1150 "//base",
1151 "//base/third_party/dynamic_annotations",
1152 "//crypto",
[email protected]edfd0f42014-07-22 18:20:371153 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311154 "//url",
1155 ]
1156 }
1157
rch216445c2015-03-27 00:23:281158 executable("epoll_quic_client") {
scottmg34fb7e52014-12-03 23:27:241159 sources = [
1160 "tools/quic/quic_client_bin.cc",
1161 ]
[email protected]8603c5de2014-04-16 20:34:311162 deps = [
brettwbc44c0a92015-02-20 22:30:391163 ":balsa",
rch216445c2015-03-27 00:23:281164 ":epoll_quic_tools",
agrieved7a71c882015-11-20 19:53:281165 ":epoll_server",
rch216445c2015-03-27 00:23:281166 ":net",
1167 ":simple_quic_tools",
1168 "//base",
brettwba7a73d2015-08-31 22:17:391169 "//build/config/sanitizers:deps",
rch216445c2015-03-27 00:23:281170 "//third_party/boringssl",
1171 ]
1172 }
1173
1174 executable("epoll_quic_server") {
1175 sources = [
1176 "tools/quic/quic_server_bin.cc",
1177 ]
1178 deps = [
1179 ":balsa",
rch216445c2015-03-27 00:23:281180 ":epoll_quic_tools",
agrieved7a71c882015-11-20 19:53:281181 ":epoll_server",
[email protected]8603c5de2014-04-16 20:34:311182 ":net",
rchda78df5a2015-03-22 05:16:371183 ":simple_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311184 "//base",
brettwba7a73d2015-08-31 22:17:391185 "//build/config/sanitizers:deps",
[email protected]edfd0f42014-07-22 18:20:371186 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311187 ]
1188 }
[email protected]8603c5de2014-04-16 20:34:311189}
1190
[email protected]ef0eb442014-05-15 09:32:181191if (is_android) {
1192 generate_jni("net_jni_headers") {
1193 sources = [
1194 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
1195 "android/java/src/org/chromium/net/AndroidKeyStore.java",
1196 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java",
1197 "android/java/src/org/chromium/net/AndroidPrivateKey.java",
tbansal59a1ddc2015-09-14 17:35:011198 "android/java/src/org/chromium/net/AndroidTrafficStats.java",
[email protected]ef0eb442014-05-15 09:32:181199 "android/java/src/org/chromium/net/GURLUtils.java",
aberentec894a52015-07-09 14:45:531200 "android/java/src/org/chromium/net/HttpNegotiateAuthenticator.java",
xunjieli905496a2015-08-31 15:51:171201 "android/java/src/org/chromium/net/NetStringUtil.java",
[email protected]ef0eb442014-05-15 09:32:181202 "android/java/src/org/chromium/net/NetworkChangeNotifier.java",
1203 "android/java/src/org/chromium/net/ProxyChangeListener.java",
1204 "android/java/src/org/chromium/net/X509Util.java",
1205 ]
1206 jni_package = "net"
1207 }
cjhopmandad5f4272014-09-05 01:00:551208 generate_jni("net_test_jni_headers") {
1209 sources = [
1210 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java",
aberentec894a52015-07-09 14:45:531211 "test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticator.java",
agrievea5517aa2015-10-23 03:03:451212 "test/android/javatests/src/org/chromium/net/test/EmbeddedTestServer.java",
cjhopmandad5f4272014-09-05 01:00:551213 ]
brettwcdccaf02015-07-27 16:27:091214 jni_package = "net/test"
cjhopmandad5f4272014-09-05 01:00:551215 }
[email protected]ef0eb442014-05-15 09:32:181216}
[email protected]8603c5de2014-04-16 20:34:311217
1218if (is_android || is_linux) {
1219 executable("disk_cache_memory_test") {
Brett Wilson8f80ad0b2014-09-08 19:50:241220 testonly = true
scottmg34fb7e52014-12-03 23:27:241221 sources = [
1222 "tools/disk_cache_memory_test/disk_cache_memory_test.cc",
1223 ]
[email protected]8603c5de2014-04-16 20:34:311224 deps = [
1225 ":net",
1226 "//base",
brettwba7a73d2015-08-31 22:17:391227 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311228 ]
1229 }
1230}
[email protected]8a3f8242014-06-05 18:05:121231
rch47ad01f2015-03-20 21:17:231232source_set("simple_quic_tools") {
rcha9d12ce12015-03-19 23:06:491233 sources = [
rtennetid67b3a722015-08-18 05:15:311234 "tools/quic/quic_client_base.cc",
1235 "tools/quic/quic_client_base.h",
rched113b22015-03-26 04:54:051236 "tools/quic/quic_client_session.cc",
1237 "tools/quic/quic_client_session.h",
rchc99f380c2015-03-26 19:50:561238 "tools/quic/quic_dispatcher.cc",
1239 "tools/quic/quic_dispatcher.h",
rch0e945472015-03-26 15:19:211240 "tools/quic/quic_in_memory_cache.cc",
1241 "tools/quic/quic_in_memory_cache.h",
rchc99f380c2015-03-26 19:50:561242 "tools/quic/quic_per_connection_packet_writer.cc",
1243 "tools/quic/quic_per_connection_packet_writer.h",
rch0e945472015-03-26 15:19:211244 "tools/quic/quic_server_session.cc",
1245 "tools/quic/quic_server_session.h",
rcha9d12ce12015-03-19 23:06:491246 "tools/quic/quic_simple_client.cc",
1247 "tools/quic/quic_simple_client.h",
rch216445c2015-03-27 00:23:281248 "tools/quic/quic_simple_per_connection_packet_writer.cc",
1249 "tools/quic/quic_simple_per_connection_packet_writer.h",
1250 "tools/quic/quic_simple_server.cc",
1251 "tools/quic/quic_simple_server.h",
1252 "tools/quic/quic_simple_server_packet_writer.cc",
1253 "tools/quic/quic_simple_server_packet_writer.h",
rched113b22015-03-26 04:54:051254 "tools/quic/quic_spdy_client_stream.cc",
1255 "tools/quic/quic_spdy_client_stream.h",
rch0e945472015-03-26 15:19:211256 "tools/quic/quic_spdy_server_stream.cc",
1257 "tools/quic/quic_spdy_server_stream.h",
1258 "tools/quic/quic_time_wait_list_manager.cc",
1259 "tools/quic/quic_time_wait_list_manager.h",
rchda78df5a2015-03-22 05:16:371260 "tools/quic/synchronous_host_resolver.cc",
1261 "tools/quic/synchronous_host_resolver.h",
rcha9d12ce12015-03-19 23:06:491262 ]
1263 deps = [
1264 ":net",
1265 "//base",
rch47ad01f2015-03-20 21:17:231266 "//base/third_party/dynamic_annotations",
1267 "//url",
1268 ]
1269}
1270
sherouk51b4b098b2015-08-10 09:00:431271if (!is_ios) {
1272 executable("quic_client") {
1273 sources = [
1274 "tools/quic/quic_simple_client_bin.cc",
1275 ]
1276 deps = [
1277 ":net",
1278 ":simple_quic_tools",
1279 "//base",
brettwba7a73d2015-08-31 22:17:391280 "//build/config/sanitizers:deps",
sherouk51b4b098b2015-08-10 09:00:431281 "//url",
1282 ]
1283 }
1284 executable("quic_server") {
1285 sources = [
1286 "tools/quic/quic_simple_server_bin.cc",
1287 ]
1288 deps = [
1289 ":net",
1290 ":simple_quic_tools",
1291 "//base",
brettwba7a73d2015-08-31 22:17:391292 "//build/config/sanitizers:deps",
sherouk51b4b098b2015-08-10 09:00:431293 "//third_party/boringssl",
1294 "//third_party/protobuf:protobuf_lite",
1295 ]
1296 }
rch216445c2015-03-27 00:23:281297}
1298
dpranke64df2832015-07-31 22:33:361299# TODO(GYP): Delete this after we've converted everything to GN.
1300# The _run targets exist only for compatibility w/ GYP.
1301group("net_unittests_run") {
1302 testonly = true
1303 deps = [
1304 ":net_unittests",
1305 ]
1306}
1307
1308test("net_unittests") {
1309 sources = gypi_values.net_test_sources
1310
sherouk51b4b098b2015-08-10 09:00:431311 if (is_ios) {
1312 sources -= [
1313 "websockets/websocket_stream_cookie_test.cc",
1314 "websockets/websocket_stream_create_test_base.cc",
1315 "websockets/websocket_stream_create_test_base.h",
1316 ]
1317 }
1318
dpranke64df2832015-07-31 22:33:361319 configs += [
1320 "//build/config:precompiled_headers",
1321
1322 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1323 "//build/config/compiler:no_size_t_to_int_warning",
1324 ]
1325 defines = []
1326
1327 deps = [
1328 ":balsa",
1329 ":extras",
1330 ":http_server",
1331 ":net",
1332 ":simple_quic_tools",
1333 ":test_support",
1334 "//base",
1335 "//base:i18n",
1336 "//base:prefs_test_support",
1337 "//base/allocator",
1338 "//base/third_party/dynamic_annotations",
1339 "//crypto",
1340 "//crypto:platform",
1341 "//crypto:test_support",
dpranke64df2832015-07-31 22:33:361342 "//net/base/registry_controlled_domains",
1343 "//sql",
1344 "//testing/gmock",
1345 "//testing/gtest",
1346 "//third_party/zlib",
1347 "//url",
1348 ]
1349
1350 data = [
1351 "data/",
1352 ]
1353
1354 if (is_linux || is_mac || is_win) {
1355 deps += [
1356 "//third_party/pyftpdlib/",
1357 "//third_party/pywebsocket/",
1358 "//third_party/tlslite/",
1359 ]
1360 data_deps = [
1361 "//third_party/pyftpdlib/",
1362 "//third_party/pywebsocket/",
1363 "//third_party/tlslite/",
1364 ]
1365 data += [
1366 "tools/testserver/",
1367 "//third_party/pyftpdlib/",
1368 "//third_party/pywebsocket/",
1369 "//third_party/tlslite/",
1370 "$root_out_dir/pyproto/google/",
dprankef497c7962015-07-31 19:46:231371 ]
1372 }
1373
dpranke64df2832015-07-31 22:33:361374 if (is_desktop_linux) {
1375 deps += [ ":epoll_quic_tools" ]
1376 }
1377 if (is_linux) {
1378 sources += gypi_values.net_linux_test_sources
1379 deps += [
1380 ":epoll_quic_tools",
1381 ":epoll_server",
1382 ":flip_in_mem_edsm_server_base",
brettwbc8b2a22015-07-28 18:24:421383 ]
dpranke64df2832015-07-31 22:33:361384 }
[email protected]8a3f8242014-06-05 18:05:121385
dpranke64df2832015-07-31 22:33:361386 if (is_mac || is_ios) {
1387 sources += gypi_values.net_base_test_mac_ios_sources
1388 }
1389
1390 if (is_chromeos) {
1391 sources -= [ "proxy/proxy_config_service_linux_unittest.cc" ]
1392 }
1393
1394 if (v8_use_external_startup_data) {
1395 deps += [ "//gin" ]
1396 }
1397
1398 if (!use_nss_certs) {
1399 sources -= [
1400 "cert/nss_cert_database_unittest.cc",
1401 "ssl/client_cert_store_nss_unittest.cc",
[email protected]8a3f8242014-06-05 18:05:121402 ]
dpranke64df2832015-07-31 22:33:361403 if (is_chromeos) { # Already removed for all non-ChromeOS builds.
davidben2bcbc6b2015-04-22 02:36:411404 sources -= [
dpranke64df2832015-07-31 22:33:361405 "cert/nss_cert_database_chromeos_unittest.cc",
1406 "cert/nss_profile_filter_chromeos_unittest.cc",
davidben2bcbc6b2015-04-22 02:36:411407 ]
brettw43ae0e12015-07-14 22:12:361408 }
[email protected]8a3f8242014-06-05 18:05:121409 }
dpranke64df2832015-07-31 22:33:361410
1411 if (use_openssl) {
1412 # When building for OpenSSL, we need to exclude NSS specific tests
1413 # or functionality not supported by OpenSSL yet.
1414 # TODO(bulach): Add equivalent tests when the underlying
1415 # functionality is ported to OpenSSL.
1416 sources -= [ "quic/test_tools/crypto_test_utils_nss.cc" ]
1417 } else {
1418 sources -= [
1419 "cert/x509_util_openssl_unittest.cc",
1420 "quic/test_tools/crypto_test_utils_openssl.cc",
1421 "socket/ssl_client_socket_openssl_unittest.cc",
1422 "ssl/ssl_client_session_cache_openssl_unittest.cc",
1423 ]
1424 }
1425
1426 if (use_kerberos) {
1427 defines += [ "USE_KERBEROS" ]
1428 }
1429
1430 # These are excluded on Android, because the actual Kerberos support, which
1431 # these test, is in a separate app on Android.
1432 if (!use_kerberos || is_android) {
1433 sources -= [
1434 "http/http_auth_gssapi_posix_unittest.cc",
1435 "http/mock_gssapi_library_posix.cc",
1436 "http/mock_gssapi_library_posix.h",
1437 ]
1438 }
1439 if (!use_kerberos) {
1440 sources -= [ "http/http_auth_handler_negotiate_unittest.cc" ]
1441 }
1442
1443 if (use_openssl || (!is_desktop_linux && !is_chromeos && !is_ios)) {
1444 # Only include this test when on Posix and using NSS for
1445 # cert verification or on iOS (which also uses NSS for certs).
1446 sources -= [ "cert_net/nss_ocsp_unittest.cc" ]
1447 }
1448
1449 if (!use_openssl_certs) {
1450 sources -= [ "ssl/openssl_client_key_store_unittest.cc" ]
1451 }
1452
1453 if (!enable_websockets) {
1454 sources -= [
1455 "server/http_connection_unittest.cc",
1456 "server/http_server_response_info_unittest.cc",
1457 "server/http_server_unittest.cc",
1458 "server/web_socket_encoder_unittest.cc",
1459 "websockets/websocket_basic_stream_test.cc",
1460 "websockets/websocket_channel_test.cc",
dprankea8d2fb92015-10-28 22:25:231461 "websockets/websocket_deflate_parameters_test.cc",
dpranke64df2832015-07-31 22:33:361462 "websockets/websocket_deflate_predictor_impl_test.cc",
1463 "websockets/websocket_deflate_stream_test.cc",
1464 "websockets/websocket_deflater_test.cc",
1465 "websockets/websocket_end_to_end_test.cc",
1466 "websockets/websocket_errors_test.cc",
1467 "websockets/websocket_extension_parser_test.cc",
dprankea8d2fb92015-10-28 22:25:231468 "websockets/websocket_extension_test.cc",
dpranke64df2832015-07-31 22:33:361469 "websockets/websocket_frame_parser_test.cc",
1470 "websockets/websocket_frame_test.cc",
1471 "websockets/websocket_handshake_challenge_test.cc",
1472 "websockets/websocket_handshake_stream_create_helper_test.cc",
1473 "websockets/websocket_inflater_test.cc",
1474 "websockets/websocket_stream_test.cc",
1475 "websockets/websocket_test_util.cc",
1476 "websockets/websocket_test_util.h",
1477 ]
1478 deps -= [ ":http_server" ]
1479 }
1480
1481 if (disable_file_support) {
1482 sources -= [
1483 "base/directory_lister_unittest.cc",
1484 "url_request/url_request_file_job_unittest.cc",
1485 ]
1486 }
1487
1488 if (disable_ftp_support) {
1489 sources -= [
1490 "ftp/ftp_auth_cache_unittest.cc",
1491 "ftp/ftp_ctrl_response_buffer_unittest.cc",
1492 "ftp/ftp_directory_listing_parser_ls_unittest.cc",
dpranke64df2832015-07-31 22:33:361493 "ftp/ftp_directory_listing_parser_unittest.cc",
1494 "ftp/ftp_directory_listing_parser_unittest.h",
1495 "ftp/ftp_directory_listing_parser_vms_unittest.cc",
1496 "ftp/ftp_directory_listing_parser_windows_unittest.cc",
1497 "ftp/ftp_network_transaction_unittest.cc",
1498 "ftp/ftp_util_unittest.cc",
1499 "url_request/url_request_ftp_job_unittest.cc",
1500 ]
1501 }
1502
1503 if (!enable_built_in_dns) {
1504 sources -= [
1505 "dns/address_sorter_posix_unittest.cc",
1506 "dns/address_sorter_unittest.cc",
1507 ]
1508 }
1509
xunjieli905496a2015-08-31 15:51:171510 if (use_v8_in_net) {
dpranke64df2832015-07-31 22:33:361511 deps += [ ":net_with_v8" ]
1512 } else {
1513 sources -= [
1514 "proxy/proxy_resolver_v8_tracing_unittest.cc",
1515 "proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc",
1516 "proxy/proxy_resolver_v8_unittest.cc",
1517 ]
1518 }
1519
1520 if (use_v8_in_net && !is_android) {
1521 deps += [
1522 ":net_browser_services",
1523 ":net_utility_services",
1524 "//mojo/environment:chromium",
1525 "//third_party/mojo/src/mojo/edk/system",
1526 ]
1527 } else {
1528 sources -= [
1529 "dns/host_resolver_mojo_unittest.cc",
1530 "dns/mojo_host_resolver_impl_unittest.cc",
1531 "proxy/mojo_proxy_resolver_factory_impl_unittest.cc",
1532 "proxy/mojo_proxy_resolver_impl_unittest.cc",
1533 "proxy/mojo_proxy_resolver_v8_tracing_bindings_unittest.cc",
1534 "proxy/proxy_resolver_factory_mojo_unittest.cc",
1535 "proxy/proxy_service_mojo_unittest.cc",
1536 ]
1537 }
1538
1539 if (!enable_mdns) {
1540 sources -= [
1541 "dns/mdns_cache_unittest.cc",
1542 "dns/mdns_client_unittest.cc",
1543 "dns/record_parsed_unittest.cc",
1544 "dns/record_rdata_unittest.cc",
1545 ]
1546 }
1547
1548 if (is_ios) {
1549 # TODO(GYP)
1550 # 'actions': [
1551 # {
1552 # 'action_name': 'copy_test_data',
1553 # 'variables': {
1554 # 'test_data_files': [
mattm61c80732015-11-02 22:35:441555 # 'data/certificate_policies_unittest/',
mattm2c59d262015-10-29 05:33:211556 # 'data/name_constraints_unittest/',
dpranke64df2832015-07-31 22:33:361557 # 'data/ssl/certificates/',
1558 # 'data/test.html',
1559 # 'data/url_request_unittest/',
mattm057b0152015-08-11 00:26:241560 # 'data/verify_name_match_unittest/names/',
eroman58423c12015-08-14 20:47:361561 # 'data/parse_certificate_unittest/',
dpranke64df2832015-07-31 22:33:361562 # ],
1563 # 'test_data_prefix': 'net',
1564 # },
1565 # 'includes': [ '../build/copy_test_data_ios.gypi' ],
1566 # },
1567 # ],
1568 sources -= [
1569 # TODO(droger): The following tests are disabled because the
1570 # implementation is missing or incomplete.
1571 # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS.
1572 "base/keygen_handler_unittest.cc",
1573 "disk_cache/backend_unittest.cc",
1574 "disk_cache/blockfile/block_files_unittest.cc",
1575
1576 # Need to read input data files.
1577 "filter/gzip_filter_unittest.cc",
1578 "socket/ssl_server_socket_unittest.cc",
1579 "spdy/fuzzing/hpack_fuzz_util_test.cc",
1580
1581 # Need TestServer.
1582 "cert_net/cert_net_fetcher_impl_unittest.cc",
1583 "proxy/proxy_script_fetcher_impl_unittest.cc",
1584 "socket/ssl_client_socket_unittest.cc",
1585 "url_request/url_fetcher_impl_unittest.cc",
1586 "url_request/url_request_context_builder_unittest.cc",
1587
1588 # Needs GetAppOutput().
1589 "test/python_utils_unittest.cc",
1590
1591 # The following tests are disabled because they don't apply to
1592 # iOS.
1593 # OS is not "linux" or "freebsd" or "openbsd".
1594 "socket/unix_domain_client_socket_posix_unittest.cc",
1595 "socket/unix_domain_server_socket_posix_unittest.cc",
1596
1597 # See bug http://crbug.com/344533.
1598 "disk_cache/blockfile/index_table_v3_unittest.cc",
1599 ]
1600 }
1601
1602 if (is_android) {
agrievea5517aa2015-10-23 03:03:451603 apk_deps = [
1604 "//base:base_java_unittest_support",
1605 "//net/android:net_java",
1606 "//net/android:net_javatests",
1607 "//net/android:net_java_test_support",
1608 "//net/android:net_unittests_apk_resources",
pkotwicz8c7027d2015-11-11 06:30:071609 "//v8:v8_external_startup_data_assets",
agrievea5517aa2015-10-23 03:03:451610 ]
1611 android_manifest = "//net/android/unittest_support/AndroidManifest.xml"
dpranke64df2832015-07-31 22:33:361612 sources -= [
1613 # See bug http://crbug.com/344533.
1614 "disk_cache/blockfile/index_table_v3_unittest.cc",
dpranke64df2832015-07-31 22:33:361615 ]
1616 deps += [
1617 ":net_test_jni_headers",
1618
1619 # TODO(mmenke): This depends on test_support_base, which depends on
1620 # icu. Figure out a way to remove that dependency.
1621 "//testing/android/native_test:native_test_native_code",
1622 ]
1623 set_sources_assignment_filter([])
1624 sources += [ "base/address_tracker_linux_unittest.cc" ]
1625 set_sources_assignment_filter(sources_assignment_filter)
1626 isolate_file = "net_unittests.isolate"
1627 }
1628
dpranke64df2832015-07-31 22:33:361629 # Symbols for crashes when running tests on swarming.
1630 if (symbol_level > 0) {
1631 if (is_win) {
1632 data += [ "$root_out_dir/net_unittests.exe.pdb" ]
1633 } else if (is_mac) {
1634 data += [ "$root_out_dir/net_unittests.dSYM/" ]
1635 }
1636 }
1637}
1638
1639# !is_android && !is_win && !is_mac
[email protected]8a3f8242014-06-05 18:05:121640
rockot9c67e5f2015-03-12 20:01:211641executable("net_perftests") {
1642 testonly = true
1643 sources = [
ricea10eb9f5e2015-05-19 18:51:571644 "base/mime_sniffer_perftest.cc",
rockot9c67e5f2015-03-12 20:01:211645 "cookies/cookie_monster_perftest.cc",
1646 "disk_cache/blockfile/disk_cache_perftest.cc",
rohitrao1860223c2015-05-16 01:07:141647 "extras/sqlite/sqlite_persistent_cookie_store_perftest.cc",
rockot9c67e5f2015-03-12 20:01:211648 "proxy/proxy_resolver_perftest.cc",
1649 "udp/udp_socket_perftest.cc",
1650 ]
1651
1652 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1653 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
1654 deps = [
brettwcdccaf02015-07-27 16:27:091655 ":extras",
1656 ":net",
1657 ":test_support",
rockot9c67e5f2015-03-12 20:01:211658 "//base",
1659 "//base:i18n",
1660 "//base/test:test_support_perf",
brettwba7a73d2015-08-31 22:17:391661 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:211662 "//testing/gtest",
1663 "//url",
rockot9c67e5f2015-03-12 20:01:211664 ]
1665
1666 if (enable_websockets) {
1667 sources += [ "websockets/websocket_frame_perftest.cc" ]
1668 }
1669
1670 if (use_v8_in_net) {
1671 deps += [ ":net_with_v8" ]
1672 } else {
1673 sources -= [ "proxy/proxy_resolver_perftest.cc" ]
1674 }
rockot9c67e5f2015-03-12 20:01:211675}