blob: bcd593b05cd5fba4cd697eb4edb08d991aa43341 [file] [log] [blame]
[email protected]4625ade2014-04-15 19:26:441# Copyright (c) 2013 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
slan77bdc2e62015-09-21 17:56:265import("//build/config/chromecast_build.gni")
brettw4cab0f12015-09-14 21:40:016import("//build/config/compiler/compiler.gni")
[email protected]4625ade2014-04-15 19:26:447import("//build/config/crypto.gni")
8import("//build/config/features.gni")
9import("//build/config/ui.gni")
dpranked4da5ab42015-10-13 06:20:3310import("//build_overrides/v8.gni")
qsrfb5251d12015-01-21 15:57:2211import("//testing/test.gni")
rockot9c67e5f2015-03-12 20:01:2112import("//third_party/icu/config.gni")
rtennetib6f1c0d2015-04-03 17:52:0613import("//third_party/protobuf/proto_library.gni")
tfarinae597851a2015-10-06 23:14:4114import("//tools/grit/grit_rule.gni")
[email protected]26046b52014-07-16 00:11:0315
[email protected]4625ade2014-04-15 19:26:4416if (is_android) {
17 import("//build/config/android/config.gni")
[email protected]ef0eb442014-05-15 09:32:1818 import("//build/config/android/rules.gni")
[email protected]4625ade2014-04-15 19:26:4419} else if (is_mac) {
20 import("//build/config/mac/mac_sdk.gni")
21}
22
23# The list of net files is kept in net.gypi. Read it.
scottmg34fb7e52014-12-03 23:27:2424gypi_values = exec_script("//build/gypi_to_gn.py",
25 [ rebase_path("net.gypi") ],
26 "scope",
27 [ "net.gypi" ])
[email protected]4625ade2014-04-15 19:26:4428
slan77bdc2e62015-09-21 17:56:2629# Disable Kerberos on ChromeOS, Android, iOS, and Chromecast, at least for now.
30# It needs configuration (krb5.conf and so on).
31use_kerberos = !is_chromeos && !is_android && !is_ios && !is_chromecast
[email protected]4625ade2014-04-15 19:26:4432
33# The way the cache uses mmap() is inefficient on some Android devices. If
34# this flag is set, we hackily avoid using mmap() in the disk cache. We are
35# pretty confident that mmap-ing the index would not hurt any existing x86
36# android devices, but we cannot be so sure about the variety of ARM devices.
37# So enable it for x86 only for now.
dpranke43276212015-02-20 02:55:1938posix_avoid_mmap = is_android && current_cpu != "x86"
[email protected]4625ade2014-04-15 19:26:4439
40# WebSockets and socket stream code are used everywhere except iOS.
41enable_websockets = !is_ios
[email protected]8a3f8242014-06-05 18:05:1242use_v8_in_net = !is_ios
[email protected]4625ade2014-04-15 19:26:4443enable_built_in_dns = !is_ios
[email protected]8a3f8242014-06-05 18:05:1244disable_ftp_support = is_ios
[email protected]4625ade2014-04-15 19:26:4445
[email protected]384dab92014-06-04 20:26:0846declare_args() {
47 # Disables support for file URLs. File URL support requires use of icu.
48 disable_file_support = false
49}
[email protected]02494ec2014-05-07 15:05:2950
[email protected]4625ade2014-04-15 19:26:4451config("net_config") {
52 defines = []
53 if (posix_avoid_mmap) {
54 defines += [ "POSIX_AVOID_MMAP" ]
55 }
[email protected]02494ec2014-05-07 15:05:2956 if (disable_file_support) {
57 defines += [ "DISABLE_FILE_SUPPORT" ]
58 }
[email protected]4625ade2014-04-15 19:26:4459}
60
xunjieli905496a2015-08-31 15:51:1761# net_internal_config is shared with net and net_small.
62config("net_internal_config") {
[email protected]8603c5de2014-04-16 20:34:3163 defines = [
ellyjonesc7a5c502015-06-26 18:55:2064 # TODO(GYP) Note that the GYP file supports linux_link_kerberos (defaults to
[email protected]8603c5de2014-04-16 20:34:3165 # 0) which implies that we run pkg_config on kerberos and link to that
66 # rather than setting this define which will dynamically open it. That
67 # doesn't seem to be set in the regular builds, so we're skipping this
68 # capability here.
69 "DLOPEN_KERBEROS",
scottmg34fb7e52014-12-03 23:27:2470 "NET_IMPLEMENTATION",
[email protected]8603c5de2014-04-16 20:34:3171 ]
dpranke43276212015-02-20 02:55:1972
[email protected]4625ade2014-04-15 19:26:4473 if (use_kerberos) {
74 defines += [ "USE_KERBEROS" ]
75 if (is_android) {
xunjieli905496a2015-08-31 15:51:1776 include_dirs = [ "/usr/include/kerberosV" ]
[email protected]4625ade2014-04-15 19:26:4477 }
[email protected]4625ade2014-04-15 19:26:4478 }
79
80 if (enable_built_in_dns) {
81 defines += [ "ENABLE_BUILT_IN_DNS" ]
xunjieli905496a2015-08-31 15:51:1782 }
83}
84
85# net_shared_* are settings shared between net and net_small
sergeyu99d83f92015-09-14 23:03:3386net_shared_sources = gypi_values.net_nacl_common_sources
xunjieli905496a2015-08-31 15:51:1787
88net_shared_unfiltered_sources = []
89
90net_shared_configs = [
91 ":net_internal_config",
92 "//build/config:precompiled_headers",
93
94 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
95 "//build/config/compiler:no_size_t_to_int_warning",
96]
97
98net_shared_public_deps = [
99 ":net_quic_proto",
100 "//crypto",
101 "//crypto:platform",
102]
103
104net_shared_deps = [
105 ":net_resources",
106 "//base",
xunjieli905496a2015-08-31 15:51:17107 "//net/base/registry_controlled_domains",
xunjieli905496a2015-08-31 15:51:17108 "//third_party/protobuf:protobuf_lite",
xunjieli905496a2015-08-31 15:51:17109]
110
sergeyu99d83f92015-09-14 23:03:33111if (!is_nacl) {
112 net_shared_sources += gypi_values.net_non_nacl_sources
xunjieli905496a2015-08-31 15:51:17113
sergeyu99d83f92015-09-14 23:03:33114 net_shared_deps += [
115 "//base:prefs",
116 "//base/third_party/dynamic_annotations",
117 "//sdch",
118 "//third_party/zlib",
119 ]
120
121 if (!use_kerberos) {
122 net_shared_sources -= [
123 "http/http_auth_gssapi_posix.cc",
124 "http/http_auth_gssapi_posix.h",
125 "http/http_auth_handler_negotiate.cc",
126 "http/http_auth_handler_negotiate.h",
127 ]
128 }
129
130 if (is_posix) {
131 if (posix_avoid_mmap) {
132 net_shared_sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ]
133 } else {
134 net_shared_sources -=
135 [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ]
136 }
137 }
138
139 if (!enable_built_in_dns) {
140 net_shared_sources -= [
141 "dns/address_sorter_posix.cc",
142 "dns/address_sorter_posix.h",
143 "dns/dns_client.cc",
144 ]
145 }
146
147 if (use_openssl) {
148 net_shared_sources -= [
149 "base/nss_memio.c",
150 "base/nss_memio.h",
151 "cert/ct_log_verifier_nss.cc",
152 "cert/ct_objects_extractor_nss.cc",
153 "cert/jwk_serializer_nss.cc",
154 "cert/scoped_nss_types.h",
155 "cert/x509_util_nss.cc",
156 "quic/crypto/aead_base_decrypter_nss.cc",
157 "quic/crypto/aead_base_encrypter_nss.cc",
158 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc",
159 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc",
160 "quic/crypto/chacha20_poly1305_decrypter_nss.cc",
161 "quic/crypto/chacha20_poly1305_encrypter_nss.cc",
162 "quic/crypto/channel_id_nss.cc",
163 "quic/crypto/p256_key_exchange_nss.cc",
164 "quic/crypto/proof_source_chromium_nss.cc",
165 "socket/nss_ssl_util.cc",
166 "socket/nss_ssl_util.h",
167 "socket/ssl_client_socket_nss.cc",
168 "socket/ssl_client_socket_nss.h",
169 "socket/ssl_server_socket_nss.cc",
170 "socket/ssl_server_socket_nss.h",
171 ]
172 if (is_ios) {
173 # Always removed for !ios below.
174 net_shared_sources -= [
175 "cert/cert_verify_proc_nss.cc",
176 "cert/cert_verify_proc_nss.h",
177 ]
178 }
sergeyu99d83f92015-09-14 23:03:33179 if (!use_nss_certs && !is_ios) {
180 net_shared_sources -= [ "cert/x509_util_nss.h" ]
181 }
[email protected]4625ade2014-04-15 19:26:44182 } else {
xunjieli905496a2015-08-31 15:51:17183 net_shared_sources -= [
sergeyu99d83f92015-09-14 23:03:33184 "cert/ct_log_verifier_openssl.cc",
185 "cert/ct_objects_extractor_openssl.cc",
186 "cert/jwk_serializer_openssl.cc",
187 "cert/x509_util_openssl.cc",
188 "cert/x509_util_openssl.h",
189 "quic/crypto/aead_base_decrypter_openssl.cc",
190 "quic/crypto/aead_base_encrypter_openssl.cc",
191 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc",
192 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc",
193 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc",
194 "quic/crypto/chacha20_poly1305_encrypter_openssl.cc",
195 "quic/crypto/channel_id_openssl.cc",
196 "quic/crypto/p256_key_exchange_openssl.cc",
197 "quic/crypto/proof_source_chromium_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",
[email protected]4625ade2014-04-15 19:26:44211 ]
212 }
sergeyu99d83f92015-09-14 23:03:33213
214 if (!use_openssl_certs) {
xunjieli905496a2015-08-31 15:51:17215 net_shared_sources -= [
sergeyu99d83f92015-09-14 23:03:33216 "base/crypto_module_openssl.cc",
217 "base/keygen_handler_openssl.cc",
218 "base/openssl_private_key_store.h",
219 "base/openssl_private_key_store_memory.cc",
220 "cert/cert_database_openssl.cc",
221 "cert/cert_verify_proc_openssl.cc",
222 "cert/cert_verify_proc_openssl.h",
223 "cert/test_root_certs_openssl.cc",
224 "cert/x509_certificate_openssl.cc",
225 "ssl/openssl_client_key_store.cc",
226 "ssl/openssl_client_key_store.h",
xunjieli06d93982015-08-27 17:13:02227 ]
sergeyu99d83f92015-09-14 23:03:33228 if (is_android) {
229 net_shared_sources -= [ "base/openssl_private_key_store_android.cc" ]
230 }
231 } else {
232 if (is_android) {
233 # Android doesn't use these even when using OpenSSL.
234 net_shared_sources -= [
235 "base/openssl_private_key_store_memory.cc",
236 "cert/cert_database_openssl.cc",
237 "cert/cert_verify_proc_openssl.cc",
238 "cert/test_root_certs_openssl.cc",
239 ]
240 }
[email protected]4625ade2014-04-15 19:26:44241 }
sergeyu99d83f92015-09-14 23:03:33242
mostynbbf5e6cc2015-10-21 07:53:31243 if (use_glib && use_gconf && !is_chromeos) {
sergeyu99d83f92015-09-14 23:03:33244 net_shared_configs += [ "//build/config/linux:gconf" ]
245 net_shared_deps += [ "//build/linux:gio" ]
246 }
247
248 if (is_linux) {
249 net_shared_configs += [ "//build/config/linux:libresolv" ]
250 }
251
252 if (!use_nss_certs) {
253 net_shared_sources -= [
254 "base/crypto_module_nss.cc",
255 "base/keygen_handler_nss.cc",
256 "cert/cert_database_nss.cc",
257 "cert/nss_cert_database.cc",
258 "cert/nss_cert_database.h",
259 "cert/x509_certificate_nss.cc",
260 "ssl/client_cert_store_nss.cc",
261 "ssl/client_cert_store_nss.h",
262 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
263 "third_party/mozilla_security_manager/nsKeygenHandler.h",
264 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
265 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
266 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
267 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
268 ]
269 if (!is_ios) {
270 # These files are part of the partial implementation of NSS on iOS so
271 # keep them in that case (even though use_nss_certs is not set).
272 net_shared_sources -= [
273 "cert/cert_verify_proc_nss.cc",
274 "cert/cert_verify_proc_nss.h",
275 "cert/test_root_certs_nss.cc",
276 "cert/x509_util_nss_certs.cc",
277 "cert_net/nss_ocsp.cc",
278 "cert_net/nss_ocsp.h",
279 ]
280 }
281 if (is_chromeos) {
282 # These were already removed on non-ChromeOS.
283 net_shared_sources -= [
284 "cert/nss_cert_database_chromeos.cc",
285 "cert/nss_cert_database_chromeos.h",
286 "cert/nss_profile_filter_chromeos.cc",
287 "cert/nss_profile_filter_chromeos.h",
288 ]
289 }
xunjieli905496a2015-08-31 15:51:17290 net_shared_sources -= [
pneubeckabe6e9d12015-08-26 08:47:11291 "ssl/client_key_store.cc",
292 "ssl/client_key_store.h",
293 "ssl/ssl_platform_key_nss.cc",
294 ]
sergeyu99d83f92015-09-14 23:03:33295 } else if (use_openssl) {
296 # client_cert_store_nss.c requires NSS_CmpCertChainWCANames from NSS's
297 # libssl, but our bundled copy is not built in OpenSSL ports. Pull that file
298 # in directly.
299 net_shared_sources += [ "third_party/nss/ssl/cmpcert.c" ]
[email protected]4625ade2014-04-15 19:26:44300 }
301
sergeyu99d83f92015-09-14 23:03:33302 if (!enable_mdns) {
303 net_shared_sources -= [
304 "dns/mdns_cache.cc",
305 "dns/mdns_cache.h",
306 "dns/mdns_client.cc",
307 "dns/mdns_client.h",
308 "dns/mdns_client_impl.cc",
309 "dns/mdns_client_impl.h",
310 "dns/record_parsed.cc",
311 "dns/record_parsed.h",
312 "dns/record_rdata.cc",
313 "dns/record_rdata.h",
314 ]
315 }
316
317 if (is_win) {
318 net_shared_sources -= [ "http/http_auth_handler_ntlm_portable.cc" ]
319 } else { # !is_win
320 net_shared_sources -= [
321 "base/winsock_init.cc",
322 "base/winsock_init.h",
323 "base/winsock_util.cc",
324 "base/winsock_util.h",
325 "proxy/proxy_resolver_winhttp.cc",
326 "proxy/proxy_resolver_winhttp.h",
327 ]
328 }
329
330 if (is_ios) {
331 # Add back some sources that were otherwise filtered out. iOS needs some Mac
332 # files.
333 net_shared_unfiltered_sources += [
334 "base/mac/url_conversions.h",
335 "base/mac/url_conversions.mm",
336 "base/network_change_notifier_mac.cc",
337 "base/network_config_watcher_mac.cc",
338 "base/network_interfaces_mac.cc",
339 "base/network_interfaces_mac.h",
340 "base/platform_mime_util_mac.mm",
341 "proxy/proxy_resolver_mac.cc",
342 "proxy/proxy_server_mac.cc",
343 ]
344
345 net_shared_sources -= [ "disk_cache/blockfile/file_posix.cc" ]
346 net_shared_deps += [
347 "//third_party/nss:nspr",
348 "//third_party/nss",
349 "//net/third_party/nss/ssl:libssl",
350 ]
351 }
352
353 if (is_ios || is_mac) {
354 net_shared_sources += gypi_values.net_base_mac_ios_sources
355 }
356
xunjieli905496a2015-08-31 15:51:17357 if (is_android) {
sergeyu99d83f92015-09-14 23:03:33358 net_shared_deps += [ ":net_jni_headers" ]
359
360 # Add some Linux sources that were excluded by the filter, but which
361 # are needed.
362 net_shared_unfiltered_sources += [
363 "base/address_tracker_linux.cc",
364 "base/address_tracker_linux.h",
365 "base/network_interfaces_linux.cc",
366 "base/network_interfaces_linux.h",
367 "base/platform_mime_util_linux.cc",
368 ]
xunjieli905496a2015-08-31 15:51:17369 }
370} else {
sergeyu99d83f92015-09-14 23:03:33371 net_shared_public_deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
xunjieli905496a2015-08-31 15:51:17372}
373
374component("net") {
375 sources = net_shared_sources
376
377 # Add back some sources that were otherwise filtered out.
378 set_sources_assignment_filter([])
379 sources += net_shared_unfiltered_sources
380 set_sources_assignment_filter(sources_assignment_filter)
381
382 cflags = []
383 configs += net_shared_configs
384 public_configs = [ ":net_config" ]
385
386 public_deps = net_shared_public_deps + [ "//url" ]
387 deps = net_shared_deps
[email protected]4625ade2014-04-15 19:26:44388
389 if (is_mac) {
[email protected]4625ade2014-04-15 19:26:44390 libs = [
[email protected]ab9ce6e2014-04-17 20:33:19391 "Foundation.framework",
392 "Security.framework",
393 "SystemConfiguration.framework",
394 "resolv",
[email protected]4625ade2014-04-15 19:26:44395 ]
396 }
397
398 if (is_ios) {
[email protected]4625ade2014-04-15 19:26:44399 libs = [
[email protected]ab9ce6e2014-04-17 20:33:19400 "CFNetwork.framework",
401 "MobileCoreServices.framework",
402 "Security.framework",
403 "SystemConfiguration.framework",
404 "resolv",
[email protected]4625ade2014-04-15 19:26:44405 ]
xunjieli06d93982015-08-27 17:13:02406 }
xunjieli4c8c6922015-08-27 16:02:40407
sergeyu99d83f92015-09-14 23:03:33408 if (!is_nacl) {
409 if (!disable_file_support) {
410 sources += gypi_values.net_file_support_sources
411 }
xunjieli06d93982015-08-27 17:13:02412
sergeyu99d83f92015-09-14 23:03:33413 if (!disable_ftp_support) {
414 sources += gypi_values.net_ftp_support_sources
415 }
xunjieli905496a2015-08-31 15:51:17416
sergeyu99d83f92015-09-14 23:03:33417 if (enable_websockets) {
418 sources += gypi_values.net_websockets_sources
419 }
xunjieli905496a2015-08-31 15:51:17420
sergeyu99d83f92015-09-14 23:03:33421 # ICU support.
422 deps += [
423 "//base:i18n",
424 "//third_party/icu",
425 ]
426 sources += [
427 "base/filename_util_icu.cc",
428 "base/net_string_util_icu.cc",
429 "base/net_util_icu.cc",
430 ]
431 }
xunjieli905496a2015-08-31 15:51:17432}
433
434if (is_android) {
435 # Same as net, but with ICU, file, ftp, and websocket support stripped.
436 component("net_small") {
437 sources = net_shared_sources
438
439 # Add back some sources that were otherwise filtered out.
xunjieli06d93982015-08-27 17:13:02440 set_sources_assignment_filter([])
xunjieli905496a2015-08-31 15:51:17441 sources += net_shared_unfiltered_sources
xunjieli06d93982015-08-27 17:13:02442 set_sources_assignment_filter(sources_assignment_filter)
xunjieli06d93982015-08-27 17:13:02443
xunjieli905496a2015-08-31 15:51:17444 cflags = []
445 defines = []
446 configs += net_shared_configs
447 public_configs = [ ":net_config" ]
448
449 public_deps = net_shared_public_deps +
450 [ "//url:url_lib_use_icu_alternatives_on_android" ]
451 deps = net_shared_deps + [ ":net_jni_headers" ]
452
453 defines += [
454 "DISABLE_FILE_SUPPORT",
455 "DISABLE_FTP_SUPPORT",
456 "USE_ICU_ALTERNATIVES_ON_ANDROID=1",
457 ]
458
459 # Use ICU alternative on Android.
[email protected]85191ed2014-05-15 00:41:49460 sources += [
461 "base/net_string_util_icu_alternatives_android.cc",
462 "base/net_string_util_icu_alternatives_android.h",
463 ]
464 }
[email protected]4625ade2014-04-15 19:26:44465}
466
467grit("net_resources") {
468 source = "base/net_resources.grd"
[email protected]7ae52902014-08-18 22:36:01469 use_qualified_include = true
[email protected]b89c53842014-07-23 16:32:32470 outputs = [
471 "grit/net_resources.h",
472 "net_resources.pak",
[email protected]b89c53842014-07-23 16:32:32473 ]
[email protected]4625ade2014-04-15 19:26:44474}
475
rtennetib6f1c0d2015-04-03 17:52:06476proto_library("net_quic_proto") {
xunjieli905496a2015-08-31 15:51:17477 visibility = [
478 ":net",
479 ":net_small",
480 ]
brettw2e7db0a2015-04-24 22:59:17481
rtennetib6f1c0d2015-04-03 17:52:06482 sources = [
483 "quic/proto/cached_network_parameters.proto",
484 "quic/proto/source_address_token.proto",
485 ]
486 cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:"
487 cc_include = "net/base/net_export.h"
488
489 defines = [ "NET_IMPLEMENTATION" ]
490
491 extra_configs = [ "//build/config/compiler:wexit_time_destructors" ]
492}
493
Brett Wilson83fd4242014-09-02 19:45:33494static_library("extras") {
mef327a8e42014-08-29 17:10:03495 sources = gypi_values.net_extras_sources
496 configs += [ "//build/config/compiler:wexit_time_destructors" ]
497 deps = [
498 ":net",
brettwbc44c0a92015-02-20 22:30:39499 "//base",
mef327a8e42014-08-29 17:10:03500 "//sql:sql",
501 ]
502}
503
[email protected]8a3f8242014-06-05 18:05:12504static_library("http_server") {
[email protected]4625ade2014-04-15 19:26:44505 sources = [
506 "server/http_connection.cc",
507 "server/http_connection.h",
508 "server/http_server.cc",
509 "server/http_server.h",
510 "server/http_server_request_info.cc",
511 "server/http_server_request_info.h",
512 "server/http_server_response_info.cc",
513 "server/http_server_response_info.h",
514 "server/web_socket.cc",
515 "server/web_socket.h",
dgozmana6e70092014-12-12 14:46:21516 "server/web_socket_encoder.cc",
517 "server/web_socket_encoder.h",
[email protected]4625ade2014-04-15 19:26:44518 ]
jambc6cc8e2014-11-14 17:56:29519 configs += [
brettwd1c719a2015-02-19 23:17:04520 "//build/config/compiler:no_size_t_to_int_warning",
jambc6cc8e2014-11-14 17:56:29521 "//build/config/compiler:wexit_time_destructors",
jambc6cc8e2014-11-14 17:56:29522 ]
[email protected]4625ade2014-04-15 19:26:44523 deps = [
524 ":net",
525 "//base",
526 ]
527}
528
[email protected]8603c5de2014-04-16 20:34:31529executable("dump_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24530 testonly = true
[email protected]8603c5de2014-04-16 20:34:31531 sources = [
[email protected]8603c5de2014-04-16 20:34:31532 "tools/dump_cache/dump_cache.cc",
533 "tools/dump_cache/dump_files.cc",
534 "tools/dump_cache/dump_files.h",
[email protected]8603c5de2014-04-16 20:34:31535 ]
[email protected]4625ade2014-04-15 19:26:44536
brettwd1c719a2015-02-19 23:17:04537 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
538 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31539
540 deps = [
[email protected]8603c5de2014-04-16 20:34:31541 ":net",
[email protected]b2b2bf52014-05-28 20:26:57542 ":test_support",
brettwba7a73d2015-08-31 22:17:39543 "//base",
544 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31545 ]
546}
547
[email protected]b2b2bf52014-05-28 20:26:57548source_set("test_support") {
Brett Wilson8f80ad0b2014-09-08 19:50:24549 testonly = true
[email protected]8603c5de2014-04-16 20:34:31550 sources = [
[email protected]8603c5de2014-04-16 20:34:31551 "base/load_timing_info_test_util.cc",
552 "base/load_timing_info_test_util.h",
553 "base/mock_file_stream.cc",
554 "base/mock_file_stream.h",
555 "base/test_completion_callback.cc",
556 "base/test_completion_callback.h",
557 "base/test_data_directory.cc",
558 "base/test_data_directory.h",
559 "cert/mock_cert_verifier.cc",
560 "cert/mock_cert_verifier.h",
561 "cookies/cookie_monster_store_test.cc",
562 "cookies/cookie_monster_store_test.h",
563 "cookies/cookie_store_test_callbacks.cc",
564 "cookies/cookie_store_test_callbacks.h",
565 "cookies/cookie_store_test_helpers.cc",
566 "cookies/cookie_store_test_helpers.h",
567 "disk_cache/disk_cache_test_base.cc",
568 "disk_cache/disk_cache_test_base.h",
569 "disk_cache/disk_cache_test_util.cc",
570 "disk_cache/disk_cache_test_util.h",
571 "dns/dns_test_util.cc",
572 "dns/dns_test_util.h",
573 "dns/mock_host_resolver.cc",
574 "dns/mock_host_resolver.h",
575 "dns/mock_mdns_socket_factory.cc",
576 "dns/mock_mdns_socket_factory.h",
[email protected]8a3f8242014-06-05 18:05:12577 "http/http_transaction_test_util.cc",
578 "http/http_transaction_test_util.h",
vishal.b62985ca92015-04-17 08:45:51579 "log/test_net_log.cc",
580 "log/test_net_log.h",
mmenke43758e62015-05-04 21:09:46581 "log/test_net_log_entry.cc",
582 "log/test_net_log_entry.h",
mmenke0034c542015-05-05 22:34:59583 "log/test_net_log_util.cc",
mmenke43758e62015-05-04 21:09:46584 "log/test_net_log_util.h",
[email protected]8603c5de2014-04-16 20:34:31585 "proxy/mock_proxy_resolver.cc",
586 "proxy/mock_proxy_resolver.h",
587 "proxy/mock_proxy_script_fetcher.cc",
588 "proxy/mock_proxy_script_fetcher.h",
589 "proxy/proxy_config_service_common_unittest.cc",
590 "proxy/proxy_config_service_common_unittest.h",
591 "socket/socket_test_util.cc",
592 "socket/socket_test_util.h",
593 "test/cert_test_util.cc",
594 "test/cert_test_util.h",
[email protected]83e1ae32014-07-18 10:57:07595 "test/cert_test_util_nss.cc",
nharper2e171cf2015-06-01 20:29:23596 "test/channel_id_test_util.cc",
597 "test/channel_id_test_util.h",
[email protected]8603c5de2014-04-16 20:34:31598 "test/ct_test_util.cc",
599 "test/ct_test_util.h",
600 "test/embedded_test_server/embedded_test_server.cc",
601 "test/embedded_test_server/embedded_test_server.h",
602 "test/embedded_test_server/http_connection.cc",
603 "test/embedded_test_server/http_connection.h",
604 "test/embedded_test_server/http_request.cc",
605 "test/embedded_test_server/http_request.h",
606 "test/embedded_test_server/http_response.cc",
607 "test/embedded_test_server/http_response.h",
sammc6ac3fe52015-02-25 06:00:28608 "test/event_waiter.h",
[email protected]8603c5de2014-04-16 20:34:31609 "test/net_test_suite.cc",
610 "test/net_test_suite.h",
611 "test/python_utils.cc",
612 "test/python_utils.h",
sherouk51b4b098b2015-08-10 09:00:43613 "test/url_request/ssl_certificate_error_job.cc",
614 "test/url_request/ssl_certificate_error_job.h",
Brett Wilson32ce17a2014-11-10 17:45:30615 "test/url_request/url_request_failed_job.cc",
616 "test/url_request/url_request_failed_job.h",
mef3e826cf2014-12-13 18:40:40617 "test/url_request/url_request_mock_data_job.cc",
618 "test/url_request/url_request_mock_data_job.h",
jam8e45cd72015-01-20 16:33:44619 "test/url_request/url_request_slow_download_job.cc",
620 "test/url_request/url_request_slow_download_job.h",
[email protected]8603c5de2014-04-16 20:34:31621 "url_request/test_url_fetcher_factory.cc",
622 "url_request/test_url_fetcher_factory.h",
623 "url_request/url_request_test_util.cc",
624 "url_request/url_request_test_util.h",
625 ]
sherouk3eee4a82015-09-01 10:42:33626 if (!is_ios) {
627 sources += [
628 "test/spawned_test_server/base_test_server.cc",
629 "test/spawned_test_server/base_test_server.h",
630 "test/spawned_test_server/local_test_server.cc",
631 "test/spawned_test_server/local_test_server.h",
632 "test/spawned_test_server/local_test_server_posix.cc",
633 "test/spawned_test_server/local_test_server_win.cc",
634 "test/spawned_test_server/spawned_test_server.h",
635 ]
636 }
[email protected]8603c5de2014-04-16 20:34:31637
brettwbc8b2a22015-07-28 18:24:42638 configs += [
639 "//build/config:precompiled_headers",
640
641 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
642 "//build/config/compiler:no_size_t_to_int_warning",
643 ]
[email protected]8603c5de2014-04-16 20:34:31644
Brett Wilsone53895272014-09-23 23:41:46645 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31646 "//base",
647 "//base/test:test_support",
[email protected]22fe91d2014-08-12 17:07:12648 "//crypto",
[email protected]59ff2d42014-04-22 22:25:23649 "//net",
[email protected]8603c5de2014-04-16 20:34:31650 "//net/tools/tld_cleanup",
651 "//testing/gmock",
652 "//testing/gtest",
653 "//url",
654 ]
655
jamb533b7e2015-03-04 17:12:05656 if (!is_ios) {
657 public_deps += [ "//third_party/protobuf:py_proto" ]
658 }
659
davidben4a644b02015-07-01 19:34:55660 if (use_nss_certs || is_ios) {
scottmg34fb7e52014-12-03 23:27:24661 public_deps += [ "//crypto:platform" ]
[email protected]8603c5de2014-04-16 20:34:31662 }
663
sherouk3eee4a82015-09-01 10:42:33664 if (is_android) {
665 sources += [
[email protected]8603c5de2014-04-16 20:34:31666 "test/spawned_test_server/remote_test_server.cc",
667 "test/spawned_test_server/remote_test_server.h",
668 "test/spawned_test_server/spawner_communicator.cc",
669 "test/spawned_test_server/spawner_communicator.h",
670 ]
671 }
672
673 if (use_v8_in_net) {
Brett Wilsone53895272014-09-23 23:41:46674 public_deps += [ ":net_with_v8" ]
[email protected]8603c5de2014-04-16 20:34:31675 }
676
677 if (!enable_mdns) {
678 sources -= [
679 "dns/mock_mdns_socket_factory.cc",
680 "dns/mock_mdns_socket_factory.h",
681 ]
682 }
683
davidben15d69d482014-09-29 18:24:08684 if (!use_nss_certs) {
scottmg34fb7e52014-12-03 23:27:24685 sources -= [ "test/cert_test_util_nss.cc" ]
[email protected]83e1ae32014-07-18 10:57:07686 }
xunjielia6888202015-04-14 21:34:25687
688 if (!disable_file_support) {
689 sources += [
690 "test/url_request/url_request_mock_http_job.cc",
691 "test/url_request/url_request_mock_http_job.h",
692 "url_request/test_url_request_interceptor.cc",
693 "url_request/test_url_request_interceptor.h",
694 ]
695 }
[email protected]8603c5de2014-04-16 20:34:31696}
697
[email protected]ceeaac792014-06-25 05:14:43698source_set("balsa") {
699 sources = [
700 "tools/balsa/balsa_enums.h",
701 "tools/balsa/balsa_frame.cc",
702 "tools/balsa/balsa_frame.h",
703 "tools/balsa/balsa_headers.cc",
704 "tools/balsa/balsa_headers.h",
705 "tools/balsa/balsa_headers_token_utils.cc",
706 "tools/balsa/balsa_headers_token_utils.h",
707 "tools/balsa/balsa_visitor_interface.h",
708 "tools/balsa/http_message_constants.cc",
709 "tools/balsa/http_message_constants.h",
710 "tools/balsa/noop_balsa_visitor.h",
711 "tools/balsa/simple_buffer.cc",
712 "tools/balsa/simple_buffer.h",
713 "tools/balsa/split.cc",
714 "tools/balsa/split.h",
715 "tools/balsa/string_piece_utils.h",
rtennetie0ee6eb2015-05-01 00:55:09716 "tools/quic/spdy_balsa_utils.cc",
717 "tools/quic/spdy_balsa_utils.h",
[email protected]ceeaac792014-06-25 05:14:43718 ]
719 deps = [
720 ":net",
721 "//base",
[email protected]22fe91d2014-08-12 17:07:12722 "//url",
[email protected]ceeaac792014-06-25 05:14:43723 ]
724}
725
[email protected]8603c5de2014-04-16 20:34:31726if (use_v8_in_net) {
727 component("net_with_v8") {
728 sources = [
729 "proxy/proxy_resolver_v8.cc",
730 "proxy/proxy_resolver_v8.h",
731 "proxy/proxy_resolver_v8_tracing.cc",
732 "proxy/proxy_resolver_v8_tracing.h",
sammcf2d1ea02015-06-29 02:58:47733 "proxy/proxy_resolver_v8_tracing_wrapper.cc",
734 "proxy/proxy_resolver_v8_tracing_wrapper.h",
[email protected]8603c5de2014-04-16 20:34:31735 "proxy/proxy_service_v8.cc",
736 "proxy/proxy_service_v8.h",
737 ]
738
739 defines = [ "NET_IMPLEMENTATION" ]
dprankea22b0732015-10-21 21:15:11740
[email protected]8603c5de2014-04-16 20:34:31741 configs += [
brettwd1c719a2015-02-19 23:17:04742 "//build/config/compiler:no_size_t_to_int_warning",
[email protected]8603c5de2014-04-16 20:34:31743 "//build/config/compiler:wexit_time_destructors",
dprankea22b0732015-10-21 21:15:11744 "//v8:external_startup_data",
[email protected]8603c5de2014-04-16 20:34:31745 ]
746
Brett Wilsone53895272014-09-23 23:41:46747 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31748 ":net",
Brett Wilsone53895272014-09-23 23:41:46749 ]
750 deps = [
[email protected]8603c5de2014-04-16 20:34:31751 "//base",
752 "//gin",
753 "//url",
754 "//v8",
755 ]
756 }
757}
758
amistry7e6ebfdc82015-02-13 04:19:11759if (use_v8_in_net && !is_android) {
760 source_set("net_browser_services") {
761 sources = [
762 "dns/mojo_host_resolver_impl.cc",
763 "dns/mojo_host_resolver_impl.h",
amistry6e1ed1b2015-03-12 05:24:01764 "proxy/in_process_mojo_proxy_resolver_factory.cc",
765 "proxy/in_process_mojo_proxy_resolver_factory.h",
sammc1d5df4d2015-05-05 05:06:17766 "proxy/mojo_proxy_resolver_factory.h",
eromandcacef22015-06-01 19:36:35767 "proxy/proxy_resolver_factory_mojo.cc",
768 "proxy/proxy_resolver_factory_mojo.h",
amistry6e1ed1b2015-03-12 05:24:01769 "proxy/proxy_service_mojo.cc",
770 "proxy/proxy_service_mojo.h",
amistry7e6ebfdc82015-02-13 04:19:11771 ]
772
773 public_deps = [
774 ":mojo_type_converters",
775 ":net",
brettwbc44c0a92015-02-20 22:30:39776 "//base",
amistry07ff1402015-03-10 07:34:07777 "//mojo/common",
amistry7e6ebfdc82015-02-13 04:19:11778 "//net/interfaces",
779 "//third_party/mojo/src/mojo/public/cpp/bindings",
amistry6e1ed1b2015-03-12 05:24:01780
781 # NOTE(amistry): As long as we support in-process Mojo v8 PAC, we need
782 # this dependency since in_process_mojo_proxy_resolver_factory creates
783 # the utility process side Mojo services in the browser process.
784 # Ultimately, this will go away when we only support out-of-process.
785 ":net_utility_services",
amistry7e6ebfdc82015-02-13 04:19:11786 ]
787 }
788
789 source_set("mojo_type_converters") {
790 sources = [
amistry7ec58112015-02-26 06:03:00791 "dns/mojo_host_type_converters.cc",
792 "dns/mojo_host_type_converters.h",
793 "proxy/mojo_proxy_type_converters.cc",
794 "proxy/mojo_proxy_type_converters.h",
amistry7e6ebfdc82015-02-13 04:19:11795 ]
796
797 public_deps = [
798 ":net",
799 "//net/interfaces",
800 "//third_party/mojo/src/mojo/public/cpp/bindings",
801 ]
802 }
sammc5403aa1d2015-02-25 04:59:21803
804 source_set("net_utility_services") {
805 sources = [
sammc6ac3fe52015-02-25 06:00:28806 "dns/host_resolver_mojo.cc",
807 "dns/host_resolver_mojo.h",
sammc352f7492015-02-25 09:45:24808 "proxy/mojo_proxy_resolver_factory_impl.cc",
809 "proxy/mojo_proxy_resolver_factory_impl.h",
sammc5403aa1d2015-02-25 04:59:21810 "proxy/mojo_proxy_resolver_impl.cc",
811 "proxy/mojo_proxy_resolver_impl.h",
sammca3242c92015-07-10 02:38:51812 "proxy/mojo_proxy_resolver_v8_tracing_bindings.h",
sammc5403aa1d2015-02-25 04:59:21813 ]
814
rockot9509ec82015-04-14 02:50:56815 deps = [
816 ":net_with_v8",
817 ]
818
sammc5403aa1d2015-02-25 04:59:21819 public_deps = [
820 ":mojo_type_converters",
821 ":net",
822 "//mojo/common",
823 "//net/interfaces",
824 "//third_party/mojo/src/mojo/public/cpp/bindings",
825 ]
826 }
amistry7e6ebfdc82015-02-13 04:19:11827}
828
[email protected]8603c5de2014-04-16 20:34:31829if (!is_ios && !is_android) {
830 executable("crash_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24831 testonly = true
scottmg34fb7e52014-12-03 23:27:24832 sources = [
833 "tools/crash_cache/crash_cache.cc",
834 ]
dpranke43276212015-02-20 02:55:19835
brettwd1c719a2015-02-19 23:17:04836 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
837 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31838 deps = [
839 ":net",
[email protected]b2b2bf52014-05-28 20:26:57840 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31841 "//base",
brettwba7a73d2015-08-31 22:17:39842 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31843 ]
844 }
845
846 executable("crl_set_dump") {
Brett Wilson8f80ad0b2014-09-08 19:50:24847 testonly = true
scottmg34fb7e52014-12-03 23:27:24848 sources = [
849 "tools/crl_set_dump/crl_set_dump.cc",
850 ]
dpranke43276212015-02-20 02:55:19851
brettwd1c719a2015-02-19 23:17:04852 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
853 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31854 deps = [
855 ":net",
856 "//base",
brettwba7a73d2015-08-31 22:17:39857 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31858 ]
859 }
860
861 executable("dns_fuzz_stub") {
Brett Wilson8f80ad0b2014-09-08 19:50:24862 testonly = true
scottmg34fb7e52014-12-03 23:27:24863 sources = [
864 "tools/dns_fuzz_stub/dns_fuzz_stub.cc",
865 ]
dpranke43276212015-02-20 02:55:19866
brettwd1c719a2015-02-19 23:17:04867 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
868 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31869 deps = [
870 ":net",
871 "//base",
brettwba7a73d2015-08-31 22:17:39872 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31873 ]
874 }
875
876 executable("gdig") {
Brett Wilson8f80ad0b2014-09-08 19:50:24877 testonly = true
[email protected]8603c5de2014-04-16 20:34:31878 sources = [
879 "tools/gdig/file_net_log.cc",
880 "tools/gdig/gdig.cc",
881 ]
882 deps = [
883 ":net",
884 "//base",
brettwba7a73d2015-08-31 22:17:39885 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31886 ]
887 }
888
889 executable("get_server_time") {
Brett Wilson8f80ad0b2014-09-08 19:50:24890 testonly = true
scottmg34fb7e52014-12-03 23:27:24891 sources = [
892 "tools/get_server_time/get_server_time.cc",
893 ]
dpranke43276212015-02-20 02:55:19894
brettwd1c719a2015-02-19 23:17:04895 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
896 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31897 deps = [
898 ":net",
899 "//base",
900 "//base:i18n",
brettwba7a73d2015-08-31 22:17:39901 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31902 "//url",
903 ]
904 }
905
rockot9c67e5f2015-03-12 20:01:21906 executable("hpack_example_generator") {
907 testonly = true
908 sources = [
909 "spdy/fuzzing/hpack_example_generator.cc",
910 ]
911
912 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
913 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
914 deps = [
rockot9c67e5f2015-03-12 20:01:21915 ":net",
brettwba7a73d2015-08-31 22:17:39916 "//base",
917 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:21918 ]
919 }
920
921 executable("hpack_fuzz_mutator") {
922 testonly = true
923 sources = [
924 "spdy/fuzzing/hpack_fuzz_mutator.cc",
925 ]
926
927 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
928 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
929 deps = [
rockot9c67e5f2015-03-12 20:01:21930 ":net",
brettwba7a73d2015-08-31 22:17:39931 "//base",
932 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:21933 ]
934 }
935
936 executable("hpack_fuzz_wrapper") {
937 testonly = true
938 sources = [
939 "spdy/fuzzing/hpack_fuzz_wrapper.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
[email protected]8603c5de2014-04-16 20:34:31951 if (use_v8_in_net) {
952 executable("net_watcher") {
Brett Wilson8f80ad0b2014-09-08 19:50:24953 testonly = true
scottmg34fb7e52014-12-03 23:27:24954 sources = [
955 "tools/net_watcher/net_watcher.cc",
956 ]
[email protected]8603c5de2014-04-16 20:34:31957 deps = [
958 ":net",
959 ":net_with_v8",
960 "//base",
brettwba7a73d2015-08-31 22:17:39961 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31962 ]
963
mostynbbf5e6cc2015-10-21 07:53:31964 if (is_desktop_linux && use_gconf && use_glib) {
xunjieli905496a2015-08-31 15:51:17965 configs += [
966 "//build/config/linux:gconf",
967 "//build/config/linux:glib",
968 ]
dprankead0c1f42015-08-28 21:48:04969 deps += [ "//build/linux:gio" ]
[email protected]8603c5de2014-04-16 20:34:31970 }
971 }
972 }
973
974 executable("run_testserver") {
Brett Wilson8f80ad0b2014-09-08 19:50:24975 testonly = true
scottmg34fb7e52014-12-03 23:27:24976 sources = [
977 "tools/testserver/run_testserver.cc",
978 ]
[email protected]8603c5de2014-04-16 20:34:31979 deps = [
[email protected]b2b2bf52014-05-28 20:26:57980 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31981 "//base",
982 "//base/test:test_support",
brettwba7a73d2015-08-31 22:17:39983 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31984 "//testing/gtest",
985 ]
986 }
987
988 executable("stress_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24989 testonly = true
scottmg34fb7e52014-12-03 23:27:24990 sources = [
rvargase23fcf652015-03-04 19:59:22991 "tools/stress_cache/stress_cache.cc",
scottmg34fb7e52014-12-03 23:27:24992 ]
dpranke43276212015-02-20 02:55:19993
brettwd1c719a2015-02-19 23:17:04994 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
995 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31996 deps = [
997 ":net",
[email protected]b2b2bf52014-05-28 20:26:57998 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31999 "//base",
brettwba7a73d2015-08-31 22:17:391000 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311001 ]
1002 }
1003
1004 executable("tld_cleanup") {
scottmg34fb7e52014-12-03 23:27:241005 sources = [
1006 "tools/tld_cleanup/tld_cleanup.cc",
1007 ]
dpranke43276212015-02-20 02:55:191008
brettwd1c719a2015-02-19 23:17:041009 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1010 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:311011 deps = [
1012 "//base",
1013 "//base:i18n",
brettwba7a73d2015-08-31 22:17:391014 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311015 "//net/tools/tld_cleanup",
1016 ]
1017 }
1018}
1019
rch6983a3f2015-03-30 03:47:281020if (is_linux) {
[email protected]8a3f8242014-06-05 18:05:121021 static_library("epoll_server") {
[email protected]8603c5de2014-04-16 20:34:311022 sources = [
1023 "tools/epoll_server/epoll_server.cc",
1024 "tools/epoll_server/epoll_server.h",
1025 ]
1026 deps = [
1027 ":net",
1028 "//base",
1029 ]
1030 }
1031
[email protected]8a3f8242014-06-05 18:05:121032 static_library("flip_in_mem_edsm_server_base") {
Brett Wilson8f80ad0b2014-09-08 19:50:241033 testonly = true
[email protected]8603c5de2014-04-16 20:34:311034 sources = [
[email protected]8603c5de2014-04-16 20:34:311035 "tools/flip_server/acceptor_thread.cc",
satorux933fc7a2015-02-13 07:09:101036 "tools/flip_server/acceptor_thread.h",
1037 "tools/flip_server/constants.h",
[email protected]8603c5de2014-04-16 20:34:311038 "tools/flip_server/create_listener.cc",
1039 "tools/flip_server/create_listener.h",
[email protected]8603c5de2014-04-16 20:34:311040 "tools/flip_server/flip_config.cc",
1041 "tools/flip_server/flip_config.h",
1042 "tools/flip_server/http_interface.cc",
1043 "tools/flip_server/http_interface.h",
1044 "tools/flip_server/loadtime_measurement.h",
[email protected]8603c5de2014-04-16 20:34:311045 "tools/flip_server/mem_cache.cc",
satorux933fc7a2015-02-13 07:09:101046 "tools/flip_server/mem_cache.h",
[email protected]8603c5de2014-04-16 20:34:311047 "tools/flip_server/output_ordering.cc",
1048 "tools/flip_server/output_ordering.h",
1049 "tools/flip_server/ring_buffer.cc",
1050 "tools/flip_server/ring_buffer.h",
1051 "tools/flip_server/sm_connection.cc",
1052 "tools/flip_server/sm_connection.h",
1053 "tools/flip_server/sm_interface.h",
[email protected]8603c5de2014-04-16 20:34:311054 "tools/flip_server/spdy_interface.cc",
1055 "tools/flip_server/spdy_interface.h",
satorux933fc7a2015-02-13 07:09:101056 "tools/flip_server/spdy_ssl.cc",
1057 "tools/flip_server/spdy_ssl.h",
[email protected]8603c5de2014-04-16 20:34:311058 "tools/flip_server/spdy_util.cc",
1059 "tools/flip_server/spdy_util.h",
1060 "tools/flip_server/streamer_interface.cc",
1061 "tools/flip_server/streamer_interface.h",
rvargas145310f2015-08-14 18:09:041062 "tools/flip_server/url_to_filename_encoder.cc",
1063 "tools/flip_server/url_to_filename_encoder.h",
1064 "tools/flip_server/url_utilities.cc",
1065 "tools/flip_server/url_utilities.h",
[email protected]8603c5de2014-04-16 20:34:311066 ]
1067 deps = [
1068 ":balsa",
1069 ":epoll_server",
1070 ":net",
1071 "//base",
[email protected]edfd0f42014-07-22 18:20:371072 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311073 ]
1074 }
1075
1076 executable("flip_in_mem_edsm_server_unittests") {
Brett Wilson8f80ad0b2014-09-08 19:50:241077 testonly = true
[email protected]8603c5de2014-04-16 20:34:311078 sources = [
1079 "tools/flip_server/flip_test_utils.cc",
1080 "tools/flip_server/flip_test_utils.h",
1081 "tools/flip_server/http_interface_test.cc",
1082 "tools/flip_server/mem_cache_test.cc",
1083 "tools/flip_server/run_all_tests.cc",
1084 "tools/flip_server/spdy_interface_test.cc",
rvargas145310f2015-08-14 18:09:041085 "tools/flip_server/url_to_filename_encoder_unittest.cc",
1086 "tools/flip_server/url_utilities_unittest.cc",
[email protected]8603c5de2014-04-16 20:34:311087 ]
1088 deps = [
brettwbc44c0a92015-02-20 22:30:391089 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311090 ":flip_in_mem_edsm_server_base",
1091 ":net",
[email protected]b2b2bf52014-05-28 20:26:571092 ":test_support",
brettwba7a73d2015-08-31 22:17:391093 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311094 "//testing/gtest",
1095 "//testing/gmock",
[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") {
Brett Wilson8f80ad0b2014-09-08 19:50:241101 testonly = true
scottmg34fb7e52014-12-03 23:27:241102 sources = [
1103 "tools/flip_server/flip_in_mem_edsm_server.cc",
1104 ]
[email protected]8603c5de2014-04-16 20:34:311105 deps = [
brettwbc44c0a92015-02-20 22:30:391106 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311107 ":flip_in_mem_edsm_server_base",
1108 ":net",
1109 "//base",
brettwba7a73d2015-08-31 22:17:391110 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311111 ]
1112 }
1113
rch216445c2015-03-27 00:23:281114 source_set("epoll_quic_tools") {
[email protected]8603c5de2014-04-16 20:34:311115 sources = [
1116 "tools/quic/quic_client.cc",
1117 "tools/quic/quic_client.h",
[email protected]8603c5de2014-04-16 20:34:311118 "tools/quic/quic_default_packet_writer.cc",
1119 "tools/quic/quic_default_packet_writer.h",
[email protected]8603c5de2014-04-16 20:34:311120 "tools/quic/quic_epoll_clock.cc",
1121 "tools/quic/quic_epoll_clock.h",
1122 "tools/quic/quic_epoll_connection_helper.cc",
1123 "tools/quic/quic_epoll_connection_helper.h",
rtennetifb3fa6c2015-03-16 23:04:551124 "tools/quic/quic_packet_reader.cc",
1125 "tools/quic/quic_packet_reader.h",
[email protected]8603c5de2014-04-16 20:34:311126 "tools/quic/quic_packet_writer_wrapper.cc",
1127 "tools/quic/quic_packet_writer_wrapper.h",
1128 "tools/quic/quic_server.cc",
1129 "tools/quic/quic_server.h",
[email protected]8603c5de2014-04-16 20:34:311130 "tools/quic/quic_socket_utils.cc",
1131 "tools/quic/quic_socket_utils.h",
[email protected]8603c5de2014-04-16 20:34:311132 ]
1133 deps = [
1134 ":balsa",
1135 ":epoll_server",
1136 ":net",
1137 "//base",
1138 "//base/third_party/dynamic_annotations",
1139 "//crypto",
[email protected]edfd0f42014-07-22 18:20:371140 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311141 "//url",
1142 ]
1143 }
1144
rch216445c2015-03-27 00:23:281145 executable("epoll_quic_client") {
scottmg34fb7e52014-12-03 23:27:241146 sources = [
1147 "tools/quic/quic_client_bin.cc",
1148 ]
[email protected]8603c5de2014-04-16 20:34:311149 deps = [
brettwbc44c0a92015-02-20 22:30:391150 ":balsa",
1151 ":epoll_server",
rch216445c2015-03-27 00:23:281152 ":epoll_quic_tools",
1153 ":net",
1154 ":simple_quic_tools",
1155 "//base",
brettwba7a73d2015-08-31 22:17:391156 "//build/config/sanitizers:deps",
rch216445c2015-03-27 00:23:281157 "//third_party/boringssl",
1158 ]
1159 }
1160
1161 executable("epoll_quic_server") {
1162 sources = [
1163 "tools/quic/quic_server_bin.cc",
1164 ]
1165 deps = [
1166 ":balsa",
1167 ":epoll_server",
1168 ":epoll_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311169 ":net",
rchda78df5a2015-03-22 05:16:371170 ":simple_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311171 "//base",
brettwba7a73d2015-08-31 22:17:391172 "//build/config/sanitizers:deps",
[email protected]edfd0f42014-07-22 18:20:371173 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311174 ]
1175 }
[email protected]8603c5de2014-04-16 20:34:311176}
1177
[email protected]ef0eb442014-05-15 09:32:181178if (is_android) {
1179 generate_jni("net_jni_headers") {
1180 sources = [
1181 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
1182 "android/java/src/org/chromium/net/AndroidKeyStore.java",
1183 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java",
1184 "android/java/src/org/chromium/net/AndroidPrivateKey.java",
tbansal59a1ddc2015-09-14 17:35:011185 "android/java/src/org/chromium/net/AndroidTrafficStats.java",
[email protected]ef0eb442014-05-15 09:32:181186 "android/java/src/org/chromium/net/GURLUtils.java",
aberentec894a52015-07-09 14:45:531187 "android/java/src/org/chromium/net/HttpNegotiateAuthenticator.java",
xunjieli905496a2015-08-31 15:51:171188 "android/java/src/org/chromium/net/NetStringUtil.java",
[email protected]ef0eb442014-05-15 09:32:181189 "android/java/src/org/chromium/net/NetworkChangeNotifier.java",
1190 "android/java/src/org/chromium/net/ProxyChangeListener.java",
1191 "android/java/src/org/chromium/net/X509Util.java",
1192 ]
1193 jni_package = "net"
1194 }
cjhopmandad5f4272014-09-05 01:00:551195 generate_jni("net_test_jni_headers") {
1196 sources = [
1197 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java",
aberentec894a52015-07-09 14:45:531198 "test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticator.java",
cjhopmandad5f4272014-09-05 01:00:551199 ]
brettwcdccaf02015-07-27 16:27:091200 jni_package = "net/test"
cjhopmandad5f4272014-09-05 01:00:551201 }
[email protected]ef0eb442014-05-15 09:32:181202}
[email protected]8603c5de2014-04-16 20:34:311203
1204if (is_android || is_linux) {
1205 executable("disk_cache_memory_test") {
Brett Wilson8f80ad0b2014-09-08 19:50:241206 testonly = true
scottmg34fb7e52014-12-03 23:27:241207 sources = [
1208 "tools/disk_cache_memory_test/disk_cache_memory_test.cc",
1209 ]
[email protected]8603c5de2014-04-16 20:34:311210 deps = [
1211 ":net",
1212 "//base",
brettwba7a73d2015-08-31 22:17:391213 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311214 ]
1215 }
1216}
[email protected]8a3f8242014-06-05 18:05:121217
rch47ad01f2015-03-20 21:17:231218source_set("simple_quic_tools") {
rcha9d12ce12015-03-19 23:06:491219 sources = [
rtennetid67b3a722015-08-18 05:15:311220 "tools/quic/quic_client_base.cc",
1221 "tools/quic/quic_client_base.h",
rched113b22015-03-26 04:54:051222 "tools/quic/quic_client_session.cc",
1223 "tools/quic/quic_client_session.h",
rchc99f380c2015-03-26 19:50:561224 "tools/quic/quic_dispatcher.cc",
1225 "tools/quic/quic_dispatcher.h",
rch0e945472015-03-26 15:19:211226 "tools/quic/quic_in_memory_cache.cc",
1227 "tools/quic/quic_in_memory_cache.h",
rchc99f380c2015-03-26 19:50:561228 "tools/quic/quic_per_connection_packet_writer.cc",
1229 "tools/quic/quic_per_connection_packet_writer.h",
rch0e945472015-03-26 15:19:211230 "tools/quic/quic_server_session.cc",
1231 "tools/quic/quic_server_session.h",
rcha9d12ce12015-03-19 23:06:491232 "tools/quic/quic_simple_client.cc",
1233 "tools/quic/quic_simple_client.h",
rch216445c2015-03-27 00:23:281234 "tools/quic/quic_simple_per_connection_packet_writer.cc",
1235 "tools/quic/quic_simple_per_connection_packet_writer.h",
1236 "tools/quic/quic_simple_server.cc",
1237 "tools/quic/quic_simple_server.h",
1238 "tools/quic/quic_simple_server_packet_writer.cc",
1239 "tools/quic/quic_simple_server_packet_writer.h",
rched113b22015-03-26 04:54:051240 "tools/quic/quic_spdy_client_stream.cc",
1241 "tools/quic/quic_spdy_client_stream.h",
rch0e945472015-03-26 15:19:211242 "tools/quic/quic_spdy_server_stream.cc",
1243 "tools/quic/quic_spdy_server_stream.h",
1244 "tools/quic/quic_time_wait_list_manager.cc",
1245 "tools/quic/quic_time_wait_list_manager.h",
rchda78df5a2015-03-22 05:16:371246 "tools/quic/synchronous_host_resolver.cc",
1247 "tools/quic/synchronous_host_resolver.h",
rcha9d12ce12015-03-19 23:06:491248 ]
1249 deps = [
1250 ":net",
1251 "//base",
rch47ad01f2015-03-20 21:17:231252 "//base/third_party/dynamic_annotations",
1253 "//url",
1254 ]
1255}
1256
sherouk51b4b098b2015-08-10 09:00:431257if (!is_ios) {
1258 executable("quic_client") {
1259 sources = [
1260 "tools/quic/quic_simple_client_bin.cc",
1261 ]
1262 deps = [
1263 ":net",
1264 ":simple_quic_tools",
1265 "//base",
brettwba7a73d2015-08-31 22:17:391266 "//build/config/sanitizers:deps",
sherouk51b4b098b2015-08-10 09:00:431267 "//url",
1268 ]
1269 }
1270 executable("quic_server") {
1271 sources = [
1272 "tools/quic/quic_simple_server_bin.cc",
1273 ]
1274 deps = [
1275 ":net",
1276 ":simple_quic_tools",
1277 "//base",
brettwba7a73d2015-08-31 22:17:391278 "//build/config/sanitizers:deps",
sherouk51b4b098b2015-08-10 09:00:431279 "//third_party/boringssl",
1280 "//third_party/protobuf:protobuf_lite",
1281 ]
1282 }
rch216445c2015-03-27 00:23:281283}
1284
dpranke64df2832015-07-31 22:33:361285# TODO(GYP): Delete this after we've converted everything to GN.
1286# The _run targets exist only for compatibility w/ GYP.
1287group("net_unittests_run") {
1288 testonly = true
1289 deps = [
1290 ":net_unittests",
1291 ]
1292}
1293
1294test("net_unittests") {
1295 sources = gypi_values.net_test_sources
1296
sherouk51b4b098b2015-08-10 09:00:431297 if (is_ios) {
1298 sources -= [
1299 "websockets/websocket_stream_cookie_test.cc",
1300 "websockets/websocket_stream_create_test_base.cc",
1301 "websockets/websocket_stream_create_test_base.h",
1302 ]
1303 }
1304
dpranke64df2832015-07-31 22:33:361305 configs += [
1306 "//build/config:precompiled_headers",
1307
1308 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1309 "//build/config/compiler:no_size_t_to_int_warning",
1310 ]
1311 defines = []
1312
1313 deps = [
1314 ":balsa",
1315 ":extras",
1316 ":http_server",
1317 ":net",
1318 ":simple_quic_tools",
1319 ":test_support",
1320 "//base",
1321 "//base:i18n",
1322 "//base:prefs_test_support",
1323 "//base/allocator",
1324 "//base/third_party/dynamic_annotations",
1325 "//crypto",
1326 "//crypto:platform",
1327 "//crypto:test_support",
dpranke64df2832015-07-31 22:33:361328 "//net/base/registry_controlled_domains",
1329 "//sql",
1330 "//testing/gmock",
1331 "//testing/gtest",
1332 "//third_party/zlib",
1333 "//url",
1334 ]
1335
1336 data = [
1337 "data/",
1338 ]
1339
1340 if (is_linux || is_mac || is_win) {
1341 deps += [
1342 "//third_party/pyftpdlib/",
1343 "//third_party/pywebsocket/",
1344 "//third_party/tlslite/",
1345 ]
1346 data_deps = [
1347 "//third_party/pyftpdlib/",
1348 "//third_party/pywebsocket/",
1349 "//third_party/tlslite/",
1350 ]
1351 data += [
1352 "tools/testserver/",
1353 "//third_party/pyftpdlib/",
1354 "//third_party/pywebsocket/",
1355 "//third_party/tlslite/",
1356 "$root_out_dir/pyproto/google/",
dprankef497c7962015-07-31 19:46:231357 ]
1358 }
1359
dpranke64df2832015-07-31 22:33:361360 if (is_desktop_linux) {
1361 deps += [ ":epoll_quic_tools" ]
1362 }
1363 if (is_linux) {
1364 sources += gypi_values.net_linux_test_sources
1365 deps += [
1366 ":epoll_quic_tools",
1367 ":epoll_server",
1368 ":flip_in_mem_edsm_server_base",
brettwbc8b2a22015-07-28 18:24:421369 ]
dpranke64df2832015-07-31 22:33:361370 }
[email protected]8a3f8242014-06-05 18:05:121371
dpranke64df2832015-07-31 22:33:361372 if (is_mac || is_ios) {
1373 sources += gypi_values.net_base_test_mac_ios_sources
1374 }
1375
1376 if (is_chromeos) {
1377 sources -= [ "proxy/proxy_config_service_linux_unittest.cc" ]
1378 }
1379
1380 if (v8_use_external_startup_data) {
1381 deps += [ "//gin" ]
1382 }
1383
1384 if (!use_nss_certs) {
1385 sources -= [
1386 "cert/nss_cert_database_unittest.cc",
1387 "ssl/client_cert_store_nss_unittest.cc",
[email protected]8a3f8242014-06-05 18:05:121388 ]
dpranke64df2832015-07-31 22:33:361389 if (is_chromeos) { # Already removed for all non-ChromeOS builds.
davidben2bcbc6b2015-04-22 02:36:411390 sources -= [
dpranke64df2832015-07-31 22:33:361391 "cert/nss_cert_database_chromeos_unittest.cc",
1392 "cert/nss_profile_filter_chromeos_unittest.cc",
davidben2bcbc6b2015-04-22 02:36:411393 ]
brettw43ae0e12015-07-14 22:12:361394 }
[email protected]8a3f8242014-06-05 18:05:121395 }
dpranke64df2832015-07-31 22:33:361396
1397 if (use_openssl) {
1398 # When building for OpenSSL, we need to exclude NSS specific tests
1399 # or functionality not supported by OpenSSL yet.
1400 # TODO(bulach): Add equivalent tests when the underlying
1401 # functionality is ported to OpenSSL.
1402 sources -= [ "quic/test_tools/crypto_test_utils_nss.cc" ]
1403 } else {
1404 sources -= [
1405 "cert/x509_util_openssl_unittest.cc",
1406 "quic/test_tools/crypto_test_utils_openssl.cc",
1407 "socket/ssl_client_socket_openssl_unittest.cc",
1408 "ssl/ssl_client_session_cache_openssl_unittest.cc",
1409 ]
1410 }
1411
1412 if (use_kerberos) {
1413 defines += [ "USE_KERBEROS" ]
1414 }
1415
1416 # These are excluded on Android, because the actual Kerberos support, which
1417 # these test, is in a separate app on Android.
1418 if (!use_kerberos || is_android) {
1419 sources -= [
1420 "http/http_auth_gssapi_posix_unittest.cc",
1421 "http/mock_gssapi_library_posix.cc",
1422 "http/mock_gssapi_library_posix.h",
1423 ]
1424 }
1425 if (!use_kerberos) {
1426 sources -= [ "http/http_auth_handler_negotiate_unittest.cc" ]
1427 }
1428
1429 if (use_openssl || (!is_desktop_linux && !is_chromeos && !is_ios)) {
1430 # Only include this test when on Posix and using NSS for
1431 # cert verification or on iOS (which also uses NSS for certs).
1432 sources -= [ "cert_net/nss_ocsp_unittest.cc" ]
1433 }
1434
1435 if (!use_openssl_certs) {
1436 sources -= [ "ssl/openssl_client_key_store_unittest.cc" ]
1437 }
1438
1439 if (!enable_websockets) {
1440 sources -= [
1441 "server/http_connection_unittest.cc",
1442 "server/http_server_response_info_unittest.cc",
1443 "server/http_server_unittest.cc",
1444 "server/web_socket_encoder_unittest.cc",
1445 "websockets/websocket_basic_stream_test.cc",
1446 "websockets/websocket_channel_test.cc",
1447 "websockets/websocket_deflate_predictor_impl_test.cc",
1448 "websockets/websocket_deflate_stream_test.cc",
1449 "websockets/websocket_deflater_test.cc",
1450 "websockets/websocket_end_to_end_test.cc",
1451 "websockets/websocket_errors_test.cc",
1452 "websockets/websocket_extension_parser_test.cc",
1453 "websockets/websocket_frame_parser_test.cc",
1454 "websockets/websocket_frame_test.cc",
1455 "websockets/websocket_handshake_challenge_test.cc",
1456 "websockets/websocket_handshake_stream_create_helper_test.cc",
1457 "websockets/websocket_inflater_test.cc",
1458 "websockets/websocket_stream_test.cc",
1459 "websockets/websocket_test_util.cc",
1460 "websockets/websocket_test_util.h",
1461 ]
1462 deps -= [ ":http_server" ]
1463 }
1464
1465 if (disable_file_support) {
1466 sources -= [
1467 "base/directory_lister_unittest.cc",
1468 "url_request/url_request_file_job_unittest.cc",
1469 ]
1470 }
1471
1472 if (disable_ftp_support) {
1473 sources -= [
1474 "ftp/ftp_auth_cache_unittest.cc",
1475 "ftp/ftp_ctrl_response_buffer_unittest.cc",
1476 "ftp/ftp_directory_listing_parser_ls_unittest.cc",
dpranke64df2832015-07-31 22:33:361477 "ftp/ftp_directory_listing_parser_unittest.cc",
1478 "ftp/ftp_directory_listing_parser_unittest.h",
1479 "ftp/ftp_directory_listing_parser_vms_unittest.cc",
1480 "ftp/ftp_directory_listing_parser_windows_unittest.cc",
1481 "ftp/ftp_network_transaction_unittest.cc",
1482 "ftp/ftp_util_unittest.cc",
1483 "url_request/url_request_ftp_job_unittest.cc",
1484 ]
1485 }
1486
1487 if (!enable_built_in_dns) {
1488 sources -= [
1489 "dns/address_sorter_posix_unittest.cc",
1490 "dns/address_sorter_unittest.cc",
1491 ]
1492 }
1493
xunjieli905496a2015-08-31 15:51:171494 if (use_v8_in_net) {
dpranke64df2832015-07-31 22:33:361495 deps += [ ":net_with_v8" ]
1496 } else {
1497 sources -= [
1498 "proxy/proxy_resolver_v8_tracing_unittest.cc",
1499 "proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc",
1500 "proxy/proxy_resolver_v8_unittest.cc",
1501 ]
1502 }
1503
1504 if (use_v8_in_net && !is_android) {
1505 deps += [
1506 ":net_browser_services",
1507 ":net_utility_services",
1508 "//mojo/environment:chromium",
1509 "//third_party/mojo/src/mojo/edk/system",
1510 ]
1511 } else {
1512 sources -= [
1513 "dns/host_resolver_mojo_unittest.cc",
1514 "dns/mojo_host_resolver_impl_unittest.cc",
1515 "proxy/mojo_proxy_resolver_factory_impl_unittest.cc",
1516 "proxy/mojo_proxy_resolver_impl_unittest.cc",
1517 "proxy/mojo_proxy_resolver_v8_tracing_bindings_unittest.cc",
1518 "proxy/proxy_resolver_factory_mojo_unittest.cc",
1519 "proxy/proxy_service_mojo_unittest.cc",
1520 ]
1521 }
1522
1523 if (!enable_mdns) {
1524 sources -= [
1525 "dns/mdns_cache_unittest.cc",
1526 "dns/mdns_client_unittest.cc",
1527 "dns/record_parsed_unittest.cc",
1528 "dns/record_rdata_unittest.cc",
1529 ]
1530 }
1531
1532 if (is_ios) {
1533 # TODO(GYP)
1534 # 'actions': [
1535 # {
1536 # 'action_name': 'copy_test_data',
1537 # 'variables': {
1538 # 'test_data_files': [
1539 # 'data/ssl/certificates/',
1540 # 'data/test.html',
1541 # 'data/url_request_unittest/',
mattm057b0152015-08-11 00:26:241542 # 'data/verify_name_match_unittest/names/',
eroman58423c12015-08-14 20:47:361543 # 'data/parse_certificate_unittest/',
dpranke64df2832015-07-31 22:33:361544 # ],
1545 # 'test_data_prefix': 'net',
1546 # },
1547 # 'includes': [ '../build/copy_test_data_ios.gypi' ],
1548 # },
1549 # ],
1550 sources -= [
1551 # TODO(droger): The following tests are disabled because the
1552 # implementation is missing or incomplete.
1553 # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS.
1554 "base/keygen_handler_unittest.cc",
1555 "disk_cache/backend_unittest.cc",
1556 "disk_cache/blockfile/block_files_unittest.cc",
1557
1558 # Need to read input data files.
1559 "filter/gzip_filter_unittest.cc",
1560 "socket/ssl_server_socket_unittest.cc",
1561 "spdy/fuzzing/hpack_fuzz_util_test.cc",
1562
1563 # Need TestServer.
1564 "cert_net/cert_net_fetcher_impl_unittest.cc",
1565 "proxy/proxy_script_fetcher_impl_unittest.cc",
1566 "socket/ssl_client_socket_unittest.cc",
1567 "url_request/url_fetcher_impl_unittest.cc",
1568 "url_request/url_request_context_builder_unittest.cc",
1569
1570 # Needs GetAppOutput().
1571 "test/python_utils_unittest.cc",
1572
1573 # The following tests are disabled because they don't apply to
1574 # iOS.
1575 # OS is not "linux" or "freebsd" or "openbsd".
1576 "socket/unix_domain_client_socket_posix_unittest.cc",
1577 "socket/unix_domain_server_socket_posix_unittest.cc",
1578
1579 # See bug http://crbug.com/344533.
1580 "disk_cache/blockfile/index_table_v3_unittest.cc",
1581 ]
1582 }
1583
1584 if (is_android) {
1585 sources -= [
1586 # See bug http://crbug.com/344533.
1587 "disk_cache/blockfile/index_table_v3_unittest.cc",
1588 "dns/dns_config_service_posix_unittest.cc",
1589 ]
1590 deps += [
1591 ":net_test_jni_headers",
1592
1593 # TODO(mmenke): This depends on test_support_base, which depends on
1594 # icu. Figure out a way to remove that dependency.
1595 "//testing/android/native_test:native_test_native_code",
1596 ]
1597 set_sources_assignment_filter([])
1598 sources += [ "base/address_tracker_linux_unittest.cc" ]
1599 set_sources_assignment_filter(sources_assignment_filter)
1600 isolate_file = "net_unittests.isolate"
1601 }
1602
dpranke64df2832015-07-31 22:33:361603 # Symbols for crashes when running tests on swarming.
1604 if (symbol_level > 0) {
1605 if (is_win) {
1606 data += [ "$root_out_dir/net_unittests.exe.pdb" ]
1607 } else if (is_mac) {
1608 data += [ "$root_out_dir/net_unittests.dSYM/" ]
1609 }
1610 }
1611}
1612
1613# !is_android && !is_win && !is_mac
[email protected]8a3f8242014-06-05 18:05:121614
rockot9c67e5f2015-03-12 20:01:211615executable("net_perftests") {
1616 testonly = true
1617 sources = [
ricea10eb9f5e2015-05-19 18:51:571618 "base/mime_sniffer_perftest.cc",
rockot9c67e5f2015-03-12 20:01:211619 "cookies/cookie_monster_perftest.cc",
1620 "disk_cache/blockfile/disk_cache_perftest.cc",
rohitrao1860223c2015-05-16 01:07:141621 "extras/sqlite/sqlite_persistent_cookie_store_perftest.cc",
rockot9c67e5f2015-03-12 20:01:211622 "proxy/proxy_resolver_perftest.cc",
1623 "udp/udp_socket_perftest.cc",
1624 ]
1625
1626 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1627 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
1628 deps = [
brettwcdccaf02015-07-27 16:27:091629 ":extras",
1630 ":net",
1631 ":test_support",
rockot9c67e5f2015-03-12 20:01:211632 "//base",
1633 "//base:i18n",
1634 "//base/test:test_support_perf",
brettwba7a73d2015-08-31 22:17:391635 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:211636 "//testing/gtest",
1637 "//url",
rockot9c67e5f2015-03-12 20:01:211638 ]
1639
1640 if (enable_websockets) {
1641 sources += [ "websockets/websocket_frame_perftest.cc" ]
1642 }
1643
1644 if (use_v8_in_net) {
1645 deps += [ ":net_with_v8" ]
1646 } else {
1647 sources -= [ "proxy/proxy_resolver_perftest.cc" ]
1648 }
rockot9c67e5f2015-03-12 20:01:211649}