blob: c21196bf88c2d44111a80bfcdf31edb67460d8fb [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")
rmcilroy5837d332014-12-17 14:30:5810import("//build/module_args/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")
[email protected]4625ade2014-04-15 19:26:4414
[email protected]26046b52014-07-16 00:11:0315# TODO(cjhopman): //build/config/android/rules.gni also imports grit_rule.gni.
16# Currently, that file can't be imported multiple times. Make this always
17# imported when http://crbug.com/393704 is fixed.
18if (!is_android) {
19 import("//tools/grit/grit_rule.gni")
20}
21
[email protected]4625ade2014-04-15 19:26:4422if (is_android) {
23 import("//build/config/android/config.gni")
[email protected]ef0eb442014-05-15 09:32:1824 import("//build/config/android/rules.gni")
[email protected]4625ade2014-04-15 19:26:4425} else if (is_mac) {
26 import("//build/config/mac/mac_sdk.gni")
27}
28
29# The list of net files is kept in net.gypi. Read it.
scottmg34fb7e52014-12-03 23:27:2430gypi_values = exec_script("//build/gypi_to_gn.py",
31 [ rebase_path("net.gypi") ],
32 "scope",
33 [ "net.gypi" ])
[email protected]4625ade2014-04-15 19:26:4434
slan77bdc2e62015-09-21 17:56:2635# Disable Kerberos on ChromeOS, Android, iOS, and Chromecast, at least for now.
36# It needs configuration (krb5.conf and so on).
37use_kerberos = !is_chromeos && !is_android && !is_ios && !is_chromecast
[email protected]4625ade2014-04-15 19:26:4438
39# The way the cache uses mmap() is inefficient on some Android devices. If
40# this flag is set, we hackily avoid using mmap() in the disk cache. We are
41# pretty confident that mmap-ing the index would not hurt any existing x86
42# android devices, but we cannot be so sure about the variety of ARM devices.
43# So enable it for x86 only for now.
dpranke43276212015-02-20 02:55:1944posix_avoid_mmap = is_android && current_cpu != "x86"
[email protected]4625ade2014-04-15 19:26:4445
46# WebSockets and socket stream code are used everywhere except iOS.
47enable_websockets = !is_ios
[email protected]8a3f8242014-06-05 18:05:1248use_v8_in_net = !is_ios
[email protected]4625ade2014-04-15 19:26:4449enable_built_in_dns = !is_ios
[email protected]8a3f8242014-06-05 18:05:1250disable_ftp_support = is_ios
[email protected]4625ade2014-04-15 19:26:4451
[email protected]384dab92014-06-04 20:26:0852declare_args() {
53 # Disables support for file URLs. File URL support requires use of icu.
54 disable_file_support = false
55}
[email protected]02494ec2014-05-07 15:05:2956
[email protected]4625ade2014-04-15 19:26:4457config("net_config") {
58 defines = []
59 if (posix_avoid_mmap) {
60 defines += [ "POSIX_AVOID_MMAP" ]
61 }
[email protected]02494ec2014-05-07 15:05:2962 if (disable_file_support) {
63 defines += [ "DISABLE_FILE_SUPPORT" ]
64 }
[email protected]4625ade2014-04-15 19:26:4465}
66
xunjieli905496a2015-08-31 15:51:1767# net_internal_config is shared with net and net_small.
68config("net_internal_config") {
[email protected]8603c5de2014-04-16 20:34:3169 defines = [
ellyjonesc7a5c502015-06-26 18:55:2070 # TODO(GYP) Note that the GYP file supports linux_link_kerberos (defaults to
[email protected]8603c5de2014-04-16 20:34:3171 # 0) which implies that we run pkg_config on kerberos and link to that
72 # rather than setting this define which will dynamically open it. That
73 # doesn't seem to be set in the regular builds, so we're skipping this
74 # capability here.
75 "DLOPEN_KERBEROS",
scottmg34fb7e52014-12-03 23:27:2476 "NET_IMPLEMENTATION",
[email protected]8603c5de2014-04-16 20:34:3177 ]
dpranke43276212015-02-20 02:55:1978
[email protected]4625ade2014-04-15 19:26:4479 if (use_kerberos) {
80 defines += [ "USE_KERBEROS" ]
81 if (is_android) {
xunjieli905496a2015-08-31 15:51:1782 include_dirs = [ "/usr/include/kerberosV" ]
[email protected]4625ade2014-04-15 19:26:4483 }
[email protected]4625ade2014-04-15 19:26:4484 }
85
86 if (enable_built_in_dns) {
87 defines += [ "ENABLE_BUILT_IN_DNS" ]
xunjieli905496a2015-08-31 15:51:1788 }
89}
90
91# net_shared_* are settings shared between net and net_small
sergeyu99d83f92015-09-14 23:03:3392net_shared_sources = gypi_values.net_nacl_common_sources
xunjieli905496a2015-08-31 15:51:1793
94net_shared_unfiltered_sources = []
95
96net_shared_configs = [
97 ":net_internal_config",
98 "//build/config:precompiled_headers",
99
100 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
101 "//build/config/compiler:no_size_t_to_int_warning",
102]
103
104net_shared_public_deps = [
105 ":net_quic_proto",
106 "//crypto",
107 "//crypto:platform",
108]
109
110net_shared_deps = [
111 ":net_resources",
112 "//base",
xunjieli905496a2015-08-31 15:51:17113 "//net/base/registry_controlled_domains",
xunjieli905496a2015-08-31 15:51:17114 "//third_party/protobuf:protobuf_lite",
xunjieli905496a2015-08-31 15:51:17115]
116
sergeyu99d83f92015-09-14 23:03:33117if (!is_nacl) {
118 net_shared_sources += gypi_values.net_non_nacl_sources
xunjieli905496a2015-08-31 15:51:17119
sergeyu99d83f92015-09-14 23:03:33120 net_shared_deps += [
121 "//base:prefs",
122 "//base/third_party/dynamic_annotations",
123 "//sdch",
124 "//third_party/zlib",
125 ]
126
127 if (!use_kerberos) {
128 net_shared_sources -= [
129 "http/http_auth_gssapi_posix.cc",
130 "http/http_auth_gssapi_posix.h",
131 "http/http_auth_handler_negotiate.cc",
132 "http/http_auth_handler_negotiate.h",
133 ]
134 }
135
136 if (is_posix) {
137 if (posix_avoid_mmap) {
138 net_shared_sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ]
139 } else {
140 net_shared_sources -=
141 [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ]
142 }
143 }
144
145 if (!enable_built_in_dns) {
146 net_shared_sources -= [
147 "dns/address_sorter_posix.cc",
148 "dns/address_sorter_posix.h",
149 "dns/dns_client.cc",
150 ]
151 }
152
153 if (use_openssl) {
154 net_shared_sources -= [
155 "base/nss_memio.c",
156 "base/nss_memio.h",
157 "cert/ct_log_verifier_nss.cc",
158 "cert/ct_objects_extractor_nss.cc",
159 "cert/jwk_serializer_nss.cc",
160 "cert/scoped_nss_types.h",
161 "cert/x509_util_nss.cc",
162 "quic/crypto/aead_base_decrypter_nss.cc",
163 "quic/crypto/aead_base_encrypter_nss.cc",
164 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc",
165 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc",
166 "quic/crypto/chacha20_poly1305_decrypter_nss.cc",
167 "quic/crypto/chacha20_poly1305_encrypter_nss.cc",
168 "quic/crypto/channel_id_nss.cc",
169 "quic/crypto/p256_key_exchange_nss.cc",
170 "quic/crypto/proof_source_chromium_nss.cc",
171 "socket/nss_ssl_util.cc",
172 "socket/nss_ssl_util.h",
173 "socket/ssl_client_socket_nss.cc",
174 "socket/ssl_client_socket_nss.h",
175 "socket/ssl_server_socket_nss.cc",
176 "socket/ssl_server_socket_nss.h",
177 ]
178 if (is_ios) {
179 # Always removed for !ios below.
180 net_shared_sources -= [
181 "cert/cert_verify_proc_nss.cc",
182 "cert/cert_verify_proc_nss.h",
183 ]
184 }
185 if (is_win) {
186 net_shared_sources -= [ "cert/sha256_legacy_support_nss_win.cc" ]
187 }
188 if (!use_nss_certs && !is_ios) {
189 net_shared_sources -= [ "cert/x509_util_nss.h" ]
190 }
[email protected]4625ade2014-04-15 19:26:44191 } else {
xunjieli905496a2015-08-31 15:51:17192 net_shared_sources -= [
sergeyu99d83f92015-09-14 23:03:33193 "cert/ct_log_verifier_openssl.cc",
194 "cert/ct_objects_extractor_openssl.cc",
195 "cert/jwk_serializer_openssl.cc",
196 "cert/x509_util_openssl.cc",
197 "cert/x509_util_openssl.h",
198 "quic/crypto/aead_base_decrypter_openssl.cc",
199 "quic/crypto/aead_base_encrypter_openssl.cc",
200 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc",
201 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc",
202 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc",
203 "quic/crypto/chacha20_poly1305_encrypter_openssl.cc",
204 "quic/crypto/channel_id_openssl.cc",
205 "quic/crypto/p256_key_exchange_openssl.cc",
206 "quic/crypto/proof_source_chromium_openssl.cc",
207 "quic/crypto/scoped_evp_aead_ctx.cc",
208 "quic/crypto/scoped_evp_aead_ctx.h",
209 "socket/ssl_client_socket_openssl.cc",
210 "socket/ssl_client_socket_openssl.h",
211 "socket/ssl_server_socket_openssl.cc",
212 "socket/ssl_server_socket_openssl.h",
213 "ssl/openssl_ssl_util.cc",
214 "ssl/openssl_ssl_util.h",
215 "ssl/ssl_client_session_cache_openssl.cc",
216 "ssl/ssl_client_session_cache_openssl.h",
217 "ssl/ssl_platform_key.h",
218 "ssl/threaded_ssl_private_key.cc",
219 "ssl/threaded_ssl_private_key.h",
[email protected]4625ade2014-04-15 19:26:44220 ]
sergeyu99d83f92015-09-14 23:03:33221 if (is_mac) {
222 net_shared_sources -= [ "ssl/ssl_platform_key_mac.cc" ]
223 }
224 if (is_android) {
225 net_shared_sources -= [ "ssl/ssl_platform_key_android.cc" ]
226 }
227 if (is_win) {
228 net_shared_sources -= [
229 "cert/sha256_legacy_support_openssl_win.cc",
230 "ssl/ssl_platform_key_win.cc",
231 ]
232 }
233 if (use_nss_certs) {
234 net_shared_sources -= [
235 "ssl/client_key_store.cc",
236 "ssl/client_key_store.h",
237 "ssl/ssl_platform_key_nss.cc",
238 ]
239 }
[email protected]4625ade2014-04-15 19:26:44240 }
sergeyu99d83f92015-09-14 23:03:33241
242 if (!use_openssl_certs) {
xunjieli905496a2015-08-31 15:51:17243 net_shared_sources -= [
sergeyu99d83f92015-09-14 23:03:33244 "base/crypto_module_openssl.cc",
245 "base/keygen_handler_openssl.cc",
246 "base/openssl_private_key_store.h",
247 "base/openssl_private_key_store_memory.cc",
248 "cert/cert_database_openssl.cc",
249 "cert/cert_verify_proc_openssl.cc",
250 "cert/cert_verify_proc_openssl.h",
251 "cert/test_root_certs_openssl.cc",
252 "cert/x509_certificate_openssl.cc",
253 "ssl/openssl_client_key_store.cc",
254 "ssl/openssl_client_key_store.h",
xunjieli06d93982015-08-27 17:13:02255 ]
sergeyu99d83f92015-09-14 23:03:33256 if (is_android) {
257 net_shared_sources -= [ "base/openssl_private_key_store_android.cc" ]
258 }
259 } else {
260 if (is_android) {
261 # Android doesn't use these even when using OpenSSL.
262 net_shared_sources -= [
263 "base/openssl_private_key_store_memory.cc",
264 "cert/cert_database_openssl.cc",
265 "cert/cert_verify_proc_openssl.cc",
266 "cert/test_root_certs_openssl.cc",
267 ]
268 }
[email protected]4625ade2014-04-15 19:26:44269 }
sergeyu99d83f92015-09-14 23:03:33270
271 if (use_glib && !is_chromeos) {
272 net_shared_configs += [ "//build/config/linux:gconf" ]
273 net_shared_deps += [ "//build/linux:gio" ]
274 }
275
276 if (is_linux) {
277 net_shared_configs += [ "//build/config/linux:libresolv" ]
278 }
279
280 if (!use_nss_certs) {
281 net_shared_sources -= [
282 "base/crypto_module_nss.cc",
283 "base/keygen_handler_nss.cc",
284 "cert/cert_database_nss.cc",
285 "cert/nss_cert_database.cc",
286 "cert/nss_cert_database.h",
287 "cert/x509_certificate_nss.cc",
288 "ssl/client_cert_store_nss.cc",
289 "ssl/client_cert_store_nss.h",
290 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
291 "third_party/mozilla_security_manager/nsKeygenHandler.h",
292 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
293 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
294 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
295 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
296 ]
297 if (!is_ios) {
298 # These files are part of the partial implementation of NSS on iOS so
299 # keep them in that case (even though use_nss_certs is not set).
300 net_shared_sources -= [
301 "cert/cert_verify_proc_nss.cc",
302 "cert/cert_verify_proc_nss.h",
303 "cert/test_root_certs_nss.cc",
304 "cert/x509_util_nss_certs.cc",
305 "cert_net/nss_ocsp.cc",
306 "cert_net/nss_ocsp.h",
307 ]
308 }
309 if (is_chromeos) {
310 # These were already removed on non-ChromeOS.
311 net_shared_sources -= [
312 "cert/nss_cert_database_chromeos.cc",
313 "cert/nss_cert_database_chromeos.h",
314 "cert/nss_profile_filter_chromeos.cc",
315 "cert/nss_profile_filter_chromeos.h",
316 ]
317 }
xunjieli905496a2015-08-31 15:51:17318 net_shared_sources -= [
pneubeckabe6e9d12015-08-26 08:47:11319 "ssl/client_key_store.cc",
320 "ssl/client_key_store.h",
321 "ssl/ssl_platform_key_nss.cc",
322 ]
sergeyu99d83f92015-09-14 23:03:33323 } else if (use_openssl) {
324 # client_cert_store_nss.c requires NSS_CmpCertChainWCANames from NSS's
325 # libssl, but our bundled copy is not built in OpenSSL ports. Pull that file
326 # in directly.
327 net_shared_sources += [ "third_party/nss/ssl/cmpcert.c" ]
[email protected]4625ade2014-04-15 19:26:44328 }
329
sergeyu99d83f92015-09-14 23:03:33330 if (!enable_mdns) {
331 net_shared_sources -= [
332 "dns/mdns_cache.cc",
333 "dns/mdns_cache.h",
334 "dns/mdns_client.cc",
335 "dns/mdns_client.h",
336 "dns/mdns_client_impl.cc",
337 "dns/mdns_client_impl.h",
338 "dns/record_parsed.cc",
339 "dns/record_parsed.h",
340 "dns/record_rdata.cc",
341 "dns/record_rdata.h",
342 ]
343 }
344
345 if (is_win) {
346 net_shared_sources -= [ "http/http_auth_handler_ntlm_portable.cc" ]
347 } else { # !is_win
348 net_shared_sources -= [
349 "base/winsock_init.cc",
350 "base/winsock_init.h",
351 "base/winsock_util.cc",
352 "base/winsock_util.h",
353 "proxy/proxy_resolver_winhttp.cc",
354 "proxy/proxy_resolver_winhttp.h",
355 ]
356 }
357
358 if (is_ios) {
359 # Add back some sources that were otherwise filtered out. iOS needs some Mac
360 # files.
361 net_shared_unfiltered_sources += [
362 "base/mac/url_conversions.h",
363 "base/mac/url_conversions.mm",
364 "base/network_change_notifier_mac.cc",
365 "base/network_config_watcher_mac.cc",
366 "base/network_interfaces_mac.cc",
367 "base/network_interfaces_mac.h",
368 "base/platform_mime_util_mac.mm",
369 "proxy/proxy_resolver_mac.cc",
370 "proxy/proxy_server_mac.cc",
371 ]
372
373 net_shared_sources -= [ "disk_cache/blockfile/file_posix.cc" ]
374 net_shared_deps += [
375 "//third_party/nss:nspr",
376 "//third_party/nss",
377 "//net/third_party/nss/ssl:libssl",
378 ]
379 }
380
381 if (is_ios || is_mac) {
382 net_shared_sources += gypi_values.net_base_mac_ios_sources
383 }
384
xunjieli905496a2015-08-31 15:51:17385 if (is_android) {
sergeyu99d83f92015-09-14 23:03:33386 net_shared_deps += [ ":net_jni_headers" ]
387
388 # Add some Linux sources that were excluded by the filter, but which
389 # are needed.
390 net_shared_unfiltered_sources += [
391 "base/address_tracker_linux.cc",
392 "base/address_tracker_linux.h",
393 "base/network_interfaces_linux.cc",
394 "base/network_interfaces_linux.h",
395 "base/platform_mime_util_linux.cc",
396 ]
xunjieli905496a2015-08-31 15:51:17397 }
398} else {
sergeyu99d83f92015-09-14 23:03:33399 net_shared_public_deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
xunjieli905496a2015-08-31 15:51:17400}
401
402component("net") {
403 sources = net_shared_sources
404
405 # Add back some sources that were otherwise filtered out.
406 set_sources_assignment_filter([])
407 sources += net_shared_unfiltered_sources
408 set_sources_assignment_filter(sources_assignment_filter)
409
410 cflags = []
411 configs += net_shared_configs
412 public_configs = [ ":net_config" ]
413
414 public_deps = net_shared_public_deps + [ "//url" ]
415 deps = net_shared_deps
[email protected]4625ade2014-04-15 19:26:44416
417 if (is_mac) {
[email protected]4625ade2014-04-15 19:26:44418 libs = [
[email protected]ab9ce6e2014-04-17 20:33:19419 "Foundation.framework",
420 "Security.framework",
421 "SystemConfiguration.framework",
422 "resolv",
[email protected]4625ade2014-04-15 19:26:44423 ]
424 }
425
426 if (is_ios) {
[email protected]4625ade2014-04-15 19:26:44427 libs = [
[email protected]ab9ce6e2014-04-17 20:33:19428 "CFNetwork.framework",
429 "MobileCoreServices.framework",
430 "Security.framework",
431 "SystemConfiguration.framework",
432 "resolv",
[email protected]4625ade2014-04-15 19:26:44433 ]
xunjieli06d93982015-08-27 17:13:02434 }
xunjieli4c8c6922015-08-27 16:02:40435
sergeyu99d83f92015-09-14 23:03:33436 if (!is_nacl) {
437 if (!disable_file_support) {
438 sources += gypi_values.net_file_support_sources
439 }
xunjieli06d93982015-08-27 17:13:02440
sergeyu99d83f92015-09-14 23:03:33441 if (!disable_ftp_support) {
442 sources += gypi_values.net_ftp_support_sources
443 }
xunjieli905496a2015-08-31 15:51:17444
sergeyu99d83f92015-09-14 23:03:33445 if (enable_websockets) {
446 sources += gypi_values.net_websockets_sources
447 }
xunjieli905496a2015-08-31 15:51:17448
sergeyu99d83f92015-09-14 23:03:33449 # ICU support.
450 deps += [
451 "//base:i18n",
452 "//third_party/icu",
453 ]
454 sources += [
455 "base/filename_util_icu.cc",
456 "base/net_string_util_icu.cc",
457 "base/net_util_icu.cc",
458 ]
459 }
xunjieli905496a2015-08-31 15:51:17460}
461
462if (is_android) {
463 # Same as net, but with ICU, file, ftp, and websocket support stripped.
464 component("net_small") {
465 sources = net_shared_sources
466
467 # Add back some sources that were otherwise filtered out.
xunjieli06d93982015-08-27 17:13:02468 set_sources_assignment_filter([])
xunjieli905496a2015-08-31 15:51:17469 sources += net_shared_unfiltered_sources
xunjieli06d93982015-08-27 17:13:02470 set_sources_assignment_filter(sources_assignment_filter)
xunjieli06d93982015-08-27 17:13:02471
xunjieli905496a2015-08-31 15:51:17472 cflags = []
473 defines = []
474 configs += net_shared_configs
475 public_configs = [ ":net_config" ]
476
477 public_deps = net_shared_public_deps +
478 [ "//url:url_lib_use_icu_alternatives_on_android" ]
479 deps = net_shared_deps + [ ":net_jni_headers" ]
480
481 defines += [
482 "DISABLE_FILE_SUPPORT",
483 "DISABLE_FTP_SUPPORT",
484 "USE_ICU_ALTERNATIVES_ON_ANDROID=1",
485 ]
486
487 # Use ICU alternative on Android.
[email protected]85191ed2014-05-15 00:41:49488 sources += [
489 "base/net_string_util_icu_alternatives_android.cc",
490 "base/net_string_util_icu_alternatives_android.h",
491 ]
492 }
[email protected]4625ade2014-04-15 19:26:44493}
494
495grit("net_resources") {
496 source = "base/net_resources.grd"
[email protected]7ae52902014-08-18 22:36:01497 use_qualified_include = true
[email protected]b89c53842014-07-23 16:32:32498 outputs = [
499 "grit/net_resources.h",
500 "net_resources.pak",
[email protected]b89c53842014-07-23 16:32:32501 ]
[email protected]4625ade2014-04-15 19:26:44502}
503
rtennetib6f1c0d2015-04-03 17:52:06504proto_library("net_quic_proto") {
xunjieli905496a2015-08-31 15:51:17505 visibility = [
506 ":net",
507 ":net_small",
508 ]
brettw2e7db0a2015-04-24 22:59:17509
rtennetib6f1c0d2015-04-03 17:52:06510 sources = [
511 "quic/proto/cached_network_parameters.proto",
512 "quic/proto/source_address_token.proto",
513 ]
514 cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:"
515 cc_include = "net/base/net_export.h"
516
517 defines = [ "NET_IMPLEMENTATION" ]
518
519 extra_configs = [ "//build/config/compiler:wexit_time_destructors" ]
520}
521
Brett Wilson83fd4242014-09-02 19:45:33522static_library("extras") {
mef327a8e42014-08-29 17:10:03523 sources = gypi_values.net_extras_sources
524 configs += [ "//build/config/compiler:wexit_time_destructors" ]
525 deps = [
526 ":net",
brettwbc44c0a92015-02-20 22:30:39527 "//base",
mef327a8e42014-08-29 17:10:03528 "//sql:sql",
529 ]
530}
531
[email protected]8a3f8242014-06-05 18:05:12532static_library("http_server") {
[email protected]4625ade2014-04-15 19:26:44533 sources = [
534 "server/http_connection.cc",
535 "server/http_connection.h",
536 "server/http_server.cc",
537 "server/http_server.h",
538 "server/http_server_request_info.cc",
539 "server/http_server_request_info.h",
540 "server/http_server_response_info.cc",
541 "server/http_server_response_info.h",
542 "server/web_socket.cc",
543 "server/web_socket.h",
dgozmana6e70092014-12-12 14:46:21544 "server/web_socket_encoder.cc",
545 "server/web_socket_encoder.h",
[email protected]4625ade2014-04-15 19:26:44546 ]
jambc6cc8e2014-11-14 17:56:29547 configs += [
brettwd1c719a2015-02-19 23:17:04548 "//build/config/compiler:no_size_t_to_int_warning",
jambc6cc8e2014-11-14 17:56:29549 "//build/config/compiler:wexit_time_destructors",
jambc6cc8e2014-11-14 17:56:29550 ]
[email protected]4625ade2014-04-15 19:26:44551 deps = [
552 ":net",
553 "//base",
554 ]
555}
556
[email protected]8603c5de2014-04-16 20:34:31557executable("dump_cache") {
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 "tools/dump_cache/dump_cache.cc",
561 "tools/dump_cache/dump_files.cc",
562 "tools/dump_cache/dump_files.h",
[email protected]8603c5de2014-04-16 20:34:31563 ]
[email protected]4625ade2014-04-15 19:26:44564
brettwd1c719a2015-02-19 23:17:04565 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
566 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31567
568 deps = [
[email protected]8603c5de2014-04-16 20:34:31569 ":net",
[email protected]b2b2bf52014-05-28 20:26:57570 ":test_support",
brettwba7a73d2015-08-31 22:17:39571 "//base",
572 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31573 ]
574}
575
[email protected]b2b2bf52014-05-28 20:26:57576source_set("test_support") {
Brett Wilson8f80ad0b2014-09-08 19:50:24577 testonly = true
[email protected]8603c5de2014-04-16 20:34:31578 sources = [
[email protected]8603c5de2014-04-16 20:34:31579 "base/load_timing_info_test_util.cc",
580 "base/load_timing_info_test_util.h",
581 "base/mock_file_stream.cc",
582 "base/mock_file_stream.h",
583 "base/test_completion_callback.cc",
584 "base/test_completion_callback.h",
585 "base/test_data_directory.cc",
586 "base/test_data_directory.h",
587 "cert/mock_cert_verifier.cc",
588 "cert/mock_cert_verifier.h",
589 "cookies/cookie_monster_store_test.cc",
590 "cookies/cookie_monster_store_test.h",
591 "cookies/cookie_store_test_callbacks.cc",
592 "cookies/cookie_store_test_callbacks.h",
593 "cookies/cookie_store_test_helpers.cc",
594 "cookies/cookie_store_test_helpers.h",
595 "disk_cache/disk_cache_test_base.cc",
596 "disk_cache/disk_cache_test_base.h",
597 "disk_cache/disk_cache_test_util.cc",
598 "disk_cache/disk_cache_test_util.h",
599 "dns/dns_test_util.cc",
600 "dns/dns_test_util.h",
601 "dns/mock_host_resolver.cc",
602 "dns/mock_host_resolver.h",
603 "dns/mock_mdns_socket_factory.cc",
604 "dns/mock_mdns_socket_factory.h",
[email protected]8a3f8242014-06-05 18:05:12605 "http/http_transaction_test_util.cc",
606 "http/http_transaction_test_util.h",
vishal.b62985ca92015-04-17 08:45:51607 "log/test_net_log.cc",
608 "log/test_net_log.h",
mmenke43758e62015-05-04 21:09:46609 "log/test_net_log_entry.cc",
610 "log/test_net_log_entry.h",
mmenke0034c542015-05-05 22:34:59611 "log/test_net_log_util.cc",
mmenke43758e62015-05-04 21:09:46612 "log/test_net_log_util.h",
[email protected]8603c5de2014-04-16 20:34:31613 "proxy/mock_proxy_resolver.cc",
614 "proxy/mock_proxy_resolver.h",
615 "proxy/mock_proxy_script_fetcher.cc",
616 "proxy/mock_proxy_script_fetcher.h",
617 "proxy/proxy_config_service_common_unittest.cc",
618 "proxy/proxy_config_service_common_unittest.h",
619 "socket/socket_test_util.cc",
620 "socket/socket_test_util.h",
621 "test/cert_test_util.cc",
622 "test/cert_test_util.h",
[email protected]83e1ae32014-07-18 10:57:07623 "test/cert_test_util_nss.cc",
nharper2e171cf2015-06-01 20:29:23624 "test/channel_id_test_util.cc",
625 "test/channel_id_test_util.h",
[email protected]8603c5de2014-04-16 20:34:31626 "test/ct_test_util.cc",
627 "test/ct_test_util.h",
628 "test/embedded_test_server/embedded_test_server.cc",
629 "test/embedded_test_server/embedded_test_server.h",
630 "test/embedded_test_server/http_connection.cc",
631 "test/embedded_test_server/http_connection.h",
632 "test/embedded_test_server/http_request.cc",
633 "test/embedded_test_server/http_request.h",
634 "test/embedded_test_server/http_response.cc",
635 "test/embedded_test_server/http_response.h",
xunjieli0f1bd6252015-06-03 21:57:20636 "test/embedded_test_server/stream_listen_socket.cc",
637 "test/embedded_test_server/stream_listen_socket.h",
638 "test/embedded_test_server/tcp_listen_socket.cc",
639 "test/embedded_test_server/tcp_listen_socket.h",
sammc6ac3fe52015-02-25 06:00:28640 "test/event_waiter.h",
[email protected]8603c5de2014-04-16 20:34:31641 "test/net_test_suite.cc",
642 "test/net_test_suite.h",
643 "test/python_utils.cc",
644 "test/python_utils.h",
sherouk51b4b098b2015-08-10 09:00:43645 "test/url_request/ssl_certificate_error_job.cc",
646 "test/url_request/ssl_certificate_error_job.h",
Brett Wilson32ce17a2014-11-10 17:45:30647 "test/url_request/url_request_failed_job.cc",
648 "test/url_request/url_request_failed_job.h",
mef3e826cf2014-12-13 18:40:40649 "test/url_request/url_request_mock_data_job.cc",
650 "test/url_request/url_request_mock_data_job.h",
jam8e45cd72015-01-20 16:33:44651 "test/url_request/url_request_slow_download_job.cc",
652 "test/url_request/url_request_slow_download_job.h",
[email protected]8603c5de2014-04-16 20:34:31653 "url_request/test_url_fetcher_factory.cc",
654 "url_request/test_url_fetcher_factory.h",
655 "url_request/url_request_test_util.cc",
656 "url_request/url_request_test_util.h",
657 ]
sherouk3eee4a82015-09-01 10:42:33658 if (!is_ios) {
659 sources += [
660 "test/spawned_test_server/base_test_server.cc",
661 "test/spawned_test_server/base_test_server.h",
662 "test/spawned_test_server/local_test_server.cc",
663 "test/spawned_test_server/local_test_server.h",
664 "test/spawned_test_server/local_test_server_posix.cc",
665 "test/spawned_test_server/local_test_server_win.cc",
666 "test/spawned_test_server/spawned_test_server.h",
667 ]
668 }
[email protected]8603c5de2014-04-16 20:34:31669
brettwbc8b2a22015-07-28 18:24:42670 configs += [
671 "//build/config:precompiled_headers",
672
673 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
674 "//build/config/compiler:no_size_t_to_int_warning",
675 ]
[email protected]8603c5de2014-04-16 20:34:31676
Brett Wilsone53895272014-09-23 23:41:46677 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31678 "//base",
679 "//base/test:test_support",
[email protected]22fe91d2014-08-12 17:07:12680 "//crypto",
[email protected]59ff2d42014-04-22 22:25:23681 "//net",
[email protected]8603c5de2014-04-16 20:34:31682 "//net/tools/tld_cleanup",
683 "//testing/gmock",
684 "//testing/gtest",
685 "//url",
686 ]
687
jamb533b7e2015-03-04 17:12:05688 if (!is_ios) {
689 public_deps += [ "//third_party/protobuf:py_proto" ]
690 }
691
davidben4a644b02015-07-01 19:34:55692 if (use_nss_certs || is_ios) {
scottmg34fb7e52014-12-03 23:27:24693 public_deps += [ "//crypto:platform" ]
[email protected]8603c5de2014-04-16 20:34:31694 }
695
sherouk3eee4a82015-09-01 10:42:33696 if (is_android) {
697 sources += [
[email protected]8603c5de2014-04-16 20:34:31698 "test/spawned_test_server/remote_test_server.cc",
699 "test/spawned_test_server/remote_test_server.h",
700 "test/spawned_test_server/spawner_communicator.cc",
701 "test/spawned_test_server/spawner_communicator.h",
702 ]
703 }
704
705 if (use_v8_in_net) {
Brett Wilsone53895272014-09-23 23:41:46706 public_deps += [ ":net_with_v8" ]
[email protected]8603c5de2014-04-16 20:34:31707 }
708
709 if (!enable_mdns) {
710 sources -= [
711 "dns/mock_mdns_socket_factory.cc",
712 "dns/mock_mdns_socket_factory.h",
713 ]
714 }
715
davidben15d69d482014-09-29 18:24:08716 if (!use_nss_certs) {
scottmg34fb7e52014-12-03 23:27:24717 sources -= [ "test/cert_test_util_nss.cc" ]
[email protected]83e1ae32014-07-18 10:57:07718 }
xunjielia6888202015-04-14 21:34:25719
720 if (!disable_file_support) {
721 sources += [
722 "test/url_request/url_request_mock_http_job.cc",
723 "test/url_request/url_request_mock_http_job.h",
724 "url_request/test_url_request_interceptor.cc",
725 "url_request/test_url_request_interceptor.h",
726 ]
727 }
[email protected]8603c5de2014-04-16 20:34:31728}
729
[email protected]ceeaac792014-06-25 05:14:43730source_set("balsa") {
731 sources = [
732 "tools/balsa/balsa_enums.h",
733 "tools/balsa/balsa_frame.cc",
734 "tools/balsa/balsa_frame.h",
735 "tools/balsa/balsa_headers.cc",
736 "tools/balsa/balsa_headers.h",
737 "tools/balsa/balsa_headers_token_utils.cc",
738 "tools/balsa/balsa_headers_token_utils.h",
739 "tools/balsa/balsa_visitor_interface.h",
740 "tools/balsa/http_message_constants.cc",
741 "tools/balsa/http_message_constants.h",
742 "tools/balsa/noop_balsa_visitor.h",
743 "tools/balsa/simple_buffer.cc",
744 "tools/balsa/simple_buffer.h",
745 "tools/balsa/split.cc",
746 "tools/balsa/split.h",
747 "tools/balsa/string_piece_utils.h",
rtennetie0ee6eb2015-05-01 00:55:09748 "tools/quic/spdy_balsa_utils.cc",
749 "tools/quic/spdy_balsa_utils.h",
[email protected]ceeaac792014-06-25 05:14:43750 ]
751 deps = [
752 ":net",
753 "//base",
[email protected]22fe91d2014-08-12 17:07:12754 "//url",
[email protected]ceeaac792014-06-25 05:14:43755 ]
756}
757
[email protected]8603c5de2014-04-16 20:34:31758if (use_v8_in_net) {
759 component("net_with_v8") {
760 sources = [
761 "proxy/proxy_resolver_v8.cc",
762 "proxy/proxy_resolver_v8.h",
763 "proxy/proxy_resolver_v8_tracing.cc",
764 "proxy/proxy_resolver_v8_tracing.h",
sammcf2d1ea02015-06-29 02:58:47765 "proxy/proxy_resolver_v8_tracing_wrapper.cc",
766 "proxy/proxy_resolver_v8_tracing_wrapper.h",
[email protected]8603c5de2014-04-16 20:34:31767 "proxy/proxy_service_v8.cc",
768 "proxy/proxy_service_v8.h",
769 ]
770
771 defines = [ "NET_IMPLEMENTATION" ]
772 configs += [
brettwd1c719a2015-02-19 23:17:04773 "//build/config/compiler:no_size_t_to_int_warning",
[email protected]8603c5de2014-04-16 20:34:31774 "//build/config/compiler:wexit_time_destructors",
775 ]
776
Brett Wilsone53895272014-09-23 23:41:46777 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31778 ":net",
Brett Wilsone53895272014-09-23 23:41:46779 ]
780 deps = [
[email protected]8603c5de2014-04-16 20:34:31781 "//base",
782 "//gin",
783 "//url",
784 "//v8",
785 ]
786 }
787}
788
amistry7e6ebfdc82015-02-13 04:19:11789if (use_v8_in_net && !is_android) {
790 source_set("net_browser_services") {
791 sources = [
792 "dns/mojo_host_resolver_impl.cc",
793 "dns/mojo_host_resolver_impl.h",
amistry6e1ed1b2015-03-12 05:24:01794 "proxy/in_process_mojo_proxy_resolver_factory.cc",
795 "proxy/in_process_mojo_proxy_resolver_factory.h",
sammc1d5df4d2015-05-05 05:06:17796 "proxy/mojo_proxy_resolver_factory.h",
eromandcacef22015-06-01 19:36:35797 "proxy/proxy_resolver_factory_mojo.cc",
798 "proxy/proxy_resolver_factory_mojo.h",
amistry6e1ed1b2015-03-12 05:24:01799 "proxy/proxy_service_mojo.cc",
800 "proxy/proxy_service_mojo.h",
amistry7e6ebfdc82015-02-13 04:19:11801 ]
802
803 public_deps = [
804 ":mojo_type_converters",
805 ":net",
brettwbc44c0a92015-02-20 22:30:39806 "//base",
amistry07ff1402015-03-10 07:34:07807 "//mojo/common",
amistry7e6ebfdc82015-02-13 04:19:11808 "//net/interfaces",
809 "//third_party/mojo/src/mojo/public/cpp/bindings",
amistry6e1ed1b2015-03-12 05:24:01810
811 # NOTE(amistry): As long as we support in-process Mojo v8 PAC, we need
812 # this dependency since in_process_mojo_proxy_resolver_factory creates
813 # the utility process side Mojo services in the browser process.
814 # Ultimately, this will go away when we only support out-of-process.
815 ":net_utility_services",
amistry7e6ebfdc82015-02-13 04:19:11816 ]
817 }
818
819 source_set("mojo_type_converters") {
820 sources = [
amistry7ec58112015-02-26 06:03:00821 "dns/mojo_host_type_converters.cc",
822 "dns/mojo_host_type_converters.h",
823 "proxy/mojo_proxy_type_converters.cc",
824 "proxy/mojo_proxy_type_converters.h",
amistry7e6ebfdc82015-02-13 04:19:11825 ]
826
827 public_deps = [
828 ":net",
829 "//net/interfaces",
830 "//third_party/mojo/src/mojo/public/cpp/bindings",
831 ]
832 }
sammc5403aa1d2015-02-25 04:59:21833
834 source_set("net_utility_services") {
835 sources = [
sammc6ac3fe52015-02-25 06:00:28836 "dns/host_resolver_mojo.cc",
837 "dns/host_resolver_mojo.h",
sammc352f7492015-02-25 09:45:24838 "proxy/mojo_proxy_resolver_factory_impl.cc",
839 "proxy/mojo_proxy_resolver_factory_impl.h",
sammc5403aa1d2015-02-25 04:59:21840 "proxy/mojo_proxy_resolver_impl.cc",
841 "proxy/mojo_proxy_resolver_impl.h",
sammca3242c92015-07-10 02:38:51842 "proxy/mojo_proxy_resolver_v8_tracing_bindings.h",
sammc5403aa1d2015-02-25 04:59:21843 ]
844
rockot9509ec82015-04-14 02:50:56845 deps = [
846 ":net_with_v8",
847 ]
848
sammc5403aa1d2015-02-25 04:59:21849 public_deps = [
850 ":mojo_type_converters",
851 ":net",
852 "//mojo/common",
853 "//net/interfaces",
854 "//third_party/mojo/src/mojo/public/cpp/bindings",
855 ]
856 }
amistry7e6ebfdc82015-02-13 04:19:11857}
858
[email protected]8603c5de2014-04-16 20:34:31859if (!is_ios && !is_android) {
860 executable("crash_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24861 testonly = true
scottmg34fb7e52014-12-03 23:27:24862 sources = [
863 "tools/crash_cache/crash_cache.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",
[email protected]b2b2bf52014-05-28 20:26:57870 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31871 "//base",
brettwba7a73d2015-08-31 22:17:39872 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31873 ]
874 }
875
876 executable("crl_set_dump") {
Brett Wilson8f80ad0b2014-09-08 19:50:24877 testonly = true
scottmg34fb7e52014-12-03 23:27:24878 sources = [
879 "tools/crl_set_dump/crl_set_dump.cc",
880 ]
dpranke43276212015-02-20 02:55:19881
brettwd1c719a2015-02-19 23:17:04882 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
883 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31884 deps = [
885 ":net",
886 "//base",
brettwba7a73d2015-08-31 22:17:39887 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31888 ]
889 }
890
891 executable("dns_fuzz_stub") {
Brett Wilson8f80ad0b2014-09-08 19:50:24892 testonly = true
scottmg34fb7e52014-12-03 23:27:24893 sources = [
894 "tools/dns_fuzz_stub/dns_fuzz_stub.cc",
895 ]
dpranke43276212015-02-20 02:55:19896
brettwd1c719a2015-02-19 23:17:04897 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
898 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31899 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("gdig") {
Brett Wilson8f80ad0b2014-09-08 19:50:24907 testonly = true
[email protected]8603c5de2014-04-16 20:34:31908 sources = [
909 "tools/gdig/file_net_log.cc",
910 "tools/gdig/gdig.cc",
911 ]
912 deps = [
913 ":net",
914 "//base",
brettwba7a73d2015-08-31 22:17:39915 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31916 ]
917 }
918
919 executable("get_server_time") {
Brett Wilson8f80ad0b2014-09-08 19:50:24920 testonly = true
scottmg34fb7e52014-12-03 23:27:24921 sources = [
922 "tools/get_server_time/get_server_time.cc",
923 ]
dpranke43276212015-02-20 02:55:19924
brettwd1c719a2015-02-19 23:17:04925 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
926 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31927 deps = [
928 ":net",
929 "//base",
930 "//base:i18n",
brettwba7a73d2015-08-31 22:17:39931 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31932 "//url",
933 ]
934 }
935
rockot9c67e5f2015-03-12 20:01:21936 executable("hpack_example_generator") {
937 testonly = true
938 sources = [
939 "spdy/fuzzing/hpack_example_generator.cc",
940 ]
941
942 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
943 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
944 deps = [
rockot9c67e5f2015-03-12 20:01:21945 ":net",
brettwba7a73d2015-08-31 22:17:39946 "//base",
947 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:21948 ]
949 }
950
951 executable("hpack_fuzz_mutator") {
952 testonly = true
953 sources = [
954 "spdy/fuzzing/hpack_fuzz_mutator.cc",
955 ]
956
957 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
958 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
959 deps = [
rockot9c67e5f2015-03-12 20:01:21960 ":net",
brettwba7a73d2015-08-31 22:17:39961 "//base",
962 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:21963 ]
964 }
965
966 executable("hpack_fuzz_wrapper") {
967 testonly = true
968 sources = [
969 "spdy/fuzzing/hpack_fuzz_wrapper.cc",
970 ]
971
972 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
973 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
974 deps = [
rockot9c67e5f2015-03-12 20:01:21975 ":net",
brettwba7a73d2015-08-31 22:17:39976 "//base",
977 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:21978 ]
979 }
980
[email protected]8603c5de2014-04-16 20:34:31981 if (use_v8_in_net) {
982 executable("net_watcher") {
Brett Wilson8f80ad0b2014-09-08 19:50:24983 testonly = true
scottmg34fb7e52014-12-03 23:27:24984 sources = [
985 "tools/net_watcher/net_watcher.cc",
986 ]
[email protected]8603c5de2014-04-16 20:34:31987 deps = [
988 ":net",
989 ":net_with_v8",
990 "//base",
brettwba7a73d2015-08-31 22:17:39991 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31992 ]
993
slan77bdc2e62015-09-21 17:56:26994 if (is_desktop_linux && use_gconf) {
xunjieli905496a2015-08-31 15:51:17995 configs += [
996 "//build/config/linux:gconf",
997 "//build/config/linux:glib",
998 ]
dprankead0c1f42015-08-28 21:48:04999 deps += [ "//build/linux:gio" ]
[email protected]8603c5de2014-04-16 20:34:311000 }
1001 }
1002 }
1003
1004 executable("run_testserver") {
Brett Wilson8f80ad0b2014-09-08 19:50:241005 testonly = true
scottmg34fb7e52014-12-03 23:27:241006 sources = [
1007 "tools/testserver/run_testserver.cc",
1008 ]
[email protected]8603c5de2014-04-16 20:34:311009 deps = [
[email protected]b2b2bf52014-05-28 20:26:571010 ":test_support",
[email protected]8603c5de2014-04-16 20:34:311011 "//base",
1012 "//base/test:test_support",
brettwba7a73d2015-08-31 22:17:391013 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311014 "//testing/gtest",
1015 ]
1016 }
1017
1018 executable("stress_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:241019 testonly = true
scottmg34fb7e52014-12-03 23:27:241020 sources = [
rvargase23fcf652015-03-04 19:59:221021 "tools/stress_cache/stress_cache.cc",
scottmg34fb7e52014-12-03 23:27:241022 ]
dpranke43276212015-02-20 02:55:191023
brettwd1c719a2015-02-19 23:17:041024 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1025 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:311026 deps = [
1027 ":net",
[email protected]b2b2bf52014-05-28 20:26:571028 ":test_support",
[email protected]8603c5de2014-04-16 20:34:311029 "//base",
brettwba7a73d2015-08-31 22:17:391030 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311031 ]
1032 }
1033
1034 executable("tld_cleanup") {
scottmg34fb7e52014-12-03 23:27:241035 sources = [
1036 "tools/tld_cleanup/tld_cleanup.cc",
1037 ]
dpranke43276212015-02-20 02:55:191038
brettwd1c719a2015-02-19 23:17:041039 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1040 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:311041 deps = [
1042 "//base",
1043 "//base:i18n",
brettwba7a73d2015-08-31 22:17:391044 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311045 "//net/tools/tld_cleanup",
1046 ]
1047 }
1048}
1049
rch6983a3f2015-03-30 03:47:281050if (is_linux) {
[email protected]8a3f8242014-06-05 18:05:121051 static_library("epoll_server") {
[email protected]8603c5de2014-04-16 20:34:311052 sources = [
1053 "tools/epoll_server/epoll_server.cc",
1054 "tools/epoll_server/epoll_server.h",
1055 ]
1056 deps = [
1057 ":net",
1058 "//base",
1059 ]
1060 }
1061
[email protected]8a3f8242014-06-05 18:05:121062 static_library("flip_in_mem_edsm_server_base") {
Brett Wilson8f80ad0b2014-09-08 19:50:241063 testonly = true
[email protected]8603c5de2014-04-16 20:34:311064 sources = [
[email protected]8603c5de2014-04-16 20:34:311065 "tools/flip_server/acceptor_thread.cc",
satorux933fc7a2015-02-13 07:09:101066 "tools/flip_server/acceptor_thread.h",
1067 "tools/flip_server/constants.h",
[email protected]8603c5de2014-04-16 20:34:311068 "tools/flip_server/create_listener.cc",
1069 "tools/flip_server/create_listener.h",
[email protected]8603c5de2014-04-16 20:34:311070 "tools/flip_server/flip_config.cc",
1071 "tools/flip_server/flip_config.h",
1072 "tools/flip_server/http_interface.cc",
1073 "tools/flip_server/http_interface.h",
1074 "tools/flip_server/loadtime_measurement.h",
[email protected]8603c5de2014-04-16 20:34:311075 "tools/flip_server/mem_cache.cc",
satorux933fc7a2015-02-13 07:09:101076 "tools/flip_server/mem_cache.h",
[email protected]8603c5de2014-04-16 20:34:311077 "tools/flip_server/output_ordering.cc",
1078 "tools/flip_server/output_ordering.h",
1079 "tools/flip_server/ring_buffer.cc",
1080 "tools/flip_server/ring_buffer.h",
1081 "tools/flip_server/sm_connection.cc",
1082 "tools/flip_server/sm_connection.h",
1083 "tools/flip_server/sm_interface.h",
[email protected]8603c5de2014-04-16 20:34:311084 "tools/flip_server/spdy_interface.cc",
1085 "tools/flip_server/spdy_interface.h",
satorux933fc7a2015-02-13 07:09:101086 "tools/flip_server/spdy_ssl.cc",
1087 "tools/flip_server/spdy_ssl.h",
[email protected]8603c5de2014-04-16 20:34:311088 "tools/flip_server/spdy_util.cc",
1089 "tools/flip_server/spdy_util.h",
1090 "tools/flip_server/streamer_interface.cc",
1091 "tools/flip_server/streamer_interface.h",
rvargas145310f2015-08-14 18:09:041092 "tools/flip_server/url_to_filename_encoder.cc",
1093 "tools/flip_server/url_to_filename_encoder.h",
1094 "tools/flip_server/url_utilities.cc",
1095 "tools/flip_server/url_utilities.h",
[email protected]8603c5de2014-04-16 20:34:311096 ]
1097 deps = [
1098 ":balsa",
1099 ":epoll_server",
1100 ":net",
1101 "//base",
[email protected]edfd0f42014-07-22 18:20:371102 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311103 ]
1104 }
1105
1106 executable("flip_in_mem_edsm_server_unittests") {
Brett Wilson8f80ad0b2014-09-08 19:50:241107 testonly = true
[email protected]8603c5de2014-04-16 20:34:311108 sources = [
1109 "tools/flip_server/flip_test_utils.cc",
1110 "tools/flip_server/flip_test_utils.h",
1111 "tools/flip_server/http_interface_test.cc",
1112 "tools/flip_server/mem_cache_test.cc",
1113 "tools/flip_server/run_all_tests.cc",
1114 "tools/flip_server/spdy_interface_test.cc",
rvargas145310f2015-08-14 18:09:041115 "tools/flip_server/url_to_filename_encoder_unittest.cc",
1116 "tools/flip_server/url_utilities_unittest.cc",
[email protected]8603c5de2014-04-16 20:34:311117 ]
1118 deps = [
brettwbc44c0a92015-02-20 22:30:391119 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311120 ":flip_in_mem_edsm_server_base",
1121 ":net",
[email protected]b2b2bf52014-05-28 20:26:571122 ":test_support",
brettwba7a73d2015-08-31 22:17:391123 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311124 "//testing/gtest",
1125 "//testing/gmock",
[email protected]edfd0f42014-07-22 18:20:371126 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311127 ]
1128 }
1129
1130 executable("flip_in_mem_edsm_server") {
Brett Wilson8f80ad0b2014-09-08 19:50:241131 testonly = true
scottmg34fb7e52014-12-03 23:27:241132 sources = [
1133 "tools/flip_server/flip_in_mem_edsm_server.cc",
1134 ]
[email protected]8603c5de2014-04-16 20:34:311135 deps = [
brettwbc44c0a92015-02-20 22:30:391136 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311137 ":flip_in_mem_edsm_server_base",
1138 ":net",
1139 "//base",
brettwba7a73d2015-08-31 22:17:391140 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311141 ]
1142 }
1143
rch216445c2015-03-27 00:23:281144 source_set("epoll_quic_tools") {
[email protected]8603c5de2014-04-16 20:34:311145 sources = [
1146 "tools/quic/quic_client.cc",
1147 "tools/quic/quic_client.h",
[email protected]8603c5de2014-04-16 20:34:311148 "tools/quic/quic_default_packet_writer.cc",
1149 "tools/quic/quic_default_packet_writer.h",
[email protected]8603c5de2014-04-16 20:34:311150 "tools/quic/quic_epoll_clock.cc",
1151 "tools/quic/quic_epoll_clock.h",
1152 "tools/quic/quic_epoll_connection_helper.cc",
1153 "tools/quic/quic_epoll_connection_helper.h",
rtennetifb3fa6c2015-03-16 23:04:551154 "tools/quic/quic_packet_reader.cc",
1155 "tools/quic/quic_packet_reader.h",
[email protected]8603c5de2014-04-16 20:34:311156 "tools/quic/quic_packet_writer_wrapper.cc",
1157 "tools/quic/quic_packet_writer_wrapper.h",
1158 "tools/quic/quic_server.cc",
1159 "tools/quic/quic_server.h",
[email protected]8603c5de2014-04-16 20:34:311160 "tools/quic/quic_socket_utils.cc",
1161 "tools/quic/quic_socket_utils.h",
[email protected]8603c5de2014-04-16 20:34:311162 ]
1163 deps = [
1164 ":balsa",
1165 ":epoll_server",
1166 ":net",
1167 "//base",
1168 "//base/third_party/dynamic_annotations",
1169 "//crypto",
[email protected]edfd0f42014-07-22 18:20:371170 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311171 "//url",
1172 ]
1173 }
1174
rch216445c2015-03-27 00:23:281175 executable("epoll_quic_client") {
scottmg34fb7e52014-12-03 23:27:241176 sources = [
1177 "tools/quic/quic_client_bin.cc",
1178 ]
[email protected]8603c5de2014-04-16 20:34:311179 deps = [
brettwbc44c0a92015-02-20 22:30:391180 ":balsa",
1181 ":epoll_server",
rch216445c2015-03-27 00:23:281182 ":epoll_quic_tools",
1183 ":net",
1184 ":simple_quic_tools",
1185 "//base",
brettwba7a73d2015-08-31 22:17:391186 "//build/config/sanitizers:deps",
rch216445c2015-03-27 00:23:281187 "//third_party/boringssl",
1188 ]
1189 }
1190
1191 executable("epoll_quic_server") {
1192 sources = [
1193 "tools/quic/quic_server_bin.cc",
1194 ]
1195 deps = [
1196 ":balsa",
1197 ":epoll_server",
1198 ":epoll_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311199 ":net",
rchda78df5a2015-03-22 05:16:371200 ":simple_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311201 "//base",
brettwba7a73d2015-08-31 22:17:391202 "//build/config/sanitizers:deps",
[email protected]edfd0f42014-07-22 18:20:371203 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311204 ]
1205 }
[email protected]8603c5de2014-04-16 20:34:311206}
1207
[email protected]ef0eb442014-05-15 09:32:181208if (is_android) {
1209 generate_jni("net_jni_headers") {
1210 sources = [
1211 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
1212 "android/java/src/org/chromium/net/AndroidKeyStore.java",
1213 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java",
1214 "android/java/src/org/chromium/net/AndroidPrivateKey.java",
tbansal59a1ddc2015-09-14 17:35:011215 "android/java/src/org/chromium/net/AndroidTrafficStats.java",
[email protected]ef0eb442014-05-15 09:32:181216 "android/java/src/org/chromium/net/GURLUtils.java",
aberentec894a52015-07-09 14:45:531217 "android/java/src/org/chromium/net/HttpNegotiateAuthenticator.java",
xunjieli905496a2015-08-31 15:51:171218 "android/java/src/org/chromium/net/NetStringUtil.java",
[email protected]ef0eb442014-05-15 09:32:181219 "android/java/src/org/chromium/net/NetworkChangeNotifier.java",
1220 "android/java/src/org/chromium/net/ProxyChangeListener.java",
1221 "android/java/src/org/chromium/net/X509Util.java",
1222 ]
1223 jni_package = "net"
1224 }
cjhopmandad5f4272014-09-05 01:00:551225 generate_jni("net_test_jni_headers") {
1226 sources = [
1227 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java",
aberentec894a52015-07-09 14:45:531228 "test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticator.java",
cjhopmandad5f4272014-09-05 01:00:551229 ]
brettwcdccaf02015-07-27 16:27:091230 jni_package = "net/test"
cjhopmandad5f4272014-09-05 01:00:551231 }
[email protected]ef0eb442014-05-15 09:32:181232}
[email protected]8603c5de2014-04-16 20:34:311233
1234if (is_android || is_linux) {
1235 executable("disk_cache_memory_test") {
Brett Wilson8f80ad0b2014-09-08 19:50:241236 testonly = true
scottmg34fb7e52014-12-03 23:27:241237 sources = [
1238 "tools/disk_cache_memory_test/disk_cache_memory_test.cc",
1239 ]
[email protected]8603c5de2014-04-16 20:34:311240 deps = [
1241 ":net",
1242 "//base",
brettwba7a73d2015-08-31 22:17:391243 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311244 ]
1245 }
1246}
[email protected]8a3f8242014-06-05 18:05:121247
rch47ad01f2015-03-20 21:17:231248source_set("simple_quic_tools") {
rcha9d12ce12015-03-19 23:06:491249 sources = [
rtennetid67b3a722015-08-18 05:15:311250 "tools/quic/quic_client_base.cc",
1251 "tools/quic/quic_client_base.h",
rched113b22015-03-26 04:54:051252 "tools/quic/quic_client_session.cc",
1253 "tools/quic/quic_client_session.h",
rchc99f380c2015-03-26 19:50:561254 "tools/quic/quic_dispatcher.cc",
1255 "tools/quic/quic_dispatcher.h",
rch0e945472015-03-26 15:19:211256 "tools/quic/quic_in_memory_cache.cc",
1257 "tools/quic/quic_in_memory_cache.h",
rchc99f380c2015-03-26 19:50:561258 "tools/quic/quic_per_connection_packet_writer.cc",
1259 "tools/quic/quic_per_connection_packet_writer.h",
rch0e945472015-03-26 15:19:211260 "tools/quic/quic_server_session.cc",
1261 "tools/quic/quic_server_session.h",
rcha9d12ce12015-03-19 23:06:491262 "tools/quic/quic_simple_client.cc",
1263 "tools/quic/quic_simple_client.h",
rch216445c2015-03-27 00:23:281264 "tools/quic/quic_simple_per_connection_packet_writer.cc",
1265 "tools/quic/quic_simple_per_connection_packet_writer.h",
1266 "tools/quic/quic_simple_server.cc",
1267 "tools/quic/quic_simple_server.h",
1268 "tools/quic/quic_simple_server_packet_writer.cc",
1269 "tools/quic/quic_simple_server_packet_writer.h",
rched113b22015-03-26 04:54:051270 "tools/quic/quic_spdy_client_stream.cc",
1271 "tools/quic/quic_spdy_client_stream.h",
rch0e945472015-03-26 15:19:211272 "tools/quic/quic_spdy_server_stream.cc",
1273 "tools/quic/quic_spdy_server_stream.h",
1274 "tools/quic/quic_time_wait_list_manager.cc",
1275 "tools/quic/quic_time_wait_list_manager.h",
rchda78df5a2015-03-22 05:16:371276 "tools/quic/synchronous_host_resolver.cc",
1277 "tools/quic/synchronous_host_resolver.h",
rcha9d12ce12015-03-19 23:06:491278 ]
1279 deps = [
1280 ":net",
1281 "//base",
rch47ad01f2015-03-20 21:17:231282 "//base/third_party/dynamic_annotations",
1283 "//url",
1284 ]
1285}
1286
sherouk51b4b098b2015-08-10 09:00:431287if (!is_ios) {
1288 executable("quic_client") {
1289 sources = [
1290 "tools/quic/quic_simple_client_bin.cc",
1291 ]
1292 deps = [
1293 ":net",
1294 ":simple_quic_tools",
1295 "//base",
brettwba7a73d2015-08-31 22:17:391296 "//build/config/sanitizers:deps",
sherouk51b4b098b2015-08-10 09:00:431297 "//url",
1298 ]
1299 }
1300 executable("quic_server") {
1301 sources = [
1302 "tools/quic/quic_simple_server_bin.cc",
1303 ]
1304 deps = [
1305 ":net",
1306 ":simple_quic_tools",
1307 "//base",
brettwba7a73d2015-08-31 22:17:391308 "//build/config/sanitizers:deps",
sherouk51b4b098b2015-08-10 09:00:431309 "//third_party/boringssl",
1310 "//third_party/protobuf:protobuf_lite",
1311 ]
1312 }
rch216445c2015-03-27 00:23:281313}
1314
dpranke64df2832015-07-31 22:33:361315# TODO(GYP): Delete this after we've converted everything to GN.
1316# The _run targets exist only for compatibility w/ GYP.
1317group("net_unittests_run") {
1318 testonly = true
1319 deps = [
1320 ":net_unittests",
1321 ]
1322}
1323
1324test("net_unittests") {
1325 sources = gypi_values.net_test_sources
1326
sherouk51b4b098b2015-08-10 09:00:431327 if (is_ios) {
1328 sources -= [
1329 "websockets/websocket_stream_cookie_test.cc",
1330 "websockets/websocket_stream_create_test_base.cc",
1331 "websockets/websocket_stream_create_test_base.h",
1332 ]
1333 }
1334
dpranke64df2832015-07-31 22:33:361335 configs += [
1336 "//build/config:precompiled_headers",
1337
1338 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1339 "//build/config/compiler:no_size_t_to_int_warning",
1340 ]
1341 defines = []
1342
1343 deps = [
1344 ":balsa",
1345 ":extras",
1346 ":http_server",
1347 ":net",
1348 ":simple_quic_tools",
1349 ":test_support",
1350 "//base",
1351 "//base:i18n",
1352 "//base:prefs_test_support",
1353 "//base/allocator",
1354 "//base/third_party/dynamic_annotations",
1355 "//crypto",
1356 "//crypto:platform",
1357 "//crypto:test_support",
dpranke64df2832015-07-31 22:33:361358 "//net/base/registry_controlled_domains",
1359 "//sql",
1360 "//testing/gmock",
1361 "//testing/gtest",
1362 "//third_party/zlib",
1363 "//url",
1364 ]
1365
1366 data = [
1367 "data/",
1368 ]
1369
1370 if (is_linux || is_mac || is_win) {
1371 deps += [
1372 "//third_party/pyftpdlib/",
1373 "//third_party/pywebsocket/",
1374 "//third_party/tlslite/",
1375 ]
1376 data_deps = [
1377 "//third_party/pyftpdlib/",
1378 "//third_party/pywebsocket/",
1379 "//third_party/tlslite/",
1380 ]
1381 data += [
1382 "tools/testserver/",
1383 "//third_party/pyftpdlib/",
1384 "//third_party/pywebsocket/",
1385 "//third_party/tlslite/",
1386 "$root_out_dir/pyproto/google/",
dprankef497c7962015-07-31 19:46:231387 ]
1388 }
1389
dpranke64df2832015-07-31 22:33:361390 if (is_desktop_linux) {
1391 deps += [ ":epoll_quic_tools" ]
1392 }
1393 if (is_linux) {
1394 sources += gypi_values.net_linux_test_sources
1395 deps += [
1396 ":epoll_quic_tools",
1397 ":epoll_server",
1398 ":flip_in_mem_edsm_server_base",
brettwbc8b2a22015-07-28 18:24:421399 ]
dpranke64df2832015-07-31 22:33:361400 }
[email protected]8a3f8242014-06-05 18:05:121401
dpranke64df2832015-07-31 22:33:361402 if (is_mac || is_ios) {
1403 sources += gypi_values.net_base_test_mac_ios_sources
1404 }
1405
1406 if (is_chromeos) {
1407 sources -= [ "proxy/proxy_config_service_linux_unittest.cc" ]
1408 }
1409
1410 if (v8_use_external_startup_data) {
1411 deps += [ "//gin" ]
1412 }
1413
1414 if (!use_nss_certs) {
1415 sources -= [
1416 "cert/nss_cert_database_unittest.cc",
1417 "ssl/client_cert_store_nss_unittest.cc",
[email protected]8a3f8242014-06-05 18:05:121418 ]
dpranke64df2832015-07-31 22:33:361419 if (is_chromeos) { # Already removed for all non-ChromeOS builds.
davidben2bcbc6b2015-04-22 02:36:411420 sources -= [
dpranke64df2832015-07-31 22:33:361421 "cert/nss_cert_database_chromeos_unittest.cc",
1422 "cert/nss_profile_filter_chromeos_unittest.cc",
davidben2bcbc6b2015-04-22 02:36:411423 ]
brettw43ae0e12015-07-14 22:12:361424 }
[email protected]8a3f8242014-06-05 18:05:121425 }
dpranke64df2832015-07-31 22:33:361426
1427 if (use_openssl) {
1428 # When building for OpenSSL, we need to exclude NSS specific tests
1429 # or functionality not supported by OpenSSL yet.
1430 # TODO(bulach): Add equivalent tests when the underlying
1431 # functionality is ported to OpenSSL.
1432 sources -= [ "quic/test_tools/crypto_test_utils_nss.cc" ]
1433 } else {
1434 sources -= [
1435 "cert/x509_util_openssl_unittest.cc",
1436 "quic/test_tools/crypto_test_utils_openssl.cc",
1437 "socket/ssl_client_socket_openssl_unittest.cc",
1438 "ssl/ssl_client_session_cache_openssl_unittest.cc",
1439 ]
1440 }
1441
1442 if (use_kerberos) {
1443 defines += [ "USE_KERBEROS" ]
1444 }
1445
1446 # These are excluded on Android, because the actual Kerberos support, which
1447 # these test, is in a separate app on Android.
1448 if (!use_kerberos || is_android) {
1449 sources -= [
1450 "http/http_auth_gssapi_posix_unittest.cc",
1451 "http/mock_gssapi_library_posix.cc",
1452 "http/mock_gssapi_library_posix.h",
1453 ]
1454 }
1455 if (!use_kerberos) {
1456 sources -= [ "http/http_auth_handler_negotiate_unittest.cc" ]
1457 }
1458
1459 if (use_openssl || (!is_desktop_linux && !is_chromeos && !is_ios)) {
1460 # Only include this test when on Posix and using NSS for
1461 # cert verification or on iOS (which also uses NSS for certs).
1462 sources -= [ "cert_net/nss_ocsp_unittest.cc" ]
1463 }
1464
1465 if (!use_openssl_certs) {
1466 sources -= [ "ssl/openssl_client_key_store_unittest.cc" ]
1467 }
1468
1469 if (!enable_websockets) {
1470 sources -= [
1471 "server/http_connection_unittest.cc",
1472 "server/http_server_response_info_unittest.cc",
1473 "server/http_server_unittest.cc",
1474 "server/web_socket_encoder_unittest.cc",
1475 "websockets/websocket_basic_stream_test.cc",
1476 "websockets/websocket_channel_test.cc",
1477 "websockets/websocket_deflate_predictor_impl_test.cc",
1478 "websockets/websocket_deflate_stream_test.cc",
1479 "websockets/websocket_deflater_test.cc",
1480 "websockets/websocket_end_to_end_test.cc",
1481 "websockets/websocket_errors_test.cc",
1482 "websockets/websocket_extension_parser_test.cc",
1483 "websockets/websocket_frame_parser_test.cc",
1484 "websockets/websocket_frame_test.cc",
1485 "websockets/websocket_handshake_challenge_test.cc",
1486 "websockets/websocket_handshake_stream_create_helper_test.cc",
1487 "websockets/websocket_inflater_test.cc",
1488 "websockets/websocket_stream_test.cc",
1489 "websockets/websocket_test_util.cc",
1490 "websockets/websocket_test_util.h",
1491 ]
1492 deps -= [ ":http_server" ]
1493 }
1494
1495 if (disable_file_support) {
1496 sources -= [
1497 "base/directory_lister_unittest.cc",
1498 "url_request/url_request_file_job_unittest.cc",
1499 ]
1500 }
1501
1502 if (disable_ftp_support) {
1503 sources -= [
1504 "ftp/ftp_auth_cache_unittest.cc",
1505 "ftp/ftp_ctrl_response_buffer_unittest.cc",
1506 "ftp/ftp_directory_listing_parser_ls_unittest.cc",
dpranke64df2832015-07-31 22:33:361507 "ftp/ftp_directory_listing_parser_unittest.cc",
1508 "ftp/ftp_directory_listing_parser_unittest.h",
1509 "ftp/ftp_directory_listing_parser_vms_unittest.cc",
1510 "ftp/ftp_directory_listing_parser_windows_unittest.cc",
1511 "ftp/ftp_network_transaction_unittest.cc",
1512 "ftp/ftp_util_unittest.cc",
1513 "url_request/url_request_ftp_job_unittest.cc",
1514 ]
1515 }
1516
1517 if (!enable_built_in_dns) {
1518 sources -= [
1519 "dns/address_sorter_posix_unittest.cc",
1520 "dns/address_sorter_unittest.cc",
1521 ]
1522 }
1523
xunjieli905496a2015-08-31 15:51:171524 if (use_v8_in_net) {
dpranke64df2832015-07-31 22:33:361525 deps += [ ":net_with_v8" ]
1526 } else {
1527 sources -= [
1528 "proxy/proxy_resolver_v8_tracing_unittest.cc",
1529 "proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc",
1530 "proxy/proxy_resolver_v8_unittest.cc",
1531 ]
1532 }
1533
1534 if (use_v8_in_net && !is_android) {
1535 deps += [
1536 ":net_browser_services",
1537 ":net_utility_services",
1538 "//mojo/environment:chromium",
1539 "//third_party/mojo/src/mojo/edk/system",
1540 ]
1541 } else {
1542 sources -= [
1543 "dns/host_resolver_mojo_unittest.cc",
1544 "dns/mojo_host_resolver_impl_unittest.cc",
1545 "proxy/mojo_proxy_resolver_factory_impl_unittest.cc",
1546 "proxy/mojo_proxy_resolver_impl_unittest.cc",
1547 "proxy/mojo_proxy_resolver_v8_tracing_bindings_unittest.cc",
1548 "proxy/proxy_resolver_factory_mojo_unittest.cc",
1549 "proxy/proxy_service_mojo_unittest.cc",
1550 ]
1551 }
1552
1553 if (!enable_mdns) {
1554 sources -= [
1555 "dns/mdns_cache_unittest.cc",
1556 "dns/mdns_client_unittest.cc",
1557 "dns/record_parsed_unittest.cc",
1558 "dns/record_rdata_unittest.cc",
1559 ]
1560 }
1561
1562 if (is_ios) {
1563 # TODO(GYP)
1564 # 'actions': [
1565 # {
1566 # 'action_name': 'copy_test_data',
1567 # 'variables': {
1568 # 'test_data_files': [
1569 # 'data/ssl/certificates/',
1570 # 'data/test.html',
1571 # 'data/url_request_unittest/',
mattm057b0152015-08-11 00:26:241572 # 'data/verify_name_match_unittest/names/',
eroman58423c12015-08-14 20:47:361573 # 'data/parse_certificate_unittest/',
dpranke64df2832015-07-31 22:33:361574 # ],
1575 # 'test_data_prefix': 'net',
1576 # },
1577 # 'includes': [ '../build/copy_test_data_ios.gypi' ],
1578 # },
1579 # ],
1580 sources -= [
1581 # TODO(droger): The following tests are disabled because the
1582 # implementation is missing or incomplete.
1583 # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS.
1584 "base/keygen_handler_unittest.cc",
1585 "disk_cache/backend_unittest.cc",
1586 "disk_cache/blockfile/block_files_unittest.cc",
1587
1588 # Need to read input data files.
1589 "filter/gzip_filter_unittest.cc",
1590 "socket/ssl_server_socket_unittest.cc",
1591 "spdy/fuzzing/hpack_fuzz_util_test.cc",
1592
1593 # Need TestServer.
1594 "cert_net/cert_net_fetcher_impl_unittest.cc",
1595 "proxy/proxy_script_fetcher_impl_unittest.cc",
1596 "socket/ssl_client_socket_unittest.cc",
1597 "url_request/url_fetcher_impl_unittest.cc",
1598 "url_request/url_request_context_builder_unittest.cc",
1599
1600 # Needs GetAppOutput().
1601 "test/python_utils_unittest.cc",
1602
1603 # The following tests are disabled because they don't apply to
1604 # iOS.
1605 # OS is not "linux" or "freebsd" or "openbsd".
1606 "socket/unix_domain_client_socket_posix_unittest.cc",
1607 "socket/unix_domain_server_socket_posix_unittest.cc",
1608
1609 # See bug http://crbug.com/344533.
1610 "disk_cache/blockfile/index_table_v3_unittest.cc",
1611 ]
1612 }
1613
1614 if (is_android) {
1615 sources -= [
1616 # See bug http://crbug.com/344533.
1617 "disk_cache/blockfile/index_table_v3_unittest.cc",
1618 "dns/dns_config_service_posix_unittest.cc",
1619 ]
1620 deps += [
1621 ":net_test_jni_headers",
1622
1623 # TODO(mmenke): This depends on test_support_base, which depends on
1624 # icu. Figure out a way to remove that dependency.
1625 "//testing/android/native_test:native_test_native_code",
1626 ]
1627 set_sources_assignment_filter([])
1628 sources += [ "base/address_tracker_linux_unittest.cc" ]
1629 set_sources_assignment_filter(sources_assignment_filter)
1630 isolate_file = "net_unittests.isolate"
1631 }
1632
dpranke64df2832015-07-31 22:33:361633 # Symbols for crashes when running tests on swarming.
1634 if (symbol_level > 0) {
1635 if (is_win) {
1636 data += [ "$root_out_dir/net_unittests.exe.pdb" ]
1637 } else if (is_mac) {
1638 data += [ "$root_out_dir/net_unittests.dSYM/" ]
1639 }
1640 }
1641}
1642
1643# !is_android && !is_win && !is_mac
[email protected]8a3f8242014-06-05 18:05:121644
rockot9c67e5f2015-03-12 20:01:211645executable("net_perftests") {
1646 testonly = true
1647 sources = [
ricea10eb9f5e2015-05-19 18:51:571648 "base/mime_sniffer_perftest.cc",
rockot9c67e5f2015-03-12 20:01:211649 "cookies/cookie_monster_perftest.cc",
1650 "disk_cache/blockfile/disk_cache_perftest.cc",
rohitrao1860223c2015-05-16 01:07:141651 "extras/sqlite/sqlite_persistent_cookie_store_perftest.cc",
rockot9c67e5f2015-03-12 20:01:211652 "proxy/proxy_resolver_perftest.cc",
1653 "udp/udp_socket_perftest.cc",
1654 ]
1655
1656 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1657 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
1658 deps = [
brettwcdccaf02015-07-27 16:27:091659 ":extras",
1660 ":net",
1661 ":test_support",
rockot9c67e5f2015-03-12 20:01:211662 "//base",
1663 "//base:i18n",
1664 "//base/test:test_support_perf",
brettwba7a73d2015-08-31 22:17:391665 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:211666 "//testing/gtest",
1667 "//url",
rockot9c67e5f2015-03-12 20:01:211668 ]
1669
1670 if (enable_websockets) {
1671 sources += [ "websockets/websocket_frame_perftest.cc" ]
1672 }
1673
1674 if (use_v8_in_net) {
1675 deps += [ ":net_with_v8" ]
1676 } else {
1677 sources -= [ "proxy/proxy_resolver_perftest.cc" ]
1678 }
rockot9c67e5f2015-03-12 20:01:211679}