blob: 319e1e7064a5ca6a8964d0601fc82f94242bf39a [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
243 if (use_glib && !is_chromeos) {
244 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" ]
740 configs += [
brettwd1c719a2015-02-19 23:17:04741 "//build/config/compiler:no_size_t_to_int_warning",
[email protected]8603c5de2014-04-16 20:34:31742 "//build/config/compiler:wexit_time_destructors",
743 ]
744
Brett Wilsone53895272014-09-23 23:41:46745 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31746 ":net",
Brett Wilsone53895272014-09-23 23:41:46747 ]
748 deps = [
[email protected]8603c5de2014-04-16 20:34:31749 "//base",
750 "//gin",
751 "//url",
752 "//v8",
753 ]
754 }
755}
756
amistry7e6ebfdc82015-02-13 04:19:11757if (use_v8_in_net && !is_android) {
758 source_set("net_browser_services") {
759 sources = [
760 "dns/mojo_host_resolver_impl.cc",
761 "dns/mojo_host_resolver_impl.h",
amistry6e1ed1b2015-03-12 05:24:01762 "proxy/in_process_mojo_proxy_resolver_factory.cc",
763 "proxy/in_process_mojo_proxy_resolver_factory.h",
sammc1d5df4d2015-05-05 05:06:17764 "proxy/mojo_proxy_resolver_factory.h",
eromandcacef22015-06-01 19:36:35765 "proxy/proxy_resolver_factory_mojo.cc",
766 "proxy/proxy_resolver_factory_mojo.h",
amistry6e1ed1b2015-03-12 05:24:01767 "proxy/proxy_service_mojo.cc",
768 "proxy/proxy_service_mojo.h",
amistry7e6ebfdc82015-02-13 04:19:11769 ]
770
771 public_deps = [
772 ":mojo_type_converters",
773 ":net",
brettwbc44c0a92015-02-20 22:30:39774 "//base",
amistry07ff1402015-03-10 07:34:07775 "//mojo/common",
amistry7e6ebfdc82015-02-13 04:19:11776 "//net/interfaces",
777 "//third_party/mojo/src/mojo/public/cpp/bindings",
amistry6e1ed1b2015-03-12 05:24:01778
779 # NOTE(amistry): As long as we support in-process Mojo v8 PAC, we need
780 # this dependency since in_process_mojo_proxy_resolver_factory creates
781 # the utility process side Mojo services in the browser process.
782 # Ultimately, this will go away when we only support out-of-process.
783 ":net_utility_services",
amistry7e6ebfdc82015-02-13 04:19:11784 ]
785 }
786
787 source_set("mojo_type_converters") {
788 sources = [
amistry7ec58112015-02-26 06:03:00789 "dns/mojo_host_type_converters.cc",
790 "dns/mojo_host_type_converters.h",
791 "proxy/mojo_proxy_type_converters.cc",
792 "proxy/mojo_proxy_type_converters.h",
amistry7e6ebfdc82015-02-13 04:19:11793 ]
794
795 public_deps = [
796 ":net",
797 "//net/interfaces",
798 "//third_party/mojo/src/mojo/public/cpp/bindings",
799 ]
800 }
sammc5403aa1d2015-02-25 04:59:21801
802 source_set("net_utility_services") {
803 sources = [
sammc6ac3fe52015-02-25 06:00:28804 "dns/host_resolver_mojo.cc",
805 "dns/host_resolver_mojo.h",
sammc352f7492015-02-25 09:45:24806 "proxy/mojo_proxy_resolver_factory_impl.cc",
807 "proxy/mojo_proxy_resolver_factory_impl.h",
sammc5403aa1d2015-02-25 04:59:21808 "proxy/mojo_proxy_resolver_impl.cc",
809 "proxy/mojo_proxy_resolver_impl.h",
sammca3242c92015-07-10 02:38:51810 "proxy/mojo_proxy_resolver_v8_tracing_bindings.h",
sammc5403aa1d2015-02-25 04:59:21811 ]
812
rockot9509ec82015-04-14 02:50:56813 deps = [
814 ":net_with_v8",
815 ]
816
sammc5403aa1d2015-02-25 04:59:21817 public_deps = [
818 ":mojo_type_converters",
819 ":net",
820 "//mojo/common",
821 "//net/interfaces",
822 "//third_party/mojo/src/mojo/public/cpp/bindings",
823 ]
824 }
amistry7e6ebfdc82015-02-13 04:19:11825}
826
[email protected]8603c5de2014-04-16 20:34:31827if (!is_ios && !is_android) {
828 executable("crash_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24829 testonly = true
scottmg34fb7e52014-12-03 23:27:24830 sources = [
831 "tools/crash_cache/crash_cache.cc",
832 ]
dpranke43276212015-02-20 02:55:19833
brettwd1c719a2015-02-19 23:17:04834 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
835 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31836 deps = [
837 ":net",
[email protected]b2b2bf52014-05-28 20:26:57838 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31839 "//base",
brettwba7a73d2015-08-31 22:17:39840 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31841 ]
842 }
843
844 executable("crl_set_dump") {
Brett Wilson8f80ad0b2014-09-08 19:50:24845 testonly = true
scottmg34fb7e52014-12-03 23:27:24846 sources = [
847 "tools/crl_set_dump/crl_set_dump.cc",
848 ]
dpranke43276212015-02-20 02:55:19849
brettwd1c719a2015-02-19 23:17:04850 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
851 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31852 deps = [
853 ":net",
854 "//base",
brettwba7a73d2015-08-31 22:17:39855 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31856 ]
857 }
858
859 executable("dns_fuzz_stub") {
Brett Wilson8f80ad0b2014-09-08 19:50:24860 testonly = true
scottmg34fb7e52014-12-03 23:27:24861 sources = [
862 "tools/dns_fuzz_stub/dns_fuzz_stub.cc",
863 ]
dpranke43276212015-02-20 02:55:19864
brettwd1c719a2015-02-19 23:17:04865 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
866 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31867 deps = [
868 ":net",
869 "//base",
brettwba7a73d2015-08-31 22:17:39870 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31871 ]
872 }
873
874 executable("gdig") {
Brett Wilson8f80ad0b2014-09-08 19:50:24875 testonly = true
[email protected]8603c5de2014-04-16 20:34:31876 sources = [
877 "tools/gdig/file_net_log.cc",
878 "tools/gdig/gdig.cc",
879 ]
880 deps = [
881 ":net",
882 "//base",
brettwba7a73d2015-08-31 22:17:39883 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31884 ]
885 }
886
887 executable("get_server_time") {
Brett Wilson8f80ad0b2014-09-08 19:50:24888 testonly = true
scottmg34fb7e52014-12-03 23:27:24889 sources = [
890 "tools/get_server_time/get_server_time.cc",
891 ]
dpranke43276212015-02-20 02:55:19892
brettwd1c719a2015-02-19 23:17:04893 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
894 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31895 deps = [
896 ":net",
897 "//base",
898 "//base:i18n",
brettwba7a73d2015-08-31 22:17:39899 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31900 "//url",
901 ]
902 }
903
rockot9c67e5f2015-03-12 20:01:21904 executable("hpack_example_generator") {
905 testonly = true
906 sources = [
907 "spdy/fuzzing/hpack_example_generator.cc",
908 ]
909
910 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
911 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
912 deps = [
rockot9c67e5f2015-03-12 20:01:21913 ":net",
brettwba7a73d2015-08-31 22:17:39914 "//base",
915 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:21916 ]
917 }
918
919 executable("hpack_fuzz_mutator") {
920 testonly = true
921 sources = [
922 "spdy/fuzzing/hpack_fuzz_mutator.cc",
923 ]
924
925 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
926 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
927 deps = [
rockot9c67e5f2015-03-12 20:01:21928 ":net",
brettwba7a73d2015-08-31 22:17:39929 "//base",
930 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:21931 ]
932 }
933
934 executable("hpack_fuzz_wrapper") {
935 testonly = true
936 sources = [
937 "spdy/fuzzing/hpack_fuzz_wrapper.cc",
938 ]
939
940 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
941 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
942 deps = [
rockot9c67e5f2015-03-12 20:01:21943 ":net",
brettwba7a73d2015-08-31 22:17:39944 "//base",
945 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:21946 ]
947 }
948
[email protected]8603c5de2014-04-16 20:34:31949 if (use_v8_in_net) {
950 executable("net_watcher") {
Brett Wilson8f80ad0b2014-09-08 19:50:24951 testonly = true
scottmg34fb7e52014-12-03 23:27:24952 sources = [
953 "tools/net_watcher/net_watcher.cc",
954 ]
[email protected]8603c5de2014-04-16 20:34:31955 deps = [
956 ":net",
957 ":net_with_v8",
958 "//base",
brettwba7a73d2015-08-31 22:17:39959 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31960 ]
961
slan77bdc2e62015-09-21 17:56:26962 if (is_desktop_linux && use_gconf) {
xunjieli905496a2015-08-31 15:51:17963 configs += [
964 "//build/config/linux:gconf",
965 "//build/config/linux:glib",
966 ]
dprankead0c1f42015-08-28 21:48:04967 deps += [ "//build/linux:gio" ]
[email protected]8603c5de2014-04-16 20:34:31968 }
969 }
970 }
971
972 executable("run_testserver") {
Brett Wilson8f80ad0b2014-09-08 19:50:24973 testonly = true
scottmg34fb7e52014-12-03 23:27:24974 sources = [
975 "tools/testserver/run_testserver.cc",
976 ]
[email protected]8603c5de2014-04-16 20:34:31977 deps = [
[email protected]b2b2bf52014-05-28 20:26:57978 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31979 "//base",
980 "//base/test:test_support",
brettwba7a73d2015-08-31 22:17:39981 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31982 "//testing/gtest",
983 ]
984 }
985
986 executable("stress_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24987 testonly = true
scottmg34fb7e52014-12-03 23:27:24988 sources = [
rvargase23fcf652015-03-04 19:59:22989 "tools/stress_cache/stress_cache.cc",
scottmg34fb7e52014-12-03 23:27:24990 ]
dpranke43276212015-02-20 02:55:19991
brettwd1c719a2015-02-19 23:17:04992 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
993 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31994 deps = [
995 ":net",
[email protected]b2b2bf52014-05-28 20:26:57996 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31997 "//base",
brettwba7a73d2015-08-31 22:17:39998 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31999 ]
1000 }
1001
1002 executable("tld_cleanup") {
scottmg34fb7e52014-12-03 23:27:241003 sources = [
1004 "tools/tld_cleanup/tld_cleanup.cc",
1005 ]
dpranke43276212015-02-20 02:55:191006
brettwd1c719a2015-02-19 23:17:041007 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1008 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:311009 deps = [
1010 "//base",
1011 "//base:i18n",
brettwba7a73d2015-08-31 22:17:391012 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311013 "//net/tools/tld_cleanup",
1014 ]
1015 }
1016}
1017
rch6983a3f2015-03-30 03:47:281018if (is_linux) {
[email protected]8a3f8242014-06-05 18:05:121019 static_library("epoll_server") {
[email protected]8603c5de2014-04-16 20:34:311020 sources = [
1021 "tools/epoll_server/epoll_server.cc",
1022 "tools/epoll_server/epoll_server.h",
1023 ]
1024 deps = [
1025 ":net",
1026 "//base",
1027 ]
1028 }
1029
[email protected]8a3f8242014-06-05 18:05:121030 static_library("flip_in_mem_edsm_server_base") {
Brett Wilson8f80ad0b2014-09-08 19:50:241031 testonly = true
[email protected]8603c5de2014-04-16 20:34:311032 sources = [
[email protected]8603c5de2014-04-16 20:34:311033 "tools/flip_server/acceptor_thread.cc",
satorux933fc7a2015-02-13 07:09:101034 "tools/flip_server/acceptor_thread.h",
1035 "tools/flip_server/constants.h",
[email protected]8603c5de2014-04-16 20:34:311036 "tools/flip_server/create_listener.cc",
1037 "tools/flip_server/create_listener.h",
[email protected]8603c5de2014-04-16 20:34:311038 "tools/flip_server/flip_config.cc",
1039 "tools/flip_server/flip_config.h",
1040 "tools/flip_server/http_interface.cc",
1041 "tools/flip_server/http_interface.h",
1042 "tools/flip_server/loadtime_measurement.h",
[email protected]8603c5de2014-04-16 20:34:311043 "tools/flip_server/mem_cache.cc",
satorux933fc7a2015-02-13 07:09:101044 "tools/flip_server/mem_cache.h",
[email protected]8603c5de2014-04-16 20:34:311045 "tools/flip_server/output_ordering.cc",
1046 "tools/flip_server/output_ordering.h",
1047 "tools/flip_server/ring_buffer.cc",
1048 "tools/flip_server/ring_buffer.h",
1049 "tools/flip_server/sm_connection.cc",
1050 "tools/flip_server/sm_connection.h",
1051 "tools/flip_server/sm_interface.h",
[email protected]8603c5de2014-04-16 20:34:311052 "tools/flip_server/spdy_interface.cc",
1053 "tools/flip_server/spdy_interface.h",
satorux933fc7a2015-02-13 07:09:101054 "tools/flip_server/spdy_ssl.cc",
1055 "tools/flip_server/spdy_ssl.h",
[email protected]8603c5de2014-04-16 20:34:311056 "tools/flip_server/spdy_util.cc",
1057 "tools/flip_server/spdy_util.h",
1058 "tools/flip_server/streamer_interface.cc",
1059 "tools/flip_server/streamer_interface.h",
rvargas145310f2015-08-14 18:09:041060 "tools/flip_server/url_to_filename_encoder.cc",
1061 "tools/flip_server/url_to_filename_encoder.h",
1062 "tools/flip_server/url_utilities.cc",
1063 "tools/flip_server/url_utilities.h",
[email protected]8603c5de2014-04-16 20:34:311064 ]
1065 deps = [
1066 ":balsa",
1067 ":epoll_server",
1068 ":net",
1069 "//base",
[email protected]edfd0f42014-07-22 18:20:371070 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311071 ]
1072 }
1073
1074 executable("flip_in_mem_edsm_server_unittests") {
Brett Wilson8f80ad0b2014-09-08 19:50:241075 testonly = true
[email protected]8603c5de2014-04-16 20:34:311076 sources = [
1077 "tools/flip_server/flip_test_utils.cc",
1078 "tools/flip_server/flip_test_utils.h",
1079 "tools/flip_server/http_interface_test.cc",
1080 "tools/flip_server/mem_cache_test.cc",
1081 "tools/flip_server/run_all_tests.cc",
1082 "tools/flip_server/spdy_interface_test.cc",
rvargas145310f2015-08-14 18:09:041083 "tools/flip_server/url_to_filename_encoder_unittest.cc",
1084 "tools/flip_server/url_utilities_unittest.cc",
[email protected]8603c5de2014-04-16 20:34:311085 ]
1086 deps = [
brettwbc44c0a92015-02-20 22:30:391087 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311088 ":flip_in_mem_edsm_server_base",
1089 ":net",
[email protected]b2b2bf52014-05-28 20:26:571090 ":test_support",
brettwba7a73d2015-08-31 22:17:391091 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311092 "//testing/gtest",
1093 "//testing/gmock",
[email protected]edfd0f42014-07-22 18:20:371094 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311095 ]
1096 }
1097
1098 executable("flip_in_mem_edsm_server") {
Brett Wilson8f80ad0b2014-09-08 19:50:241099 testonly = true
scottmg34fb7e52014-12-03 23:27:241100 sources = [
1101 "tools/flip_server/flip_in_mem_edsm_server.cc",
1102 ]
[email protected]8603c5de2014-04-16 20:34:311103 deps = [
brettwbc44c0a92015-02-20 22:30:391104 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311105 ":flip_in_mem_edsm_server_base",
1106 ":net",
1107 "//base",
brettwba7a73d2015-08-31 22:17:391108 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311109 ]
1110 }
1111
rch216445c2015-03-27 00:23:281112 source_set("epoll_quic_tools") {
[email protected]8603c5de2014-04-16 20:34:311113 sources = [
1114 "tools/quic/quic_client.cc",
1115 "tools/quic/quic_client.h",
[email protected]8603c5de2014-04-16 20:34:311116 "tools/quic/quic_default_packet_writer.cc",
1117 "tools/quic/quic_default_packet_writer.h",
[email protected]8603c5de2014-04-16 20:34:311118 "tools/quic/quic_epoll_clock.cc",
1119 "tools/quic/quic_epoll_clock.h",
1120 "tools/quic/quic_epoll_connection_helper.cc",
1121 "tools/quic/quic_epoll_connection_helper.h",
rtennetifb3fa6c2015-03-16 23:04:551122 "tools/quic/quic_packet_reader.cc",
1123 "tools/quic/quic_packet_reader.h",
[email protected]8603c5de2014-04-16 20:34:311124 "tools/quic/quic_packet_writer_wrapper.cc",
1125 "tools/quic/quic_packet_writer_wrapper.h",
1126 "tools/quic/quic_server.cc",
1127 "tools/quic/quic_server.h",
[email protected]8603c5de2014-04-16 20:34:311128 "tools/quic/quic_socket_utils.cc",
1129 "tools/quic/quic_socket_utils.h",
[email protected]8603c5de2014-04-16 20:34:311130 ]
1131 deps = [
1132 ":balsa",
1133 ":epoll_server",
1134 ":net",
1135 "//base",
1136 "//base/third_party/dynamic_annotations",
1137 "//crypto",
[email protected]edfd0f42014-07-22 18:20:371138 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311139 "//url",
1140 ]
1141 }
1142
rch216445c2015-03-27 00:23:281143 executable("epoll_quic_client") {
scottmg34fb7e52014-12-03 23:27:241144 sources = [
1145 "tools/quic/quic_client_bin.cc",
1146 ]
[email protected]8603c5de2014-04-16 20:34:311147 deps = [
brettwbc44c0a92015-02-20 22:30:391148 ":balsa",
1149 ":epoll_server",
rch216445c2015-03-27 00:23:281150 ":epoll_quic_tools",
1151 ":net",
1152 ":simple_quic_tools",
1153 "//base",
brettwba7a73d2015-08-31 22:17:391154 "//build/config/sanitizers:deps",
rch216445c2015-03-27 00:23:281155 "//third_party/boringssl",
1156 ]
1157 }
1158
1159 executable("epoll_quic_server") {
1160 sources = [
1161 "tools/quic/quic_server_bin.cc",
1162 ]
1163 deps = [
1164 ":balsa",
1165 ":epoll_server",
1166 ":epoll_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311167 ":net",
rchda78df5a2015-03-22 05:16:371168 ":simple_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311169 "//base",
brettwba7a73d2015-08-31 22:17:391170 "//build/config/sanitizers:deps",
[email protected]edfd0f42014-07-22 18:20:371171 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311172 ]
1173 }
[email protected]8603c5de2014-04-16 20:34:311174}
1175
[email protected]ef0eb442014-05-15 09:32:181176if (is_android) {
1177 generate_jni("net_jni_headers") {
1178 sources = [
1179 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
1180 "android/java/src/org/chromium/net/AndroidKeyStore.java",
1181 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java",
1182 "android/java/src/org/chromium/net/AndroidPrivateKey.java",
tbansal59a1ddc2015-09-14 17:35:011183 "android/java/src/org/chromium/net/AndroidTrafficStats.java",
[email protected]ef0eb442014-05-15 09:32:181184 "android/java/src/org/chromium/net/GURLUtils.java",
aberentec894a52015-07-09 14:45:531185 "android/java/src/org/chromium/net/HttpNegotiateAuthenticator.java",
xunjieli905496a2015-08-31 15:51:171186 "android/java/src/org/chromium/net/NetStringUtil.java",
[email protected]ef0eb442014-05-15 09:32:181187 "android/java/src/org/chromium/net/NetworkChangeNotifier.java",
1188 "android/java/src/org/chromium/net/ProxyChangeListener.java",
1189 "android/java/src/org/chromium/net/X509Util.java",
1190 ]
1191 jni_package = "net"
1192 }
cjhopmandad5f4272014-09-05 01:00:551193 generate_jni("net_test_jni_headers") {
1194 sources = [
1195 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java",
aberentec894a52015-07-09 14:45:531196 "test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticator.java",
cjhopmandad5f4272014-09-05 01:00:551197 ]
brettwcdccaf02015-07-27 16:27:091198 jni_package = "net/test"
cjhopmandad5f4272014-09-05 01:00:551199 }
[email protected]ef0eb442014-05-15 09:32:181200}
[email protected]8603c5de2014-04-16 20:34:311201
1202if (is_android || is_linux) {
1203 executable("disk_cache_memory_test") {
Brett Wilson8f80ad0b2014-09-08 19:50:241204 testonly = true
scottmg34fb7e52014-12-03 23:27:241205 sources = [
1206 "tools/disk_cache_memory_test/disk_cache_memory_test.cc",
1207 ]
[email protected]8603c5de2014-04-16 20:34:311208 deps = [
1209 ":net",
1210 "//base",
brettwba7a73d2015-08-31 22:17:391211 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311212 ]
1213 }
1214}
[email protected]8a3f8242014-06-05 18:05:121215
rch47ad01f2015-03-20 21:17:231216source_set("simple_quic_tools") {
rcha9d12ce12015-03-19 23:06:491217 sources = [
rtennetid67b3a722015-08-18 05:15:311218 "tools/quic/quic_client_base.cc",
1219 "tools/quic/quic_client_base.h",
rched113b22015-03-26 04:54:051220 "tools/quic/quic_client_session.cc",
1221 "tools/quic/quic_client_session.h",
rchc99f380c2015-03-26 19:50:561222 "tools/quic/quic_dispatcher.cc",
1223 "tools/quic/quic_dispatcher.h",
rch0e945472015-03-26 15:19:211224 "tools/quic/quic_in_memory_cache.cc",
1225 "tools/quic/quic_in_memory_cache.h",
rchc99f380c2015-03-26 19:50:561226 "tools/quic/quic_per_connection_packet_writer.cc",
1227 "tools/quic/quic_per_connection_packet_writer.h",
rch0e945472015-03-26 15:19:211228 "tools/quic/quic_server_session.cc",
1229 "tools/quic/quic_server_session.h",
rcha9d12ce12015-03-19 23:06:491230 "tools/quic/quic_simple_client.cc",
1231 "tools/quic/quic_simple_client.h",
rch216445c2015-03-27 00:23:281232 "tools/quic/quic_simple_per_connection_packet_writer.cc",
1233 "tools/quic/quic_simple_per_connection_packet_writer.h",
1234 "tools/quic/quic_simple_server.cc",
1235 "tools/quic/quic_simple_server.h",
1236 "tools/quic/quic_simple_server_packet_writer.cc",
1237 "tools/quic/quic_simple_server_packet_writer.h",
rched113b22015-03-26 04:54:051238 "tools/quic/quic_spdy_client_stream.cc",
1239 "tools/quic/quic_spdy_client_stream.h",
rch0e945472015-03-26 15:19:211240 "tools/quic/quic_spdy_server_stream.cc",
1241 "tools/quic/quic_spdy_server_stream.h",
1242 "tools/quic/quic_time_wait_list_manager.cc",
1243 "tools/quic/quic_time_wait_list_manager.h",
rchda78df5a2015-03-22 05:16:371244 "tools/quic/synchronous_host_resolver.cc",
1245 "tools/quic/synchronous_host_resolver.h",
rcha9d12ce12015-03-19 23:06:491246 ]
1247 deps = [
1248 ":net",
1249 "//base",
rch47ad01f2015-03-20 21:17:231250 "//base/third_party/dynamic_annotations",
1251 "//url",
1252 ]
1253}
1254
sherouk51b4b098b2015-08-10 09:00:431255if (!is_ios) {
1256 executable("quic_client") {
1257 sources = [
1258 "tools/quic/quic_simple_client_bin.cc",
1259 ]
1260 deps = [
1261 ":net",
1262 ":simple_quic_tools",
1263 "//base",
brettwba7a73d2015-08-31 22:17:391264 "//build/config/sanitizers:deps",
sherouk51b4b098b2015-08-10 09:00:431265 "//url",
1266 ]
1267 }
1268 executable("quic_server") {
1269 sources = [
1270 "tools/quic/quic_simple_server_bin.cc",
1271 ]
1272 deps = [
1273 ":net",
1274 ":simple_quic_tools",
1275 "//base",
brettwba7a73d2015-08-31 22:17:391276 "//build/config/sanitizers:deps",
sherouk51b4b098b2015-08-10 09:00:431277 "//third_party/boringssl",
1278 "//third_party/protobuf:protobuf_lite",
1279 ]
1280 }
rch216445c2015-03-27 00:23:281281}
1282
dpranke64df2832015-07-31 22:33:361283# TODO(GYP): Delete this after we've converted everything to GN.
1284# The _run targets exist only for compatibility w/ GYP.
1285group("net_unittests_run") {
1286 testonly = true
1287 deps = [
1288 ":net_unittests",
1289 ]
1290}
1291
1292test("net_unittests") {
1293 sources = gypi_values.net_test_sources
1294
sherouk51b4b098b2015-08-10 09:00:431295 if (is_ios) {
1296 sources -= [
1297 "websockets/websocket_stream_cookie_test.cc",
1298 "websockets/websocket_stream_create_test_base.cc",
1299 "websockets/websocket_stream_create_test_base.h",
1300 ]
1301 }
1302
dpranke64df2832015-07-31 22:33:361303 configs += [
1304 "//build/config:precompiled_headers",
1305
1306 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1307 "//build/config/compiler:no_size_t_to_int_warning",
1308 ]
1309 defines = []
1310
1311 deps = [
1312 ":balsa",
1313 ":extras",
1314 ":http_server",
1315 ":net",
1316 ":simple_quic_tools",
1317 ":test_support",
1318 "//base",
1319 "//base:i18n",
1320 "//base:prefs_test_support",
1321 "//base/allocator",
1322 "//base/third_party/dynamic_annotations",
1323 "//crypto",
1324 "//crypto:platform",
1325 "//crypto:test_support",
dpranke64df2832015-07-31 22:33:361326 "//net/base/registry_controlled_domains",
1327 "//sql",
1328 "//testing/gmock",
1329 "//testing/gtest",
1330 "//third_party/zlib",
1331 "//url",
1332 ]
1333
1334 data = [
1335 "data/",
1336 ]
1337
1338 if (is_linux || is_mac || is_win) {
1339 deps += [
1340 "//third_party/pyftpdlib/",
1341 "//third_party/pywebsocket/",
1342 "//third_party/tlslite/",
1343 ]
1344 data_deps = [
1345 "//third_party/pyftpdlib/",
1346 "//third_party/pywebsocket/",
1347 "//third_party/tlslite/",
1348 ]
1349 data += [
1350 "tools/testserver/",
1351 "//third_party/pyftpdlib/",
1352 "//third_party/pywebsocket/",
1353 "//third_party/tlslite/",
1354 "$root_out_dir/pyproto/google/",
dprankef497c7962015-07-31 19:46:231355 ]
1356 }
1357
dpranke64df2832015-07-31 22:33:361358 if (is_desktop_linux) {
1359 deps += [ ":epoll_quic_tools" ]
1360 }
1361 if (is_linux) {
1362 sources += gypi_values.net_linux_test_sources
1363 deps += [
1364 ":epoll_quic_tools",
1365 ":epoll_server",
1366 ":flip_in_mem_edsm_server_base",
brettwbc8b2a22015-07-28 18:24:421367 ]
dpranke64df2832015-07-31 22:33:361368 }
[email protected]8a3f8242014-06-05 18:05:121369
dpranke64df2832015-07-31 22:33:361370 if (is_mac || is_ios) {
1371 sources += gypi_values.net_base_test_mac_ios_sources
1372 }
1373
1374 if (is_chromeos) {
1375 sources -= [ "proxy/proxy_config_service_linux_unittest.cc" ]
1376 }
1377
1378 if (v8_use_external_startup_data) {
1379 deps += [ "//gin" ]
1380 }
1381
1382 if (!use_nss_certs) {
1383 sources -= [
1384 "cert/nss_cert_database_unittest.cc",
1385 "ssl/client_cert_store_nss_unittest.cc",
[email protected]8a3f8242014-06-05 18:05:121386 ]
dpranke64df2832015-07-31 22:33:361387 if (is_chromeos) { # Already removed for all non-ChromeOS builds.
davidben2bcbc6b2015-04-22 02:36:411388 sources -= [
dpranke64df2832015-07-31 22:33:361389 "cert/nss_cert_database_chromeos_unittest.cc",
1390 "cert/nss_profile_filter_chromeos_unittest.cc",
davidben2bcbc6b2015-04-22 02:36:411391 ]
brettw43ae0e12015-07-14 22:12:361392 }
[email protected]8a3f8242014-06-05 18:05:121393 }
dpranke64df2832015-07-31 22:33:361394
1395 if (use_openssl) {
1396 # When building for OpenSSL, we need to exclude NSS specific tests
1397 # or functionality not supported by OpenSSL yet.
1398 # TODO(bulach): Add equivalent tests when the underlying
1399 # functionality is ported to OpenSSL.
1400 sources -= [ "quic/test_tools/crypto_test_utils_nss.cc" ]
1401 } else {
1402 sources -= [
1403 "cert/x509_util_openssl_unittest.cc",
1404 "quic/test_tools/crypto_test_utils_openssl.cc",
1405 "socket/ssl_client_socket_openssl_unittest.cc",
1406 "ssl/ssl_client_session_cache_openssl_unittest.cc",
1407 ]
1408 }
1409
1410 if (use_kerberos) {
1411 defines += [ "USE_KERBEROS" ]
1412 }
1413
1414 # These are excluded on Android, because the actual Kerberos support, which
1415 # these test, is in a separate app on Android.
1416 if (!use_kerberos || is_android) {
1417 sources -= [
1418 "http/http_auth_gssapi_posix_unittest.cc",
1419 "http/mock_gssapi_library_posix.cc",
1420 "http/mock_gssapi_library_posix.h",
1421 ]
1422 }
1423 if (!use_kerberos) {
1424 sources -= [ "http/http_auth_handler_negotiate_unittest.cc" ]
1425 }
1426
1427 if (use_openssl || (!is_desktop_linux && !is_chromeos && !is_ios)) {
1428 # Only include this test when on Posix and using NSS for
1429 # cert verification or on iOS (which also uses NSS for certs).
1430 sources -= [ "cert_net/nss_ocsp_unittest.cc" ]
1431 }
1432
1433 if (!use_openssl_certs) {
1434 sources -= [ "ssl/openssl_client_key_store_unittest.cc" ]
1435 }
1436
1437 if (!enable_websockets) {
1438 sources -= [
1439 "server/http_connection_unittest.cc",
1440 "server/http_server_response_info_unittest.cc",
1441 "server/http_server_unittest.cc",
1442 "server/web_socket_encoder_unittest.cc",
1443 "websockets/websocket_basic_stream_test.cc",
1444 "websockets/websocket_channel_test.cc",
1445 "websockets/websocket_deflate_predictor_impl_test.cc",
1446 "websockets/websocket_deflate_stream_test.cc",
1447 "websockets/websocket_deflater_test.cc",
1448 "websockets/websocket_end_to_end_test.cc",
1449 "websockets/websocket_errors_test.cc",
1450 "websockets/websocket_extension_parser_test.cc",
1451 "websockets/websocket_frame_parser_test.cc",
1452 "websockets/websocket_frame_test.cc",
1453 "websockets/websocket_handshake_challenge_test.cc",
1454 "websockets/websocket_handshake_stream_create_helper_test.cc",
1455 "websockets/websocket_inflater_test.cc",
1456 "websockets/websocket_stream_test.cc",
1457 "websockets/websocket_test_util.cc",
1458 "websockets/websocket_test_util.h",
1459 ]
1460 deps -= [ ":http_server" ]
1461 }
1462
1463 if (disable_file_support) {
1464 sources -= [
1465 "base/directory_lister_unittest.cc",
1466 "url_request/url_request_file_job_unittest.cc",
1467 ]
1468 }
1469
1470 if (disable_ftp_support) {
1471 sources -= [
1472 "ftp/ftp_auth_cache_unittest.cc",
1473 "ftp/ftp_ctrl_response_buffer_unittest.cc",
1474 "ftp/ftp_directory_listing_parser_ls_unittest.cc",
dpranke64df2832015-07-31 22:33:361475 "ftp/ftp_directory_listing_parser_unittest.cc",
1476 "ftp/ftp_directory_listing_parser_unittest.h",
1477 "ftp/ftp_directory_listing_parser_vms_unittest.cc",
1478 "ftp/ftp_directory_listing_parser_windows_unittest.cc",
1479 "ftp/ftp_network_transaction_unittest.cc",
1480 "ftp/ftp_util_unittest.cc",
1481 "url_request/url_request_ftp_job_unittest.cc",
1482 ]
1483 }
1484
1485 if (!enable_built_in_dns) {
1486 sources -= [
1487 "dns/address_sorter_posix_unittest.cc",
1488 "dns/address_sorter_unittest.cc",
1489 ]
1490 }
1491
xunjieli905496a2015-08-31 15:51:171492 if (use_v8_in_net) {
dpranke64df2832015-07-31 22:33:361493 deps += [ ":net_with_v8" ]
1494 } else {
1495 sources -= [
1496 "proxy/proxy_resolver_v8_tracing_unittest.cc",
1497 "proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc",
1498 "proxy/proxy_resolver_v8_unittest.cc",
1499 ]
1500 }
1501
1502 if (use_v8_in_net && !is_android) {
1503 deps += [
1504 ":net_browser_services",
1505 ":net_utility_services",
1506 "//mojo/environment:chromium",
1507 "//third_party/mojo/src/mojo/edk/system",
1508 ]
1509 } else {
1510 sources -= [
1511 "dns/host_resolver_mojo_unittest.cc",
1512 "dns/mojo_host_resolver_impl_unittest.cc",
1513 "proxy/mojo_proxy_resolver_factory_impl_unittest.cc",
1514 "proxy/mojo_proxy_resolver_impl_unittest.cc",
1515 "proxy/mojo_proxy_resolver_v8_tracing_bindings_unittest.cc",
1516 "proxy/proxy_resolver_factory_mojo_unittest.cc",
1517 "proxy/proxy_service_mojo_unittest.cc",
1518 ]
1519 }
1520
1521 if (!enable_mdns) {
1522 sources -= [
1523 "dns/mdns_cache_unittest.cc",
1524 "dns/mdns_client_unittest.cc",
1525 "dns/record_parsed_unittest.cc",
1526 "dns/record_rdata_unittest.cc",
1527 ]
1528 }
1529
1530 if (is_ios) {
1531 # TODO(GYP)
1532 # 'actions': [
1533 # {
1534 # 'action_name': 'copy_test_data',
1535 # 'variables': {
1536 # 'test_data_files': [
1537 # 'data/ssl/certificates/',
1538 # 'data/test.html',
1539 # 'data/url_request_unittest/',
mattm057b0152015-08-11 00:26:241540 # 'data/verify_name_match_unittest/names/',
eroman58423c12015-08-14 20:47:361541 # 'data/parse_certificate_unittest/',
dpranke64df2832015-07-31 22:33:361542 # ],
1543 # 'test_data_prefix': 'net',
1544 # },
1545 # 'includes': [ '../build/copy_test_data_ios.gypi' ],
1546 # },
1547 # ],
1548 sources -= [
1549 # TODO(droger): The following tests are disabled because the
1550 # implementation is missing or incomplete.
1551 # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS.
1552 "base/keygen_handler_unittest.cc",
1553 "disk_cache/backend_unittest.cc",
1554 "disk_cache/blockfile/block_files_unittest.cc",
1555
1556 # Need to read input data files.
1557 "filter/gzip_filter_unittest.cc",
1558 "socket/ssl_server_socket_unittest.cc",
1559 "spdy/fuzzing/hpack_fuzz_util_test.cc",
1560
1561 # Need TestServer.
1562 "cert_net/cert_net_fetcher_impl_unittest.cc",
1563 "proxy/proxy_script_fetcher_impl_unittest.cc",
1564 "socket/ssl_client_socket_unittest.cc",
1565 "url_request/url_fetcher_impl_unittest.cc",
1566 "url_request/url_request_context_builder_unittest.cc",
1567
1568 # Needs GetAppOutput().
1569 "test/python_utils_unittest.cc",
1570
1571 # The following tests are disabled because they don't apply to
1572 # iOS.
1573 # OS is not "linux" or "freebsd" or "openbsd".
1574 "socket/unix_domain_client_socket_posix_unittest.cc",
1575 "socket/unix_domain_server_socket_posix_unittest.cc",
1576
1577 # See bug http://crbug.com/344533.
1578 "disk_cache/blockfile/index_table_v3_unittest.cc",
1579 ]
1580 }
1581
1582 if (is_android) {
1583 sources -= [
1584 # See bug http://crbug.com/344533.
1585 "disk_cache/blockfile/index_table_v3_unittest.cc",
1586 "dns/dns_config_service_posix_unittest.cc",
1587 ]
1588 deps += [
1589 ":net_test_jni_headers",
1590
1591 # TODO(mmenke): This depends on test_support_base, which depends on
1592 # icu. Figure out a way to remove that dependency.
1593 "//testing/android/native_test:native_test_native_code",
1594 ]
1595 set_sources_assignment_filter([])
1596 sources += [ "base/address_tracker_linux_unittest.cc" ]
1597 set_sources_assignment_filter(sources_assignment_filter)
1598 isolate_file = "net_unittests.isolate"
1599 }
1600
dpranke64df2832015-07-31 22:33:361601 # Symbols for crashes when running tests on swarming.
1602 if (symbol_level > 0) {
1603 if (is_win) {
1604 data += [ "$root_out_dir/net_unittests.exe.pdb" ]
1605 } else if (is_mac) {
1606 data += [ "$root_out_dir/net_unittests.dSYM/" ]
1607 }
1608 }
1609}
1610
1611# !is_android && !is_win && !is_mac
[email protected]8a3f8242014-06-05 18:05:121612
rockot9c67e5f2015-03-12 20:01:211613executable("net_perftests") {
1614 testonly = true
1615 sources = [
ricea10eb9f5e2015-05-19 18:51:571616 "base/mime_sniffer_perftest.cc",
rockot9c67e5f2015-03-12 20:01:211617 "cookies/cookie_monster_perftest.cc",
1618 "disk_cache/blockfile/disk_cache_perftest.cc",
rohitrao1860223c2015-05-16 01:07:141619 "extras/sqlite/sqlite_persistent_cookie_store_perftest.cc",
rockot9c67e5f2015-03-12 20:01:211620 "proxy/proxy_resolver_perftest.cc",
1621 "udp/udp_socket_perftest.cc",
1622 ]
1623
1624 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1625 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
1626 deps = [
brettwcdccaf02015-07-27 16:27:091627 ":extras",
1628 ":net",
1629 ":test_support",
rockot9c67e5f2015-03-12 20:01:211630 "//base",
1631 "//base:i18n",
1632 "//base/test:test_support_perf",
brettwba7a73d2015-08-31 22:17:391633 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:211634 "//testing/gtest",
1635 "//url",
rockot9c67e5f2015-03-12 20:01:211636 ]
1637
1638 if (enable_websockets) {
1639 sources += [ "websockets/websocket_frame_perftest.cc" ]
1640 }
1641
1642 if (use_v8_in_net) {
1643 deps += [ ":net_with_v8" ]
1644 } else {
1645 sources -= [ "proxy/proxy_resolver_perftest.cc" ]
1646 }
rockot9c67e5f2015-03-12 20:01:211647}