blob: c5dfe54178e5d7724e3e282eeb6ce1161c9fc31e [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",
drogerfd8b2772015-12-04 14:34:56576 "cookies/cookie_store_unittest.h",
[email protected]8603c5de2014-04-16 20:34:31577 "disk_cache/disk_cache_test_base.cc",
578 "disk_cache/disk_cache_test_base.h",
579 "disk_cache/disk_cache_test_util.cc",
580 "disk_cache/disk_cache_test_util.h",
581 "dns/dns_test_util.cc",
582 "dns/dns_test_util.h",
583 "dns/mock_host_resolver.cc",
584 "dns/mock_host_resolver.h",
585 "dns/mock_mdns_socket_factory.cc",
586 "dns/mock_mdns_socket_factory.h",
[email protected]8a3f8242014-06-05 18:05:12587 "http/http_transaction_test_util.cc",
588 "http/http_transaction_test_util.h",
vishal.b62985ca92015-04-17 08:45:51589 "log/test_net_log.cc",
590 "log/test_net_log.h",
mmenke43758e62015-05-04 21:09:46591 "log/test_net_log_entry.cc",
592 "log/test_net_log_entry.h",
mmenke0034c542015-05-05 22:34:59593 "log/test_net_log_util.cc",
mmenke43758e62015-05-04 21:09:46594 "log/test_net_log_util.h",
[email protected]8603c5de2014-04-16 20:34:31595 "proxy/mock_proxy_resolver.cc",
596 "proxy/mock_proxy_resolver.h",
597 "proxy/mock_proxy_script_fetcher.cc",
598 "proxy/mock_proxy_script_fetcher.h",
599 "proxy/proxy_config_service_common_unittest.cc",
600 "proxy/proxy_config_service_common_unittest.h",
601 "socket/socket_test_util.cc",
602 "socket/socket_test_util.h",
603 "test/cert_test_util.cc",
604 "test/cert_test_util.h",
[email protected]83e1ae32014-07-18 10:57:07605 "test/cert_test_util_nss.cc",
nharper2e171cf2015-06-01 20:29:23606 "test/channel_id_test_util.cc",
607 "test/channel_id_test_util.h",
[email protected]8603c5de2014-04-16 20:34:31608 "test/ct_test_util.cc",
609 "test/ct_test_util.h",
svaldez7d25c562015-10-30 19:09:45610 "test/embedded_test_server/default_handlers.cc",
611 "test/embedded_test_server/default_handlers.h",
[email protected]8603c5de2014-04-16 20:34:31612 "test/embedded_test_server/embedded_test_server.cc",
613 "test/embedded_test_server/embedded_test_server.h",
614 "test/embedded_test_server/http_connection.cc",
615 "test/embedded_test_server/http_connection.h",
616 "test/embedded_test_server/http_request.cc",
617 "test/embedded_test_server/http_request.h",
618 "test/embedded_test_server/http_response.cc",
619 "test/embedded_test_server/http_response.h",
svaldez6e7e82a22015-10-28 19:39:53620 "test/embedded_test_server/request_handler_util.cc",
621 "test/embedded_test_server/request_handler_util.h",
sammc6ac3fe52015-02-25 06:00:28622 "test/event_waiter.h",
[email protected]8603c5de2014-04-16 20:34:31623 "test/net_test_suite.cc",
624 "test/net_test_suite.h",
625 "test/python_utils.cc",
626 "test/python_utils.h",
brettw6315e032015-11-27 18:38:36627 "test/test_certificate_data.h",
sherouk51b4b098b2015-08-10 09:00:43628 "test/url_request/ssl_certificate_error_job.cc",
629 "test/url_request/ssl_certificate_error_job.h",
Brett Wilson32ce17a2014-11-10 17:45:30630 "test/url_request/url_request_failed_job.cc",
631 "test/url_request/url_request_failed_job.h",
mef3e826cf2014-12-13 18:40:40632 "test/url_request/url_request_mock_data_job.cc",
633 "test/url_request/url_request_mock_data_job.h",
jam8e45cd72015-01-20 16:33:44634 "test/url_request/url_request_slow_download_job.cc",
635 "test/url_request/url_request_slow_download_job.h",
[email protected]8603c5de2014-04-16 20:34:31636 "url_request/test_url_fetcher_factory.cc",
637 "url_request/test_url_fetcher_factory.h",
638 "url_request/url_request_test_util.cc",
639 "url_request/url_request_test_util.h",
640 ]
sherouk3eee4a82015-09-01 10:42:33641 if (!is_ios) {
642 sources += [
643 "test/spawned_test_server/base_test_server.cc",
644 "test/spawned_test_server/base_test_server.h",
645 "test/spawned_test_server/local_test_server.cc",
646 "test/spawned_test_server/local_test_server.h",
647 "test/spawned_test_server/local_test_server_posix.cc",
648 "test/spawned_test_server/local_test_server_win.cc",
649 "test/spawned_test_server/spawned_test_server.h",
650 ]
651 }
[email protected]8603c5de2014-04-16 20:34:31652
brettwbc8b2a22015-07-28 18:24:42653 configs += [
654 "//build/config:precompiled_headers",
655
656 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
657 "//build/config/compiler:no_size_t_to_int_warning",
658 ]
[email protected]8603c5de2014-04-16 20:34:31659
Brett Wilsone53895272014-09-23 23:41:46660 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31661 "//base",
662 "//base/test:test_support",
[email protected]22fe91d2014-08-12 17:07:12663 "//crypto",
[email protected]59ff2d42014-04-22 22:25:23664 "//net",
[email protected]8603c5de2014-04-16 20:34:31665 "//net/tools/tld_cleanup",
666 "//testing/gmock",
667 "//testing/gtest",
668 "//url",
669 ]
670
jamb533b7e2015-03-04 17:12:05671 if (!is_ios) {
672 public_deps += [ "//third_party/protobuf:py_proto" ]
673 }
674
davidben4a644b02015-07-01 19:34:55675 if (use_nss_certs || is_ios) {
scottmg34fb7e52014-12-03 23:27:24676 public_deps += [ "//crypto:platform" ]
[email protected]8603c5de2014-04-16 20:34:31677 }
678
sherouk3eee4a82015-09-01 10:42:33679 if (is_android) {
680 sources += [
[email protected]8603c5de2014-04-16 20:34:31681 "test/spawned_test_server/remote_test_server.cc",
682 "test/spawned_test_server/remote_test_server.h",
683 "test/spawned_test_server/spawner_communicator.cc",
684 "test/spawned_test_server/spawner_communicator.h",
685 ]
686 }
687
688 if (use_v8_in_net) {
Brett Wilsone53895272014-09-23 23:41:46689 public_deps += [ ":net_with_v8" ]
[email protected]8603c5de2014-04-16 20:34:31690 }
691
692 if (!enable_mdns) {
693 sources -= [
694 "dns/mock_mdns_socket_factory.cc",
695 "dns/mock_mdns_socket_factory.h",
696 ]
697 }
698
davidben15d69d482014-09-29 18:24:08699 if (!use_nss_certs) {
scottmg34fb7e52014-12-03 23:27:24700 sources -= [ "test/cert_test_util_nss.cc" ]
[email protected]83e1ae32014-07-18 10:57:07701 }
xunjielia6888202015-04-14 21:34:25702
703 if (!disable_file_support) {
704 sources += [
705 "test/url_request/url_request_mock_http_job.cc",
706 "test/url_request/url_request_mock_http_job.h",
707 "url_request/test_url_request_interceptor.cc",
708 "url_request/test_url_request_interceptor.h",
709 ]
710 }
[email protected]8603c5de2014-04-16 20:34:31711}
712
[email protected]ceeaac792014-06-25 05:14:43713source_set("balsa") {
714 sources = [
715 "tools/balsa/balsa_enums.h",
716 "tools/balsa/balsa_frame.cc",
717 "tools/balsa/balsa_frame.h",
718 "tools/balsa/balsa_headers.cc",
719 "tools/balsa/balsa_headers.h",
720 "tools/balsa/balsa_headers_token_utils.cc",
721 "tools/balsa/balsa_headers_token_utils.h",
722 "tools/balsa/balsa_visitor_interface.h",
723 "tools/balsa/http_message_constants.cc",
724 "tools/balsa/http_message_constants.h",
725 "tools/balsa/noop_balsa_visitor.h",
726 "tools/balsa/simple_buffer.cc",
727 "tools/balsa/simple_buffer.h",
728 "tools/balsa/split.cc",
729 "tools/balsa/split.h",
730 "tools/balsa/string_piece_utils.h",
rtennetie0ee6eb2015-05-01 00:55:09731 "tools/quic/spdy_balsa_utils.cc",
732 "tools/quic/spdy_balsa_utils.h",
[email protected]ceeaac792014-06-25 05:14:43733 ]
734 deps = [
735 ":net",
736 "//base",
[email protected]22fe91d2014-08-12 17:07:12737 "//url",
[email protected]ceeaac792014-06-25 05:14:43738 ]
739}
740
[email protected]8603c5de2014-04-16 20:34:31741if (use_v8_in_net) {
742 component("net_with_v8") {
743 sources = [
744 "proxy/proxy_resolver_v8.cc",
745 "proxy/proxy_resolver_v8.h",
746 "proxy/proxy_resolver_v8_tracing.cc",
747 "proxy/proxy_resolver_v8_tracing.h",
sammcf2d1ea02015-06-29 02:58:47748 "proxy/proxy_resolver_v8_tracing_wrapper.cc",
749 "proxy/proxy_resolver_v8_tracing_wrapper.h",
[email protected]8603c5de2014-04-16 20:34:31750 "proxy/proxy_service_v8.cc",
751 "proxy/proxy_service_v8.h",
752 ]
753
754 defines = [ "NET_IMPLEMENTATION" ]
dprankea22b0732015-10-21 21:15:11755
[email protected]8603c5de2014-04-16 20:34:31756 configs += [
brettwd1c719a2015-02-19 23:17:04757 "//build/config/compiler:no_size_t_to_int_warning",
[email protected]8603c5de2014-04-16 20:34:31758 "//build/config/compiler:wexit_time_destructors",
dprankea22b0732015-10-21 21:15:11759 "//v8:external_startup_data",
[email protected]8603c5de2014-04-16 20:34:31760 ]
761
Brett Wilsone53895272014-09-23 23:41:46762 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31763 ":net",
Brett Wilsone53895272014-09-23 23:41:46764 ]
765 deps = [
[email protected]8603c5de2014-04-16 20:34:31766 "//base",
767 "//gin",
768 "//url",
769 "//v8",
770 ]
771 }
772}
773
amistry7e6ebfdc82015-02-13 04:19:11774if (use_v8_in_net && !is_android) {
775 source_set("net_browser_services") {
776 sources = [
777 "dns/mojo_host_resolver_impl.cc",
778 "dns/mojo_host_resolver_impl.h",
amistry6e1ed1b2015-03-12 05:24:01779 "proxy/in_process_mojo_proxy_resolver_factory.cc",
780 "proxy/in_process_mojo_proxy_resolver_factory.h",
sammc1d5df4d2015-05-05 05:06:17781 "proxy/mojo_proxy_resolver_factory.h",
eromandcacef22015-06-01 19:36:35782 "proxy/proxy_resolver_factory_mojo.cc",
783 "proxy/proxy_resolver_factory_mojo.h",
amistry6e1ed1b2015-03-12 05:24:01784 "proxy/proxy_service_mojo.cc",
785 "proxy/proxy_service_mojo.h",
amistry7e6ebfdc82015-02-13 04:19:11786 ]
787
788 public_deps = [
789 ":mojo_type_converters",
tfarina8ac4d17f2015-12-16 02:11:11790 ":net_with_v8",
brettwbc44c0a92015-02-20 22:30:39791 "//base",
amistry07ff1402015-03-10 07:34:07792 "//mojo/common",
rockot85dce0862015-11-13 01:33:59793 "//mojo/public/cpp/bindings",
amistry7e6ebfdc82015-02-13 04:19:11794 "//net/interfaces",
amistry6e1ed1b2015-03-12 05:24:01795
796 # NOTE(amistry): As long as we support in-process Mojo v8 PAC, we need
797 # this dependency since in_process_mojo_proxy_resolver_factory creates
798 # the utility process side Mojo services in the browser process.
799 # Ultimately, this will go away when we only support out-of-process.
800 ":net_utility_services",
amistry7e6ebfdc82015-02-13 04:19:11801 ]
802 }
803
804 source_set("mojo_type_converters") {
805 sources = [
amistry7ec58112015-02-26 06:03:00806 "dns/mojo_host_type_converters.cc",
807 "dns/mojo_host_type_converters.h",
808 "proxy/mojo_proxy_type_converters.cc",
809 "proxy/mojo_proxy_type_converters.h",
amistry7e6ebfdc82015-02-13 04:19:11810 ]
811
812 public_deps = [
813 ":net",
tfarina8ac4d17f2015-12-16 02:11:11814 "//base",
rockot85dce0862015-11-13 01:33:59815 "//mojo/public/cpp/bindings",
amistry7e6ebfdc82015-02-13 04:19:11816 "//net/interfaces",
amistry7e6ebfdc82015-02-13 04:19:11817 ]
818 }
sammc5403aa1d2015-02-25 04:59:21819
820 source_set("net_utility_services") {
821 sources = [
sammc6ac3fe52015-02-25 06:00:28822 "dns/host_resolver_mojo.cc",
823 "dns/host_resolver_mojo.h",
sammc352f7492015-02-25 09:45:24824 "proxy/mojo_proxy_resolver_factory_impl.cc",
825 "proxy/mojo_proxy_resolver_factory_impl.h",
sammc5403aa1d2015-02-25 04:59:21826 "proxy/mojo_proxy_resolver_impl.cc",
827 "proxy/mojo_proxy_resolver_impl.h",
sammca3242c92015-07-10 02:38:51828 "proxy/mojo_proxy_resolver_v8_tracing_bindings.h",
sammc5403aa1d2015-02-25 04:59:21829 ]
830
rockot9509ec82015-04-14 02:50:56831 deps = [
832 ":net_with_v8",
tfarina8ac4d17f2015-12-16 02:11:11833 "//base",
rockot9509ec82015-04-14 02:50:56834 ]
835
sammc5403aa1d2015-02-25 04:59:21836 public_deps = [
837 ":mojo_type_converters",
838 ":net",
839 "//mojo/common",
rockot85dce0862015-11-13 01:33:59840 "//mojo/public/cpp/bindings",
sammc5403aa1d2015-02-25 04:59:21841 "//net/interfaces",
sammc5403aa1d2015-02-25 04:59:21842 ]
843 }
amistry7e6ebfdc82015-02-13 04:19:11844}
845
[email protected]8603c5de2014-04-16 20:34:31846if (!is_ios && !is_android) {
847 executable("crash_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24848 testonly = true
scottmg34fb7e52014-12-03 23:27:24849 sources = [
850 "tools/crash_cache/crash_cache.cc",
851 ]
dpranke43276212015-02-20 02:55:19852
brettwd1c719a2015-02-19 23:17:04853 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
854 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31855 deps = [
856 ":net",
[email protected]b2b2bf52014-05-28 20:26:57857 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31858 "//base",
brettwba7a73d2015-08-31 22:17:39859 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31860 ]
861 }
862
863 executable("crl_set_dump") {
Brett Wilson8f80ad0b2014-09-08 19:50:24864 testonly = true
scottmg34fb7e52014-12-03 23:27:24865 sources = [
866 "tools/crl_set_dump/crl_set_dump.cc",
867 ]
dpranke43276212015-02-20 02:55:19868
brettwd1c719a2015-02-19 23:17:04869 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
870 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31871 deps = [
872 ":net",
873 "//base",
brettwba7a73d2015-08-31 22:17:39874 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31875 ]
876 }
877
878 executable("dns_fuzz_stub") {
Brett Wilson8f80ad0b2014-09-08 19:50:24879 testonly = true
scottmg34fb7e52014-12-03 23:27:24880 sources = [
881 "tools/dns_fuzz_stub/dns_fuzz_stub.cc",
882 ]
dpranke43276212015-02-20 02:55:19883
brettwd1c719a2015-02-19 23:17:04884 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
885 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31886 deps = [
887 ":net",
888 "//base",
brettwba7a73d2015-08-31 22:17:39889 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31890 ]
891 }
892
893 executable("gdig") {
Brett Wilson8f80ad0b2014-09-08 19:50:24894 testonly = true
[email protected]8603c5de2014-04-16 20:34:31895 sources = [
896 "tools/gdig/file_net_log.cc",
897 "tools/gdig/gdig.cc",
898 ]
899 deps = [
900 ":net",
901 "//base",
brettwba7a73d2015-08-31 22:17:39902 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31903 ]
904 }
905
906 executable("get_server_time") {
Brett Wilson8f80ad0b2014-09-08 19:50:24907 testonly = true
scottmg34fb7e52014-12-03 23:27:24908 sources = [
909 "tools/get_server_time/get_server_time.cc",
910 ]
dpranke43276212015-02-20 02:55:19911
brettwd1c719a2015-02-19 23:17:04912 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
913 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31914 deps = [
915 ":net",
916 "//base",
917 "//base:i18n",
brettwba7a73d2015-08-31 22:17:39918 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31919 "//url",
920 ]
921 }
922
rockot9c67e5f2015-03-12 20:01:21923 executable("hpack_example_generator") {
924 testonly = true
925 sources = [
926 "spdy/fuzzing/hpack_example_generator.cc",
927 ]
928
929 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
930 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
931 deps = [
rockot9c67e5f2015-03-12 20:01:21932 ":net",
brettwba7a73d2015-08-31 22:17:39933 "//base",
934 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:21935 ]
936 }
937
938 executable("hpack_fuzz_mutator") {
939 testonly = true
940 sources = [
941 "spdy/fuzzing/hpack_fuzz_mutator.cc",
942 ]
943
944 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
945 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
946 deps = [
rockot9c67e5f2015-03-12 20:01:21947 ":net",
brettwba7a73d2015-08-31 22:17:39948 "//base",
949 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:21950 ]
951 }
952
953 executable("hpack_fuzz_wrapper") {
954 testonly = true
955 sources = [
956 "spdy/fuzzing/hpack_fuzz_wrapper.cc",
957 ]
958
959 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
960 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
961 deps = [
rockot9c67e5f2015-03-12 20:01:21962 ":net",
brettwba7a73d2015-08-31 22:17:39963 "//base",
964 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:21965 ]
966 }
967
[email protected]8603c5de2014-04-16 20:34:31968 if (use_v8_in_net) {
969 executable("net_watcher") {
Brett Wilson8f80ad0b2014-09-08 19:50:24970 testonly = true
scottmg34fb7e52014-12-03 23:27:24971 sources = [
972 "tools/net_watcher/net_watcher.cc",
973 ]
[email protected]8603c5de2014-04-16 20:34:31974 deps = [
975 ":net",
976 ":net_with_v8",
977 "//base",
brettwba7a73d2015-08-31 22:17:39978 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31979 ]
980
mostynbbf5e6cc2015-10-21 07:53:31981 if (is_desktop_linux && use_gconf && use_glib) {
xunjieli905496a2015-08-31 15:51:17982 configs += [
983 "//build/config/linux:gconf",
984 "//build/config/linux:glib",
985 ]
dprankead0c1f42015-08-28 21:48:04986 deps += [ "//build/linux:gio" ]
[email protected]8603c5de2014-04-16 20:34:31987 }
988 }
989 }
990
991 executable("run_testserver") {
Brett Wilson8f80ad0b2014-09-08 19:50:24992 testonly = true
scottmg34fb7e52014-12-03 23:27:24993 sources = [
994 "tools/testserver/run_testserver.cc",
995 ]
[email protected]8603c5de2014-04-16 20:34:31996 deps = [
[email protected]b2b2bf52014-05-28 20:26:57997 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31998 "//base",
999 "//base/test:test_support",
brettwba7a73d2015-08-31 22:17:391000 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311001 "//testing/gtest",
1002 ]
1003 }
1004
1005 executable("stress_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:241006 testonly = true
scottmg34fb7e52014-12-03 23:27:241007 sources = [
rvargase23fcf652015-03-04 19:59:221008 "tools/stress_cache/stress_cache.cc",
scottmg34fb7e52014-12-03 23:27:241009 ]
dpranke43276212015-02-20 02:55:191010
brettwd1c719a2015-02-19 23:17:041011 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1012 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:311013 deps = [
1014 ":net",
[email protected]b2b2bf52014-05-28 20:26:571015 ":test_support",
[email protected]8603c5de2014-04-16 20:34:311016 "//base",
brettwba7a73d2015-08-31 22:17:391017 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311018 ]
1019 }
1020
1021 executable("tld_cleanup") {
scottmg34fb7e52014-12-03 23:27:241022 sources = [
1023 "tools/tld_cleanup/tld_cleanup.cc",
1024 ]
dpranke43276212015-02-20 02:55:191025
brettwd1c719a2015-02-19 23:17:041026 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1027 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:311028 deps = [
1029 "//base",
1030 "//base:i18n",
brettwba7a73d2015-08-31 22:17:391031 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311032 "//net/tools/tld_cleanup",
1033 ]
1034 }
1035}
1036
rch6983a3f2015-03-30 03:47:281037if (is_linux) {
[email protected]8a3f8242014-06-05 18:05:121038 static_library("epoll_server") {
[email protected]8603c5de2014-04-16 20:34:311039 sources = [
1040 "tools/epoll_server/epoll_server.cc",
1041 "tools/epoll_server/epoll_server.h",
1042 ]
1043 deps = [
1044 ":net",
1045 "//base",
1046 ]
1047 }
1048
[email protected]8a3f8242014-06-05 18:05:121049 static_library("flip_in_mem_edsm_server_base") {
Brett Wilson8f80ad0b2014-09-08 19:50:241050 testonly = true
[email protected]8603c5de2014-04-16 20:34:311051 sources = [
[email protected]8603c5de2014-04-16 20:34:311052 "tools/flip_server/acceptor_thread.cc",
satorux933fc7a2015-02-13 07:09:101053 "tools/flip_server/acceptor_thread.h",
1054 "tools/flip_server/constants.h",
[email protected]8603c5de2014-04-16 20:34:311055 "tools/flip_server/create_listener.cc",
1056 "tools/flip_server/create_listener.h",
[email protected]8603c5de2014-04-16 20:34:311057 "tools/flip_server/flip_config.cc",
1058 "tools/flip_server/flip_config.h",
1059 "tools/flip_server/http_interface.cc",
1060 "tools/flip_server/http_interface.h",
[email protected]8603c5de2014-04-16 20:34:311061 "tools/flip_server/mem_cache.cc",
satorux933fc7a2015-02-13 07:09:101062 "tools/flip_server/mem_cache.h",
[email protected]8603c5de2014-04-16 20:34:311063 "tools/flip_server/output_ordering.cc",
1064 "tools/flip_server/output_ordering.h",
1065 "tools/flip_server/ring_buffer.cc",
1066 "tools/flip_server/ring_buffer.h",
1067 "tools/flip_server/sm_connection.cc",
1068 "tools/flip_server/sm_connection.h",
1069 "tools/flip_server/sm_interface.h",
[email protected]8603c5de2014-04-16 20:34:311070 "tools/flip_server/spdy_interface.cc",
1071 "tools/flip_server/spdy_interface.h",
satorux933fc7a2015-02-13 07:09:101072 "tools/flip_server/spdy_ssl.cc",
1073 "tools/flip_server/spdy_ssl.h",
[email protected]8603c5de2014-04-16 20:34:311074 "tools/flip_server/spdy_util.cc",
1075 "tools/flip_server/spdy_util.h",
1076 "tools/flip_server/streamer_interface.cc",
1077 "tools/flip_server/streamer_interface.h",
rvargas145310f2015-08-14 18:09:041078 "tools/flip_server/url_to_filename_encoder.cc",
1079 "tools/flip_server/url_to_filename_encoder.h",
1080 "tools/flip_server/url_utilities.cc",
1081 "tools/flip_server/url_utilities.h",
[email protected]8603c5de2014-04-16 20:34:311082 ]
1083 deps = [
1084 ":balsa",
1085 ":epoll_server",
1086 ":net",
1087 "//base",
[email protected]edfd0f42014-07-22 18:20:371088 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311089 ]
1090 }
1091
1092 executable("flip_in_mem_edsm_server_unittests") {
Brett Wilson8f80ad0b2014-09-08 19:50:241093 testonly = true
[email protected]8603c5de2014-04-16 20:34:311094 sources = [
1095 "tools/flip_server/flip_test_utils.cc",
1096 "tools/flip_server/flip_test_utils.h",
1097 "tools/flip_server/http_interface_test.cc",
1098 "tools/flip_server/mem_cache_test.cc",
1099 "tools/flip_server/run_all_tests.cc",
1100 "tools/flip_server/spdy_interface_test.cc",
rvargas145310f2015-08-14 18:09:041101 "tools/flip_server/url_to_filename_encoder_unittest.cc",
1102 "tools/flip_server/url_utilities_unittest.cc",
[email protected]8603c5de2014-04-16 20:34:311103 ]
1104 deps = [
brettwbc44c0a92015-02-20 22:30:391105 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311106 ":flip_in_mem_edsm_server_base",
1107 ":net",
[email protected]b2b2bf52014-05-28 20:26:571108 ":test_support",
brettwba7a73d2015-08-31 22:17:391109 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311110 "//testing/gmock",
agrieved7a71c882015-11-20 19:53:281111 "//testing/gtest",
[email protected]edfd0f42014-07-22 18:20:371112 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311113 ]
1114 }
1115
1116 executable("flip_in_mem_edsm_server") {
Brett Wilson8f80ad0b2014-09-08 19:50:241117 testonly = true
scottmg34fb7e52014-12-03 23:27:241118 sources = [
1119 "tools/flip_server/flip_in_mem_edsm_server.cc",
1120 ]
[email protected]8603c5de2014-04-16 20:34:311121 deps = [
brettwbc44c0a92015-02-20 22:30:391122 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311123 ":flip_in_mem_edsm_server_base",
1124 ":net",
1125 "//base",
brettwba7a73d2015-08-31 22:17:391126 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311127 ]
1128 }
1129
rch216445c2015-03-27 00:23:281130 source_set("epoll_quic_tools") {
[email protected]8603c5de2014-04-16 20:34:311131 sources = [
1132 "tools/quic/quic_client.cc",
1133 "tools/quic/quic_client.h",
[email protected]8603c5de2014-04-16 20:34:311134 "tools/quic/quic_default_packet_writer.cc",
1135 "tools/quic/quic_default_packet_writer.h",
[email protected]8603c5de2014-04-16 20:34:311136 "tools/quic/quic_epoll_clock.cc",
1137 "tools/quic/quic_epoll_clock.h",
1138 "tools/quic/quic_epoll_connection_helper.cc",
1139 "tools/quic/quic_epoll_connection_helper.h",
rtennetifb3fa6c2015-03-16 23:04:551140 "tools/quic/quic_packet_reader.cc",
1141 "tools/quic/quic_packet_reader.h",
[email protected]8603c5de2014-04-16 20:34:311142 "tools/quic/quic_packet_writer_wrapper.cc",
1143 "tools/quic/quic_packet_writer_wrapper.h",
1144 "tools/quic/quic_server.cc",
1145 "tools/quic/quic_server.h",
[email protected]8603c5de2014-04-16 20:34:311146 "tools/quic/quic_socket_utils.cc",
1147 "tools/quic/quic_socket_utils.h",
[email protected]8603c5de2014-04-16 20:34:311148 ]
1149 deps = [
1150 ":balsa",
1151 ":epoll_server",
1152 ":net",
tfarina8ac4d17f2015-12-16 02:11:111153 ":simple_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311154 "//base",
1155 "//base/third_party/dynamic_annotations",
1156 "//crypto",
[email protected]edfd0f42014-07-22 18:20:371157 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311158 "//url",
1159 ]
1160 }
1161
rch216445c2015-03-27 00:23:281162 executable("epoll_quic_client") {
scottmg34fb7e52014-12-03 23:27:241163 sources = [
1164 "tools/quic/quic_client_bin.cc",
1165 ]
[email protected]8603c5de2014-04-16 20:34:311166 deps = [
brettwbc44c0a92015-02-20 22:30:391167 ":balsa",
rch216445c2015-03-27 00:23:281168 ":epoll_quic_tools",
agrieved7a71c882015-11-20 19:53:281169 ":epoll_server",
rch216445c2015-03-27 00:23:281170 ":net",
1171 ":simple_quic_tools",
1172 "//base",
brettwba7a73d2015-08-31 22:17:391173 "//build/config/sanitizers:deps",
rch216445c2015-03-27 00:23:281174 "//third_party/boringssl",
1175 ]
1176 }
1177
1178 executable("epoll_quic_server") {
1179 sources = [
1180 "tools/quic/quic_server_bin.cc",
1181 ]
1182 deps = [
1183 ":balsa",
rch216445c2015-03-27 00:23:281184 ":epoll_quic_tools",
agrieved7a71c882015-11-20 19:53:281185 ":epoll_server",
[email protected]8603c5de2014-04-16 20:34:311186 ":net",
rchda78df5a2015-03-22 05:16:371187 ":simple_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311188 "//base",
brettwba7a73d2015-08-31 22:17:391189 "//build/config/sanitizers:deps",
[email protected]edfd0f42014-07-22 18:20:371190 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311191 ]
1192 }
[email protected]8603c5de2014-04-16 20:34:311193}
1194
[email protected]ef0eb442014-05-15 09:32:181195if (is_android) {
1196 generate_jni("net_jni_headers") {
1197 sources = [
1198 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
1199 "android/java/src/org/chromium/net/AndroidKeyStore.java",
1200 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java",
tbansal59a1ddc2015-09-14 17:35:011201 "android/java/src/org/chromium/net/AndroidTrafficStats.java",
[email protected]ef0eb442014-05-15 09:32:181202 "android/java/src/org/chromium/net/GURLUtils.java",
aberentec894a52015-07-09 14:45:531203 "android/java/src/org/chromium/net/HttpNegotiateAuthenticator.java",
xunjieli905496a2015-08-31 15:51:171204 "android/java/src/org/chromium/net/NetStringUtil.java",
[email protected]ef0eb442014-05-15 09:32:181205 "android/java/src/org/chromium/net/NetworkChangeNotifier.java",
1206 "android/java/src/org/chromium/net/ProxyChangeListener.java",
1207 "android/java/src/org/chromium/net/X509Util.java",
1208 ]
1209 jni_package = "net"
1210 }
cjhopmandad5f4272014-09-05 01:00:551211 generate_jni("net_test_jni_headers") {
1212 sources = [
1213 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java",
aberentec894a52015-07-09 14:45:531214 "test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticator.java",
danakjeb58d9c2015-12-15 20:15:091215 "test/android/javatests/src/org/chromium/net/test/EmbeddedTestServer.java",
cjhopmandad5f4272014-09-05 01:00:551216 ]
brettwcdccaf02015-07-27 16:27:091217 jni_package = "net/test"
cjhopmandad5f4272014-09-05 01:00:551218 }
[email protected]ef0eb442014-05-15 09:32:181219}
[email protected]8603c5de2014-04-16 20:34:311220
1221if (is_android || is_linux) {
1222 executable("disk_cache_memory_test") {
Brett Wilson8f80ad0b2014-09-08 19:50:241223 testonly = true
scottmg34fb7e52014-12-03 23:27:241224 sources = [
1225 "tools/disk_cache_memory_test/disk_cache_memory_test.cc",
1226 ]
[email protected]8603c5de2014-04-16 20:34:311227 deps = [
1228 ":net",
1229 "//base",
brettwba7a73d2015-08-31 22:17:391230 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311231 ]
1232 }
1233}
[email protected]8a3f8242014-06-05 18:05:121234
rch47ad01f2015-03-20 21:17:231235source_set("simple_quic_tools") {
rcha9d12ce12015-03-19 23:06:491236 sources = [
rtennetid67b3a722015-08-18 05:15:311237 "tools/quic/quic_client_base.cc",
1238 "tools/quic/quic_client_base.h",
rched113b22015-03-26 04:54:051239 "tools/quic/quic_client_session.cc",
1240 "tools/quic/quic_client_session.h",
rchc99f380c2015-03-26 19:50:561241 "tools/quic/quic_dispatcher.cc",
1242 "tools/quic/quic_dispatcher.h",
rch0e945472015-03-26 15:19:211243 "tools/quic/quic_in_memory_cache.cc",
1244 "tools/quic/quic_in_memory_cache.h",
rchc99f380c2015-03-26 19:50:561245 "tools/quic/quic_per_connection_packet_writer.cc",
1246 "tools/quic/quic_per_connection_packet_writer.h",
rch0e945472015-03-26 15:19:211247 "tools/quic/quic_server_session.cc",
1248 "tools/quic/quic_server_session.h",
rcha9d12ce12015-03-19 23:06:491249 "tools/quic/quic_simple_client.cc",
1250 "tools/quic/quic_simple_client.h",
rch216445c2015-03-27 00:23:281251 "tools/quic/quic_simple_per_connection_packet_writer.cc",
1252 "tools/quic/quic_simple_per_connection_packet_writer.h",
1253 "tools/quic/quic_simple_server.cc",
1254 "tools/quic/quic_simple_server.h",
1255 "tools/quic/quic_simple_server_packet_writer.cc",
1256 "tools/quic/quic_simple_server_packet_writer.h",
rched113b22015-03-26 04:54:051257 "tools/quic/quic_spdy_client_stream.cc",
1258 "tools/quic/quic_spdy_client_stream.h",
rch0e945472015-03-26 15:19:211259 "tools/quic/quic_spdy_server_stream.cc",
1260 "tools/quic/quic_spdy_server_stream.h",
1261 "tools/quic/quic_time_wait_list_manager.cc",
1262 "tools/quic/quic_time_wait_list_manager.h",
rchda78df5a2015-03-22 05:16:371263 "tools/quic/synchronous_host_resolver.cc",
1264 "tools/quic/synchronous_host_resolver.h",
rcha9d12ce12015-03-19 23:06:491265 ]
1266 deps = [
tfarina8ac4d17f2015-12-16 02:11:111267 ":balsa",
rcha9d12ce12015-03-19 23:06:491268 ":net",
1269 "//base",
rch47ad01f2015-03-20 21:17:231270 "//base/third_party/dynamic_annotations",
1271 "//url",
1272 ]
1273}
1274
ricea7afa5232015-12-01 20:55:231275action_foreach("stale_while_revalidate_experiment_domains_dafsa") {
1276 script = "//net/tools/dafsa/make_dafsa.py"
1277 sources = [
1278 "base/stale_while_revalidate_experiment_domains.gperf",
1279 ]
1280 outputs = [
1281 "${target_gen_dir}/base/{{source_name_part}}-inc.cc",
1282 ]
1283 args = [
1284 "{{source}}",
1285 rebase_path("${target_gen_dir}/base/{{source_name_part}}-inc.cc",
1286 root_build_dir),
1287 ]
1288}
1289
1290source_set("stale_while_revalidate_experiment_domains") {
1291 sources = [
1292 "base/stale_while_revalidate_experiment_domains.cc",
1293 "base/stale_while_revalidate_experiment_domains.h",
1294 ]
1295 deps = [
1296 ":net",
1297 ":stale_while_revalidate_experiment_domains_dafsa",
1298 "//base",
1299 ]
1300 configs += net_shared_configs
1301}
1302
sherouk51b4b098b2015-08-10 09:00:431303if (!is_ios) {
1304 executable("quic_client") {
1305 sources = [
1306 "tools/quic/quic_simple_client_bin.cc",
1307 ]
1308 deps = [
1309 ":net",
1310 ":simple_quic_tools",
1311 "//base",
brettwba7a73d2015-08-31 22:17:391312 "//build/config/sanitizers:deps",
sherouk51b4b098b2015-08-10 09:00:431313 "//url",
1314 ]
1315 }
1316 executable("quic_server") {
1317 sources = [
1318 "tools/quic/quic_simple_server_bin.cc",
1319 ]
1320 deps = [
1321 ":net",
1322 ":simple_quic_tools",
1323 "//base",
brettwba7a73d2015-08-31 22:17:391324 "//build/config/sanitizers:deps",
sherouk51b4b098b2015-08-10 09:00:431325 "//third_party/boringssl",
1326 "//third_party/protobuf:protobuf_lite",
1327 ]
1328 }
rch216445c2015-03-27 00:23:281329}
1330
dpranke64df2832015-07-31 22:33:361331# TODO(GYP): Delete this after we've converted everything to GN.
1332# The _run targets exist only for compatibility w/ GYP.
1333group("net_unittests_run") {
1334 testonly = true
1335 deps = [
1336 ":net_unittests",
1337 ]
1338}
1339
1340test("net_unittests") {
1341 sources = gypi_values.net_test_sources
1342
sherouk51b4b098b2015-08-10 09:00:431343 if (is_ios) {
1344 sources -= [
1345 "websockets/websocket_stream_cookie_test.cc",
1346 "websockets/websocket_stream_create_test_base.cc",
1347 "websockets/websocket_stream_create_test_base.h",
1348 ]
1349 }
1350
dpranke64df2832015-07-31 22:33:361351 configs += [
1352 "//build/config:precompiled_headers",
1353
1354 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1355 "//build/config/compiler:no_size_t_to_int_warning",
1356 ]
1357 defines = []
1358
1359 deps = [
1360 ":balsa",
1361 ":extras",
1362 ":http_server",
1363 ":net",
1364 ":simple_quic_tools",
ricea7afa5232015-12-01 20:55:231365 ":stale_while_revalidate_experiment_domains",
dpranke64df2832015-07-31 22:33:361366 ":test_support",
1367 "//base",
1368 "//base:i18n",
1369 "//base:prefs_test_support",
1370 "//base/allocator",
1371 "//base/third_party/dynamic_annotations",
1372 "//crypto",
1373 "//crypto:platform",
1374 "//crypto:test_support",
dpranke64df2832015-07-31 22:33:361375 "//net/base/registry_controlled_domains",
1376 "//sql",
1377 "//testing/gmock",
1378 "//testing/gtest",
1379 "//third_party/zlib",
1380 "//url",
1381 ]
1382
1383 data = [
1384 "data/",
1385 ]
1386
1387 if (is_linux || is_mac || is_win) {
1388 deps += [
1389 "//third_party/pyftpdlib/",
1390 "//third_party/pywebsocket/",
1391 "//third_party/tlslite/",
1392 ]
1393 data_deps = [
1394 "//third_party/pyftpdlib/",
1395 "//third_party/pywebsocket/",
1396 "//third_party/tlslite/",
1397 ]
1398 data += [
1399 "tools/testserver/",
1400 "//third_party/pyftpdlib/",
1401 "//third_party/pywebsocket/",
1402 "//third_party/tlslite/",
1403 "$root_out_dir/pyproto/google/",
dprankef497c7962015-07-31 19:46:231404 ]
1405 }
1406
dpranke64df2832015-07-31 22:33:361407 if (is_desktop_linux) {
1408 deps += [ ":epoll_quic_tools" ]
1409 }
1410 if (is_linux) {
1411 sources += gypi_values.net_linux_test_sources
1412 deps += [
1413 ":epoll_quic_tools",
1414 ":epoll_server",
1415 ":flip_in_mem_edsm_server_base",
brettwbc8b2a22015-07-28 18:24:421416 ]
dpranke64df2832015-07-31 22:33:361417 }
[email protected]8a3f8242014-06-05 18:05:121418
dpranke64df2832015-07-31 22:33:361419 if (is_mac || is_ios) {
1420 sources += gypi_values.net_base_test_mac_ios_sources
1421 }
1422
1423 if (is_chromeos) {
1424 sources -= [ "proxy/proxy_config_service_linux_unittest.cc" ]
1425 }
1426
1427 if (v8_use_external_startup_data) {
1428 deps += [ "//gin" ]
1429 }
1430
1431 if (!use_nss_certs) {
1432 sources -= [
1433 "cert/nss_cert_database_unittest.cc",
1434 "ssl/client_cert_store_nss_unittest.cc",
[email protected]8a3f8242014-06-05 18:05:121435 ]
dpranke64df2832015-07-31 22:33:361436 if (is_chromeos) { # Already removed for all non-ChromeOS builds.
davidben2bcbc6b2015-04-22 02:36:411437 sources -= [
dpranke64df2832015-07-31 22:33:361438 "cert/nss_cert_database_chromeos_unittest.cc",
1439 "cert/nss_profile_filter_chromeos_unittest.cc",
davidben2bcbc6b2015-04-22 02:36:411440 ]
brettw43ae0e12015-07-14 22:12:361441 }
[email protected]8a3f8242014-06-05 18:05:121442 }
dpranke64df2832015-07-31 22:33:361443
1444 if (use_openssl) {
dpranke64df2832015-07-31 22:33:361445 sources -= [ "quic/test_tools/crypto_test_utils_nss.cc" ]
1446 } else {
1447 sources -= [
dpranke64df2832015-07-31 22:33:361448 "quic/test_tools/crypto_test_utils_openssl.cc",
1449 "socket/ssl_client_socket_openssl_unittest.cc",
1450 "ssl/ssl_client_session_cache_openssl_unittest.cc",
1451 ]
1452 }
1453
1454 if (use_kerberos) {
1455 defines += [ "USE_KERBEROS" ]
1456 }
1457
1458 # These are excluded on Android, because the actual Kerberos support, which
1459 # these test, is in a separate app on Android.
1460 if (!use_kerberos || is_android) {
1461 sources -= [
1462 "http/http_auth_gssapi_posix_unittest.cc",
1463 "http/mock_gssapi_library_posix.cc",
1464 "http/mock_gssapi_library_posix.h",
1465 ]
1466 }
1467 if (!use_kerberos) {
1468 sources -= [ "http/http_auth_handler_negotiate_unittest.cc" ]
1469 }
1470
davidbene1858d82015-12-09 02:18:401471 if (!use_nss_certs && !is_ios) {
dpranke64df2832015-07-31 22:33:361472 # Only include this test when on Posix and using NSS for
1473 # cert verification or on iOS (which also uses NSS for certs).
1474 sources -= [ "cert_net/nss_ocsp_unittest.cc" ]
1475 }
1476
1477 if (!use_openssl_certs) {
1478 sources -= [ "ssl/openssl_client_key_store_unittest.cc" ]
1479 }
1480
1481 if (!enable_websockets) {
1482 sources -= [
1483 "server/http_connection_unittest.cc",
1484 "server/http_server_response_info_unittest.cc",
1485 "server/http_server_unittest.cc",
1486 "server/web_socket_encoder_unittest.cc",
1487 "websockets/websocket_basic_stream_test.cc",
1488 "websockets/websocket_channel_test.cc",
dprankea8d2fb92015-10-28 22:25:231489 "websockets/websocket_deflate_parameters_test.cc",
dpranke64df2832015-07-31 22:33:361490 "websockets/websocket_deflate_predictor_impl_test.cc",
1491 "websockets/websocket_deflate_stream_test.cc",
1492 "websockets/websocket_deflater_test.cc",
1493 "websockets/websocket_end_to_end_test.cc",
1494 "websockets/websocket_errors_test.cc",
1495 "websockets/websocket_extension_parser_test.cc",
dprankea8d2fb92015-10-28 22:25:231496 "websockets/websocket_extension_test.cc",
dpranke64df2832015-07-31 22:33:361497 "websockets/websocket_frame_parser_test.cc",
1498 "websockets/websocket_frame_test.cc",
1499 "websockets/websocket_handshake_challenge_test.cc",
1500 "websockets/websocket_handshake_stream_create_helper_test.cc",
1501 "websockets/websocket_inflater_test.cc",
1502 "websockets/websocket_stream_test.cc",
1503 "websockets/websocket_test_util.cc",
1504 "websockets/websocket_test_util.h",
1505 ]
1506 deps -= [ ":http_server" ]
1507 }
1508
1509 if (disable_file_support) {
1510 sources -= [
1511 "base/directory_lister_unittest.cc",
1512 "url_request/url_request_file_job_unittest.cc",
1513 ]
1514 }
1515
1516 if (disable_ftp_support) {
1517 sources -= [
1518 "ftp/ftp_auth_cache_unittest.cc",
1519 "ftp/ftp_ctrl_response_buffer_unittest.cc",
1520 "ftp/ftp_directory_listing_parser_ls_unittest.cc",
dpranke64df2832015-07-31 22:33:361521 "ftp/ftp_directory_listing_parser_unittest.cc",
1522 "ftp/ftp_directory_listing_parser_unittest.h",
1523 "ftp/ftp_directory_listing_parser_vms_unittest.cc",
1524 "ftp/ftp_directory_listing_parser_windows_unittest.cc",
1525 "ftp/ftp_network_transaction_unittest.cc",
1526 "ftp/ftp_util_unittest.cc",
1527 "url_request/url_request_ftp_job_unittest.cc",
1528 ]
1529 }
1530
1531 if (!enable_built_in_dns) {
1532 sources -= [
1533 "dns/address_sorter_posix_unittest.cc",
1534 "dns/address_sorter_unittest.cc",
1535 ]
1536 }
1537
xunjieli905496a2015-08-31 15:51:171538 if (use_v8_in_net) {
dpranke64df2832015-07-31 22:33:361539 deps += [ ":net_with_v8" ]
1540 } else {
1541 sources -= [
1542 "proxy/proxy_resolver_v8_tracing_unittest.cc",
1543 "proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc",
1544 "proxy/proxy_resolver_v8_unittest.cc",
1545 ]
1546 }
1547
1548 if (use_v8_in_net && !is_android) {
1549 deps += [
1550 ":net_browser_services",
1551 ":net_utility_services",
1552 "//mojo/environment:chromium",
1553 "//third_party/mojo/src/mojo/edk/system",
1554 ]
1555 } else {
1556 sources -= [
1557 "dns/host_resolver_mojo_unittest.cc",
1558 "dns/mojo_host_resolver_impl_unittest.cc",
1559 "proxy/mojo_proxy_resolver_factory_impl_unittest.cc",
1560 "proxy/mojo_proxy_resolver_impl_unittest.cc",
1561 "proxy/mojo_proxy_resolver_v8_tracing_bindings_unittest.cc",
1562 "proxy/proxy_resolver_factory_mojo_unittest.cc",
1563 "proxy/proxy_service_mojo_unittest.cc",
1564 ]
1565 }
1566
1567 if (!enable_mdns) {
1568 sources -= [
1569 "dns/mdns_cache_unittest.cc",
1570 "dns/mdns_client_unittest.cc",
1571 "dns/record_parsed_unittest.cc",
1572 "dns/record_rdata_unittest.cc",
1573 ]
1574 }
1575
1576 if (is_ios) {
1577 # TODO(GYP)
1578 # 'actions': [
1579 # {
1580 # 'action_name': 'copy_test_data',
1581 # 'variables': {
1582 # 'test_data_files': [
mattm61c80732015-11-02 22:35:441583 # 'data/certificate_policies_unittest/',
mattm2c59d262015-10-29 05:33:211584 # 'data/name_constraints_unittest/',
dpranke64df2832015-07-31 22:33:361585 # 'data/ssl/certificates/',
1586 # 'data/test.html',
1587 # 'data/url_request_unittest/',
mattm057b0152015-08-11 00:26:241588 # 'data/verify_name_match_unittest/names/',
eroman58423c12015-08-14 20:47:361589 # 'data/parse_certificate_unittest/',
dpranke64df2832015-07-31 22:33:361590 # ],
1591 # 'test_data_prefix': 'net',
1592 # },
1593 # 'includes': [ '../build/copy_test_data_ios.gypi' ],
1594 # },
1595 # ],
1596 sources -= [
1597 # TODO(droger): The following tests are disabled because the
1598 # implementation is missing or incomplete.
1599 # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS.
1600 "base/keygen_handler_unittest.cc",
1601 "disk_cache/backend_unittest.cc",
1602 "disk_cache/blockfile/block_files_unittest.cc",
1603
1604 # Need to read input data files.
1605 "filter/gzip_filter_unittest.cc",
1606 "socket/ssl_server_socket_unittest.cc",
1607 "spdy/fuzzing/hpack_fuzz_util_test.cc",
1608
1609 # Need TestServer.
1610 "cert_net/cert_net_fetcher_impl_unittest.cc",
1611 "proxy/proxy_script_fetcher_impl_unittest.cc",
1612 "socket/ssl_client_socket_unittest.cc",
1613 "url_request/url_fetcher_impl_unittest.cc",
1614 "url_request/url_request_context_builder_unittest.cc",
1615
1616 # Needs GetAppOutput().
1617 "test/python_utils_unittest.cc",
1618
1619 # The following tests are disabled because they don't apply to
1620 # iOS.
1621 # OS is not "linux" or "freebsd" or "openbsd".
1622 "socket/unix_domain_client_socket_posix_unittest.cc",
1623 "socket/unix_domain_server_socket_posix_unittest.cc",
1624
1625 # See bug http://crbug.com/344533.
1626 "disk_cache/blockfile/index_table_v3_unittest.cc",
1627 ]
1628 }
1629
1630 if (is_android) {
agrieve97176362015-12-01 16:36:191631 deps += [
1632 ":net_test_jni_headers",
agrievea5517aa2015-10-23 03:03:451633 "//base:base_java_unittest_support",
1634 "//net/android:net_java",
agrievea5517aa2015-10-23 03:03:451635 "//net/android:net_java_test_support",
agrieve97176362015-12-01 16:36:191636 "//net/android:net_javatests",
agrievea5517aa2015-10-23 03:03:451637 "//net/android:net_unittests_apk_resources",
agrieve97176362015-12-01 16:36:191638
1639 # TODO(mmenke): This depends on test_support_base, which depends on
1640 # icu. Figure out a way to remove that dependency.
1641 "//testing/android/native_test:native_test_native_code",
pkotwicz8c7027d2015-11-11 06:30:071642 "//v8:v8_external_startup_data_assets",
agrievea5517aa2015-10-23 03:03:451643 ]
1644 android_manifest = "//net/android/unittest_support/AndroidManifest.xml"
dpranke64df2832015-07-31 22:33:361645 sources -= [
1646 # See bug http://crbug.com/344533.
1647 "disk_cache/blockfile/index_table_v3_unittest.cc",
dpranke64df2832015-07-31 22:33:361648 ]
dpranke64df2832015-07-31 22:33:361649 set_sources_assignment_filter([])
1650 sources += [ "base/address_tracker_linux_unittest.cc" ]
1651 set_sources_assignment_filter(sources_assignment_filter)
1652 isolate_file = "net_unittests.isolate"
1653 }
1654
dpranke64df2832015-07-31 22:33:361655 # Symbols for crashes when running tests on swarming.
1656 if (symbol_level > 0) {
1657 if (is_win) {
1658 data += [ "$root_out_dir/net_unittests.exe.pdb" ]
1659 } else if (is_mac) {
1660 data += [ "$root_out_dir/net_unittests.dSYM/" ]
1661 }
1662 }
1663}
1664
1665# !is_android && !is_win && !is_mac
[email protected]8a3f8242014-06-05 18:05:121666
rockot9c67e5f2015-03-12 20:01:211667executable("net_perftests") {
1668 testonly = true
1669 sources = [
ricea10eb9f5e2015-05-19 18:51:571670 "base/mime_sniffer_perftest.cc",
rockot9c67e5f2015-03-12 20:01:211671 "cookies/cookie_monster_perftest.cc",
1672 "disk_cache/blockfile/disk_cache_perftest.cc",
rohitrao1860223c2015-05-16 01:07:141673 "extras/sqlite/sqlite_persistent_cookie_store_perftest.cc",
rockot9c67e5f2015-03-12 20:01:211674 "proxy/proxy_resolver_perftest.cc",
1675 "udp/udp_socket_perftest.cc",
1676 ]
1677
1678 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1679 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
1680 deps = [
brettwcdccaf02015-07-27 16:27:091681 ":extras",
1682 ":net",
1683 ":test_support",
rockot9c67e5f2015-03-12 20:01:211684 "//base",
1685 "//base:i18n",
1686 "//base/test:test_support_perf",
brettwba7a73d2015-08-31 22:17:391687 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:211688 "//testing/gtest",
1689 "//url",
rockot9c67e5f2015-03-12 20:01:211690 ]
1691
1692 if (enable_websockets) {
1693 sources += [ "websockets/websocket_frame_perftest.cc" ]
1694 }
1695
1696 if (use_v8_in_net) {
1697 deps += [ ":net_with_v8" ]
1698 } else {
1699 sources -= [ "proxy/proxy_resolver_perftest.cc" ]
1700 }
rockot9c67e5f2015-03-12 20:01:211701}