blob: 0b0b43590c3bbce8c1a5c49517b27ea6fa2c4862 [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
5import("//build/config/crypto.gni")
6import("//build/config/features.gni")
7import("//build/config/ui.gni")
rmcilroy5837d332014-12-17 14:30:588import("//build/module_args/v8.gni")
qsrfb5251d12015-01-21 15:57:229import("//testing/test.gni")
rockot9c67e5f2015-03-12 20:01:2110import("//third_party/icu/config.gni")
rtennetib6f1c0d2015-04-03 17:52:0611import("//third_party/protobuf/proto_library.gni")
[email protected]4625ade2014-04-15 19:26:4412
[email protected]26046b52014-07-16 00:11:0313# TODO(cjhopman): //build/config/android/rules.gni also imports grit_rule.gni.
14# Currently, that file can't be imported multiple times. Make this always
15# imported when http://crbug.com/393704 is fixed.
16if (!is_android) {
17 import("//tools/grit/grit_rule.gni")
18}
19
[email protected]4625ade2014-04-15 19:26:4420if (is_android) {
21 import("//build/config/android/config.gni")
[email protected]ef0eb442014-05-15 09:32:1822 import("//build/config/android/rules.gni")
[email protected]4625ade2014-04-15 19:26:4423} else if (is_mac) {
24 import("//build/config/mac/mac_sdk.gni")
25}
26
27# The list of net files is kept in net.gypi. Read it.
scottmg34fb7e52014-12-03 23:27:2428gypi_values = exec_script("//build/gypi_to_gn.py",
29 [ rebase_path("net.gypi") ],
30 "scope",
31 [ "net.gypi" ])
[email protected]4625ade2014-04-15 19:26:4432
33# Disable Kerberos on ChromeOS, Android and iOS, at least for now. It needs
34# configuration (krb5.conf and so on).
35use_kerberos = !is_chromeos && !is_android && !is_ios
36
37# The way the cache uses mmap() is inefficient on some Android devices. If
38# this flag is set, we hackily avoid using mmap() in the disk cache. We are
39# pretty confident that mmap-ing the index would not hurt any existing x86
40# android devices, but we cannot be so sure about the variety of ARM devices.
41# So enable it for x86 only for now.
dpranke43276212015-02-20 02:55:1942posix_avoid_mmap = is_android && current_cpu != "x86"
[email protected]4625ade2014-04-15 19:26:4443
44# WebSockets and socket stream code are used everywhere except iOS.
45enable_websockets = !is_ios
[email protected]8a3f8242014-06-05 18:05:1246use_v8_in_net = !is_ios
[email protected]4625ade2014-04-15 19:26:4447enable_built_in_dns = !is_ios
[email protected]8a3f8242014-06-05 18:05:1248disable_ftp_support = is_ios
[email protected]4625ade2014-04-15 19:26:4449
[email protected]384dab92014-06-04 20:26:0850declare_args() {
51 # Disables support for file URLs. File URL support requires use of icu.
52 disable_file_support = false
53}
[email protected]02494ec2014-05-07 15:05:2954
[email protected]4625ade2014-04-15 19:26:4455config("net_config") {
56 defines = []
57 if (posix_avoid_mmap) {
58 defines += [ "POSIX_AVOID_MMAP" ]
59 }
[email protected]02494ec2014-05-07 15:05:2960 if (disable_file_support) {
61 defines += [ "DISABLE_FILE_SUPPORT" ]
62 }
[email protected]4625ade2014-04-15 19:26:4463}
64
xunjieli905496a2015-08-31 15:51:1765# net_internal_config is shared with net and net_small.
66config("net_internal_config") {
[email protected]8603c5de2014-04-16 20:34:3167 defines = [
ellyjonesc7a5c502015-06-26 18:55:2068 # TODO(GYP) Note that the GYP file supports linux_link_kerberos (defaults to
[email protected]8603c5de2014-04-16 20:34:3169 # 0) which implies that we run pkg_config on kerberos and link to that
70 # rather than setting this define which will dynamically open it. That
71 # doesn't seem to be set in the regular builds, so we're skipping this
72 # capability here.
73 "DLOPEN_KERBEROS",
scottmg34fb7e52014-12-03 23:27:2474 "NET_IMPLEMENTATION",
[email protected]8603c5de2014-04-16 20:34:3175 ]
dpranke43276212015-02-20 02:55:1976
[email protected]4625ade2014-04-15 19:26:4477 if (use_kerberos) {
78 defines += [ "USE_KERBEROS" ]
79 if (is_android) {
xunjieli905496a2015-08-31 15:51:1780 include_dirs = [ "/usr/include/kerberosV" ]
[email protected]4625ade2014-04-15 19:26:4481 }
[email protected]4625ade2014-04-15 19:26:4482 }
83
84 if (enable_built_in_dns) {
85 defines += [ "ENABLE_BUILT_IN_DNS" ]
xunjieli905496a2015-08-31 15:51:1786 }
87}
88
89# net_shared_* are settings shared between net and net_small
90net_shared_sources =
91 gypi_values.net_nacl_common_sources + gypi_values.net_non_nacl_sources
92
93net_shared_unfiltered_sources = []
94
95net_shared_configs = [
96 ":net_internal_config",
97 "//build/config:precompiled_headers",
98
99 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
100 "//build/config/compiler:no_size_t_to_int_warning",
101]
102
103net_shared_public_deps = [
104 ":net_quic_proto",
105 "//crypto",
106 "//crypto:platform",
107]
108
109net_shared_deps = [
110 ":net_resources",
111 "//base",
112 "//base:prefs",
113 "//base/third_party/dynamic_annotations",
114 "//net/base/registry_controlled_domains",
115 "//sdch",
116 "//third_party/protobuf:protobuf_lite",
117 "//third_party/zlib",
118]
119
120if (!use_kerberos) {
121 net_shared_sources -= [
122 "http/http_auth_gssapi_posix.cc",
123 "http/http_auth_gssapi_posix.h",
124 "http/http_auth_handler_negotiate.cc",
125 "http/http_auth_handler_negotiate.h",
126 ]
127}
128
129if (is_posix) {
130 if (posix_avoid_mmap) {
131 net_shared_sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ]
[email protected]4625ade2014-04-15 19:26:44132 } else {
xunjieli905496a2015-08-31 15:51:17133 net_shared_sources -=
134 [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ]
135 }
136}
137
138if (!enable_built_in_dns) {
139 net_shared_sources -= [
140 "dns/address_sorter_posix.cc",
141 "dns/address_sorter_posix.h",
142 "dns/dns_client.cc",
143 ]
144}
145
146if (use_openssl) {
147 net_shared_sources -= [
148 "base/nss_memio.c",
149 "base/nss_memio.h",
150 "cert/ct_log_verifier_nss.cc",
151 "cert/ct_objects_extractor_nss.cc",
152 "cert/jwk_serializer_nss.cc",
153 "cert/scoped_nss_types.h",
154 "cert/x509_util_nss.cc",
155 "quic/crypto/aead_base_decrypter_nss.cc",
156 "quic/crypto/aead_base_encrypter_nss.cc",
157 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc",
158 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc",
159 "quic/crypto/chacha20_poly1305_decrypter_nss.cc",
160 "quic/crypto/chacha20_poly1305_encrypter_nss.cc",
161 "quic/crypto/channel_id_nss.cc",
162 "quic/crypto/p256_key_exchange_nss.cc",
163 "socket/nss_ssl_util.cc",
164 "socket/nss_ssl_util.h",
165 "socket/ssl_client_socket_nss.cc",
166 "socket/ssl_client_socket_nss.h",
167 "socket/ssl_server_socket_nss.cc",
168 "socket/ssl_server_socket_nss.h",
169 ]
170 if (is_ios) {
171 # Always removed for !ios below.
172 net_shared_sources -= [
173 "cert/cert_verify_proc_nss.cc",
174 "cert/cert_verify_proc_nss.h",
[email protected]4625ade2014-04-15 19:26:44175 ]
176 }
xunjieli905496a2015-08-31 15:51:17177 if (is_win) {
178 net_shared_sources -= [ "cert/sha256_legacy_support_nss_win.cc" ]
[email protected]4625ade2014-04-15 19:26:44179 }
xunjieli905496a2015-08-31 15:51:17180 if (!use_nss_certs && !is_ios) {
181 net_shared_sources -= [ "cert/x509_util_nss.h" ]
182 }
183} else {
184 net_shared_sources -= [
185 "cert/ct_log_verifier_openssl.cc",
186 "cert/ct_objects_extractor_openssl.cc",
187 "cert/jwk_serializer_openssl.cc",
188 "cert/x509_util_openssl.cc",
189 "cert/x509_util_openssl.h",
190 "quic/crypto/aead_base_decrypter_openssl.cc",
191 "quic/crypto/aead_base_encrypter_openssl.cc",
192 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc",
193 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc",
194 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc",
195 "quic/crypto/chacha20_poly1305_encrypter_openssl.cc",
196 "quic/crypto/channel_id_openssl.cc",
197 "quic/crypto/p256_key_exchange_openssl.cc",
198 "quic/crypto/scoped_evp_aead_ctx.cc",
199 "quic/crypto/scoped_evp_aead_ctx.h",
200 "socket/ssl_client_socket_openssl.cc",
201 "socket/ssl_client_socket_openssl.h",
202 "socket/ssl_server_socket_openssl.cc",
203 "socket/ssl_server_socket_openssl.h",
204 "ssl/openssl_ssl_util.cc",
205 "ssl/openssl_ssl_util.h",
206 "ssl/ssl_client_session_cache_openssl.cc",
207 "ssl/ssl_client_session_cache_openssl.h",
208 "ssl/ssl_platform_key.h",
209 "ssl/threaded_ssl_private_key.cc",
210 "ssl/threaded_ssl_private_key.h",
211 ]
212 if (is_mac) {
213 net_shared_sources -= [ "ssl/ssl_platform_key_mac.cc" ]
214 }
215 if (is_android) {
216 net_shared_sources -= [ "ssl/ssl_platform_key_android.cc" ]
217 }
218 if (is_win) {
219 net_shared_sources -= [
220 "cert/sha256_legacy_support_openssl_win.cc",
221 "ssl/ssl_platform_key_win.cc",
xunjieli06d93982015-08-27 17:13:02222 ]
[email protected]4625ade2014-04-15 19:26:44223 }
xunjieli905496a2015-08-31 15:51:17224 if (use_nss_certs) {
225 net_shared_sources -= [
pneubeckabe6e9d12015-08-26 08:47:11226 "ssl/client_key_store.cc",
227 "ssl/client_key_store.h",
228 "ssl/ssl_platform_key_nss.cc",
229 ]
[email protected]4625ade2014-04-15 19:26:44230 }
xunjieli905496a2015-08-31 15:51:17231}
[email protected]4625ade2014-04-15 19:26:44232
xunjieli905496a2015-08-31 15:51:17233if (!use_openssl_certs) {
234 net_shared_sources -= [
235 "base/crypto_module_openssl.cc",
236 "base/keygen_handler_openssl.cc",
237 "base/openssl_private_key_store.h",
238 "base/openssl_private_key_store_memory.cc",
239 "cert/cert_database_openssl.cc",
240 "cert/cert_verify_proc_openssl.cc",
241 "cert/cert_verify_proc_openssl.h",
242 "cert/test_root_certs_openssl.cc",
243 "cert/x509_certificate_openssl.cc",
244 "ssl/openssl_client_key_store.cc",
245 "ssl/openssl_client_key_store.h",
246 ]
247 if (is_android) {
248 net_shared_sources -= [ "base/openssl_private_key_store_android.cc" ]
249 }
250} else {
251 if (is_android) {
252 # Android doesn't use these even when using OpenSSL.
253 net_shared_sources -= [
254 "base/openssl_private_key_store_memory.cc",
255 "cert/cert_database_openssl.cc",
256 "cert/cert_verify_proc_openssl.cc",
257 "cert/test_root_certs_openssl.cc",
[email protected]4625ade2014-04-15 19:26:44258 ]
259 }
xunjieli905496a2015-08-31 15:51:17260}
[email protected]4625ade2014-04-15 19:26:44261
xunjieli905496a2015-08-31 15:51:17262if (use_glib && !is_chromeos) {
263 net_shared_configs += [ "//build/config/linux:gconf" ]
264 net_shared_deps += [ "//build/linux:gio" ]
265}
xunjieli06d93982015-08-27 17:13:02266
xunjieli905496a2015-08-31 15:51:17267if (is_linux) {
268 net_shared_configs += [ "//build/config/linux:libresolv" ]
269}
270
271if (!use_nss_certs) {
272 net_shared_sources -= [
273 "base/crypto_module_nss.cc",
274 "base/keygen_handler_nss.cc",
275 "cert/cert_database_nss.cc",
276 "cert/nss_cert_database.cc",
277 "cert/nss_cert_database.h",
278 "cert/x509_certificate_nss.cc",
279 "ssl/client_cert_store_nss.cc",
280 "ssl/client_cert_store_nss.h",
281 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
282 "third_party/mozilla_security_manager/nsKeygenHandler.h",
283 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
284 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
285 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
286 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
287 ]
288 if (!is_ios) {
289 # These files are part of the partial implementation of NSS on iOS so
290 # keep them in that case (even though use_nss_certs is not set).
291 net_shared_sources -= [
292 "cert/cert_verify_proc_nss.cc",
293 "cert/cert_verify_proc_nss.h",
294 "cert/test_root_certs_nss.cc",
295 "cert/x509_util_nss_certs.cc",
296 "cert_net/nss_ocsp.cc",
297 "cert_net/nss_ocsp.h",
xunjieli4c8c6922015-08-27 16:02:40298 ]
299 }
xunjieli905496a2015-08-31 15:51:17300 if (is_chromeos) {
301 # These were already removed on non-ChromeOS.
302 net_shared_sources -= [
303 "cert/nss_cert_database_chromeos.cc",
304 "cert/nss_cert_database_chromeos.h",
305 "cert/nss_profile_filter_chromeos.cc",
306 "cert/nss_profile_filter_chromeos.h",
307 ]
308 }
309 net_shared_sources -= [
310 "ssl/client_key_store.cc",
311 "ssl/client_key_store.h",
312 "ssl/ssl_platform_key_nss.cc",
313 ]
314} else if (use_openssl) {
315 # client_cert_store_nss.c requires NSS_CmpCertChainWCANames from NSS's
316 # libssl, but our bundled copy is not built in OpenSSL ports. Pull that file
317 # in directly.
318 net_shared_sources += [ "third_party/nss/ssl/cmpcert.c" ]
319}
320
321if (!enable_mdns) {
322 net_shared_sources -= [
323 "dns/mdns_cache.cc",
324 "dns/mdns_cache.h",
325 "dns/mdns_client.cc",
326 "dns/mdns_client.h",
327 "dns/mdns_client_impl.cc",
328 "dns/mdns_client_impl.h",
329 "dns/record_parsed.cc",
330 "dns/record_parsed.h",
331 "dns/record_rdata.cc",
332 "dns/record_rdata.h",
333 ]
334}
335
336if (is_win) {
337 net_shared_sources -= [
338 "http/http_auth_handler_ntlm_portable.cc",
339 "socket/socket_libevent.cc",
340 "socket/socket_libevent.h",
341 "socket/tcp_socket_libevent.cc",
342 "socket/tcp_socket_libevent.h",
343 "udp/udp_socket_libevent.cc",
344 "udp/udp_socket_libevent.h",
345 ]
346} else { # !is_win
347 net_shared_sources -= [
348 "base/winsock_init.cc",
349 "base/winsock_init.h",
350 "base/winsock_util.cc",
351 "base/winsock_util.h",
352 "proxy/proxy_resolver_winhttp.cc",
353 "proxy/proxy_resolver_winhttp.h",
354 ]
355}
356
357if (is_ios) {
358 # Add back some sources that were otherwise filtered out. iOS needs some Mac
359 # files.
360 net_shared_unfiltered_sources += [
361 "base/mac/url_conversions.h",
362 "base/mac/url_conversions.mm",
363 "base/network_change_notifier_mac.cc",
364 "base/network_config_watcher_mac.cc",
365 "base/network_interfaces_mac.cc",
366 "base/network_interfaces_mac.h",
367 "base/platform_mime_util_mac.mm",
368 "proxy/proxy_resolver_mac.cc",
369 "proxy/proxy_server_mac.cc",
370 ]
371
372 net_shared_sources -= [ "disk_cache/blockfile/file_posix.cc" ]
373 net_shared_deps += [
374 "//third_party/nss:nspr",
375 "//third_party/nss",
376 "//net/third_party/nss/ssl:libssl",
377 ]
378}
379
380if (is_ios || is_mac) {
381 net_shared_sources += gypi_values.net_base_mac_ios_sources
382}
383
384if (is_android) {
385 net_shared_deps += [ ":net_jni_headers" ]
386
387 # Add some Linux sources that were excluded by the filter, but which
388 # are needed.
389 net_shared_unfiltered_sources += [
390 "base/address_tracker_linux.cc",
391 "base/address_tracker_linux.h",
392 "base/network_interfaces_linux.cc",
393 "base/network_interfaces_linux.h",
394 "base/platform_mime_util_linux.cc",
395 ]
396}
397
398component("net") {
399 sources = net_shared_sources
400
401 # Add back some sources that were otherwise filtered out.
402 set_sources_assignment_filter([])
403 sources += net_shared_unfiltered_sources
404 set_sources_assignment_filter(sources_assignment_filter)
405
406 cflags = []
407 configs += net_shared_configs
408 public_configs = [ ":net_config" ]
409
410 public_deps = net_shared_public_deps + [ "//url" ]
411 deps = net_shared_deps
[email protected]4625ade2014-04-15 19:26:44412
413 if (is_mac) {
[email protected]4625ade2014-04-15 19:26:44414 libs = [
[email protected]ab9ce6e2014-04-17 20:33:19415 "Foundation.framework",
416 "Security.framework",
417 "SystemConfiguration.framework",
418 "resolv",
[email protected]4625ade2014-04-15 19:26:44419 ]
420 }
421
422 if (is_ios) {
[email protected]4625ade2014-04-15 19:26:44423 libs = [
[email protected]ab9ce6e2014-04-17 20:33:19424 "CFNetwork.framework",
425 "MobileCoreServices.framework",
426 "Security.framework",
427 "SystemConfiguration.framework",
428 "resolv",
[email protected]4625ade2014-04-15 19:26:44429 ]
xunjieli06d93982015-08-27 17:13:02430 }
xunjieli4c8c6922015-08-27 16:02:40431
xunjieli905496a2015-08-31 15:51:17432 if (!disable_file_support) {
433 sources += gypi_values.net_file_support_sources
xunjieli06d93982015-08-27 17:13:02434 }
435
xunjieli905496a2015-08-31 15:51:17436 if (!disable_ftp_support) {
437 sources += gypi_values.net_ftp_support_sources
438 }
439
440 if (enable_websockets) {
441 sources += gypi_values.net_websockets_sources
442 }
443
444 # ICU support.
445 deps += [
446 "//base:i18n",
447 "//third_party/icu",
448 ]
449 sources += [
450 "base/filename_util_icu.cc",
451 "base/net_string_util_icu.cc",
452 "base/net_util_icu.cc",
453 ]
454}
455
456if (is_android) {
457 # Same as net, but with ICU, file, ftp, and websocket support stripped.
458 component("net_small") {
459 sources = net_shared_sources
460
461 # Add back some sources that were otherwise filtered out.
xunjieli06d93982015-08-27 17:13:02462 set_sources_assignment_filter([])
xunjieli905496a2015-08-31 15:51:17463 sources += net_shared_unfiltered_sources
xunjieli06d93982015-08-27 17:13:02464 set_sources_assignment_filter(sources_assignment_filter)
xunjieli06d93982015-08-27 17:13:02465
xunjieli905496a2015-08-31 15:51:17466 cflags = []
467 defines = []
468 configs += net_shared_configs
469 public_configs = [ ":net_config" ]
470
471 public_deps = net_shared_public_deps +
472 [ "//url:url_lib_use_icu_alternatives_on_android" ]
473 deps = net_shared_deps + [ ":net_jni_headers" ]
474
475 defines += [
476 "DISABLE_FILE_SUPPORT",
477 "DISABLE_FTP_SUPPORT",
478 "USE_ICU_ALTERNATIVES_ON_ANDROID=1",
479 ]
480
481 # Use ICU alternative on Android.
[email protected]85191ed2014-05-15 00:41:49482 sources += [
483 "base/net_string_util_icu_alternatives_android.cc",
484 "base/net_string_util_icu_alternatives_android.h",
485 ]
486 }
[email protected]4625ade2014-04-15 19:26:44487}
488
489grit("net_resources") {
490 source = "base/net_resources.grd"
[email protected]7ae52902014-08-18 22:36:01491 use_qualified_include = true
[email protected]b89c53842014-07-23 16:32:32492 outputs = [
493 "grit/net_resources.h",
494 "net_resources.pak",
[email protected]b89c53842014-07-23 16:32:32495 ]
[email protected]4625ade2014-04-15 19:26:44496}
497
rtennetib6f1c0d2015-04-03 17:52:06498proto_library("net_quic_proto") {
xunjieli905496a2015-08-31 15:51:17499 visibility = [
500 ":net",
501 ":net_small",
502 ]
brettw2e7db0a2015-04-24 22:59:17503
rtennetib6f1c0d2015-04-03 17:52:06504 sources = [
505 "quic/proto/cached_network_parameters.proto",
506 "quic/proto/source_address_token.proto",
507 ]
508 cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:"
509 cc_include = "net/base/net_export.h"
510
511 defines = [ "NET_IMPLEMENTATION" ]
512
513 extra_configs = [ "//build/config/compiler:wexit_time_destructors" ]
514}
515
Brett Wilson83fd4242014-09-02 19:45:33516static_library("extras") {
mef327a8e42014-08-29 17:10:03517 sources = gypi_values.net_extras_sources
518 configs += [ "//build/config/compiler:wexit_time_destructors" ]
519 deps = [
520 ":net",
brettwbc44c0a92015-02-20 22:30:39521 "//base",
mef327a8e42014-08-29 17:10:03522 "//sql:sql",
523 ]
524}
525
[email protected]8a3f8242014-06-05 18:05:12526static_library("http_server") {
[email protected]4625ade2014-04-15 19:26:44527 sources = [
528 "server/http_connection.cc",
529 "server/http_connection.h",
530 "server/http_server.cc",
531 "server/http_server.h",
532 "server/http_server_request_info.cc",
533 "server/http_server_request_info.h",
534 "server/http_server_response_info.cc",
535 "server/http_server_response_info.h",
536 "server/web_socket.cc",
537 "server/web_socket.h",
dgozmana6e70092014-12-12 14:46:21538 "server/web_socket_encoder.cc",
539 "server/web_socket_encoder.h",
[email protected]4625ade2014-04-15 19:26:44540 ]
jambc6cc8e2014-11-14 17:56:29541 configs += [
brettwd1c719a2015-02-19 23:17:04542 "//build/config/compiler:no_size_t_to_int_warning",
jambc6cc8e2014-11-14 17:56:29543 "//build/config/compiler:wexit_time_destructors",
jambc6cc8e2014-11-14 17:56:29544 ]
[email protected]4625ade2014-04-15 19:26:44545 deps = [
546 ":net",
547 "//base",
548 ]
549}
550
[email protected]8603c5de2014-04-16 20:34:31551executable("dump_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24552 testonly = true
[email protected]8603c5de2014-04-16 20:34:31553 sources = [
[email protected]8603c5de2014-04-16 20:34:31554 "tools/dump_cache/dump_cache.cc",
555 "tools/dump_cache/dump_files.cc",
556 "tools/dump_cache/dump_files.h",
[email protected]8603c5de2014-04-16 20:34:31557 ]
[email protected]4625ade2014-04-15 19:26:44558
brettwd1c719a2015-02-19 23:17:04559 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
560 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31561
562 deps = [
[email protected]8603c5de2014-04-16 20:34:31563 ":net",
[email protected]b2b2bf52014-05-28 20:26:57564 ":test_support",
brettwba7a73d2015-08-31 22:17:39565 "//base",
566 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31567 ]
568}
569
[email protected]b2b2bf52014-05-28 20:26:57570source_set("test_support") {
Brett Wilson8f80ad0b2014-09-08 19:50:24571 testonly = true
[email protected]8603c5de2014-04-16 20:34:31572 sources = [
[email protected]8603c5de2014-04-16 20:34:31573 "base/load_timing_info_test_util.cc",
574 "base/load_timing_info_test_util.h",
575 "base/mock_file_stream.cc",
576 "base/mock_file_stream.h",
577 "base/test_completion_callback.cc",
578 "base/test_completion_callback.h",
579 "base/test_data_directory.cc",
580 "base/test_data_directory.h",
581 "cert/mock_cert_verifier.cc",
582 "cert/mock_cert_verifier.h",
583 "cookies/cookie_monster_store_test.cc",
584 "cookies/cookie_monster_store_test.h",
585 "cookies/cookie_store_test_callbacks.cc",
586 "cookies/cookie_store_test_callbacks.h",
587 "cookies/cookie_store_test_helpers.cc",
588 "cookies/cookie_store_test_helpers.h",
589 "disk_cache/disk_cache_test_base.cc",
590 "disk_cache/disk_cache_test_base.h",
591 "disk_cache/disk_cache_test_util.cc",
592 "disk_cache/disk_cache_test_util.h",
593 "dns/dns_test_util.cc",
594 "dns/dns_test_util.h",
595 "dns/mock_host_resolver.cc",
596 "dns/mock_host_resolver.h",
597 "dns/mock_mdns_socket_factory.cc",
598 "dns/mock_mdns_socket_factory.h",
[email protected]8a3f8242014-06-05 18:05:12599 "http/http_transaction_test_util.cc",
600 "http/http_transaction_test_util.h",
vishal.b62985ca92015-04-17 08:45:51601 "log/test_net_log.cc",
602 "log/test_net_log.h",
mmenke43758e62015-05-04 21:09:46603 "log/test_net_log_entry.cc",
604 "log/test_net_log_entry.h",
mmenke0034c542015-05-05 22:34:59605 "log/test_net_log_util.cc",
mmenke43758e62015-05-04 21:09:46606 "log/test_net_log_util.h",
[email protected]8603c5de2014-04-16 20:34:31607 "proxy/mock_proxy_resolver.cc",
608 "proxy/mock_proxy_resolver.h",
609 "proxy/mock_proxy_script_fetcher.cc",
610 "proxy/mock_proxy_script_fetcher.h",
611 "proxy/proxy_config_service_common_unittest.cc",
612 "proxy/proxy_config_service_common_unittest.h",
613 "socket/socket_test_util.cc",
614 "socket/socket_test_util.h",
615 "test/cert_test_util.cc",
616 "test/cert_test_util.h",
[email protected]83e1ae32014-07-18 10:57:07617 "test/cert_test_util_nss.cc",
nharper2e171cf2015-06-01 20:29:23618 "test/channel_id_test_util.cc",
619 "test/channel_id_test_util.h",
[email protected]8603c5de2014-04-16 20:34:31620 "test/ct_test_util.cc",
621 "test/ct_test_util.h",
622 "test/embedded_test_server/embedded_test_server.cc",
623 "test/embedded_test_server/embedded_test_server.h",
624 "test/embedded_test_server/http_connection.cc",
625 "test/embedded_test_server/http_connection.h",
626 "test/embedded_test_server/http_request.cc",
627 "test/embedded_test_server/http_request.h",
628 "test/embedded_test_server/http_response.cc",
629 "test/embedded_test_server/http_response.h",
xunjieli0f1bd6252015-06-03 21:57:20630 "test/embedded_test_server/stream_listen_socket.cc",
631 "test/embedded_test_server/stream_listen_socket.h",
632 "test/embedded_test_server/tcp_listen_socket.cc",
633 "test/embedded_test_server/tcp_listen_socket.h",
sammc6ac3fe52015-02-25 06:00:28634 "test/event_waiter.h",
[email protected]8603c5de2014-04-16 20:34:31635 "test/net_test_suite.cc",
636 "test/net_test_suite.h",
637 "test/python_utils.cc",
638 "test/python_utils.h",
639 "test/spawned_test_server/base_test_server.cc",
640 "test/spawned_test_server/base_test_server.h",
[email protected]8603c5de2014-04-16 20:34:31641 "test/spawned_test_server/local_test_server.cc",
642 "test/spawned_test_server/local_test_server.h",
satorux933fc7a2015-02-13 07:09:10643 "test/spawned_test_server/local_test_server_posix.cc",
644 "test/spawned_test_server/local_test_server_win.cc",
[email protected]8603c5de2014-04-16 20:34:31645 "test/spawned_test_server/remote_test_server.cc",
646 "test/spawned_test_server/remote_test_server.h",
647 "test/spawned_test_server/spawned_test_server.h",
648 "test/spawned_test_server/spawner_communicator.cc",
649 "test/spawned_test_server/spawner_communicator.h",
sherouk51b4b098b2015-08-10 09:00:43650 "test/url_request/ssl_certificate_error_job.cc",
651 "test/url_request/ssl_certificate_error_job.h",
Brett Wilson32ce17a2014-11-10 17:45:30652 "test/url_request/url_request_failed_job.cc",
653 "test/url_request/url_request_failed_job.h",
mef3e826cf2014-12-13 18:40:40654 "test/url_request/url_request_mock_data_job.cc",
655 "test/url_request/url_request_mock_data_job.h",
jam8e45cd72015-01-20 16:33:44656 "test/url_request/url_request_slow_download_job.cc",
657 "test/url_request/url_request_slow_download_job.h",
[email protected]8603c5de2014-04-16 20:34:31658 "url_request/test_url_fetcher_factory.cc",
659 "url_request/test_url_fetcher_factory.h",
660 "url_request/url_request_test_util.cc",
661 "url_request/url_request_test_util.h",
662 ]
663
brettwbc8b2a22015-07-28 18:24:42664 configs += [
665 "//build/config:precompiled_headers",
666
667 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
668 "//build/config/compiler:no_size_t_to_int_warning",
669 ]
[email protected]8603c5de2014-04-16 20:34:31670
Brett Wilsone53895272014-09-23 23:41:46671 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31672 "//base",
673 "//base/test:test_support",
[email protected]22fe91d2014-08-12 17:07:12674 "//crypto",
[email protected]59ff2d42014-04-22 22:25:23675 "//net",
[email protected]8603c5de2014-04-16 20:34:31676 "//net/tools/tld_cleanup",
677 "//testing/gmock",
678 "//testing/gtest",
679 "//url",
680 ]
681
jamb533b7e2015-03-04 17:12:05682 if (!is_ios) {
683 public_deps += [ "//third_party/protobuf:py_proto" ]
684 }
685
davidben4a644b02015-07-01 19:34:55686 if (use_nss_certs || is_ios) {
scottmg34fb7e52014-12-03 23:27:24687 public_deps += [ "//crypto:platform" ]
[email protected]8603c5de2014-04-16 20:34:31688 }
689
690 if (!is_android) {
691 sources -= [
692 "test/spawned_test_server/remote_test_server.cc",
693 "test/spawned_test_server/remote_test_server.h",
694 "test/spawned_test_server/spawner_communicator.cc",
695 "test/spawned_test_server/spawner_communicator.h",
696 ]
697 }
698
699 if (use_v8_in_net) {
Brett Wilsone53895272014-09-23 23:41:46700 public_deps += [ ":net_with_v8" ]
[email protected]8603c5de2014-04-16 20:34:31701 }
702
703 if (!enable_mdns) {
704 sources -= [
705 "dns/mock_mdns_socket_factory.cc",
706 "dns/mock_mdns_socket_factory.h",
707 ]
708 }
709
davidben15d69d482014-09-29 18:24:08710 if (!use_nss_certs) {
scottmg34fb7e52014-12-03 23:27:24711 sources -= [ "test/cert_test_util_nss.cc" ]
[email protected]83e1ae32014-07-18 10:57:07712 }
xunjielia6888202015-04-14 21:34:25713
714 if (!disable_file_support) {
715 sources += [
716 "test/url_request/url_request_mock_http_job.cc",
717 "test/url_request/url_request_mock_http_job.h",
718 "url_request/test_url_request_interceptor.cc",
719 "url_request/test_url_request_interceptor.h",
720 ]
721 }
[email protected]8603c5de2014-04-16 20:34:31722}
723
[email protected]ceeaac792014-06-25 05:14:43724source_set("balsa") {
725 sources = [
726 "tools/balsa/balsa_enums.h",
727 "tools/balsa/balsa_frame.cc",
728 "tools/balsa/balsa_frame.h",
729 "tools/balsa/balsa_headers.cc",
730 "tools/balsa/balsa_headers.h",
731 "tools/balsa/balsa_headers_token_utils.cc",
732 "tools/balsa/balsa_headers_token_utils.h",
733 "tools/balsa/balsa_visitor_interface.h",
734 "tools/balsa/http_message_constants.cc",
735 "tools/balsa/http_message_constants.h",
736 "tools/balsa/noop_balsa_visitor.h",
737 "tools/balsa/simple_buffer.cc",
738 "tools/balsa/simple_buffer.h",
739 "tools/balsa/split.cc",
740 "tools/balsa/split.h",
741 "tools/balsa/string_piece_utils.h",
rtennetie0ee6eb2015-05-01 00:55:09742 "tools/quic/spdy_balsa_utils.cc",
743 "tools/quic/spdy_balsa_utils.h",
[email protected]ceeaac792014-06-25 05:14:43744 ]
745 deps = [
746 ":net",
747 "//base",
[email protected]22fe91d2014-08-12 17:07:12748 "//url",
[email protected]ceeaac792014-06-25 05:14:43749 ]
750}
751
[email protected]8603c5de2014-04-16 20:34:31752if (use_v8_in_net) {
753 component("net_with_v8") {
754 sources = [
755 "proxy/proxy_resolver_v8.cc",
756 "proxy/proxy_resolver_v8.h",
757 "proxy/proxy_resolver_v8_tracing.cc",
758 "proxy/proxy_resolver_v8_tracing.h",
sammcf2d1ea02015-06-29 02:58:47759 "proxy/proxy_resolver_v8_tracing_wrapper.cc",
760 "proxy/proxy_resolver_v8_tracing_wrapper.h",
[email protected]8603c5de2014-04-16 20:34:31761 "proxy/proxy_service_v8.cc",
762 "proxy/proxy_service_v8.h",
763 ]
764
765 defines = [ "NET_IMPLEMENTATION" ]
766 configs += [
brettwd1c719a2015-02-19 23:17:04767 "//build/config/compiler:no_size_t_to_int_warning",
[email protected]8603c5de2014-04-16 20:34:31768 "//build/config/compiler:wexit_time_destructors",
769 ]
770
Brett Wilsone53895272014-09-23 23:41:46771 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31772 ":net",
Brett Wilsone53895272014-09-23 23:41:46773 ]
774 deps = [
[email protected]8603c5de2014-04-16 20:34:31775 "//base",
776 "//gin",
777 "//url",
778 "//v8",
779 ]
780 }
781}
782
amistry7e6ebfdc82015-02-13 04:19:11783if (use_v8_in_net && !is_android) {
784 source_set("net_browser_services") {
785 sources = [
786 "dns/mojo_host_resolver_impl.cc",
787 "dns/mojo_host_resolver_impl.h",
amistry6e1ed1b2015-03-12 05:24:01788 "proxy/in_process_mojo_proxy_resolver_factory.cc",
789 "proxy/in_process_mojo_proxy_resolver_factory.h",
sammc1d5df4d2015-05-05 05:06:17790 "proxy/mojo_proxy_resolver_factory.h",
eromandcacef22015-06-01 19:36:35791 "proxy/proxy_resolver_factory_mojo.cc",
792 "proxy/proxy_resolver_factory_mojo.h",
amistry6e1ed1b2015-03-12 05:24:01793 "proxy/proxy_service_mojo.cc",
794 "proxy/proxy_service_mojo.h",
amistry7e6ebfdc82015-02-13 04:19:11795 ]
796
797 public_deps = [
798 ":mojo_type_converters",
799 ":net",
brettwbc44c0a92015-02-20 22:30:39800 "//base",
amistry07ff1402015-03-10 07:34:07801 "//mojo/common",
amistry7e6ebfdc82015-02-13 04:19:11802 "//net/interfaces",
803 "//third_party/mojo/src/mojo/public/cpp/bindings",
amistry6e1ed1b2015-03-12 05:24:01804
805 # NOTE(amistry): As long as we support in-process Mojo v8 PAC, we need
806 # this dependency since in_process_mojo_proxy_resolver_factory creates
807 # the utility process side Mojo services in the browser process.
808 # Ultimately, this will go away when we only support out-of-process.
809 ":net_utility_services",
amistry7e6ebfdc82015-02-13 04:19:11810 ]
811 }
812
813 source_set("mojo_type_converters") {
814 sources = [
amistry7ec58112015-02-26 06:03:00815 "dns/mojo_host_type_converters.cc",
816 "dns/mojo_host_type_converters.h",
817 "proxy/mojo_proxy_type_converters.cc",
818 "proxy/mojo_proxy_type_converters.h",
amistry7e6ebfdc82015-02-13 04:19:11819 ]
820
821 public_deps = [
822 ":net",
823 "//net/interfaces",
824 "//third_party/mojo/src/mojo/public/cpp/bindings",
825 ]
826 }
sammc5403aa1d2015-02-25 04:59:21827
828 source_set("net_utility_services") {
829 sources = [
sammc6ac3fe52015-02-25 06:00:28830 "dns/host_resolver_mojo.cc",
831 "dns/host_resolver_mojo.h",
sammc352f7492015-02-25 09:45:24832 "proxy/mojo_proxy_resolver_factory_impl.cc",
833 "proxy/mojo_proxy_resolver_factory_impl.h",
sammc5403aa1d2015-02-25 04:59:21834 "proxy/mojo_proxy_resolver_impl.cc",
835 "proxy/mojo_proxy_resolver_impl.h",
sammca3242c92015-07-10 02:38:51836 "proxy/mojo_proxy_resolver_v8_tracing_bindings.h",
sammc5403aa1d2015-02-25 04:59:21837 ]
838
rockot9509ec82015-04-14 02:50:56839 deps = [
840 ":net_with_v8",
841 ]
842
sammc5403aa1d2015-02-25 04:59:21843 public_deps = [
844 ":mojo_type_converters",
845 ":net",
846 "//mojo/common",
847 "//net/interfaces",
848 "//third_party/mojo/src/mojo/public/cpp/bindings",
849 ]
850 }
amistry7e6ebfdc82015-02-13 04:19:11851}
852
[email protected]8603c5de2014-04-16 20:34:31853if (!is_ios && !is_android) {
854 executable("crash_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24855 testonly = true
scottmg34fb7e52014-12-03 23:27:24856 sources = [
857 "tools/crash_cache/crash_cache.cc",
858 ]
dpranke43276212015-02-20 02:55:19859
brettwd1c719a2015-02-19 23:17:04860 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
861 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31862 deps = [
863 ":net",
[email protected]b2b2bf52014-05-28 20:26:57864 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31865 "//base",
brettwba7a73d2015-08-31 22:17:39866 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31867 ]
868 }
869
870 executable("crl_set_dump") {
Brett Wilson8f80ad0b2014-09-08 19:50:24871 testonly = true
scottmg34fb7e52014-12-03 23:27:24872 sources = [
873 "tools/crl_set_dump/crl_set_dump.cc",
874 ]
dpranke43276212015-02-20 02:55:19875
brettwd1c719a2015-02-19 23:17:04876 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
877 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31878 deps = [
879 ":net",
880 "//base",
brettwba7a73d2015-08-31 22:17:39881 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31882 ]
883 }
884
885 executable("dns_fuzz_stub") {
Brett Wilson8f80ad0b2014-09-08 19:50:24886 testonly = true
scottmg34fb7e52014-12-03 23:27:24887 sources = [
888 "tools/dns_fuzz_stub/dns_fuzz_stub.cc",
889 ]
dpranke43276212015-02-20 02:55:19890
brettwd1c719a2015-02-19 23:17:04891 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
892 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31893 deps = [
894 ":net",
895 "//base",
brettwba7a73d2015-08-31 22:17:39896 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31897 ]
898 }
899
900 executable("gdig") {
Brett Wilson8f80ad0b2014-09-08 19:50:24901 testonly = true
[email protected]8603c5de2014-04-16 20:34:31902 sources = [
903 "tools/gdig/file_net_log.cc",
904 "tools/gdig/gdig.cc",
905 ]
906 deps = [
907 ":net",
908 "//base",
brettwba7a73d2015-08-31 22:17:39909 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31910 ]
911 }
912
913 executable("get_server_time") {
Brett Wilson8f80ad0b2014-09-08 19:50:24914 testonly = true
scottmg34fb7e52014-12-03 23:27:24915 sources = [
916 "tools/get_server_time/get_server_time.cc",
917 ]
dpranke43276212015-02-20 02:55:19918
brettwd1c719a2015-02-19 23:17:04919 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
920 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31921 deps = [
922 ":net",
923 "//base",
924 "//base:i18n",
brettwba7a73d2015-08-31 22:17:39925 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31926 "//url",
927 ]
928 }
929
rockot9c67e5f2015-03-12 20:01:21930 executable("hpack_example_generator") {
931 testonly = true
932 sources = [
933 "spdy/fuzzing/hpack_example_generator.cc",
934 ]
935
936 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
937 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
938 deps = [
rockot9c67e5f2015-03-12 20:01:21939 ":net",
brettwba7a73d2015-08-31 22:17:39940 "//base",
941 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:21942 ]
943 }
944
945 executable("hpack_fuzz_mutator") {
946 testonly = true
947 sources = [
948 "spdy/fuzzing/hpack_fuzz_mutator.cc",
949 ]
950
951 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
952 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
953 deps = [
rockot9c67e5f2015-03-12 20:01:21954 ":net",
brettwba7a73d2015-08-31 22:17:39955 "//base",
956 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:21957 ]
958 }
959
960 executable("hpack_fuzz_wrapper") {
961 testonly = true
962 sources = [
963 "spdy/fuzzing/hpack_fuzz_wrapper.cc",
964 ]
965
966 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
967 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
968 deps = [
rockot9c67e5f2015-03-12 20:01:21969 ":net",
brettwba7a73d2015-08-31 22:17:39970 "//base",
971 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:21972 ]
973 }
974
[email protected]8603c5de2014-04-16 20:34:31975 if (use_v8_in_net) {
976 executable("net_watcher") {
Brett Wilson8f80ad0b2014-09-08 19:50:24977 testonly = true
scottmg34fb7e52014-12-03 23:27:24978 sources = [
979 "tools/net_watcher/net_watcher.cc",
980 ]
[email protected]8603c5de2014-04-16 20:34:31981 deps = [
982 ":net",
983 ":net_with_v8",
984 "//base",
brettwba7a73d2015-08-31 22:17:39985 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31986 ]
987
mukai77f8210a2014-10-07 16:35:14988 if (is_desktop_linux) {
xunjieli905496a2015-08-31 15:51:17989 configs += [
990 "//build/config/linux:gconf",
991 "//build/config/linux:glib",
992 ]
dprankead0c1f42015-08-28 21:48:04993 deps += [ "//build/linux:gio" ]
[email protected]8603c5de2014-04-16 20:34:31994 }
995 }
996 }
997
998 executable("run_testserver") {
Brett Wilson8f80ad0b2014-09-08 19:50:24999 testonly = true
scottmg34fb7e52014-12-03 23:27:241000 sources = [
1001 "tools/testserver/run_testserver.cc",
1002 ]
[email protected]8603c5de2014-04-16 20:34:311003 deps = [
[email protected]b2b2bf52014-05-28 20:26:571004 ":test_support",
[email protected]8603c5de2014-04-16 20:34:311005 "//base",
1006 "//base/test:test_support",
brettwba7a73d2015-08-31 22:17:391007 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311008 "//testing/gtest",
1009 ]
1010 }
1011
1012 executable("stress_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:241013 testonly = true
scottmg34fb7e52014-12-03 23:27:241014 sources = [
rvargase23fcf652015-03-04 19:59:221015 "tools/stress_cache/stress_cache.cc",
scottmg34fb7e52014-12-03 23:27:241016 ]
dpranke43276212015-02-20 02:55:191017
brettwd1c719a2015-02-19 23:17:041018 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1019 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:311020 deps = [
1021 ":net",
[email protected]b2b2bf52014-05-28 20:26:571022 ":test_support",
[email protected]8603c5de2014-04-16 20:34:311023 "//base",
brettwba7a73d2015-08-31 22:17:391024 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311025 ]
1026 }
1027
1028 executable("tld_cleanup") {
scottmg34fb7e52014-12-03 23:27:241029 sources = [
1030 "tools/tld_cleanup/tld_cleanup.cc",
1031 ]
dpranke43276212015-02-20 02:55:191032
brettwd1c719a2015-02-19 23:17:041033 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1034 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:311035 deps = [
1036 "//base",
1037 "//base:i18n",
brettwba7a73d2015-08-31 22:17:391038 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311039 "//net/tools/tld_cleanup",
1040 ]
1041 }
1042}
1043
rch6983a3f2015-03-30 03:47:281044if (is_linux) {
[email protected]8a3f8242014-06-05 18:05:121045 static_library("epoll_server") {
[email protected]8603c5de2014-04-16 20:34:311046 sources = [
1047 "tools/epoll_server/epoll_server.cc",
1048 "tools/epoll_server/epoll_server.h",
1049 ]
1050 deps = [
1051 ":net",
1052 "//base",
1053 ]
1054 }
1055
[email protected]8a3f8242014-06-05 18:05:121056 static_library("flip_in_mem_edsm_server_base") {
Brett Wilson8f80ad0b2014-09-08 19:50:241057 testonly = true
[email protected]8603c5de2014-04-16 20:34:311058 sources = [
[email protected]8603c5de2014-04-16 20:34:311059 "tools/flip_server/acceptor_thread.cc",
satorux933fc7a2015-02-13 07:09:101060 "tools/flip_server/acceptor_thread.h",
1061 "tools/flip_server/constants.h",
[email protected]8603c5de2014-04-16 20:34:311062 "tools/flip_server/create_listener.cc",
1063 "tools/flip_server/create_listener.h",
[email protected]8603c5de2014-04-16 20:34:311064 "tools/flip_server/flip_config.cc",
1065 "tools/flip_server/flip_config.h",
1066 "tools/flip_server/http_interface.cc",
1067 "tools/flip_server/http_interface.h",
1068 "tools/flip_server/loadtime_measurement.h",
[email protected]8603c5de2014-04-16 20:34:311069 "tools/flip_server/mem_cache.cc",
satorux933fc7a2015-02-13 07:09:101070 "tools/flip_server/mem_cache.h",
[email protected]8603c5de2014-04-16 20:34:311071 "tools/flip_server/output_ordering.cc",
1072 "tools/flip_server/output_ordering.h",
1073 "tools/flip_server/ring_buffer.cc",
1074 "tools/flip_server/ring_buffer.h",
1075 "tools/flip_server/sm_connection.cc",
1076 "tools/flip_server/sm_connection.h",
1077 "tools/flip_server/sm_interface.h",
[email protected]8603c5de2014-04-16 20:34:311078 "tools/flip_server/spdy_interface.cc",
1079 "tools/flip_server/spdy_interface.h",
satorux933fc7a2015-02-13 07:09:101080 "tools/flip_server/spdy_ssl.cc",
1081 "tools/flip_server/spdy_ssl.h",
[email protected]8603c5de2014-04-16 20:34:311082 "tools/flip_server/spdy_util.cc",
1083 "tools/flip_server/spdy_util.h",
1084 "tools/flip_server/streamer_interface.cc",
1085 "tools/flip_server/streamer_interface.h",
rvargas145310f2015-08-14 18:09:041086 "tools/flip_server/url_to_filename_encoder.cc",
1087 "tools/flip_server/url_to_filename_encoder.h",
1088 "tools/flip_server/url_utilities.cc",
1089 "tools/flip_server/url_utilities.h",
[email protected]8603c5de2014-04-16 20:34:311090 ]
1091 deps = [
1092 ":balsa",
1093 ":epoll_server",
1094 ":net",
1095 "//base",
[email protected]edfd0f42014-07-22 18:20:371096 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311097 ]
1098 }
1099
1100 executable("flip_in_mem_edsm_server_unittests") {
Brett Wilson8f80ad0b2014-09-08 19:50:241101 testonly = true
[email protected]8603c5de2014-04-16 20:34:311102 sources = [
1103 "tools/flip_server/flip_test_utils.cc",
1104 "tools/flip_server/flip_test_utils.h",
1105 "tools/flip_server/http_interface_test.cc",
1106 "tools/flip_server/mem_cache_test.cc",
1107 "tools/flip_server/run_all_tests.cc",
1108 "tools/flip_server/spdy_interface_test.cc",
rvargas145310f2015-08-14 18:09:041109 "tools/flip_server/url_to_filename_encoder_unittest.cc",
1110 "tools/flip_server/url_utilities_unittest.cc",
[email protected]8603c5de2014-04-16 20:34:311111 ]
1112 deps = [
brettwbc44c0a92015-02-20 22:30:391113 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311114 ":flip_in_mem_edsm_server_base",
1115 ":net",
[email protected]b2b2bf52014-05-28 20:26:571116 ":test_support",
brettwba7a73d2015-08-31 22:17:391117 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311118 "//testing/gtest",
1119 "//testing/gmock",
[email protected]edfd0f42014-07-22 18:20:371120 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311121 ]
1122 }
1123
1124 executable("flip_in_mem_edsm_server") {
Brett Wilson8f80ad0b2014-09-08 19:50:241125 testonly = true
scottmg34fb7e52014-12-03 23:27:241126 sources = [
1127 "tools/flip_server/flip_in_mem_edsm_server.cc",
1128 ]
[email protected]8603c5de2014-04-16 20:34:311129 deps = [
brettwbc44c0a92015-02-20 22:30:391130 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311131 ":flip_in_mem_edsm_server_base",
1132 ":net",
1133 "//base",
brettwba7a73d2015-08-31 22:17:391134 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311135 ]
1136 }
1137
rch216445c2015-03-27 00:23:281138 source_set("epoll_quic_tools") {
[email protected]8603c5de2014-04-16 20:34:311139 sources = [
1140 "tools/quic/quic_client.cc",
1141 "tools/quic/quic_client.h",
[email protected]8603c5de2014-04-16 20:34:311142 "tools/quic/quic_default_packet_writer.cc",
1143 "tools/quic/quic_default_packet_writer.h",
[email protected]8603c5de2014-04-16 20:34:311144 "tools/quic/quic_epoll_clock.cc",
1145 "tools/quic/quic_epoll_clock.h",
1146 "tools/quic/quic_epoll_connection_helper.cc",
1147 "tools/quic/quic_epoll_connection_helper.h",
rtennetifb3fa6c2015-03-16 23:04:551148 "tools/quic/quic_packet_reader.cc",
1149 "tools/quic/quic_packet_reader.h",
[email protected]8603c5de2014-04-16 20:34:311150 "tools/quic/quic_packet_writer_wrapper.cc",
1151 "tools/quic/quic_packet_writer_wrapper.h",
1152 "tools/quic/quic_server.cc",
1153 "tools/quic/quic_server.h",
[email protected]8603c5de2014-04-16 20:34:311154 "tools/quic/quic_socket_utils.cc",
1155 "tools/quic/quic_socket_utils.h",
[email protected]8603c5de2014-04-16 20:34:311156 ]
1157 deps = [
1158 ":balsa",
1159 ":epoll_server",
1160 ":net",
1161 "//base",
1162 "//base/third_party/dynamic_annotations",
1163 "//crypto",
[email protected]edfd0f42014-07-22 18:20:371164 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311165 "//url",
1166 ]
1167 }
1168
rch216445c2015-03-27 00:23:281169 executable("epoll_quic_client") {
scottmg34fb7e52014-12-03 23:27:241170 sources = [
1171 "tools/quic/quic_client_bin.cc",
1172 ]
[email protected]8603c5de2014-04-16 20:34:311173 deps = [
brettwbc44c0a92015-02-20 22:30:391174 ":balsa",
1175 ":epoll_server",
rch216445c2015-03-27 00:23:281176 ":epoll_quic_tools",
1177 ":net",
1178 ":simple_quic_tools",
1179 "//base",
brettwba7a73d2015-08-31 22:17:391180 "//build/config/sanitizers:deps",
rch216445c2015-03-27 00:23:281181 "//third_party/boringssl",
1182 ]
1183 }
1184
1185 executable("epoll_quic_server") {
1186 sources = [
1187 "tools/quic/quic_server_bin.cc",
1188 ]
1189 deps = [
1190 ":balsa",
1191 ":epoll_server",
1192 ":epoll_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311193 ":net",
rchda78df5a2015-03-22 05:16:371194 ":simple_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311195 "//base",
brettwba7a73d2015-08-31 22:17:391196 "//build/config/sanitizers:deps",
[email protected]edfd0f42014-07-22 18:20:371197 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311198 ]
1199 }
[email protected]8603c5de2014-04-16 20:34:311200}
1201
[email protected]ef0eb442014-05-15 09:32:181202if (is_android) {
1203 generate_jni("net_jni_headers") {
1204 sources = [
1205 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
1206 "android/java/src/org/chromium/net/AndroidKeyStore.java",
1207 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java",
1208 "android/java/src/org/chromium/net/AndroidPrivateKey.java",
1209 "android/java/src/org/chromium/net/GURLUtils.java",
aberentec894a52015-07-09 14:45:531210 "android/java/src/org/chromium/net/HttpNegotiateAuthenticator.java",
xunjieli905496a2015-08-31 15:51:171211 "android/java/src/org/chromium/net/NetStringUtil.java",
[email protected]ef0eb442014-05-15 09:32:181212 "android/java/src/org/chromium/net/NetworkChangeNotifier.java",
1213 "android/java/src/org/chromium/net/ProxyChangeListener.java",
1214 "android/java/src/org/chromium/net/X509Util.java",
1215 ]
1216 jni_package = "net"
1217 }
cjhopmandad5f4272014-09-05 01:00:551218 generate_jni("net_test_jni_headers") {
1219 sources = [
1220 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java",
aberentec894a52015-07-09 14:45:531221 "test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticator.java",
cjhopmandad5f4272014-09-05 01:00:551222 ]
brettwcdccaf02015-07-27 16:27:091223 jni_package = "net/test"
cjhopmandad5f4272014-09-05 01:00:551224 }
[email protected]ef0eb442014-05-15 09:32:181225}
[email protected]8603c5de2014-04-16 20:34:311226
1227if (is_android || is_linux) {
1228 executable("disk_cache_memory_test") {
Brett Wilson8f80ad0b2014-09-08 19:50:241229 testonly = true
scottmg34fb7e52014-12-03 23:27:241230 sources = [
1231 "tools/disk_cache_memory_test/disk_cache_memory_test.cc",
1232 ]
[email protected]8603c5de2014-04-16 20:34:311233 deps = [
1234 ":net",
1235 "//base",
brettwba7a73d2015-08-31 22:17:391236 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311237 ]
1238 }
1239}
[email protected]8a3f8242014-06-05 18:05:121240
rch47ad01f2015-03-20 21:17:231241source_set("simple_quic_tools") {
rcha9d12ce12015-03-19 23:06:491242 sources = [
rtennetid67b3a722015-08-18 05:15:311243 "tools/quic/quic_client_base.cc",
1244 "tools/quic/quic_client_base.h",
rched113b22015-03-26 04:54:051245 "tools/quic/quic_client_session.cc",
1246 "tools/quic/quic_client_session.h",
rchc99f380c2015-03-26 19:50:561247 "tools/quic/quic_dispatcher.cc",
1248 "tools/quic/quic_dispatcher.h",
rch0e945472015-03-26 15:19:211249 "tools/quic/quic_in_memory_cache.cc",
1250 "tools/quic/quic_in_memory_cache.h",
rchc99f380c2015-03-26 19:50:561251 "tools/quic/quic_per_connection_packet_writer.cc",
1252 "tools/quic/quic_per_connection_packet_writer.h",
rch0e945472015-03-26 15:19:211253 "tools/quic/quic_server_session.cc",
1254 "tools/quic/quic_server_session.h",
rcha9d12ce12015-03-19 23:06:491255 "tools/quic/quic_simple_client.cc",
1256 "tools/quic/quic_simple_client.h",
rch216445c2015-03-27 00:23:281257 "tools/quic/quic_simple_per_connection_packet_writer.cc",
1258 "tools/quic/quic_simple_per_connection_packet_writer.h",
1259 "tools/quic/quic_simple_server.cc",
1260 "tools/quic/quic_simple_server.h",
1261 "tools/quic/quic_simple_server_packet_writer.cc",
1262 "tools/quic/quic_simple_server_packet_writer.h",
rched113b22015-03-26 04:54:051263 "tools/quic/quic_spdy_client_stream.cc",
1264 "tools/quic/quic_spdy_client_stream.h",
rch0e945472015-03-26 15:19:211265 "tools/quic/quic_spdy_server_stream.cc",
1266 "tools/quic/quic_spdy_server_stream.h",
1267 "tools/quic/quic_time_wait_list_manager.cc",
1268 "tools/quic/quic_time_wait_list_manager.h",
rchda78df5a2015-03-22 05:16:371269 "tools/quic/synchronous_host_resolver.cc",
1270 "tools/quic/synchronous_host_resolver.h",
rcha9d12ce12015-03-19 23:06:491271 ]
1272 deps = [
1273 ":net",
1274 "//base",
rch47ad01f2015-03-20 21:17:231275 "//base/third_party/dynamic_annotations",
1276 "//url",
1277 ]
1278}
1279
sherouk51b4b098b2015-08-10 09:00:431280if (!is_ios) {
1281 executable("quic_client") {
1282 sources = [
1283 "tools/quic/quic_simple_client_bin.cc",
1284 ]
1285 deps = [
1286 ":net",
1287 ":simple_quic_tools",
1288 "//base",
brettwba7a73d2015-08-31 22:17:391289 "//build/config/sanitizers:deps",
sherouk51b4b098b2015-08-10 09:00:431290 "//url",
1291 ]
1292 }
1293 executable("quic_server") {
1294 sources = [
1295 "tools/quic/quic_simple_server_bin.cc",
1296 ]
1297 deps = [
1298 ":net",
1299 ":simple_quic_tools",
1300 "//base",
brettwba7a73d2015-08-31 22:17:391301 "//build/config/sanitizers:deps",
sherouk51b4b098b2015-08-10 09:00:431302 "//third_party/boringssl",
1303 "//third_party/protobuf:protobuf_lite",
1304 ]
1305 }
rch216445c2015-03-27 00:23:281306}
1307
dpranke64df2832015-07-31 22:33:361308# TODO(GYP): Delete this after we've converted everything to GN.
1309# The _run targets exist only for compatibility w/ GYP.
1310group("net_unittests_run") {
1311 testonly = true
1312 deps = [
1313 ":net_unittests",
1314 ]
1315}
1316
1317test("net_unittests") {
1318 sources = gypi_values.net_test_sources
1319
sherouk51b4b098b2015-08-10 09:00:431320 if (is_ios) {
1321 sources -= [
1322 "websockets/websocket_stream_cookie_test.cc",
1323 "websockets/websocket_stream_create_test_base.cc",
1324 "websockets/websocket_stream_create_test_base.h",
1325 ]
1326 }
1327
dpranke64df2832015-07-31 22:33:361328 configs += [
1329 "//build/config:precompiled_headers",
1330
1331 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1332 "//build/config/compiler:no_size_t_to_int_warning",
1333 ]
1334 defines = []
1335
1336 deps = [
1337 ":balsa",
1338 ":extras",
1339 ":http_server",
1340 ":net",
1341 ":simple_quic_tools",
1342 ":test_support",
1343 "//base",
1344 "//base:i18n",
1345 "//base:prefs_test_support",
1346 "//base/allocator",
1347 "//base/third_party/dynamic_annotations",
1348 "//crypto",
1349 "//crypto:platform",
1350 "//crypto:test_support",
xunjieli905496a2015-08-31 15:51:171351 "//gin",
dpranke64df2832015-07-31 22:33:361352 "//net/base/registry_controlled_domains",
1353 "//sql",
1354 "//testing/gmock",
1355 "//testing/gtest",
1356 "//third_party/zlib",
1357 "//url",
1358 ]
1359
1360 data = [
1361 "data/",
1362 ]
1363
1364 if (is_linux || is_mac || is_win) {
1365 deps += [
1366 "//third_party/pyftpdlib/",
1367 "//third_party/pywebsocket/",
1368 "//third_party/tlslite/",
1369 ]
1370 data_deps = [
1371 "//third_party/pyftpdlib/",
1372 "//third_party/pywebsocket/",
1373 "//third_party/tlslite/",
1374 ]
1375 data += [
1376 "tools/testserver/",
1377 "//third_party/pyftpdlib/",
1378 "//third_party/pywebsocket/",
1379 "//third_party/tlslite/",
1380 "$root_out_dir/pyproto/google/",
dprankef497c7962015-07-31 19:46:231381 ]
1382 }
1383
dpranke64df2832015-07-31 22:33:361384 if (is_desktop_linux) {
1385 deps += [ ":epoll_quic_tools" ]
1386 }
1387 if (is_linux) {
1388 sources += gypi_values.net_linux_test_sources
1389 deps += [
1390 ":epoll_quic_tools",
1391 ":epoll_server",
1392 ":flip_in_mem_edsm_server_base",
brettwbc8b2a22015-07-28 18:24:421393 ]
dpranke64df2832015-07-31 22:33:361394 }
[email protected]8a3f8242014-06-05 18:05:121395
dpranke64df2832015-07-31 22:33:361396 if (is_mac || is_ios) {
1397 sources += gypi_values.net_base_test_mac_ios_sources
1398 }
1399
1400 if (is_chromeos) {
1401 sources -= [ "proxy/proxy_config_service_linux_unittest.cc" ]
1402 }
1403
1404 if (v8_use_external_startup_data) {
1405 deps += [ "//gin" ]
1406 }
1407
1408 if (!use_nss_certs) {
1409 sources -= [
1410 "cert/nss_cert_database_unittest.cc",
1411 "ssl/client_cert_store_nss_unittest.cc",
[email protected]8a3f8242014-06-05 18:05:121412 ]
dpranke64df2832015-07-31 22:33:361413 if (is_chromeos) { # Already removed for all non-ChromeOS builds.
davidben2bcbc6b2015-04-22 02:36:411414 sources -= [
dpranke64df2832015-07-31 22:33:361415 "cert/nss_cert_database_chromeos_unittest.cc",
1416 "cert/nss_profile_filter_chromeos_unittest.cc",
davidben2bcbc6b2015-04-22 02:36:411417 ]
brettw43ae0e12015-07-14 22:12:361418 }
[email protected]8a3f8242014-06-05 18:05:121419 }
dpranke64df2832015-07-31 22:33:361420
1421 if (use_openssl) {
1422 # When building for OpenSSL, we need to exclude NSS specific tests
1423 # or functionality not supported by OpenSSL yet.
1424 # TODO(bulach): Add equivalent tests when the underlying
1425 # functionality is ported to OpenSSL.
1426 sources -= [ "quic/test_tools/crypto_test_utils_nss.cc" ]
1427 } else {
1428 sources -= [
1429 "cert/x509_util_openssl_unittest.cc",
1430 "quic/test_tools/crypto_test_utils_openssl.cc",
1431 "socket/ssl_client_socket_openssl_unittest.cc",
1432 "ssl/ssl_client_session_cache_openssl_unittest.cc",
1433 ]
1434 }
1435
1436 if (use_kerberos) {
1437 defines += [ "USE_KERBEROS" ]
1438 }
1439
1440 # These are excluded on Android, because the actual Kerberos support, which
1441 # these test, is in a separate app on Android.
1442 if (!use_kerberos || is_android) {
1443 sources -= [
1444 "http/http_auth_gssapi_posix_unittest.cc",
1445 "http/mock_gssapi_library_posix.cc",
1446 "http/mock_gssapi_library_posix.h",
1447 ]
1448 }
1449 if (!use_kerberos) {
1450 sources -= [ "http/http_auth_handler_negotiate_unittest.cc" ]
1451 }
1452
1453 if (use_openssl || (!is_desktop_linux && !is_chromeos && !is_ios)) {
1454 # Only include this test when on Posix and using NSS for
1455 # cert verification or on iOS (which also uses NSS for certs).
1456 sources -= [ "cert_net/nss_ocsp_unittest.cc" ]
1457 }
1458
1459 if (!use_openssl_certs) {
1460 sources -= [ "ssl/openssl_client_key_store_unittest.cc" ]
1461 }
1462
1463 if (!enable_websockets) {
1464 sources -= [
1465 "server/http_connection_unittest.cc",
1466 "server/http_server_response_info_unittest.cc",
1467 "server/http_server_unittest.cc",
1468 "server/web_socket_encoder_unittest.cc",
1469 "websockets/websocket_basic_stream_test.cc",
1470 "websockets/websocket_channel_test.cc",
1471 "websockets/websocket_deflate_predictor_impl_test.cc",
1472 "websockets/websocket_deflate_stream_test.cc",
1473 "websockets/websocket_deflater_test.cc",
1474 "websockets/websocket_end_to_end_test.cc",
1475 "websockets/websocket_errors_test.cc",
1476 "websockets/websocket_extension_parser_test.cc",
1477 "websockets/websocket_frame_parser_test.cc",
1478 "websockets/websocket_frame_test.cc",
1479 "websockets/websocket_handshake_challenge_test.cc",
1480 "websockets/websocket_handshake_stream_create_helper_test.cc",
1481 "websockets/websocket_inflater_test.cc",
1482 "websockets/websocket_stream_test.cc",
1483 "websockets/websocket_test_util.cc",
1484 "websockets/websocket_test_util.h",
1485 ]
1486 deps -= [ ":http_server" ]
1487 }
1488
1489 if (disable_file_support) {
1490 sources -= [
1491 "base/directory_lister_unittest.cc",
1492 "url_request/url_request_file_job_unittest.cc",
1493 ]
1494 }
1495
1496 if (disable_ftp_support) {
1497 sources -= [
1498 "ftp/ftp_auth_cache_unittest.cc",
1499 "ftp/ftp_ctrl_response_buffer_unittest.cc",
1500 "ftp/ftp_directory_listing_parser_ls_unittest.cc",
dpranke64df2832015-07-31 22:33:361501 "ftp/ftp_directory_listing_parser_unittest.cc",
1502 "ftp/ftp_directory_listing_parser_unittest.h",
1503 "ftp/ftp_directory_listing_parser_vms_unittest.cc",
1504 "ftp/ftp_directory_listing_parser_windows_unittest.cc",
1505 "ftp/ftp_network_transaction_unittest.cc",
1506 "ftp/ftp_util_unittest.cc",
1507 "url_request/url_request_ftp_job_unittest.cc",
1508 ]
1509 }
1510
1511 if (!enable_built_in_dns) {
1512 sources -= [
1513 "dns/address_sorter_posix_unittest.cc",
1514 "dns/address_sorter_unittest.cc",
1515 ]
1516 }
1517
xunjieli905496a2015-08-31 15:51:171518 if (use_v8_in_net) {
dpranke64df2832015-07-31 22:33:361519 deps += [ ":net_with_v8" ]
1520 } else {
1521 sources -= [
1522 "proxy/proxy_resolver_v8_tracing_unittest.cc",
1523 "proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc",
1524 "proxy/proxy_resolver_v8_unittest.cc",
1525 ]
1526 }
1527
1528 if (use_v8_in_net && !is_android) {
1529 deps += [
1530 ":net_browser_services",
1531 ":net_utility_services",
1532 "//mojo/environment:chromium",
1533 "//third_party/mojo/src/mojo/edk/system",
1534 ]
1535 } else {
1536 sources -= [
1537 "dns/host_resolver_mojo_unittest.cc",
1538 "dns/mojo_host_resolver_impl_unittest.cc",
1539 "proxy/mojo_proxy_resolver_factory_impl_unittest.cc",
1540 "proxy/mojo_proxy_resolver_impl_unittest.cc",
1541 "proxy/mojo_proxy_resolver_v8_tracing_bindings_unittest.cc",
1542 "proxy/proxy_resolver_factory_mojo_unittest.cc",
1543 "proxy/proxy_service_mojo_unittest.cc",
1544 ]
1545 }
1546
1547 if (!enable_mdns) {
1548 sources -= [
1549 "dns/mdns_cache_unittest.cc",
1550 "dns/mdns_client_unittest.cc",
1551 "dns/record_parsed_unittest.cc",
1552 "dns/record_rdata_unittest.cc",
1553 ]
1554 }
1555
1556 if (is_ios) {
1557 # TODO(GYP)
1558 # 'actions': [
1559 # {
1560 # 'action_name': 'copy_test_data',
1561 # 'variables': {
1562 # 'test_data_files': [
1563 # 'data/ssl/certificates/',
1564 # 'data/test.html',
1565 # 'data/url_request_unittest/',
mattm057b0152015-08-11 00:26:241566 # 'data/verify_name_match_unittest/names/',
eroman58423c12015-08-14 20:47:361567 # 'data/parse_certificate_unittest/',
dpranke64df2832015-07-31 22:33:361568 # ],
1569 # 'test_data_prefix': 'net',
1570 # },
1571 # 'includes': [ '../build/copy_test_data_ios.gypi' ],
1572 # },
1573 # ],
1574 sources -= [
1575 # TODO(droger): The following tests are disabled because the
1576 # implementation is missing or incomplete.
1577 # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS.
1578 "base/keygen_handler_unittest.cc",
1579 "disk_cache/backend_unittest.cc",
1580 "disk_cache/blockfile/block_files_unittest.cc",
1581
1582 # Need to read input data files.
1583 "filter/gzip_filter_unittest.cc",
1584 "socket/ssl_server_socket_unittest.cc",
1585 "spdy/fuzzing/hpack_fuzz_util_test.cc",
1586
1587 # Need TestServer.
1588 "cert_net/cert_net_fetcher_impl_unittest.cc",
1589 "proxy/proxy_script_fetcher_impl_unittest.cc",
1590 "socket/ssl_client_socket_unittest.cc",
1591 "url_request/url_fetcher_impl_unittest.cc",
1592 "url_request/url_request_context_builder_unittest.cc",
1593
1594 # Needs GetAppOutput().
1595 "test/python_utils_unittest.cc",
1596
1597 # The following tests are disabled because they don't apply to
1598 # iOS.
1599 # OS is not "linux" or "freebsd" or "openbsd".
1600 "socket/unix_domain_client_socket_posix_unittest.cc",
1601 "socket/unix_domain_server_socket_posix_unittest.cc",
1602
1603 # See bug http://crbug.com/344533.
1604 "disk_cache/blockfile/index_table_v3_unittest.cc",
1605 ]
1606 }
1607
1608 if (is_android) {
1609 sources -= [
1610 # See bug http://crbug.com/344533.
1611 "disk_cache/blockfile/index_table_v3_unittest.cc",
1612 "dns/dns_config_service_posix_unittest.cc",
1613 ]
1614 deps += [
1615 ":net_test_jni_headers",
1616
1617 # TODO(mmenke): This depends on test_support_base, which depends on
1618 # icu. Figure out a way to remove that dependency.
1619 "//testing/android/native_test:native_test_native_code",
1620 ]
1621 set_sources_assignment_filter([])
1622 sources += [ "base/address_tracker_linux_unittest.cc" ]
1623 set_sources_assignment_filter(sources_assignment_filter)
1624 isolate_file = "net_unittests.isolate"
1625 }
1626
dpranke64df2832015-07-31 22:33:361627 # Symbols for crashes when running tests on swarming.
1628 if (symbol_level > 0) {
1629 if (is_win) {
1630 data += [ "$root_out_dir/net_unittests.exe.pdb" ]
1631 } else if (is_mac) {
1632 data += [ "$root_out_dir/net_unittests.dSYM/" ]
1633 }
1634 }
1635}
1636
1637# !is_android && !is_win && !is_mac
[email protected]8a3f8242014-06-05 18:05:121638
rockot9c67e5f2015-03-12 20:01:211639executable("net_perftests") {
1640 testonly = true
1641 sources = [
ricea10eb9f5e2015-05-19 18:51:571642 "base/mime_sniffer_perftest.cc",
rockot9c67e5f2015-03-12 20:01:211643 "cookies/cookie_monster_perftest.cc",
1644 "disk_cache/blockfile/disk_cache_perftest.cc",
rohitrao1860223c2015-05-16 01:07:141645 "extras/sqlite/sqlite_persistent_cookie_store_perftest.cc",
rockot9c67e5f2015-03-12 20:01:211646 "proxy/proxy_resolver_perftest.cc",
1647 "udp/udp_socket_perftest.cc",
1648 ]
1649
1650 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1651 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
1652 deps = [
brettwcdccaf02015-07-27 16:27:091653 ":extras",
1654 ":net",
1655 ":test_support",
rockot9c67e5f2015-03-12 20:01:211656 "//base",
1657 "//base:i18n",
1658 "//base/test:test_support_perf",
brettwba7a73d2015-08-31 22:17:391659 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:211660 "//testing/gtest",
1661 "//url",
rockot9c67e5f2015-03-12 20:01:211662 ]
1663
1664 if (enable_websockets) {
1665 sources += [ "websockets/websocket_frame_perftest.cc" ]
1666 }
1667
1668 if (use_v8_in_net) {
1669 deps += [ ":net_with_v8" ]
1670 } else {
1671 sources -= [ "proxy/proxy_resolver_perftest.cc" ]
1672 }
rockot9c67e5f2015-03-12 20:01:211673}