blob: d355d46c70b9724e65a2d0eda653905d8f4886cb [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
agrievea5517aa2015-10-23 03:03:4529# Disable Kerberos on ChromeOS, iOS, and Chromecast, at least for now.
slan77bdc2e62015-09-21 17:56:2630# It needs configuration (krb5.conf and so on).
agrievea5517aa2015-10-23 03:03:4531use_kerberos = !is_chromeos && !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",
agrievea5517aa2015-10-23 03:03:45239 "http/http_auth_gssapi_posix.cc",
240 "http/http_auth_gssapi_posix.h",
sergeyu99d83f92015-09-14 23:03:33241 ]
242 }
[email protected]4625ade2014-04-15 19:26:44243 }
sergeyu99d83f92015-09-14 23:03:33244
mostynbbf5e6cc2015-10-21 07:53:31245 if (use_glib && use_gconf && !is_chromeos) {
sergeyu99d83f92015-09-14 23:03:33246 net_shared_configs += [ "//build/config/linux:gconf" ]
247 net_shared_deps += [ "//build/linux:gio" ]
248 }
249
250 if (is_linux) {
251 net_shared_configs += [ "//build/config/linux:libresolv" ]
252 }
253
254 if (!use_nss_certs) {
255 net_shared_sources -= [
256 "base/crypto_module_nss.cc",
257 "base/keygen_handler_nss.cc",
258 "cert/cert_database_nss.cc",
259 "cert/nss_cert_database.cc",
260 "cert/nss_cert_database.h",
261 "cert/x509_certificate_nss.cc",
262 "ssl/client_cert_store_nss.cc",
263 "ssl/client_cert_store_nss.h",
264 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
265 "third_party/mozilla_security_manager/nsKeygenHandler.h",
266 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
267 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
268 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
269 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
270 ]
271 if (!is_ios) {
272 # These files are part of the partial implementation of NSS on iOS so
273 # keep them in that case (even though use_nss_certs is not set).
274 net_shared_sources -= [
275 "cert/cert_verify_proc_nss.cc",
276 "cert/cert_verify_proc_nss.h",
277 "cert/test_root_certs_nss.cc",
278 "cert/x509_util_nss_certs.cc",
279 "cert_net/nss_ocsp.cc",
280 "cert_net/nss_ocsp.h",
281 ]
282 }
283 if (is_chromeos) {
284 # These were already removed on non-ChromeOS.
285 net_shared_sources -= [
286 "cert/nss_cert_database_chromeos.cc",
287 "cert/nss_cert_database_chromeos.h",
288 "cert/nss_profile_filter_chromeos.cc",
289 "cert/nss_profile_filter_chromeos.h",
290 ]
291 }
xunjieli905496a2015-08-31 15:51:17292 net_shared_sources -= [
pneubeckabe6e9d12015-08-26 08:47:11293 "ssl/client_key_store.cc",
294 "ssl/client_key_store.h",
295 "ssl/ssl_platform_key_nss.cc",
296 ]
sergeyu99d83f92015-09-14 23:03:33297 } else if (use_openssl) {
298 # client_cert_store_nss.c requires NSS_CmpCertChainWCANames from NSS's
299 # libssl, but our bundled copy is not built in OpenSSL ports. Pull that file
300 # in directly.
301 net_shared_sources += [ "third_party/nss/ssl/cmpcert.c" ]
[email protected]4625ade2014-04-15 19:26:44302 }
303
sergeyu99d83f92015-09-14 23:03:33304 if (!enable_mdns) {
305 net_shared_sources -= [
306 "dns/mdns_cache.cc",
307 "dns/mdns_cache.h",
308 "dns/mdns_client.cc",
309 "dns/mdns_client.h",
310 "dns/mdns_client_impl.cc",
311 "dns/mdns_client_impl.h",
312 "dns/record_parsed.cc",
313 "dns/record_parsed.h",
314 "dns/record_rdata.cc",
315 "dns/record_rdata.h",
316 ]
317 }
318
319 if (is_win) {
320 net_shared_sources -= [ "http/http_auth_handler_ntlm_portable.cc" ]
321 } else { # !is_win
322 net_shared_sources -= [
323 "base/winsock_init.cc",
324 "base/winsock_init.h",
325 "base/winsock_util.cc",
326 "base/winsock_util.h",
327 "proxy/proxy_resolver_winhttp.cc",
328 "proxy/proxy_resolver_winhttp.h",
329 ]
330 }
331
332 if (is_ios) {
333 # Add back some sources that were otherwise filtered out. iOS needs some Mac
334 # files.
335 net_shared_unfiltered_sources += [
336 "base/mac/url_conversions.h",
337 "base/mac/url_conversions.mm",
338 "base/network_change_notifier_mac.cc",
339 "base/network_config_watcher_mac.cc",
340 "base/network_interfaces_mac.cc",
341 "base/network_interfaces_mac.h",
342 "base/platform_mime_util_mac.mm",
343 "proxy/proxy_resolver_mac.cc",
344 "proxy/proxy_server_mac.cc",
345 ]
346
347 net_shared_sources -= [ "disk_cache/blockfile/file_posix.cc" ]
348 net_shared_deps += [
349 "//third_party/nss:nspr",
350 "//third_party/nss",
351 "//net/third_party/nss/ssl:libssl",
352 ]
353 }
354
355 if (is_ios || is_mac) {
356 net_shared_sources += gypi_values.net_base_mac_ios_sources
357 }
358
xunjieli905496a2015-08-31 15:51:17359 if (is_android) {
sergeyu99d83f92015-09-14 23:03:33360 net_shared_deps += [ ":net_jni_headers" ]
361
362 # Add some Linux sources that were excluded by the filter, but which
363 # are needed.
364 net_shared_unfiltered_sources += [
365 "base/address_tracker_linux.cc",
366 "base/address_tracker_linux.h",
367 "base/network_interfaces_linux.cc",
368 "base/network_interfaces_linux.h",
369 "base/platform_mime_util_linux.cc",
370 ]
xunjieli905496a2015-08-31 15:51:17371 }
372} else {
sergeyu99d83f92015-09-14 23:03:33373 net_shared_public_deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
xunjieli905496a2015-08-31 15:51:17374}
375
376component("net") {
377 sources = net_shared_sources
378
379 # Add back some sources that were otherwise filtered out.
380 set_sources_assignment_filter([])
381 sources += net_shared_unfiltered_sources
382 set_sources_assignment_filter(sources_assignment_filter)
383
384 cflags = []
385 configs += net_shared_configs
386 public_configs = [ ":net_config" ]
387
388 public_deps = net_shared_public_deps + [ "//url" ]
389 deps = net_shared_deps
[email protected]4625ade2014-04-15 19:26:44390
391 if (is_mac) {
[email protected]4625ade2014-04-15 19:26:44392 libs = [
[email protected]ab9ce6e2014-04-17 20:33:19393 "Foundation.framework",
394 "Security.framework",
395 "SystemConfiguration.framework",
396 "resolv",
[email protected]4625ade2014-04-15 19:26:44397 ]
398 }
399
400 if (is_ios) {
[email protected]4625ade2014-04-15 19:26:44401 libs = [
[email protected]ab9ce6e2014-04-17 20:33:19402 "CFNetwork.framework",
403 "MobileCoreServices.framework",
404 "Security.framework",
405 "SystemConfiguration.framework",
406 "resolv",
[email protected]4625ade2014-04-15 19:26:44407 ]
xunjieli06d93982015-08-27 17:13:02408 }
xunjieli4c8c6922015-08-27 16:02:40409
sergeyu99d83f92015-09-14 23:03:33410 if (!is_nacl) {
411 if (!disable_file_support) {
412 sources += gypi_values.net_file_support_sources
413 }
xunjieli06d93982015-08-27 17:13:02414
sergeyu99d83f92015-09-14 23:03:33415 if (!disable_ftp_support) {
416 sources += gypi_values.net_ftp_support_sources
417 }
xunjieli905496a2015-08-31 15:51:17418
sergeyu99d83f92015-09-14 23:03:33419 if (enable_websockets) {
420 sources += gypi_values.net_websockets_sources
421 }
xunjieli905496a2015-08-31 15:51:17422
sergeyu99d83f92015-09-14 23:03:33423 # ICU support.
424 deps += [
425 "//base:i18n",
426 "//third_party/icu",
427 ]
428 sources += [
429 "base/filename_util_icu.cc",
430 "base/net_string_util_icu.cc",
431 "base/net_util_icu.cc",
432 ]
433 }
xunjieli905496a2015-08-31 15:51:17434}
435
436if (is_android) {
437 # Same as net, but with ICU, file, ftp, and websocket support stripped.
438 component("net_small") {
439 sources = net_shared_sources
440
441 # Add back some sources that were otherwise filtered out.
xunjieli06d93982015-08-27 17:13:02442 set_sources_assignment_filter([])
xunjieli905496a2015-08-31 15:51:17443 sources += net_shared_unfiltered_sources
xunjieli06d93982015-08-27 17:13:02444 set_sources_assignment_filter(sources_assignment_filter)
xunjieli06d93982015-08-27 17:13:02445
xunjieli905496a2015-08-31 15:51:17446 cflags = []
447 defines = []
448 configs += net_shared_configs
449 public_configs = [ ":net_config" ]
450
451 public_deps = net_shared_public_deps +
452 [ "//url:url_lib_use_icu_alternatives_on_android" ]
453 deps = net_shared_deps + [ ":net_jni_headers" ]
454
455 defines += [
456 "DISABLE_FILE_SUPPORT",
457 "DISABLE_FTP_SUPPORT",
458 "USE_ICU_ALTERNATIVES_ON_ANDROID=1",
459 ]
460
461 # Use ICU alternative on Android.
[email protected]85191ed2014-05-15 00:41:49462 sources += [
463 "base/net_string_util_icu_alternatives_android.cc",
464 "base/net_string_util_icu_alternatives_android.h",
465 ]
466 }
[email protected]4625ade2014-04-15 19:26:44467}
468
469grit("net_resources") {
470 source = "base/net_resources.grd"
[email protected]7ae52902014-08-18 22:36:01471 use_qualified_include = true
[email protected]b89c53842014-07-23 16:32:32472 outputs = [
473 "grit/net_resources.h",
474 "net_resources.pak",
[email protected]b89c53842014-07-23 16:32:32475 ]
[email protected]4625ade2014-04-15 19:26:44476}
477
rtennetib6f1c0d2015-04-03 17:52:06478proto_library("net_quic_proto") {
xunjieli905496a2015-08-31 15:51:17479 visibility = [
480 ":net",
481 ":net_small",
482 ]
brettw2e7db0a2015-04-24 22:59:17483
rtennetib6f1c0d2015-04-03 17:52:06484 sources = [
485 "quic/proto/cached_network_parameters.proto",
486 "quic/proto/source_address_token.proto",
487 ]
488 cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:"
489 cc_include = "net/base/net_export.h"
490
491 defines = [ "NET_IMPLEMENTATION" ]
492
493 extra_configs = [ "//build/config/compiler:wexit_time_destructors" ]
494}
495
Brett Wilson83fd4242014-09-02 19:45:33496static_library("extras") {
mef327a8e42014-08-29 17:10:03497 sources = gypi_values.net_extras_sources
498 configs += [ "//build/config/compiler:wexit_time_destructors" ]
499 deps = [
500 ":net",
brettwbc44c0a92015-02-20 22:30:39501 "//base",
mef327a8e42014-08-29 17:10:03502 "//sql:sql",
503 ]
504}
505
[email protected]8a3f8242014-06-05 18:05:12506static_library("http_server") {
[email protected]4625ade2014-04-15 19:26:44507 sources = [
508 "server/http_connection.cc",
509 "server/http_connection.h",
510 "server/http_server.cc",
511 "server/http_server.h",
512 "server/http_server_request_info.cc",
513 "server/http_server_request_info.h",
514 "server/http_server_response_info.cc",
515 "server/http_server_response_info.h",
516 "server/web_socket.cc",
517 "server/web_socket.h",
dgozmana6e70092014-12-12 14:46:21518 "server/web_socket_encoder.cc",
519 "server/web_socket_encoder.h",
[email protected]4625ade2014-04-15 19:26:44520 ]
jambc6cc8e2014-11-14 17:56:29521 configs += [
brettwd1c719a2015-02-19 23:17:04522 "//build/config/compiler:no_size_t_to_int_warning",
jambc6cc8e2014-11-14 17:56:29523 "//build/config/compiler:wexit_time_destructors",
jambc6cc8e2014-11-14 17:56:29524 ]
[email protected]4625ade2014-04-15 19:26:44525 deps = [
526 ":net",
527 "//base",
528 ]
529}
530
[email protected]8603c5de2014-04-16 20:34:31531executable("dump_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24532 testonly = true
[email protected]8603c5de2014-04-16 20:34:31533 sources = [
[email protected]8603c5de2014-04-16 20:34:31534 "tools/dump_cache/dump_cache.cc",
535 "tools/dump_cache/dump_files.cc",
536 "tools/dump_cache/dump_files.h",
[email protected]8603c5de2014-04-16 20:34:31537 ]
[email protected]4625ade2014-04-15 19:26:44538
brettwd1c719a2015-02-19 23:17:04539 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
540 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31541
542 deps = [
[email protected]8603c5de2014-04-16 20:34:31543 ":net",
[email protected]b2b2bf52014-05-28 20:26:57544 ":test_support",
brettwba7a73d2015-08-31 22:17:39545 "//base",
546 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31547 ]
548}
549
[email protected]b2b2bf52014-05-28 20:26:57550source_set("test_support") {
Brett Wilson8f80ad0b2014-09-08 19:50:24551 testonly = true
[email protected]8603c5de2014-04-16 20:34:31552 sources = [
[email protected]8603c5de2014-04-16 20:34:31553 "base/load_timing_info_test_util.cc",
554 "base/load_timing_info_test_util.h",
555 "base/mock_file_stream.cc",
556 "base/mock_file_stream.h",
557 "base/test_completion_callback.cc",
558 "base/test_completion_callback.h",
559 "base/test_data_directory.cc",
560 "base/test_data_directory.h",
561 "cert/mock_cert_verifier.cc",
562 "cert/mock_cert_verifier.h",
563 "cookies/cookie_monster_store_test.cc",
564 "cookies/cookie_monster_store_test.h",
565 "cookies/cookie_store_test_callbacks.cc",
566 "cookies/cookie_store_test_callbacks.h",
567 "cookies/cookie_store_test_helpers.cc",
568 "cookies/cookie_store_test_helpers.h",
569 "disk_cache/disk_cache_test_base.cc",
570 "disk_cache/disk_cache_test_base.h",
571 "disk_cache/disk_cache_test_util.cc",
572 "disk_cache/disk_cache_test_util.h",
573 "dns/dns_test_util.cc",
574 "dns/dns_test_util.h",
575 "dns/mock_host_resolver.cc",
576 "dns/mock_host_resolver.h",
577 "dns/mock_mdns_socket_factory.cc",
578 "dns/mock_mdns_socket_factory.h",
[email protected]8a3f8242014-06-05 18:05:12579 "http/http_transaction_test_util.cc",
580 "http/http_transaction_test_util.h",
vishal.b62985ca92015-04-17 08:45:51581 "log/test_net_log.cc",
582 "log/test_net_log.h",
mmenke43758e62015-05-04 21:09:46583 "log/test_net_log_entry.cc",
584 "log/test_net_log_entry.h",
mmenke0034c542015-05-05 22:34:59585 "log/test_net_log_util.cc",
mmenke43758e62015-05-04 21:09:46586 "log/test_net_log_util.h",
[email protected]8603c5de2014-04-16 20:34:31587 "proxy/mock_proxy_resolver.cc",
588 "proxy/mock_proxy_resolver.h",
589 "proxy/mock_proxy_script_fetcher.cc",
590 "proxy/mock_proxy_script_fetcher.h",
591 "proxy/proxy_config_service_common_unittest.cc",
592 "proxy/proxy_config_service_common_unittest.h",
593 "socket/socket_test_util.cc",
594 "socket/socket_test_util.h",
595 "test/cert_test_util.cc",
596 "test/cert_test_util.h",
[email protected]83e1ae32014-07-18 10:57:07597 "test/cert_test_util_nss.cc",
nharper2e171cf2015-06-01 20:29:23598 "test/channel_id_test_util.cc",
599 "test/channel_id_test_util.h",
[email protected]8603c5de2014-04-16 20:34:31600 "test/ct_test_util.cc",
601 "test/ct_test_util.h",
602 "test/embedded_test_server/embedded_test_server.cc",
603 "test/embedded_test_server/embedded_test_server.h",
604 "test/embedded_test_server/http_connection.cc",
605 "test/embedded_test_server/http_connection.h",
606 "test/embedded_test_server/http_request.cc",
607 "test/embedded_test_server/http_request.h",
608 "test/embedded_test_server/http_response.cc",
609 "test/embedded_test_server/http_response.h",
svaldez6e7e82a22015-10-28 19:39:53610 "test/embedded_test_server/request_handler_util.cc",
611 "test/embedded_test_server/request_handler_util.h",
sammc6ac3fe52015-02-25 06:00:28612 "test/event_waiter.h",
[email protected]8603c5de2014-04-16 20:34:31613 "test/net_test_suite.cc",
614 "test/net_test_suite.h",
615 "test/python_utils.cc",
616 "test/python_utils.h",
sherouk51b4b098b2015-08-10 09:00:43617 "test/url_request/ssl_certificate_error_job.cc",
618 "test/url_request/ssl_certificate_error_job.h",
Brett Wilson32ce17a2014-11-10 17:45:30619 "test/url_request/url_request_failed_job.cc",
620 "test/url_request/url_request_failed_job.h",
mef3e826cf2014-12-13 18:40:40621 "test/url_request/url_request_mock_data_job.cc",
622 "test/url_request/url_request_mock_data_job.h",
jam8e45cd72015-01-20 16:33:44623 "test/url_request/url_request_slow_download_job.cc",
624 "test/url_request/url_request_slow_download_job.h",
[email protected]8603c5de2014-04-16 20:34:31625 "url_request/test_url_fetcher_factory.cc",
626 "url_request/test_url_fetcher_factory.h",
627 "url_request/url_request_test_util.cc",
628 "url_request/url_request_test_util.h",
629 ]
sherouk3eee4a82015-09-01 10:42:33630 if (!is_ios) {
631 sources += [
632 "test/spawned_test_server/base_test_server.cc",
633 "test/spawned_test_server/base_test_server.h",
634 "test/spawned_test_server/local_test_server.cc",
635 "test/spawned_test_server/local_test_server.h",
636 "test/spawned_test_server/local_test_server_posix.cc",
637 "test/spawned_test_server/local_test_server_win.cc",
638 "test/spawned_test_server/spawned_test_server.h",
639 ]
640 }
[email protected]8603c5de2014-04-16 20:34:31641
brettwbc8b2a22015-07-28 18:24:42642 configs += [
643 "//build/config:precompiled_headers",
644
645 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
646 "//build/config/compiler:no_size_t_to_int_warning",
647 ]
[email protected]8603c5de2014-04-16 20:34:31648
Brett Wilsone53895272014-09-23 23:41:46649 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31650 "//base",
651 "//base/test:test_support",
[email protected]22fe91d2014-08-12 17:07:12652 "//crypto",
[email protected]59ff2d42014-04-22 22:25:23653 "//net",
[email protected]8603c5de2014-04-16 20:34:31654 "//net/tools/tld_cleanup",
655 "//testing/gmock",
656 "//testing/gtest",
657 "//url",
658 ]
659
jamb533b7e2015-03-04 17:12:05660 if (!is_ios) {
661 public_deps += [ "//third_party/protobuf:py_proto" ]
662 }
663
davidben4a644b02015-07-01 19:34:55664 if (use_nss_certs || is_ios) {
scottmg34fb7e52014-12-03 23:27:24665 public_deps += [ "//crypto:platform" ]
[email protected]8603c5de2014-04-16 20:34:31666 }
667
sherouk3eee4a82015-09-01 10:42:33668 if (is_android) {
669 sources += [
[email protected]8603c5de2014-04-16 20:34:31670 "test/spawned_test_server/remote_test_server.cc",
671 "test/spawned_test_server/remote_test_server.h",
672 "test/spawned_test_server/spawner_communicator.cc",
673 "test/spawned_test_server/spawner_communicator.h",
674 ]
675 }
676
677 if (use_v8_in_net) {
Brett Wilsone53895272014-09-23 23:41:46678 public_deps += [ ":net_with_v8" ]
[email protected]8603c5de2014-04-16 20:34:31679 }
680
681 if (!enable_mdns) {
682 sources -= [
683 "dns/mock_mdns_socket_factory.cc",
684 "dns/mock_mdns_socket_factory.h",
685 ]
686 }
687
davidben15d69d482014-09-29 18:24:08688 if (!use_nss_certs) {
scottmg34fb7e52014-12-03 23:27:24689 sources -= [ "test/cert_test_util_nss.cc" ]
[email protected]83e1ae32014-07-18 10:57:07690 }
xunjielia6888202015-04-14 21:34:25691
692 if (!disable_file_support) {
693 sources += [
694 "test/url_request/url_request_mock_http_job.cc",
695 "test/url_request/url_request_mock_http_job.h",
696 "url_request/test_url_request_interceptor.cc",
697 "url_request/test_url_request_interceptor.h",
698 ]
699 }
[email protected]8603c5de2014-04-16 20:34:31700}
701
[email protected]ceeaac792014-06-25 05:14:43702source_set("balsa") {
703 sources = [
704 "tools/balsa/balsa_enums.h",
705 "tools/balsa/balsa_frame.cc",
706 "tools/balsa/balsa_frame.h",
707 "tools/balsa/balsa_headers.cc",
708 "tools/balsa/balsa_headers.h",
709 "tools/balsa/balsa_headers_token_utils.cc",
710 "tools/balsa/balsa_headers_token_utils.h",
711 "tools/balsa/balsa_visitor_interface.h",
712 "tools/balsa/http_message_constants.cc",
713 "tools/balsa/http_message_constants.h",
714 "tools/balsa/noop_balsa_visitor.h",
715 "tools/balsa/simple_buffer.cc",
716 "tools/balsa/simple_buffer.h",
717 "tools/balsa/split.cc",
718 "tools/balsa/split.h",
719 "tools/balsa/string_piece_utils.h",
rtennetie0ee6eb2015-05-01 00:55:09720 "tools/quic/spdy_balsa_utils.cc",
721 "tools/quic/spdy_balsa_utils.h",
[email protected]ceeaac792014-06-25 05:14:43722 ]
723 deps = [
724 ":net",
725 "//base",
[email protected]22fe91d2014-08-12 17:07:12726 "//url",
[email protected]ceeaac792014-06-25 05:14:43727 ]
728}
729
[email protected]8603c5de2014-04-16 20:34:31730if (use_v8_in_net) {
731 component("net_with_v8") {
732 sources = [
733 "proxy/proxy_resolver_v8.cc",
734 "proxy/proxy_resolver_v8.h",
735 "proxy/proxy_resolver_v8_tracing.cc",
736 "proxy/proxy_resolver_v8_tracing.h",
sammcf2d1ea02015-06-29 02:58:47737 "proxy/proxy_resolver_v8_tracing_wrapper.cc",
738 "proxy/proxy_resolver_v8_tracing_wrapper.h",
[email protected]8603c5de2014-04-16 20:34:31739 "proxy/proxy_service_v8.cc",
740 "proxy/proxy_service_v8.h",
741 ]
742
743 defines = [ "NET_IMPLEMENTATION" ]
dprankea22b0732015-10-21 21:15:11744
[email protected]8603c5de2014-04-16 20:34:31745 configs += [
brettwd1c719a2015-02-19 23:17:04746 "//build/config/compiler:no_size_t_to_int_warning",
[email protected]8603c5de2014-04-16 20:34:31747 "//build/config/compiler:wexit_time_destructors",
dprankea22b0732015-10-21 21:15:11748 "//v8:external_startup_data",
[email protected]8603c5de2014-04-16 20:34:31749 ]
750
Brett Wilsone53895272014-09-23 23:41:46751 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31752 ":net",
Brett Wilsone53895272014-09-23 23:41:46753 ]
754 deps = [
[email protected]8603c5de2014-04-16 20:34:31755 "//base",
756 "//gin",
757 "//url",
758 "//v8",
759 ]
760 }
761}
762
amistry7e6ebfdc82015-02-13 04:19:11763if (use_v8_in_net && !is_android) {
764 source_set("net_browser_services") {
765 sources = [
766 "dns/mojo_host_resolver_impl.cc",
767 "dns/mojo_host_resolver_impl.h",
amistry6e1ed1b2015-03-12 05:24:01768 "proxy/in_process_mojo_proxy_resolver_factory.cc",
769 "proxy/in_process_mojo_proxy_resolver_factory.h",
sammc1d5df4d2015-05-05 05:06:17770 "proxy/mojo_proxy_resolver_factory.h",
eromandcacef22015-06-01 19:36:35771 "proxy/proxy_resolver_factory_mojo.cc",
772 "proxy/proxy_resolver_factory_mojo.h",
amistry6e1ed1b2015-03-12 05:24:01773 "proxy/proxy_service_mojo.cc",
774 "proxy/proxy_service_mojo.h",
amistry7e6ebfdc82015-02-13 04:19:11775 ]
776
777 public_deps = [
778 ":mojo_type_converters",
779 ":net",
brettwbc44c0a92015-02-20 22:30:39780 "//base",
amistry07ff1402015-03-10 07:34:07781 "//mojo/common",
amistry7e6ebfdc82015-02-13 04:19:11782 "//net/interfaces",
783 "//third_party/mojo/src/mojo/public/cpp/bindings",
amistry6e1ed1b2015-03-12 05:24:01784
785 # NOTE(amistry): As long as we support in-process Mojo v8 PAC, we need
786 # this dependency since in_process_mojo_proxy_resolver_factory creates
787 # the utility process side Mojo services in the browser process.
788 # Ultimately, this will go away when we only support out-of-process.
789 ":net_utility_services",
amistry7e6ebfdc82015-02-13 04:19:11790 ]
791 }
792
793 source_set("mojo_type_converters") {
794 sources = [
amistry7ec58112015-02-26 06:03:00795 "dns/mojo_host_type_converters.cc",
796 "dns/mojo_host_type_converters.h",
797 "proxy/mojo_proxy_type_converters.cc",
798 "proxy/mojo_proxy_type_converters.h",
amistry7e6ebfdc82015-02-13 04:19:11799 ]
800
801 public_deps = [
802 ":net",
803 "//net/interfaces",
804 "//third_party/mojo/src/mojo/public/cpp/bindings",
805 ]
806 }
sammc5403aa1d2015-02-25 04:59:21807
808 source_set("net_utility_services") {
809 sources = [
sammc6ac3fe52015-02-25 06:00:28810 "dns/host_resolver_mojo.cc",
811 "dns/host_resolver_mojo.h",
sammc352f7492015-02-25 09:45:24812 "proxy/mojo_proxy_resolver_factory_impl.cc",
813 "proxy/mojo_proxy_resolver_factory_impl.h",
sammc5403aa1d2015-02-25 04:59:21814 "proxy/mojo_proxy_resolver_impl.cc",
815 "proxy/mojo_proxy_resolver_impl.h",
sammca3242c92015-07-10 02:38:51816 "proxy/mojo_proxy_resolver_v8_tracing_bindings.h",
sammc5403aa1d2015-02-25 04:59:21817 ]
818
rockot9509ec82015-04-14 02:50:56819 deps = [
820 ":net_with_v8",
821 ]
822
sammc5403aa1d2015-02-25 04:59:21823 public_deps = [
824 ":mojo_type_converters",
825 ":net",
826 "//mojo/common",
827 "//net/interfaces",
828 "//third_party/mojo/src/mojo/public/cpp/bindings",
829 ]
830 }
amistry7e6ebfdc82015-02-13 04:19:11831}
832
[email protected]8603c5de2014-04-16 20:34:31833if (!is_ios && !is_android) {
834 executable("crash_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24835 testonly = true
scottmg34fb7e52014-12-03 23:27:24836 sources = [
837 "tools/crash_cache/crash_cache.cc",
838 ]
dpranke43276212015-02-20 02:55:19839
brettwd1c719a2015-02-19 23:17:04840 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
841 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31842 deps = [
843 ":net",
[email protected]b2b2bf52014-05-28 20:26:57844 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31845 "//base",
brettwba7a73d2015-08-31 22:17:39846 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31847 ]
848 }
849
850 executable("crl_set_dump") {
Brett Wilson8f80ad0b2014-09-08 19:50:24851 testonly = true
scottmg34fb7e52014-12-03 23:27:24852 sources = [
853 "tools/crl_set_dump/crl_set_dump.cc",
854 ]
dpranke43276212015-02-20 02:55:19855
brettwd1c719a2015-02-19 23:17:04856 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
857 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31858 deps = [
859 ":net",
860 "//base",
brettwba7a73d2015-08-31 22:17:39861 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31862 ]
863 }
864
865 executable("dns_fuzz_stub") {
Brett Wilson8f80ad0b2014-09-08 19:50:24866 testonly = true
scottmg34fb7e52014-12-03 23:27:24867 sources = [
868 "tools/dns_fuzz_stub/dns_fuzz_stub.cc",
869 ]
dpranke43276212015-02-20 02:55:19870
brettwd1c719a2015-02-19 23:17:04871 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
872 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31873 deps = [
874 ":net",
875 "//base",
brettwba7a73d2015-08-31 22:17:39876 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31877 ]
878 }
879
880 executable("gdig") {
Brett Wilson8f80ad0b2014-09-08 19:50:24881 testonly = true
[email protected]8603c5de2014-04-16 20:34:31882 sources = [
883 "tools/gdig/file_net_log.cc",
884 "tools/gdig/gdig.cc",
885 ]
886 deps = [
887 ":net",
888 "//base",
brettwba7a73d2015-08-31 22:17:39889 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31890 ]
891 }
892
893 executable("get_server_time") {
Brett Wilson8f80ad0b2014-09-08 19:50:24894 testonly = true
scottmg34fb7e52014-12-03 23:27:24895 sources = [
896 "tools/get_server_time/get_server_time.cc",
897 ]
dpranke43276212015-02-20 02:55:19898
brettwd1c719a2015-02-19 23:17:04899 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
900 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31901 deps = [
902 ":net",
903 "//base",
904 "//base:i18n",
brettwba7a73d2015-08-31 22:17:39905 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31906 "//url",
907 ]
908 }
909
rockot9c67e5f2015-03-12 20:01:21910 executable("hpack_example_generator") {
911 testonly = true
912 sources = [
913 "spdy/fuzzing/hpack_example_generator.cc",
914 ]
915
916 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
917 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
918 deps = [
rockot9c67e5f2015-03-12 20:01:21919 ":net",
brettwba7a73d2015-08-31 22:17:39920 "//base",
921 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:21922 ]
923 }
924
925 executable("hpack_fuzz_mutator") {
926 testonly = true
927 sources = [
928 "spdy/fuzzing/hpack_fuzz_mutator.cc",
929 ]
930
931 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
932 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
933 deps = [
rockot9c67e5f2015-03-12 20:01:21934 ":net",
brettwba7a73d2015-08-31 22:17:39935 "//base",
936 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:21937 ]
938 }
939
940 executable("hpack_fuzz_wrapper") {
941 testonly = true
942 sources = [
943 "spdy/fuzzing/hpack_fuzz_wrapper.cc",
944 ]
945
946 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
947 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
948 deps = [
rockot9c67e5f2015-03-12 20:01:21949 ":net",
brettwba7a73d2015-08-31 22:17:39950 "//base",
951 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:21952 ]
953 }
954
[email protected]8603c5de2014-04-16 20:34:31955 if (use_v8_in_net) {
956 executable("net_watcher") {
Brett Wilson8f80ad0b2014-09-08 19:50:24957 testonly = true
scottmg34fb7e52014-12-03 23:27:24958 sources = [
959 "tools/net_watcher/net_watcher.cc",
960 ]
[email protected]8603c5de2014-04-16 20:34:31961 deps = [
962 ":net",
963 ":net_with_v8",
964 "//base",
brettwba7a73d2015-08-31 22:17:39965 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31966 ]
967
mostynbbf5e6cc2015-10-21 07:53:31968 if (is_desktop_linux && use_gconf && use_glib) {
xunjieli905496a2015-08-31 15:51:17969 configs += [
970 "//build/config/linux:gconf",
971 "//build/config/linux:glib",
972 ]
dprankead0c1f42015-08-28 21:48:04973 deps += [ "//build/linux:gio" ]
[email protected]8603c5de2014-04-16 20:34:31974 }
975 }
976 }
977
978 executable("run_testserver") {
Brett Wilson8f80ad0b2014-09-08 19:50:24979 testonly = true
scottmg34fb7e52014-12-03 23:27:24980 sources = [
981 "tools/testserver/run_testserver.cc",
982 ]
[email protected]8603c5de2014-04-16 20:34:31983 deps = [
[email protected]b2b2bf52014-05-28 20:26:57984 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31985 "//base",
986 "//base/test:test_support",
brettwba7a73d2015-08-31 22:17:39987 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31988 "//testing/gtest",
989 ]
990 }
991
992 executable("stress_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24993 testonly = true
scottmg34fb7e52014-12-03 23:27:24994 sources = [
rvargase23fcf652015-03-04 19:59:22995 "tools/stress_cache/stress_cache.cc",
scottmg34fb7e52014-12-03 23:27:24996 ]
dpranke43276212015-02-20 02:55:19997
brettwd1c719a2015-02-19 23:17:04998 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
999 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:311000 deps = [
1001 ":net",
[email protected]b2b2bf52014-05-28 20:26:571002 ":test_support",
[email protected]8603c5de2014-04-16 20:34:311003 "//base",
brettwba7a73d2015-08-31 22:17:391004 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311005 ]
1006 }
1007
1008 executable("tld_cleanup") {
scottmg34fb7e52014-12-03 23:27:241009 sources = [
1010 "tools/tld_cleanup/tld_cleanup.cc",
1011 ]
dpranke43276212015-02-20 02:55:191012
brettwd1c719a2015-02-19 23:17:041013 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1014 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:311015 deps = [
1016 "//base",
1017 "//base:i18n",
brettwba7a73d2015-08-31 22:17:391018 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311019 "//net/tools/tld_cleanup",
1020 ]
1021 }
1022}
1023
rch6983a3f2015-03-30 03:47:281024if (is_linux) {
[email protected]8a3f8242014-06-05 18:05:121025 static_library("epoll_server") {
[email protected]8603c5de2014-04-16 20:34:311026 sources = [
1027 "tools/epoll_server/epoll_server.cc",
1028 "tools/epoll_server/epoll_server.h",
1029 ]
1030 deps = [
1031 ":net",
1032 "//base",
1033 ]
1034 }
1035
[email protected]8a3f8242014-06-05 18:05:121036 static_library("flip_in_mem_edsm_server_base") {
Brett Wilson8f80ad0b2014-09-08 19:50:241037 testonly = true
[email protected]8603c5de2014-04-16 20:34:311038 sources = [
[email protected]8603c5de2014-04-16 20:34:311039 "tools/flip_server/acceptor_thread.cc",
satorux933fc7a2015-02-13 07:09:101040 "tools/flip_server/acceptor_thread.h",
1041 "tools/flip_server/constants.h",
[email protected]8603c5de2014-04-16 20:34:311042 "tools/flip_server/create_listener.cc",
1043 "tools/flip_server/create_listener.h",
[email protected]8603c5de2014-04-16 20:34:311044 "tools/flip_server/flip_config.cc",
1045 "tools/flip_server/flip_config.h",
1046 "tools/flip_server/http_interface.cc",
1047 "tools/flip_server/http_interface.h",
[email protected]8603c5de2014-04-16 20:34:311048 "tools/flip_server/mem_cache.cc",
satorux933fc7a2015-02-13 07:09:101049 "tools/flip_server/mem_cache.h",
[email protected]8603c5de2014-04-16 20:34:311050 "tools/flip_server/output_ordering.cc",
1051 "tools/flip_server/output_ordering.h",
1052 "tools/flip_server/ring_buffer.cc",
1053 "tools/flip_server/ring_buffer.h",
1054 "tools/flip_server/sm_connection.cc",
1055 "tools/flip_server/sm_connection.h",
1056 "tools/flip_server/sm_interface.h",
[email protected]8603c5de2014-04-16 20:34:311057 "tools/flip_server/spdy_interface.cc",
1058 "tools/flip_server/spdy_interface.h",
satorux933fc7a2015-02-13 07:09:101059 "tools/flip_server/spdy_ssl.cc",
1060 "tools/flip_server/spdy_ssl.h",
[email protected]8603c5de2014-04-16 20:34:311061 "tools/flip_server/spdy_util.cc",
1062 "tools/flip_server/spdy_util.h",
1063 "tools/flip_server/streamer_interface.cc",
1064 "tools/flip_server/streamer_interface.h",
rvargas145310f2015-08-14 18:09:041065 "tools/flip_server/url_to_filename_encoder.cc",
1066 "tools/flip_server/url_to_filename_encoder.h",
1067 "tools/flip_server/url_utilities.cc",
1068 "tools/flip_server/url_utilities.h",
[email protected]8603c5de2014-04-16 20:34:311069 ]
1070 deps = [
1071 ":balsa",
1072 ":epoll_server",
1073 ":net",
1074 "//base",
[email protected]edfd0f42014-07-22 18:20:371075 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311076 ]
1077 }
1078
1079 executable("flip_in_mem_edsm_server_unittests") {
Brett Wilson8f80ad0b2014-09-08 19:50:241080 testonly = true
[email protected]8603c5de2014-04-16 20:34:311081 sources = [
1082 "tools/flip_server/flip_test_utils.cc",
1083 "tools/flip_server/flip_test_utils.h",
1084 "tools/flip_server/http_interface_test.cc",
1085 "tools/flip_server/mem_cache_test.cc",
1086 "tools/flip_server/run_all_tests.cc",
1087 "tools/flip_server/spdy_interface_test.cc",
rvargas145310f2015-08-14 18:09:041088 "tools/flip_server/url_to_filename_encoder_unittest.cc",
1089 "tools/flip_server/url_utilities_unittest.cc",
[email protected]8603c5de2014-04-16 20:34:311090 ]
1091 deps = [
brettwbc44c0a92015-02-20 22:30:391092 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311093 ":flip_in_mem_edsm_server_base",
1094 ":net",
[email protected]b2b2bf52014-05-28 20:26:571095 ":test_support",
brettwba7a73d2015-08-31 22:17:391096 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311097 "//testing/gtest",
1098 "//testing/gmock",
[email protected]edfd0f42014-07-22 18:20:371099 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311100 ]
1101 }
1102
1103 executable("flip_in_mem_edsm_server") {
Brett Wilson8f80ad0b2014-09-08 19:50:241104 testonly = true
scottmg34fb7e52014-12-03 23:27:241105 sources = [
1106 "tools/flip_server/flip_in_mem_edsm_server.cc",
1107 ]
[email protected]8603c5de2014-04-16 20:34:311108 deps = [
brettwbc44c0a92015-02-20 22:30:391109 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311110 ":flip_in_mem_edsm_server_base",
1111 ":net",
1112 "//base",
brettwba7a73d2015-08-31 22:17:391113 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311114 ]
1115 }
1116
rch216445c2015-03-27 00:23:281117 source_set("epoll_quic_tools") {
[email protected]8603c5de2014-04-16 20:34:311118 sources = [
1119 "tools/quic/quic_client.cc",
1120 "tools/quic/quic_client.h",
[email protected]8603c5de2014-04-16 20:34:311121 "tools/quic/quic_default_packet_writer.cc",
1122 "tools/quic/quic_default_packet_writer.h",
[email protected]8603c5de2014-04-16 20:34:311123 "tools/quic/quic_epoll_clock.cc",
1124 "tools/quic/quic_epoll_clock.h",
1125 "tools/quic/quic_epoll_connection_helper.cc",
1126 "tools/quic/quic_epoll_connection_helper.h",
rtennetifb3fa6c2015-03-16 23:04:551127 "tools/quic/quic_packet_reader.cc",
1128 "tools/quic/quic_packet_reader.h",
[email protected]8603c5de2014-04-16 20:34:311129 "tools/quic/quic_packet_writer_wrapper.cc",
1130 "tools/quic/quic_packet_writer_wrapper.h",
1131 "tools/quic/quic_server.cc",
1132 "tools/quic/quic_server.h",
[email protected]8603c5de2014-04-16 20:34:311133 "tools/quic/quic_socket_utils.cc",
1134 "tools/quic/quic_socket_utils.h",
[email protected]8603c5de2014-04-16 20:34:311135 ]
1136 deps = [
1137 ":balsa",
1138 ":epoll_server",
1139 ":net",
1140 "//base",
1141 "//base/third_party/dynamic_annotations",
1142 "//crypto",
[email protected]edfd0f42014-07-22 18:20:371143 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311144 "//url",
1145 ]
1146 }
1147
rch216445c2015-03-27 00:23:281148 executable("epoll_quic_client") {
scottmg34fb7e52014-12-03 23:27:241149 sources = [
1150 "tools/quic/quic_client_bin.cc",
1151 ]
[email protected]8603c5de2014-04-16 20:34:311152 deps = [
brettwbc44c0a92015-02-20 22:30:391153 ":balsa",
1154 ":epoll_server",
rch216445c2015-03-27 00:23:281155 ":epoll_quic_tools",
1156 ":net",
1157 ":simple_quic_tools",
1158 "//base",
brettwba7a73d2015-08-31 22:17:391159 "//build/config/sanitizers:deps",
rch216445c2015-03-27 00:23:281160 "//third_party/boringssl",
1161 ]
1162 }
1163
1164 executable("epoll_quic_server") {
1165 sources = [
1166 "tools/quic/quic_server_bin.cc",
1167 ]
1168 deps = [
1169 ":balsa",
1170 ":epoll_server",
1171 ":epoll_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311172 ":net",
rchda78df5a2015-03-22 05:16:371173 ":simple_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311174 "//base",
brettwba7a73d2015-08-31 22:17:391175 "//build/config/sanitizers:deps",
[email protected]edfd0f42014-07-22 18:20:371176 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311177 ]
1178 }
[email protected]8603c5de2014-04-16 20:34:311179}
1180
[email protected]ef0eb442014-05-15 09:32:181181if (is_android) {
1182 generate_jni("net_jni_headers") {
1183 sources = [
1184 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
1185 "android/java/src/org/chromium/net/AndroidKeyStore.java",
1186 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java",
1187 "android/java/src/org/chromium/net/AndroidPrivateKey.java",
tbansal59a1ddc2015-09-14 17:35:011188 "android/java/src/org/chromium/net/AndroidTrafficStats.java",
[email protected]ef0eb442014-05-15 09:32:181189 "android/java/src/org/chromium/net/GURLUtils.java",
aberentec894a52015-07-09 14:45:531190 "android/java/src/org/chromium/net/HttpNegotiateAuthenticator.java",
xunjieli905496a2015-08-31 15:51:171191 "android/java/src/org/chromium/net/NetStringUtil.java",
[email protected]ef0eb442014-05-15 09:32:181192 "android/java/src/org/chromium/net/NetworkChangeNotifier.java",
1193 "android/java/src/org/chromium/net/ProxyChangeListener.java",
1194 "android/java/src/org/chromium/net/X509Util.java",
1195 ]
1196 jni_package = "net"
1197 }
cjhopmandad5f4272014-09-05 01:00:551198 generate_jni("net_test_jni_headers") {
1199 sources = [
1200 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java",
aberentec894a52015-07-09 14:45:531201 "test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticator.java",
agrievea5517aa2015-10-23 03:03:451202 "test/android/javatests/src/org/chromium/net/test/EmbeddedTestServer.java",
cjhopmandad5f4272014-09-05 01:00:551203 ]
brettwcdccaf02015-07-27 16:27:091204 jni_package = "net/test"
cjhopmandad5f4272014-09-05 01:00:551205 }
agrievea5517aa2015-10-23 03:03:451206
1207 _net_unittests_apk_assets_dir = "$root_out_dir/net_unittests_apk/assets"
1208
1209 copy_ex("copy_net_unittests_apk_assets") {
1210 clear_dir = true
1211 dest = _net_unittests_apk_assets_dir
1212
1213 if (v8_use_external_startup_data) {
1214 sources = [
1215 "$root_out_dir/natives_blob.bin",
1216 "$root_out_dir/snapshot_blob.bin",
1217 ]
1218 deps = [
1219 "//v8",
1220 ]
1221 }
1222 }
[email protected]ef0eb442014-05-15 09:32:181223}
[email protected]8603c5de2014-04-16 20:34:311224
1225if (is_android || is_linux) {
1226 executable("disk_cache_memory_test") {
Brett Wilson8f80ad0b2014-09-08 19:50:241227 testonly = true
scottmg34fb7e52014-12-03 23:27:241228 sources = [
1229 "tools/disk_cache_memory_test/disk_cache_memory_test.cc",
1230 ]
[email protected]8603c5de2014-04-16 20:34:311231 deps = [
1232 ":net",
1233 "//base",
brettwba7a73d2015-08-31 22:17:391234 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311235 ]
1236 }
1237}
[email protected]8a3f8242014-06-05 18:05:121238
rch47ad01f2015-03-20 21:17:231239source_set("simple_quic_tools") {
rcha9d12ce12015-03-19 23:06:491240 sources = [
rtennetid67b3a722015-08-18 05:15:311241 "tools/quic/quic_client_base.cc",
1242 "tools/quic/quic_client_base.h",
rched113b22015-03-26 04:54:051243 "tools/quic/quic_client_session.cc",
1244 "tools/quic/quic_client_session.h",
rchc99f380c2015-03-26 19:50:561245 "tools/quic/quic_dispatcher.cc",
1246 "tools/quic/quic_dispatcher.h",
rch0e945472015-03-26 15:19:211247 "tools/quic/quic_in_memory_cache.cc",
1248 "tools/quic/quic_in_memory_cache.h",
rchc99f380c2015-03-26 19:50:561249 "tools/quic/quic_per_connection_packet_writer.cc",
1250 "tools/quic/quic_per_connection_packet_writer.h",
rch0e945472015-03-26 15:19:211251 "tools/quic/quic_server_session.cc",
1252 "tools/quic/quic_server_session.h",
rcha9d12ce12015-03-19 23:06:491253 "tools/quic/quic_simple_client.cc",
1254 "tools/quic/quic_simple_client.h",
rch216445c2015-03-27 00:23:281255 "tools/quic/quic_simple_per_connection_packet_writer.cc",
1256 "tools/quic/quic_simple_per_connection_packet_writer.h",
1257 "tools/quic/quic_simple_server.cc",
1258 "tools/quic/quic_simple_server.h",
1259 "tools/quic/quic_simple_server_packet_writer.cc",
1260 "tools/quic/quic_simple_server_packet_writer.h",
rched113b22015-03-26 04:54:051261 "tools/quic/quic_spdy_client_stream.cc",
1262 "tools/quic/quic_spdy_client_stream.h",
rch0e945472015-03-26 15:19:211263 "tools/quic/quic_spdy_server_stream.cc",
1264 "tools/quic/quic_spdy_server_stream.h",
1265 "tools/quic/quic_time_wait_list_manager.cc",
1266 "tools/quic/quic_time_wait_list_manager.h",
rchda78df5a2015-03-22 05:16:371267 "tools/quic/synchronous_host_resolver.cc",
1268 "tools/quic/synchronous_host_resolver.h",
rcha9d12ce12015-03-19 23:06:491269 ]
1270 deps = [
1271 ":net",
1272 "//base",
rch47ad01f2015-03-20 21:17:231273 "//base/third_party/dynamic_annotations",
1274 "//url",
1275 ]
1276}
1277
sherouk51b4b098b2015-08-10 09:00:431278if (!is_ios) {
1279 executable("quic_client") {
1280 sources = [
1281 "tools/quic/quic_simple_client_bin.cc",
1282 ]
1283 deps = [
1284 ":net",
1285 ":simple_quic_tools",
1286 "//base",
brettwba7a73d2015-08-31 22:17:391287 "//build/config/sanitizers:deps",
sherouk51b4b098b2015-08-10 09:00:431288 "//url",
1289 ]
1290 }
1291 executable("quic_server") {
1292 sources = [
1293 "tools/quic/quic_simple_server_bin.cc",
1294 ]
1295 deps = [
1296 ":net",
1297 ":simple_quic_tools",
1298 "//base",
brettwba7a73d2015-08-31 22:17:391299 "//build/config/sanitizers:deps",
sherouk51b4b098b2015-08-10 09:00:431300 "//third_party/boringssl",
1301 "//third_party/protobuf:protobuf_lite",
1302 ]
1303 }
rch216445c2015-03-27 00:23:281304}
1305
dpranke64df2832015-07-31 22:33:361306# TODO(GYP): Delete this after we've converted everything to GN.
1307# The _run targets exist only for compatibility w/ GYP.
1308group("net_unittests_run") {
1309 testonly = true
1310 deps = [
1311 ":net_unittests",
1312 ]
1313}
1314
1315test("net_unittests") {
1316 sources = gypi_values.net_test_sources
1317
sherouk51b4b098b2015-08-10 09:00:431318 if (is_ios) {
1319 sources -= [
1320 "websockets/websocket_stream_cookie_test.cc",
1321 "websockets/websocket_stream_create_test_base.cc",
1322 "websockets/websocket_stream_create_test_base.h",
1323 ]
1324 }
1325
dpranke64df2832015-07-31 22:33:361326 configs += [
1327 "//build/config:precompiled_headers",
1328
1329 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1330 "//build/config/compiler:no_size_t_to_int_warning",
1331 ]
1332 defines = []
1333
1334 deps = [
1335 ":balsa",
1336 ":extras",
1337 ":http_server",
1338 ":net",
1339 ":simple_quic_tools",
1340 ":test_support",
1341 "//base",
1342 "//base:i18n",
1343 "//base:prefs_test_support",
1344 "//base/allocator",
1345 "//base/third_party/dynamic_annotations",
1346 "//crypto",
1347 "//crypto:platform",
1348 "//crypto:test_support",
dpranke64df2832015-07-31 22:33:361349 "//net/base/registry_controlled_domains",
1350 "//sql",
1351 "//testing/gmock",
1352 "//testing/gtest",
1353 "//third_party/zlib",
1354 "//url",
1355 ]
1356
1357 data = [
1358 "data/",
1359 ]
1360
1361 if (is_linux || is_mac || is_win) {
1362 deps += [
1363 "//third_party/pyftpdlib/",
1364 "//third_party/pywebsocket/",
1365 "//third_party/tlslite/",
1366 ]
1367 data_deps = [
1368 "//third_party/pyftpdlib/",
1369 "//third_party/pywebsocket/",
1370 "//third_party/tlslite/",
1371 ]
1372 data += [
1373 "tools/testserver/",
1374 "//third_party/pyftpdlib/",
1375 "//third_party/pywebsocket/",
1376 "//third_party/tlslite/",
1377 "$root_out_dir/pyproto/google/",
dprankef497c7962015-07-31 19:46:231378 ]
1379 }
1380
dpranke64df2832015-07-31 22:33:361381 if (is_desktop_linux) {
1382 deps += [ ":epoll_quic_tools" ]
1383 }
1384 if (is_linux) {
1385 sources += gypi_values.net_linux_test_sources
1386 deps += [
1387 ":epoll_quic_tools",
1388 ":epoll_server",
1389 ":flip_in_mem_edsm_server_base",
brettwbc8b2a22015-07-28 18:24:421390 ]
dpranke64df2832015-07-31 22:33:361391 }
[email protected]8a3f8242014-06-05 18:05:121392
dpranke64df2832015-07-31 22:33:361393 if (is_mac || is_ios) {
1394 sources += gypi_values.net_base_test_mac_ios_sources
1395 }
1396
1397 if (is_chromeos) {
1398 sources -= [ "proxy/proxy_config_service_linux_unittest.cc" ]
1399 }
1400
1401 if (v8_use_external_startup_data) {
1402 deps += [ "//gin" ]
1403 }
1404
1405 if (!use_nss_certs) {
1406 sources -= [
1407 "cert/nss_cert_database_unittest.cc",
1408 "ssl/client_cert_store_nss_unittest.cc",
[email protected]8a3f8242014-06-05 18:05:121409 ]
dpranke64df2832015-07-31 22:33:361410 if (is_chromeos) { # Already removed for all non-ChromeOS builds.
davidben2bcbc6b2015-04-22 02:36:411411 sources -= [
dpranke64df2832015-07-31 22:33:361412 "cert/nss_cert_database_chromeos_unittest.cc",
1413 "cert/nss_profile_filter_chromeos_unittest.cc",
davidben2bcbc6b2015-04-22 02:36:411414 ]
brettw43ae0e12015-07-14 22:12:361415 }
[email protected]8a3f8242014-06-05 18:05:121416 }
dpranke64df2832015-07-31 22:33:361417
1418 if (use_openssl) {
1419 # When building for OpenSSL, we need to exclude NSS specific tests
1420 # or functionality not supported by OpenSSL yet.
1421 # TODO(bulach): Add equivalent tests when the underlying
1422 # functionality is ported to OpenSSL.
1423 sources -= [ "quic/test_tools/crypto_test_utils_nss.cc" ]
1424 } else {
1425 sources -= [
1426 "cert/x509_util_openssl_unittest.cc",
1427 "quic/test_tools/crypto_test_utils_openssl.cc",
1428 "socket/ssl_client_socket_openssl_unittest.cc",
1429 "ssl/ssl_client_session_cache_openssl_unittest.cc",
1430 ]
1431 }
1432
1433 if (use_kerberos) {
1434 defines += [ "USE_KERBEROS" ]
1435 }
1436
1437 # These are excluded on Android, because the actual Kerberos support, which
1438 # these test, is in a separate app on Android.
1439 if (!use_kerberos || is_android) {
1440 sources -= [
1441 "http/http_auth_gssapi_posix_unittest.cc",
1442 "http/mock_gssapi_library_posix.cc",
1443 "http/mock_gssapi_library_posix.h",
1444 ]
1445 }
1446 if (!use_kerberos) {
1447 sources -= [ "http/http_auth_handler_negotiate_unittest.cc" ]
1448 }
1449
1450 if (use_openssl || (!is_desktop_linux && !is_chromeos && !is_ios)) {
1451 # Only include this test when on Posix and using NSS for
1452 # cert verification or on iOS (which also uses NSS for certs).
1453 sources -= [ "cert_net/nss_ocsp_unittest.cc" ]
1454 }
1455
1456 if (!use_openssl_certs) {
1457 sources -= [ "ssl/openssl_client_key_store_unittest.cc" ]
1458 }
1459
1460 if (!enable_websockets) {
1461 sources -= [
1462 "server/http_connection_unittest.cc",
1463 "server/http_server_response_info_unittest.cc",
1464 "server/http_server_unittest.cc",
1465 "server/web_socket_encoder_unittest.cc",
1466 "websockets/websocket_basic_stream_test.cc",
1467 "websockets/websocket_channel_test.cc",
dprankea8d2fb92015-10-28 22:25:231468 "websockets/websocket_deflate_parameters_test.cc",
dpranke64df2832015-07-31 22:33:361469 "websockets/websocket_deflate_predictor_impl_test.cc",
1470 "websockets/websocket_deflate_stream_test.cc",
1471 "websockets/websocket_deflater_test.cc",
1472 "websockets/websocket_end_to_end_test.cc",
1473 "websockets/websocket_errors_test.cc",
1474 "websockets/websocket_extension_parser_test.cc",
dprankea8d2fb92015-10-28 22:25:231475 "websockets/websocket_extension_test.cc",
dpranke64df2832015-07-31 22:33:361476 "websockets/websocket_frame_parser_test.cc",
1477 "websockets/websocket_frame_test.cc",
1478 "websockets/websocket_handshake_challenge_test.cc",
1479 "websockets/websocket_handshake_stream_create_helper_test.cc",
1480 "websockets/websocket_inflater_test.cc",
1481 "websockets/websocket_stream_test.cc",
1482 "websockets/websocket_test_util.cc",
1483 "websockets/websocket_test_util.h",
1484 ]
1485 deps -= [ ":http_server" ]
1486 }
1487
1488 if (disable_file_support) {
1489 sources -= [
1490 "base/directory_lister_unittest.cc",
1491 "url_request/url_request_file_job_unittest.cc",
1492 ]
1493 }
1494
1495 if (disable_ftp_support) {
1496 sources -= [
1497 "ftp/ftp_auth_cache_unittest.cc",
1498 "ftp/ftp_ctrl_response_buffer_unittest.cc",
1499 "ftp/ftp_directory_listing_parser_ls_unittest.cc",
dpranke64df2832015-07-31 22:33:361500 "ftp/ftp_directory_listing_parser_unittest.cc",
1501 "ftp/ftp_directory_listing_parser_unittest.h",
1502 "ftp/ftp_directory_listing_parser_vms_unittest.cc",
1503 "ftp/ftp_directory_listing_parser_windows_unittest.cc",
1504 "ftp/ftp_network_transaction_unittest.cc",
1505 "ftp/ftp_util_unittest.cc",
1506 "url_request/url_request_ftp_job_unittest.cc",
1507 ]
1508 }
1509
1510 if (!enable_built_in_dns) {
1511 sources -= [
1512 "dns/address_sorter_posix_unittest.cc",
1513 "dns/address_sorter_unittest.cc",
1514 ]
1515 }
1516
xunjieli905496a2015-08-31 15:51:171517 if (use_v8_in_net) {
dpranke64df2832015-07-31 22:33:361518 deps += [ ":net_with_v8" ]
1519 } else {
1520 sources -= [
1521 "proxy/proxy_resolver_v8_tracing_unittest.cc",
1522 "proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc",
1523 "proxy/proxy_resolver_v8_unittest.cc",
1524 ]
1525 }
1526
1527 if (use_v8_in_net && !is_android) {
1528 deps += [
1529 ":net_browser_services",
1530 ":net_utility_services",
1531 "//mojo/environment:chromium",
1532 "//third_party/mojo/src/mojo/edk/system",
1533 ]
1534 } else {
1535 sources -= [
1536 "dns/host_resolver_mojo_unittest.cc",
1537 "dns/mojo_host_resolver_impl_unittest.cc",
1538 "proxy/mojo_proxy_resolver_factory_impl_unittest.cc",
1539 "proxy/mojo_proxy_resolver_impl_unittest.cc",
1540 "proxy/mojo_proxy_resolver_v8_tracing_bindings_unittest.cc",
1541 "proxy/proxy_resolver_factory_mojo_unittest.cc",
1542 "proxy/proxy_service_mojo_unittest.cc",
1543 ]
1544 }
1545
1546 if (!enable_mdns) {
1547 sources -= [
1548 "dns/mdns_cache_unittest.cc",
1549 "dns/mdns_client_unittest.cc",
1550 "dns/record_parsed_unittest.cc",
1551 "dns/record_rdata_unittest.cc",
1552 ]
1553 }
1554
1555 if (is_ios) {
1556 # TODO(GYP)
1557 # 'actions': [
1558 # {
1559 # 'action_name': 'copy_test_data',
1560 # 'variables': {
1561 # 'test_data_files': [
mattm2c59d262015-10-29 05:33:211562 # 'data/name_constraints_unittest/',
dpranke64df2832015-07-31 22:33:361563 # 'data/ssl/certificates/',
1564 # 'data/test.html',
1565 # 'data/url_request_unittest/',
mattm057b0152015-08-11 00:26:241566 # 'data/verify_name_match_unittest/names/',
eroman58423c12015-08-14 20:47:361567 # 'data/parse_certificate_unittest/',
dpranke64df2832015-07-31 22:33:361568 # ],
1569 # 'test_data_prefix': 'net',
1570 # },
1571 # 'includes': [ '../build/copy_test_data_ios.gypi' ],
1572 # },
1573 # ],
1574 sources -= [
1575 # TODO(droger): The following tests are disabled because the
1576 # implementation is missing or incomplete.
1577 # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS.
1578 "base/keygen_handler_unittest.cc",
1579 "disk_cache/backend_unittest.cc",
1580 "disk_cache/blockfile/block_files_unittest.cc",
1581
1582 # Need to read input data files.
1583 "filter/gzip_filter_unittest.cc",
1584 "socket/ssl_server_socket_unittest.cc",
1585 "spdy/fuzzing/hpack_fuzz_util_test.cc",
1586
1587 # Need TestServer.
1588 "cert_net/cert_net_fetcher_impl_unittest.cc",
1589 "proxy/proxy_script_fetcher_impl_unittest.cc",
1590 "socket/ssl_client_socket_unittest.cc",
1591 "url_request/url_fetcher_impl_unittest.cc",
1592 "url_request/url_request_context_builder_unittest.cc",
1593
1594 # Needs GetAppOutput().
1595 "test/python_utils_unittest.cc",
1596
1597 # The following tests are disabled because they don't apply to
1598 # iOS.
1599 # OS is not "linux" or "freebsd" or "openbsd".
1600 "socket/unix_domain_client_socket_posix_unittest.cc",
1601 "socket/unix_domain_server_socket_posix_unittest.cc",
1602
1603 # See bug http://crbug.com/344533.
1604 "disk_cache/blockfile/index_table_v3_unittest.cc",
1605 ]
1606 }
1607
1608 if (is_android) {
agrievea5517aa2015-10-23 03:03:451609 apk_deps = [
1610 "//base:base_java_unittest_support",
1611 "//net/android:net_java",
1612 "//net/android:net_javatests",
1613 "//net/android:net_java_test_support",
1614 "//net/android:net_unittests_apk_resources",
1615 ":copy_net_unittests_apk_assets",
1616 ]
1617 android_manifest = "//net/android/unittest_support/AndroidManifest.xml"
dpranke64df2832015-07-31 22:33:361618 sources -= [
1619 # See bug http://crbug.com/344533.
1620 "disk_cache/blockfile/index_table_v3_unittest.cc",
dpranke64df2832015-07-31 22:33:361621 ]
1622 deps += [
1623 ":net_test_jni_headers",
1624
1625 # TODO(mmenke): This depends on test_support_base, which depends on
1626 # icu. Figure out a way to remove that dependency.
1627 "//testing/android/native_test:native_test_native_code",
1628 ]
1629 set_sources_assignment_filter([])
1630 sources += [ "base/address_tracker_linux_unittest.cc" ]
1631 set_sources_assignment_filter(sources_assignment_filter)
agrievea5517aa2015-10-23 03:03:451632 apk_asset_location = _net_unittests_apk_assets_dir
dpranke64df2832015-07-31 22:33:361633 isolate_file = "net_unittests.isolate"
1634 }
1635
dpranke64df2832015-07-31 22:33:361636 # Symbols for crashes when running tests on swarming.
1637 if (symbol_level > 0) {
1638 if (is_win) {
1639 data += [ "$root_out_dir/net_unittests.exe.pdb" ]
1640 } else if (is_mac) {
1641 data += [ "$root_out_dir/net_unittests.dSYM/" ]
1642 }
1643 }
1644}
1645
1646# !is_android && !is_win && !is_mac
[email protected]8a3f8242014-06-05 18:05:121647
rockot9c67e5f2015-03-12 20:01:211648executable("net_perftests") {
1649 testonly = true
1650 sources = [
ricea10eb9f5e2015-05-19 18:51:571651 "base/mime_sniffer_perftest.cc",
rockot9c67e5f2015-03-12 20:01:211652 "cookies/cookie_monster_perftest.cc",
1653 "disk_cache/blockfile/disk_cache_perftest.cc",
rohitrao1860223c2015-05-16 01:07:141654 "extras/sqlite/sqlite_persistent_cookie_store_perftest.cc",
rockot9c67e5f2015-03-12 20:01:211655 "proxy/proxy_resolver_perftest.cc",
1656 "udp/udp_socket_perftest.cc",
1657 ]
1658
1659 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1660 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
1661 deps = [
brettwcdccaf02015-07-27 16:27:091662 ":extras",
1663 ":net",
1664 ":test_support",
rockot9c67e5f2015-03-12 20:01:211665 "//base",
1666 "//base:i18n",
1667 "//base/test:test_support_perf",
brettwba7a73d2015-08-31 22:17:391668 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:211669 "//testing/gtest",
1670 "//url",
rockot9c67e5f2015-03-12 20:01:211671 ]
1672
1673 if (enable_websockets) {
1674 sources += [ "websockets/websocket_frame_perftest.cc" ]
1675 }
1676
1677 if (use_v8_in_net) {
1678 deps += [ ":net_with_v8" ]
1679 } else {
1680 sources -= [ "proxy/proxy_resolver_perftest.cc" ]
1681 }
rockot9c67e5f2015-03-12 20:01:211682}