Fix crash after Launcher drag/drop (take 3 - no unit test)
[chromium-blink-merge.git] / net / BUILD.gn
blob0cdb77a99b70eb45131003c51b7f252e23fd3abd
1 # 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.
5 import("//build/config/crypto.gni")
6 import("//build/config/features.gni")
7 import("//build/config/ui.gni")
8 import("//build/module_args/v8.gni")
9 import("//url/config.gni")
11 # TODO(cjhopman): //build/config/android/rules.gni also imports grit_rule.gni.
12 # Currently, that file can't be imported multiple times.  Make this always
13 # imported when http://crbug.com/393704 is fixed.
14 if (!is_android) {
15   import("//tools/grit/grit_rule.gni")
18 if (is_android) {
19   import("//build/config/android/config.gni")
20   import("//build/config/android/rules.gni")
21 } else if (is_mac) {
22   import("//build/config/mac/mac_sdk.gni")
25 # The list of net files is kept in net.gypi. Read it.
26 gypi_values = exec_script("//build/gypi_to_gn.py",
27                           [ rebase_path("net.gypi") ],
28                           "scope",
29                           [ "net.gypi" ])
31 # Disable Kerberos on ChromeOS, Android and iOS, at least for now. It needs
32 # configuration (krb5.conf and so on).
33 use_kerberos = !is_chromeos && !is_android && !is_ios
35 # The way the cache uses mmap() is inefficient on some Android devices. If
36 # this flag is set, we hackily avoid using mmap() in the disk cache. We are
37 # pretty confident that mmap-ing the index would not hurt any existing x86
38 # android devices, but we cannot be so sure about the variety of ARM devices.
39 # So enable it for x86 only for now.
40 posix_avoid_mmap = is_android && cpu_arch != "x86"
42 # WebSockets and socket stream code are used everywhere except iOS.
43 enable_websockets = !is_ios
44 use_v8_in_net = !is_ios
45 enable_built_in_dns = !is_ios
46 disable_ftp_support = is_ios
48 declare_args() {
49   # Disables support for file URLs.  File URL support requires use of icu.
50   disable_file_support = false
53 config("net_config") {
54   defines = []
55   if (posix_avoid_mmap) {
56     defines += [ "POSIX_AVOID_MMAP" ]
57   }
58   if (disable_file_support) {
59     defines += [ "DISABLE_FILE_SUPPORT" ]
60   }
63 # Disables Windows warning about size to int truncations.
64 # TODO(jschuh): crbug.com/167187 fix this and delete this config.
65 config("net_win_size_truncation") {
66   if (is_win) {
67     cflags = [ "/wd4267" ]
68   }
71 component("net") {
72   sources =
73       gypi_values.net_nacl_common_sources + gypi_values.net_non_nacl_sources
75   cflags = []
76   defines = [
77     # TODO(GYP) Note that he GYP file supports linux_link_kerberos (defaults to
78     # 0) which implies that we run pkg_config on kerberos and link to that
79     # rather than setting this define which will dynamically open it. That
80     # doesn't seem to be set in the regular builds, so we're skipping this
81     # capability here.
82     "DLOPEN_KERBEROS",
83     "NET_IMPLEMENTATION",
84   ]
85   configs += [ ":net_win_size_truncation" ]
86   public_configs = [ ":net_config" ]
87   include_dirs = []
89   public_deps = [
90     "//crypto",
91     "//crypto:platform",
92   ]
93   deps = [
94     ":net_resources",
95     "//base",
96     "//base:i18n",
97     "//base:prefs",
98     "//base/third_party/dynamic_annotations",
99     "//net/base/registry_controlled_domains",
100     "//sdch",
101     "//third_party/icu",
102     "//third_party/zlib",
103     "//url",
104   ]
106   if (use_kerberos) {
107     defines += [ "USE_KERBEROS" ]
108     if (is_android) {
109       include_dirs += [ "/usr/include/kerberosV" ]
110     }
111   } else {
112     sources -= [
113       "http/http_auth_gssapi_posix.cc",
114       "http/http_auth_gssapi_posix.h",
115       "http/http_auth_handler_negotiate.h",
116       "http/http_auth_handler_negotiate.cc",
117     ]
118   }
120   if (is_posix) {
121     if (posix_avoid_mmap) {
122       sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ]
123     } else {
124       sources -= [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ]
125     }
126   }
128   if (disable_file_support) {
129     sources -= [
130       "base/directory_lister.cc",
131       "base/directory_lister.h",
132       "url_request/url_request_file_dir_job.cc",
133       "url_request/url_request_file_dir_job.h",
134       "url_request/url_request_file_job.cc",
135       "url_request/url_request_file_job.h",
136       "url_request/file_protocol_handler.cc",
137       "url_request/file_protocol_handler.h",
138     ]
139   }
141   if (disable_ftp_support) {
142     sources -= [
143       "ftp/ftp_auth_cache.cc",
144       "ftp/ftp_auth_cache.h",
145       "ftp/ftp_ctrl_response_buffer.cc",
146       "ftp/ftp_ctrl_response_buffer.h",
147       "ftp/ftp_directory_listing_parser.cc",
148       "ftp/ftp_directory_listing_parser.h",
149       "ftp/ftp_directory_listing_parser_ls.cc",
150       "ftp/ftp_directory_listing_parser_ls.h",
151       "ftp/ftp_directory_listing_parser_netware.cc",
152       "ftp/ftp_directory_listing_parser_netware.h",
153       "ftp/ftp_directory_listing_parser_os2.cc",
154       "ftp/ftp_directory_listing_parser_os2.h",
155       "ftp/ftp_directory_listing_parser_vms.cc",
156       "ftp/ftp_directory_listing_parser_vms.h",
157       "ftp/ftp_directory_listing_parser_windows.cc",
158       "ftp/ftp_directory_listing_parser_windows.h",
159       "ftp/ftp_network_layer.cc",
160       "ftp/ftp_network_layer.h",
161       "ftp/ftp_network_session.cc",
162       "ftp/ftp_network_session.h",
163       "ftp/ftp_network_transaction.cc",
164       "ftp/ftp_network_transaction.h",
165       "ftp/ftp_request_info.h",
166       "ftp/ftp_response_info.cc",
167       "ftp/ftp_response_info.h",
168       "ftp/ftp_server_type_histograms.cc",
169       "ftp/ftp_server_type_histograms.h",
170       "ftp/ftp_transaction.h",
171       "ftp/ftp_transaction_factory.h",
172       "ftp/ftp_util.cc",
173       "ftp/ftp_util.h",
174       "url_request/ftp_protocol_handler.cc",
175       "url_request/ftp_protocol_handler.h",
176       "url_request/url_request_ftp_job.cc",
177       "url_request/url_request_ftp_job.h",
178     ]
179   }
181   if (enable_built_in_dns) {
182     defines += [ "ENABLE_BUILT_IN_DNS" ]
183   } else {
184     sources -= [
185       "dns/address_sorter_posix.cc",
186       "dns/address_sorter_posix.h",
187       "dns/dns_client.cc",
188     ]
189   }
191   if (use_openssl) {
192     sources -= [
193       "base/nss_memio.c",
194       "base/nss_memio.h",
195       "cert/ct_log_verifier_nss.cc",
196       "cert/ct_objects_extractor_nss.cc",
197       "cert/jwk_serializer_nss.cc",
198       "cert/scoped_nss_types.h",
199       "cert/test_root_certs_nss.cc",
200       "cert/x509_util_nss.cc",
201       "cert/x509_util_nss.h",
202       "ocsp/nss_ocsp.cc",
203       "ocsp/nss_ocsp.h",
204       "quic/crypto/aead_base_decrypter_nss.cc",
205       "quic/crypto/aead_base_encrypter_nss.cc",
206       "quic/crypto/aes_128_gcm_12_decrypter_nss.cc",
207       "quic/crypto/aes_128_gcm_12_encrypter_nss.cc",
208       "quic/crypto/chacha20_poly1305_decrypter_nss.cc",
209       "quic/crypto/chacha20_poly1305_encrypter_nss.cc",
210       "quic/crypto/channel_id_nss.cc",
211       "quic/crypto/p256_key_exchange_nss.cc",
212       "socket/nss_ssl_util.cc",
213       "socket/nss_ssl_util.h",
214       "socket/ssl_client_socket_nss.cc",
215       "socket/ssl_client_socket_nss.h",
216       "socket/ssl_server_socket_nss.cc",
217       "socket/ssl_server_socket_nss.h",
218     ]
219     if (is_chromeos) {
220       sources -= [
221         "cert/nss_cert_database_chromeos.cc",
222         "cert/nss_cert_database_chromeos.h",
223         "cert/nss_profile_filter_chromeos.cc",
224         "cert/nss_profile_filter_chromeos.h",
225       ]
226     }
227     if (is_linux) {
228       # These are always removed for non-Linux cases below.
229       sources -= [
230         "base/crypto_module_nss.cc",
231         "base/keygen_handler_nss.cc",
232         "cert/cert_database_nss.cc",
233         "cert/nss_cert_database.cc",
234         "cert/nss_cert_database.h",
235         "cert/x509_certificate_nss.cc",
236         "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
237         "third_party/mozilla_security_manager/nsKeygenHandler.h",
238         "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
239         "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
240         "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
241         "third_party/mozilla_security_manager/nsPKCS12Blob.h",
242       ]
243     }
244     if (is_ios) {
245       # Always removed for !ios below.
246       sources -= [
247         "cert/cert_verify_proc_nss.cc",
248         "cert/cert_verify_proc_nss.h",
249       ]
250     }
251     if (is_win) {
252       sources -= [ "cert/sha256_legacy_support_nss_win.cc" ]
253     }
254   } else {
255     sources -= [
256       "base/crypto_module_openssl.cc",
257       "cert/ct_log_verifier_openssl.cc",
258       "cert/ct_objects_extractor_openssl.cc",
259       "cert/jwk_serializer_openssl.cc",
260       "cert/x509_util_openssl.cc",
261       "cert/x509_util_openssl.h",
262       "quic/crypto/aead_base_decrypter_openssl.cc",
263       "quic/crypto/aead_base_encrypter_openssl.cc",
264       "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc",
265       "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc",
266       "quic/crypto/chacha20_poly1305_decrypter_openssl.cc",
267       "quic/crypto/chacha20_poly1305_encrypter_openssl.cc",
268       "quic/crypto/channel_id_openssl.cc",
269       "quic/crypto/p256_key_exchange_openssl.cc",
270       "quic/crypto/scoped_evp_aead_ctx.cc",
271       "quic/crypto/scoped_evp_aead_ctx.h",
272       "socket/ssl_client_socket_openssl.cc",
273       "socket/ssl_client_socket_openssl.h",
274       "socket/ssl_server_socket_openssl.cc",
275       "socket/ssl_server_socket_openssl.h",
276       "socket/ssl_session_cache_openssl.cc",
277       "socket/ssl_session_cache_openssl.h",
278       "ssl/openssl_platform_key.h",
279       "ssl/openssl_ssl_util.cc",
280       "ssl/openssl_ssl_util.h",
281     ]
282     if (is_mac) {
283       sources -= [ "ssl/openssl_platform_key_mac.cc" ]
284     }
285     if (is_win) {
286       sources -= [
287         "cert/sha256_legacy_support_openssl_win.cc",
288         "ssl/openssl_platform_key_win.cc",
289       ]
290     }
291   }
293   if (!use_openssl_certs) {
294     sources -= [
295       "base/keygen_handler_openssl.cc",
296       "base/openssl_private_key_store.h",
297       "base/openssl_private_key_store_memory.cc",
298       "cert/cert_database_openssl.cc",
299       "cert/cert_verify_proc_openssl.cc",
300       "cert/cert_verify_proc_openssl.h",
301       "cert/test_root_certs_openssl.cc",
302       "cert/x509_certificate_openssl.cc",
303       "ssl/openssl_client_key_store.cc",
304       "ssl/openssl_client_key_store.h",
305     ]
306     if (is_android) {
307       sources -= [ "base/openssl_private_key_store_android.cc" ]
308     }
309   } else if (is_android) {
310     # Android doesn't use these even when using OpenSSL.
311     sources -= [
312       "base/openssl_private_key_store_memory.cc",
313       "cert/cert_database_openssl.cc",
314       "cert/cert_verify_proc_openssl.cc",
315       "cert/test_root_certs_openssl.cc",
316     ]
317   }
319   if (use_glib && !is_chromeos) {
320     configs += [ "//build/config/linux:gconf" ]
321     deps += [ "//build/config/linux:gio" ]
322   }
324   if (is_linux) {
325     configs += [ "//build/config/linux:libresolv" ]
326   } else {
327     sources -= [
328       "base/crypto_module_nss.cc",
329       "base/keygen_handler_nss.cc",
330       "cert/cert_database_nss.cc",
331       "cert/nss_cert_database.cc",
332       "cert/nss_cert_database.h",
333       "cert/x509_certificate_nss.cc",
334       "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
335       "third_party/mozilla_security_manager/nsKeygenHandler.h",
336       "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
337       "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
338       "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
339       "third_party/mozilla_security_manager/nsPKCS12Blob.h",
340     ]
342     if (!is_ios && !use_openssl) {
343       # These files are part of the partial implementation of NSS on iOS so
344       # keep them in that case.
345       sources -= [
346         "cert/test_root_certs_nss.cc",
347         "ocsp/nss_ocsp.cc",
348         "ocsp/nss_ocsp.h",
349       ]
350     }
351   }
353   if (!use_nss_certs) {
354     sources -= [
355       "ssl/client_cert_store_nss.cc",
356       "ssl/client_cert_store_nss.h",
357     ]
358     if (!is_ios) {
359       # These files are part of the partial implementation of NSS on iOS so
360       # keep them in that case (even though use_nss_certs is not set).
361       sources -= [
362         "cert/cert_verify_proc_nss.cc",
363         "cert/cert_verify_proc_nss.h",
364       ]
365     }
366     if (is_chromeos) {
367       # These were already removed on non-ChromeOS.
368       sources -= [
369         "ssl/client_cert_store_chromeos.cc",
370         "ssl/client_cert_store_chromeos.h",
371       ]
372     }
373   }
375   if (!enable_websockets) {
376     sources -= [
377       "websockets/websocket_basic_handshake_stream.cc",
378       "websockets/websocket_basic_handshake_stream.h",
379       "websockets/websocket_basic_stream.cc",
380       "websockets/websocket_basic_stream.h",
381       "websockets/websocket_channel.cc",
382       "websockets/websocket_channel.h",
383       "websockets/websocket_deflate_predictor.h",
384       "websockets/websocket_deflate_predictor_impl.cc",
385       "websockets/websocket_deflate_predictor_impl.h",
386       "websockets/websocket_deflate_stream.cc",
387       "websockets/websocket_deflate_stream.h",
388       "websockets/websocket_deflater.cc",
389       "websockets/websocket_deflater.h",
390       "websockets/websocket_errors.cc",
391       "websockets/websocket_errors.h",
392       "websockets/websocket_extension.cc",
393       "websockets/websocket_extension.h",
394       "websockets/websocket_extension_parser.cc",
395       "websockets/websocket_extension_parser.h",
396       "websockets/websocket_frame.cc",
397       "websockets/websocket_frame.h",
398       "websockets/websocket_frame_parser.cc",
399       "websockets/websocket_frame_parser.h",
400       "websockets/websocket_handshake_constants.cc",
401       "websockets/websocket_handshake_constants.h",
402       "websockets/websocket_handshake_challenge.cc",
403       "websockets/websocket_handshake_challenge.h",
404       "websockets/websocket_handshake_request_info.cc",
405       "websockets/websocket_handshake_request_info.h",
406       "websockets/websocket_handshake_response_info.cc",
407       "websockets/websocket_handshake_response_info.h",
408       "websockets/websocket_handshake_stream_base.h",
409       "websockets/websocket_handshake_stream_create_helper.cc",
410       "websockets/websocket_handshake_stream_create_helper.h",
411       "websockets/websocket_inflater.cc",
412       "websockets/websocket_inflater.h",
413       "websockets/websocket_mux.h",
414       "websockets/websocket_stream.cc",
415       "websockets/websocket_stream.h",
416     ]
417   }
419   if (!enable_mdns) {
420     sources -= [
421       "dns/mdns_cache.cc",
422       "dns/mdns_cache.h",
423       "dns/mdns_client.cc",
424       "dns/mdns_client.h",
425       "dns/mdns_client_impl.cc",
426       "dns/mdns_client_impl.h",
427       "dns/record_parsed.cc",
428       "dns/record_parsed.h",
429       "dns/record_rdata.cc",
430       "dns/record_rdata.h",
431     ]
432   }
434   if (is_win) {
435     sources -= [
436       "http/http_auth_handler_ntlm_portable.cc",
437       "socket/socket_libevent.cc",
438       "socket/socket_libevent.h",
439       "socket/tcp_socket_libevent.cc",
440       "socket/tcp_socket_libevent.h",
441       "udp/udp_socket_libevent.cc",
442       "udp/udp_socket_libevent.h",
443     ]
444   } else {  # !is_win
445     sources -= [
446       "base/winsock_init.cc",
447       "base/winsock_init.h",
448       "base/winsock_util.cc",
449       "base/winsock_util.h",
450       "proxy/proxy_resolver_winhttp.cc",
451       "proxy/proxy_resolver_winhttp.h",
452     ]
453   }
455   if (is_mac) {
456     libs = [
457       "Foundation.framework",
458       "Security.framework",
459       "SystemConfiguration.framework",
460       "resolv",
461     ]
462   }
464   if (is_ios) {
465     # Add back some sources that were otherwise filtered out. iOS additionally
466     # doesn't set USE_NSS but needs some of the files.
467     set_sources_assignment_filter([])
468     sources += [
469       "base/net_util_mac.cc",
470       "base/net_util_mac.h",
471       "base/network_change_notifier_mac.cc",
472       "base/network_config_watcher_mac.cc",
473       "base/platform_mime_util_mac.mm",
474       "cert/cert_verify_proc_nss.cc",
475       "cert/cert_verify_proc_nss.h",
476       "cert/test_root_certs_nss.cc",
477       "cert/x509_util_nss.cc",
478       "cert/x509_util_nss.h",
479       "proxy/proxy_resolver_mac.cc",
480       "proxy/proxy_server_mac.cc",
481       "ocsp/nss_ocsp.cc",
482       "ocsp/nss_ocsp.h",
483     ]
484     set_sources_assignment_filter(sources_assignment_filter)
486     sources -= [ "disk_cache/blockfile/file_posix.cc" ]
487     libs = [
488       "CFNetwork.framework",
489       "MobileCoreServices.framework",
490       "Security.framework",
491       "SystemConfiguration.framework",
492       "resolv",
493     ]
494   }
496   if (is_ios || is_mac) {
497     sources += gypi_values.net_base_mac_ios_sources
498   }
500   if (is_android) {
501     # Add some Linux sources that were excluded by the filter, but which
502     # are needed.
503     set_sources_assignment_filter([])
504     sources += [
505       "base/platform_mime_util_linux.cc",
506       "base/address_tracker_linux.cc",
507       "base/address_tracker_linux.h",
508       "base/net_util_linux.cc",
509       "base/net_util_linux.h",
510     ]
511     set_sources_assignment_filter(sources_assignment_filter)
513     if (!is_android_webview_build) {
514       deps += [ ":net_jni_headers" ]
515     }
516   }
518   if (use_icu_alternatives_on_android) {
519     deps -= [
520       "//base:i18n",
521       "//third_party/icu",
522     ]
523     sources -= [
524       "base/filename_util_icu.cc",
525       "base/net_string_util_icu.cc",
526       "base/net_util_icu.cc",
527     ]
528     sources += [
529       "base/net_string_util_icu_alternatives_android.cc",
530       "base/net_string_util_icu_alternatives_android.h",
531     ]
532   }
535 grit("net_resources") {
536   source = "base/net_resources.grd"
537   use_qualified_include = true
538   outputs = [
539     "grit/net_resources.h",
540     "net_resources.pak",
541     "net_resources.rc",
542   ]
545 static_library("extras") {
546   sources = gypi_values.net_extras_sources
547   configs += [ "//build/config/compiler:wexit_time_destructors" ]
548   deps = [
549     ":net",
550     "//sql:sql",
551   ]
554 static_library("http_server") {
555   sources = [
556     "server/http_connection.cc",
557     "server/http_connection.h",
558     "server/http_server.cc",
559     "server/http_server.h",
560     "server/http_server_request_info.cc",
561     "server/http_server_request_info.h",
562     "server/http_server_response_info.cc",
563     "server/http_server_response_info.h",
564     "server/web_socket.cc",
565     "server/web_socket.h",
566     "server/web_socket_encoder.cc",
567     "server/web_socket_encoder.h",
568   ]
569   configs += [
570     "//build/config/compiler:wexit_time_destructors",
571     ":net_win_size_truncation",
572   ]
573   deps = [
574     ":net",
575     "//base",
576   ]
579 executable("dump_cache") {
580   testonly = true
581   sources = [
582     "tools/dump_cache/cache_dumper.cc",
583     "tools/dump_cache/cache_dumper.h",
584     "tools/dump_cache/dump_cache.cc",
585     "tools/dump_cache/dump_files.cc",
586     "tools/dump_cache/dump_files.h",
587     "tools/dump_cache/simple_cache_dumper.cc",
588     "tools/dump_cache/simple_cache_dumper.h",
589     "tools/dump_cache/url_to_filename_encoder.cc",
590     "tools/dump_cache/url_to_filename_encoder.h",
591     "tools/dump_cache/url_utilities.h",
592     "tools/dump_cache/url_utilities.cc",
593   ]
595   configs += [ ":net_win_size_truncation" ]
597   deps = [
598     "//base",
599     ":net",
600     ":test_support",
601   ]
604 source_set("test_support") {
605   testonly = true
606   sources = [
607     "base/captured_net_log_entry.cc",
608     "base/captured_net_log_entry.h",
609     "base/capturing_net_log.cc",
610     "base/capturing_net_log.h",
611     "base/capturing_net_log_observer.cc",
612     "base/capturing_net_log_observer.h",
613     "base/load_timing_info_test_util.cc",
614     "base/load_timing_info_test_util.h",
615     "base/mock_file_stream.cc",
616     "base/mock_file_stream.h",
617     "base/test_completion_callback.cc",
618     "base/test_completion_callback.h",
619     "base/test_data_directory.cc",
620     "base/test_data_directory.h",
621     "cert/mock_cert_verifier.cc",
622     "cert/mock_cert_verifier.h",
623     "cookies/cookie_monster_store_test.cc",
624     "cookies/cookie_monster_store_test.h",
625     "cookies/cookie_store_test_callbacks.cc",
626     "cookies/cookie_store_test_callbacks.h",
627     "cookies/cookie_store_test_helpers.cc",
628     "cookies/cookie_store_test_helpers.h",
629     "disk_cache/disk_cache_test_base.cc",
630     "disk_cache/disk_cache_test_base.h",
631     "disk_cache/disk_cache_test_util.cc",
632     "disk_cache/disk_cache_test_util.h",
633     "dns/dns_test_util.cc",
634     "dns/dns_test_util.h",
635     "dns/mock_host_resolver.cc",
636     "dns/mock_host_resolver.h",
637     "dns/mock_mdns_socket_factory.cc",
638     "dns/mock_mdns_socket_factory.h",
639     "http/http_transaction_test_util.cc",
640     "http/http_transaction_test_util.h",
641     "proxy/mock_proxy_resolver.cc",
642     "proxy/mock_proxy_resolver.h",
643     "proxy/mock_proxy_script_fetcher.cc",
644     "proxy/mock_proxy_script_fetcher.h",
645     "proxy/proxy_config_service_common_unittest.cc",
646     "proxy/proxy_config_service_common_unittest.h",
647     "socket/socket_test_util.cc",
648     "socket/socket_test_util.h",
649     "test/cert_test_util.cc",
650     "test/cert_test_util.h",
651     "test/cert_test_util_nss.cc",
652     "test/ct_test_util.cc",
653     "test/ct_test_util.h",
654     "test/embedded_test_server/embedded_test_server.cc",
655     "test/embedded_test_server/embedded_test_server.h",
656     "test/embedded_test_server/http_connection.cc",
657     "test/embedded_test_server/http_connection.h",
658     "test/embedded_test_server/http_request.cc",
659     "test/embedded_test_server/http_request.h",
660     "test/embedded_test_server/http_response.cc",
661     "test/embedded_test_server/http_response.h",
662     "test/net_test_suite.cc",
663     "test/net_test_suite.h",
664     "test/python_utils.cc",
665     "test/python_utils.h",
666     "test/spawned_test_server/base_test_server.cc",
667     "test/spawned_test_server/base_test_server.h",
668     "test/spawned_test_server/local_test_server_posix.cc",
669     "test/spawned_test_server/local_test_server_win.cc",
670     "test/spawned_test_server/local_test_server.cc",
671     "test/spawned_test_server/local_test_server.h",
672     "test/spawned_test_server/remote_test_server.cc",
673     "test/spawned_test_server/remote_test_server.h",
674     "test/spawned_test_server/spawned_test_server.h",
675     "test/spawned_test_server/spawner_communicator.cc",
676     "test/spawned_test_server/spawner_communicator.h",
677     "test/url_request/url_request_failed_job.cc",
678     "test/url_request/url_request_failed_job.h",
679     "test/url_request/url_request_mock_data_job.cc",
680     "test/url_request/url_request_mock_data_job.h",
681     "test/url_request/url_request_mock_http_job.cc",
682     "test/url_request/url_request_mock_http_job.h",
683     "url_request/test_url_fetcher_factory.cc",
684     "url_request/test_url_fetcher_factory.h",
685     "url_request/test_url_request_interceptor.cc",
686     "url_request/test_url_request_interceptor.h",
687     "url_request/url_request_test_util.cc",
688     "url_request/url_request_test_util.h",
689   ]
691   configs += [ ":net_win_size_truncation" ]
693   public_deps = [
694     "//base",
695     "//base/test:test_support",
696     "//crypto",
697     "//net",
698     "//net/tools/tld_cleanup",
699     "//testing/gmock",
700     "//testing/gtest",
701     "//url",
702   ]
704   if (!use_openssl && (use_nss_certs || is_ios)) {
705     public_deps += [ "//crypto:platform" ]
706   }
708   if (!is_android) {
709     sources -= [
710       "test/spawned_test_server/remote_test_server.cc",
711       "test/spawned_test_server/remote_test_server.h",
712       "test/spawned_test_server/spawner_communicator.cc",
713       "test/spawned_test_server/spawner_communicator.h",
714     ]
715   }
717   if (use_v8_in_net) {
718     public_deps += [ ":net_with_v8" ]
719   }
721   if (!enable_mdns) {
722     sources -= [
723       "dns/mock_mdns_socket_factory.cc",
724       "dns/mock_mdns_socket_factory.h",
725     ]
726   }
728   if (!use_nss_certs) {
729     sources -= [ "test/cert_test_util_nss.cc" ]
730   }
733 source_set("balsa") {
734   sources = [
735     "tools/balsa/balsa_enums.h",
736     "tools/balsa/balsa_frame.cc",
737     "tools/balsa/balsa_frame.h",
738     "tools/balsa/balsa_headers.cc",
739     "tools/balsa/balsa_headers.h",
740     "tools/balsa/balsa_headers_token_utils.cc",
741     "tools/balsa/balsa_headers_token_utils.h",
742     "tools/balsa/balsa_visitor_interface.h",
743     "tools/balsa/http_message_constants.cc",
744     "tools/balsa/http_message_constants.h",
745     "tools/balsa/noop_balsa_visitor.h",
746     "tools/balsa/simple_buffer.cc",
747     "tools/balsa/simple_buffer.h",
748     "tools/balsa/split.cc",
749     "tools/balsa/split.h",
750     "tools/balsa/string_piece_utils.h",
751     "tools/quic/spdy_utils.cc",
752     "tools/quic/spdy_utils.h",
753   ]
754   deps = [
755     ":net",
756     "//base",
757     "//url",
758   ]
761 if (use_v8_in_net) {
762   component("net_with_v8") {
763     sources = [
764       "proxy/proxy_resolver_v8.cc",
765       "proxy/proxy_resolver_v8.h",
766       "proxy/proxy_resolver_v8_tracing.cc",
767       "proxy/proxy_resolver_v8_tracing.h",
768       "proxy/proxy_service_v8.cc",
769       "proxy/proxy_service_v8.h",
770     ]
772     defines = [ "NET_IMPLEMENTATION" ]
773     configs += [
774       ":net_win_size_truncation",
775       "//build/config/compiler:wexit_time_destructors",
776     ]
778     public_deps = [
779       ":net",
780     ]
781     deps = [
782       "//base",
783       "//gin",
784       "//url",
785       "//v8",
786     ]
787   }
790 if (!is_ios && !is_android) {
791   executable("crash_cache") {
792     testonly = true
793     sources = [
794       "tools/crash_cache/crash_cache.cc",
795     ]
796     configs += [ ":net_win_size_truncation" ]
797     deps = [
798       ":net",
799       ":test_support",
800       "//base",
801     ]
802   }
804   executable("crl_set_dump") {
805     testonly = true
806     sources = [
807       "tools/crl_set_dump/crl_set_dump.cc",
808     ]
809     configs += [ ":net_win_size_truncation" ]
810     deps = [
811       ":net",
812       "//base",
813     ]
814   }
816   executable("dns_fuzz_stub") {
817     testonly = true
818     sources = [
819       "tools/dns_fuzz_stub/dns_fuzz_stub.cc",
820     ]
821     configs += [ ":net_win_size_truncation" ]
822     deps = [
823       ":net",
824       "//base",
825     ]
826   }
828   executable("gdig") {
829     testonly = true
830     sources = [
831       "tools/gdig/file_net_log.cc",
832       "tools/gdig/gdig.cc",
833     ]
834     deps = [
835       ":net",
836       "//base",
837     ]
838   }
840   executable("get_server_time") {
841     testonly = true
842     sources = [
843       "tools/get_server_time/get_server_time.cc",
844     ]
845     configs += [ ":net_win_size_truncation" ]
846     deps = [
847       ":net",
848       "//base",
849       "//base:i18n",
850       "//url",
851     ]
852   }
854   if (use_v8_in_net) {
855     executable("net_watcher") {
856       testonly = true
857       sources = [
858         "tools/net_watcher/net_watcher.cc",
859       ]
860       deps = [
861         ":net",
862         ":net_with_v8",
863         "//base",
864       ]
866       if (is_desktop_linux) {
867         configs += [
868           "//build/config/linux:gconf",
869           "//build/config/linux:glib",
870         ]
871         deps += [ "//build/config/linux:gio" ]
872       }
873     }
874   }
876   executable("run_testserver") {
877     testonly = true
878     sources = [
879       "tools/testserver/run_testserver.cc",
880     ]
881     deps = [
882       ":net",  # TODO(brettw) bug 363749: this shouldn't be necessary. It's not
883                # in the GYP build, and can be removed when the bug is fixed.
884       ":test_support",
885       "//base",
886       "//base/test:test_support",
887       "//testing/gtest",
888     ]
889   }
891   executable("stress_cache") {
892     testonly = true
893     sources = [
894       "disk_cache/blockfile/stress_cache.cc",
895     ]
896     configs += [ ":net_win_size_truncation" ]
897     deps = [
898       ":net",
899       ":test_support",
900       "//base",
901     ]
902   }
904   executable("tld_cleanup") {
905     sources = [
906       "tools/tld_cleanup/tld_cleanup.cc",
907     ]
908     configs += [ ":net_win_size_truncation" ]
909     deps = [
910       "//base",
911       "//base:i18n",
912       "//net/tools/tld_cleanup",
913     ]
914   }
917 if (is_linux) {
918   static_library("epoll_server") {
919     sources = [
920       "tools/epoll_server/epoll_server.cc",
921       "tools/epoll_server/epoll_server.h",
922     ]
923     deps = [
924       ":net",
925       "//base",
926     ]
927   }
929   static_library("flip_in_mem_edsm_server_base") {
930     testonly = true
931     sources = [
932       "tools/dump_cache/url_to_filename_encoder.cc",
933       "tools/dump_cache/url_to_filename_encoder.h",
934       "tools/dump_cache/url_utilities.h",
935       "tools/dump_cache/url_utilities.cc",
936       "tools/flip_server/acceptor_thread.h",
937       "tools/flip_server/acceptor_thread.cc",
938       "tools/flip_server/create_listener.cc",
939       "tools/flip_server/create_listener.h",
940       "tools/flip_server/constants.h",
941       "tools/flip_server/flip_config.cc",
942       "tools/flip_server/flip_config.h",
943       "tools/flip_server/http_interface.cc",
944       "tools/flip_server/http_interface.h",
945       "tools/flip_server/loadtime_measurement.h",
946       "tools/flip_server/mem_cache.h",
947       "tools/flip_server/mem_cache.cc",
948       "tools/flip_server/output_ordering.cc",
949       "tools/flip_server/output_ordering.h",
950       "tools/flip_server/ring_buffer.cc",
951       "tools/flip_server/ring_buffer.h",
952       "tools/flip_server/sm_connection.cc",
953       "tools/flip_server/sm_connection.h",
954       "tools/flip_server/sm_interface.h",
955       "tools/flip_server/spdy_ssl.cc",
956       "tools/flip_server/spdy_ssl.h",
957       "tools/flip_server/spdy_interface.cc",
958       "tools/flip_server/spdy_interface.h",
959       "tools/flip_server/spdy_util.cc",
960       "tools/flip_server/spdy_util.h",
961       "tools/flip_server/streamer_interface.cc",
962       "tools/flip_server/streamer_interface.h",
963     ]
964     deps = [
965       ":balsa",
966       ":epoll_server",
967       ":net",
968       "//base",
969       "//third_party/boringssl",
970     ]
971   }
973   executable("flip_in_mem_edsm_server_unittests") {
974     testonly = true
975     sources = [
976       "tools/flip_server/flip_test_utils.cc",
977       "tools/flip_server/flip_test_utils.h",
978       "tools/flip_server/http_interface_test.cc",
979       "tools/flip_server/mem_cache_test.cc",
980       "tools/flip_server/run_all_tests.cc",
981       "tools/flip_server/spdy_interface_test.cc",
982     ]
983     deps = [
984       ":flip_in_mem_edsm_server_base",
985       ":net",
986       ":test_support",
987       "//testing/gtest",
988       "//testing/gmock",
989       "//third_party/boringssl",
990     ]
991   }
993   executable("flip_in_mem_edsm_server") {
994     testonly = true
995     sources = [
996       "tools/flip_server/flip_in_mem_edsm_server.cc",
997     ]
998     deps = [
999       ":flip_in_mem_edsm_server_base",
1000       ":net",
1001       "//base",
1002     ]
1003   }
1005   source_set("quic_base") {
1006     sources = [
1007       "tools/quic/quic_client.cc",
1008       "tools/quic/quic_client.h",
1009       "tools/quic/quic_client_session.cc",
1010       "tools/quic/quic_client_session.h",
1011       "tools/quic/quic_default_packet_writer.cc",
1012       "tools/quic/quic_default_packet_writer.h",
1013       "tools/quic/quic_dispatcher.h",
1014       "tools/quic/quic_dispatcher.cc",
1015       "tools/quic/quic_epoll_clock.cc",
1016       "tools/quic/quic_epoll_clock.h",
1017       "tools/quic/quic_epoll_connection_helper.cc",
1018       "tools/quic/quic_epoll_connection_helper.h",
1019       "tools/quic/quic_in_memory_cache.cc",
1020       "tools/quic/quic_in_memory_cache.h",
1021       "tools/quic/quic_packet_writer_wrapper.cc",
1022       "tools/quic/quic_packet_writer_wrapper.h",
1023       "tools/quic/quic_per_connection_packet_writer.cc",
1024       "tools/quic/quic_per_connection_packet_writer.h",
1025       "tools/quic/quic_server.cc",
1026       "tools/quic/quic_server.h",
1027       "tools/quic/quic_server_session.cc",
1028       "tools/quic/quic_server_session.h",
1029       "tools/quic/quic_socket_utils.cc",
1030       "tools/quic/quic_socket_utils.h",
1031       "tools/quic/quic_spdy_client_stream.cc",
1032       "tools/quic/quic_spdy_client_stream.h",
1033       "tools/quic/quic_spdy_server_stream.cc",
1034       "tools/quic/quic_spdy_server_stream.h",
1035       "tools/quic/quic_time_wait_list_manager.h",
1036       "tools/quic/quic_time_wait_list_manager.cc",
1037     ]
1038     deps = [
1039       ":balsa",
1040       ":epoll_server",
1041       ":net",
1042       "//base",
1043       "//base/third_party/dynamic_annotations",
1044       "//crypto",
1045       "//third_party/boringssl",
1046       "//url",
1047     ]
1048   }
1050   executable("quic_client") {
1051     sources = [
1052       "tools/quic/quic_client_bin.cc",
1053     ]
1054     deps = [
1055       ":quic_base",
1056       ":net",
1057       "//base",
1058       "//third_party/boringssl",
1059     ]
1060   }
1063 if (is_android) {
1064   generate_jni("net_jni_headers") {
1065     sources = [
1066       "android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
1067       "android/java/src/org/chromium/net/AndroidKeyStore.java",
1068       "android/java/src/org/chromium/net/AndroidNetworkLibrary.java",
1069       "android/java/src/org/chromium/net/AndroidPrivateKey.java",
1070       "android/java/src/org/chromium/net/GURLUtils.java",
1071       "android/java/src/org/chromium/net/NetworkChangeNotifier.java",
1072       "android/java/src/org/chromium/net/ProxyChangeListener.java",
1073       "android/java/src/org/chromium/net/X509Util.java",
1074     ]
1075     jni_package = "net"
1076   }
1077   generate_jni("net_test_jni_headers") {
1078     sources = [
1079       "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java",
1080     ]
1081     jni_package = "net"
1082   }
1085 if (is_android || is_linux) {
1086   executable("disk_cache_memory_test") {
1087     testonly = true
1088     sources = [
1089       "tools/disk_cache_memory_test/disk_cache_memory_test.cc",
1090     ]
1091     deps = [
1092       ":net",
1093       "//base",
1094     ]
1095   }
1098 # TODO(GYP) make this compile on Android, we need some native test deps done.
1099 # TODO(GYP) Also doesn't work on Windows; dependency on boringssl is wrong.
1100 # TODO(GYP) Also doesn't work on Mac, need to figure out why not.
1101 if (!is_android && !is_win && !is_mac) {
1102   source_set("quic_tools") {
1103     sources = [
1104       "quic/quic_dispatcher.cc",
1105       "quic/quic_dispatcher.h",
1106       "quic/quic_in_memory_cache.cc",
1107       "quic/quic_in_memory_cache.h",
1108       "quic/quic_per_connection_packet_writer.cc",
1109       "quic/quic_per_connection_packet_writer.h",
1110       "quic/quic_server.cc",
1111       "quic/quic_server.h",
1112       "quic/quic_server_packet_writer.cc",
1113       "quic/quic_server_packet_writer.h",
1114       "quic/quic_server_session.cc",
1115       "quic/quic_server_session.h",
1116       "quic/quic_spdy_server_stream.cc",
1117       "quic/quic_spdy_server_stream.h",
1118       "quic/quic_time_wait_list_manager.cc",
1119       "quic/quic_time_wait_list_manager.h",
1120     ]
1121     deps = [
1122       ":net",
1123       "//base",
1124       "//base/third_party/dynamic_annotations",
1125       "//url",
1126     ]
1127   }
1129   test("net_unittests") {
1130     sources = gypi_values.net_test_sources
1132     configs += [ ":net_win_size_truncation" ]
1133     defines = []
1135     deps = [
1136       ":extras",
1137       ":http_server",
1138       ":net",
1139       ":quic_tools",
1140       ":test_support",
1141       "//base",
1142       "//base:i18n",
1143       "//base:prefs_test_support",
1144       "//base/allocator",
1145       "//base/third_party/dynamic_annotations",
1146       "//crypto",
1147       "//crypto:platform",
1148       "//crypto:test_support",
1149       "//net/base/registry_controlled_domains",
1150       "//testing/gmock",
1151       "//testing/gtest",
1152       "//third_party/zlib",
1153       "//url",
1154     ]
1156     if (is_linux) {
1157       sources += gypi_values.net_linux_test_sources
1158       deps += [
1159         ":balsa",
1160         ":epoll_server",
1161         ":flip_in_mem_edsm_server_base",
1162         ":quic_base",
1163       ]
1164     }
1166     if (is_mac || is_ios) {
1167       sources += gypi_values.net_base_test_mac_ios_sources
1168     }
1170     if (is_chromeos) {
1171       sources -= [ "proxy/proxy_config_service_linux_unittest.cc" ]
1172     }
1174     if (is_android) {
1175       sources -= [
1176         # See bug http://crbug.com/344533.
1177         "disk_cache/blockfile/index_table_v3_unittest.cc",
1179         # No res_ninit() et al on Android, so this doesn't make a lot of
1180         # sense.
1181         "dns/dns_config_service_posix_unittest.cc",
1182       ]
1183       deps += [
1184         ":net_javatests",  # FIXME(brettw)
1185         ":net_test_jni_headers",
1186       ]
1187     }
1189     if (v8_use_external_startup_data) {
1190       deps += [ "//gin" ]
1191     }
1193     if (!use_nss_certs) {
1194       sources -= [ "ssl/client_cert_store_nss_unittest.cc" ]
1195       if (is_chromeos) {  # Already removed for all non-ChromeOS builds.
1196         sources -= [ "ssl/client_cert_store_chromeos_unittest.cc" ]
1197       }
1198     }
1200     if (use_openssl) {
1201       # When building for OpenSSL, we need to exclude NSS specific tests
1202       # or functionality not supported by OpenSSL yet.
1203       # TODO(bulach): Add equivalent tests when the underlying
1204       #               functionality is ported to OpenSSL.
1205       sources -= [
1206         "cert/nss_cert_database_unittest.cc",
1207         "cert/x509_util_nss_unittest.cc",
1208         "quic/test_tools/crypto_test_utils_nss.cc",
1209       ]
1210       if (is_chromeos) {
1211         # These were already removed in the non-ChromeOS case.
1212         sources -= [
1213           "cert/nss_cert_database_chromeos_unittest.cc",
1214           "cert/nss_profile_filter_chromeos_unittest.cc",
1215         ]
1216       }
1217     } else {
1218       sources -= [
1219         "cert/x509_util_openssl_unittest.cc",
1220         "quic/test_tools/crypto_test_utils_openssl.cc",
1221         "socket/ssl_client_socket_openssl_unittest.cc",
1222         "socket/ssl_session_cache_openssl_unittest.cc",
1223       ]
1224       if (!is_desktop_linux && !is_chromeos) {
1225         sources -= [ "cert/nss_cert_database_unittest.cc" ]
1226       }
1227     }
1229     if (use_kerberos) {
1230       defines += [ "USE_KERBEROS" ]
1231     } else {
1232       sources -= [
1233         "http/http_auth_gssapi_posix_unittest.cc",
1234         "http/http_auth_handler_negotiate_unittest.cc",
1235         "http/mock_gssapi_library_posix.cc",
1236         "http/mock_gssapi_library_posix.h",
1237       ]
1238     }
1240     if (use_openssl || (!is_desktop_linux && !is_chromeos && !is_ios)) {
1241       # Only include this test when on Posix and using NSS for
1242       # cert verification or on iOS (which also uses NSS for certs).
1243       sources -= [ "ocsp/nss_ocsp_unittest.cc" ]
1244     }
1246     if (!use_openssl_certs) {
1247       sources -= [ "ssl/openssl_client_key_store_unittest.cc" ]
1248     }
1250     if (!enable_websockets) {
1251       sources -= [
1252         "server/http_connection_unittest.cc",
1253         "server/http_server_response_info_unittest.cc",
1254         "server/http_server_unittest.cc",
1255         "server/web_socket_encoder_unittest.cc",
1256         "websockets/websocket_basic_stream_test.cc",
1257         "websockets/websocket_channel_test.cc",
1258         "websockets/websocket_deflate_predictor_impl_test.cc",
1259         "websockets/websocket_deflate_stream_test.cc",
1260         "websockets/websocket_deflater_test.cc",
1261         "websockets/websocket_errors_test.cc",
1262         "websockets/websocket_extension_parser_test.cc",
1263         "websockets/websocket_frame_parser_test.cc",
1264         "websockets/websocket_frame_test.cc",
1265         "websockets/websocket_handshake_challenge_test.cc",
1266         "websockets/websocket_handshake_stream_create_helper_test.cc",
1267         "websockets/websocket_inflater_test.cc",
1268         "websockets/websocket_stream_test.cc",
1269         "websockets/websocket_test_util.cc",
1270         "websockets/websocket_test_util.h",
1271       ]
1272       deps -= [ ":http_server" ]
1273     }
1275     if (disable_file_support) {
1276       sources -= [
1277         "base/directory_lister_unittest.cc",
1278         "url_request/url_request_file_job_unittest.cc",
1279       ]
1280     }
1282     if (disable_ftp_support) {
1283       sources -= [
1284         "ftp/ftp_auth_cache_unittest.cc",
1285         "ftp/ftp_ctrl_response_buffer_unittest.cc",
1286         "ftp/ftp_directory_listing_parser_ls_unittest.cc",
1287         "ftp/ftp_directory_listing_parser_netware_unittest.cc",
1288         "ftp/ftp_directory_listing_parser_os2_unittest.cc",
1289         "ftp/ftp_directory_listing_parser_unittest.cc",
1290         "ftp/ftp_directory_listing_parser_unittest.h",
1291         "ftp/ftp_directory_listing_parser_vms_unittest.cc",
1292         "ftp/ftp_directory_listing_parser_windows_unittest.cc",
1293         "ftp/ftp_network_transaction_unittest.cc",
1294         "ftp/ftp_util_unittest.cc",
1295         "url_request/url_request_ftp_job_unittest.cc",
1296       ]
1297     }
1299     if (!enable_built_in_dns) {
1300       sources -= [
1301         "dns/address_sorter_posix_unittest.cc",
1302         "dns/address_sorter_unittest.cc",
1303       ]
1304     }
1306     # Always need use_v8_in_net to be 1 to run on Android, so just remove
1307     # net_unittest's dependency on v8 when using icu alternatives instead of
1308     # setting use_v8_in_net to 0.
1309     if (use_v8_in_net && !use_icu_alternatives_on_android) {
1310       deps += [ ":net_with_v8" ]
1311     } else {
1312       sources -= [
1313         "proxy/proxy_resolver_v8_unittest.cc",
1314         "proxy/proxy_resolver_v8_tracing_unittest.cc",
1315       ]
1316     }
1318     if (!enable_mdns) {
1319       sources -= [
1320         "dns/mdns_cache_unittest.cc",
1321         "dns/mdns_client_unittest.cc",
1322         "dns/record_parsed_unittest.cc",
1323         "dns/record_rdata_unittest.cc",
1324       ]
1325     }
1327     if (is_ios) {
1328       # TODO(GYP)
1329       #  'actions': [
1330       #    {
1331       #      'action_name': 'copy_test_data',
1332       #      'variables': {
1333       #        'test_data_files': [
1334       #          'data/ssl/certificates/',
1335       #          'data/test.html',
1336       #          'data/url_request_unittest/',
1337       #        ],
1338       #        'test_data_prefix': 'net',
1339       #      },
1340       #      'includes': [ '../build/copy_test_data_ios.gypi' ],
1341       #    },
1342       #  ],
1343       sources -= [
1344         # TODO(droger): The following tests are disabled because the
1345         # implementation is missing or incomplete.
1346         # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS.
1347         "base/keygen_handler_unittest.cc",
1348         "disk_cache/backend_unittest.cc",
1349         "disk_cache/blockfile/block_files_unittest.cc",
1351         # Need to read input data files.
1352         "filter/gzip_filter_unittest.cc",
1353         "socket/ssl_server_socket_unittest.cc",
1354         "spdy/fuzzing/hpack_fuzz_util_test.cc",
1356         # Need TestServer.
1357         "proxy/proxy_script_fetcher_impl_unittest.cc",
1358         "socket/ssl_client_socket_unittest.cc",
1359         "url_request/url_fetcher_impl_unittest.cc",
1360         "url_request/url_request_context_builder_unittest.cc",
1362         # Needs GetAppOutput().
1363         "test/python_utils_unittest.cc",
1365         # The following tests are disabled because they don't apply to
1366         # iOS.
1367         # OS is not "linux" or "freebsd" or "openbsd".
1368         "socket/unix_domain_client_socket_posix_unittest.cc",
1369         "socket/unix_domain_listen_socket_posix_unittest.cc",
1370         "socket/unix_domain_server_socket_posix_unittest.cc",
1372         # See bug http://crbug.com/344533.
1373         "disk_cache/blockfile/index_table_v3_unittest.cc",
1374       ]
1375     }
1377     if (is_android) {
1378       sources -= [ "dns/dns_config_service_posix_unittest.cc" ]
1380       # TODO(GYP)
1381       # # TODO(mmenke):  This depends on test_support_base, which depends on
1382       # #                icu.  Figure out a way to remove that dependency.
1383       # 'dependencies': [
1384       #   '../testing/android/native_test.gyp:native_test_native_code',
1385       # ]
1387       set_sources_assignment_filter([])
1388       sources += [ "base/address_tracker_linux_unittest.cc" ]
1389       set_sources_assignment_filter(sources_assignment_filter)
1390     }
1392     if (use_icu_alternatives_on_android) {
1393       sources -= [
1394         "base/filename_util_unittest.cc",
1395         "base/net_util_icu_unittest.cc",
1396       ]
1397       deps -= [ "//base:i18n" ]
1398     }
1399   }
1401   executable("quic_server") {
1402     sources = [
1403       "quic/quic_server_bin.cc",
1404     ]
1405     deps = [
1406       ":quic_tools",
1407       ":net",
1408       "//base",
1409       "//third_party/boringssl",
1410     ]
1411   }
1412 }  # !is_android && !is_win && !is_mac