Export ScreenOrientationProvider
[chromium-blink-merge.git] / base / base.gyp
blobc74115d9303f0e4de827b7fdf8bc9304c8804ef8
1 # Copyright (c) 2012 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.
6   'variables': {
7     'chromium_code': 1,
8   },
9   'includes': [
10     '../build/win_precompile.gypi',
11     'base.gypi',
12   ],
13   'targets': [
14     {
15       'target_name': 'base',
16       'type': '<(component)',
17       'toolsets': ['host', 'target'],
18       'variables': {
19         'base_target': 1,
20         'enable_wexit_time_destructors': 1,
21         'optimize': 'max',
22       },
23       'dependencies': [
24         'base_static',
25         'allocator/allocator.gyp:allocator_extension_thunks',
26         '../testing/gtest.gyp:gtest_prod',
27         '../third_party/modp_b64/modp_b64.gyp:modp_b64',
28         'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
29       ],
30       # TODO(gregoryd): direct_dependent_settings should be shared with the
31       #  64-bit target, but it doesn't work due to a bug in gyp
32       'direct_dependent_settings': {
33         'include_dirs': [
34           '..',
35         ],
36       },
37       'conditions': [
38         ['desktop_linux == 1 or chromeos == 1', {
39           'conditions': [
40             ['chromeos==1', {
41               'sources/': [ ['include', '_chromeos\\.cc$'] ]
42             }],
43           ],
44           'dependencies': [
45             'symbolize',
46             'xdg_mime',
47           ],
48           'defines': [
49             'USE_SYMBOLIZE',
50           ],
51         }, {  # desktop_linux == 0 and chromeos == 0
52             'sources/': [
53               ['exclude', '/xdg_user_dirs/'],
54               ['exclude', '_nss\\.cc$'],
55             ],
56         }],
57         ['use_glib==1', {
58           'dependencies': [
59             '../build/linux/system.gyp:glib',
60           ],
61           'export_dependent_settings': [
62             '../build/linux/system.gyp:glib',
63           ],
64         }],
65         ['OS == "android" and _toolset == "host"', {
66           # Always build base as a static_library for host toolset, even if
67           # we're doing a component build. Specifically, we only care about the
68           # target toolset using components since that's what developers are
69           # focusing on. In theory we should do this more generally for all
70           # targets when building for host, but getting the gyp magic
71           # per-toolset for the "component" variable is hard, and we really only
72           # need base on host.
73           'type': 'static_library',
74           # Base for host support is the minimum required to run the
75           # ssl false start blacklist tool. It requires further changes
76           # to generically support host builds (and tests).
77           # Note: when building for host, gyp has OS == "android",
78           # hence the *_android.cc files are included but the actual code
79           # doesn't have OS_ANDROID / ANDROID defined.
80           'conditions': [
81             ['host_os == "mac"', {
82               'sources/': [
83                 ['exclude', '^native_library_linux\\.cc$'],
84                 ['exclude', '^process_util_linux\\.cc$'],
85                 ['exclude', '^sys_info_linux\\.cc$'],
86                 ['exclude', '^sys_string_conversions_linux\\.cc$'],
87                 ['exclude', '^worker_pool_linux\\.cc$'],
88               ],
89             }],
90           ],
91         }],
92         ['OS == "android" and _toolset == "target"', {
93           'conditions': [
94             ['target_arch == "ia32" or target_arch == "x64"', {
95               'sources/': [
96                 ['include', '^atomicops_internals_x86_gcc\\.cc$'],
97               ],
98             }],
99             ['target_arch == "mipsel"', {
100               'sources/': [
101                 ['include', '^atomicops_internals_mips_gcc\\.cc$'],
102               ],
103             }],
104           ],
105           'dependencies': [
106             'base_jni_headers',
107             '../third_party/ashmem/ashmem.gyp:ashmem',
108           ],
109           'link_settings': {
110             'libraries': [
111               '-llog',
112             ],
113           },
114           'sources!': [
115             'debug/stack_trace_posix.cc',
116           ],
117           'includes': [
118             '../build/android/cpufeatures.gypi',
119           ],
120         }],
121         ['OS == "android" and _toolset == "target" and android_webview_build == 0', {
122           'dependencies': [
123             'base_java',
124           ],
125         }],
126         ['os_bsd==1', {
127           'include_dirs': [
128             '/usr/local/include',
129           ],
130           'link_settings': {
131             'libraries': [
132               '-L/usr/local/lib -lexecinfo',
133             ],
134           },
135         }],
136         ['OS == "linux"', {
137           'link_settings': {
138             'libraries': [
139               # We need rt for clock_gettime().
140               '-lrt',
141               # For 'native_library_linux.cc'
142               '-ldl',
143             ],
144           },
145           'conditions': [
146             ['use_allocator!="tcmalloc"', {
147               'defines': [
148                 'NO_TCMALLOC',
149               ],
150               'direct_dependent_settings': {
151                 'defines': [
152                   'NO_TCMALLOC',
153                 ],
154               },
155             }],
156           ],
157         }],
158         ['OS == "win"', {
159           # Specify delayload for base.dll.
160           'msvs_settings': {
161             'VCLinkerTool': {
162               'DelayLoadDLLs': [
163                 'powrprof.dll',
164               ],
165               'AdditionalDependencies': [
166                 'powrprof.lib',
167               ],
168             },
169           },
170           # Specify delayload for components that link with base.lib.
171           'all_dependent_settings': {
172             'msvs_settings': {
173               'VCLinkerTool': {
174                 'DelayLoadDLLs': [
175                   'powrprof.dll',
176                 ],
177                 'AdditionalDependencies': [
178                   'powrprof.lib',
179                 ],
180               },
181             },
182           },
183         }],
184         ['OS == "mac" or (OS == "ios" and _toolset == "host")', {
185           'link_settings': {
186             'libraries': [
187               '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
188               '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
189               '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
190               '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
191               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
192               '$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
193               '$(SDKROOT)/System/Library/Frameworks/Security.framework',
194             ],
195           },
196           'dependencies': [
197             '../third_party/mach_override/mach_override.gyp:mach_override',
198           ],
199         }],
200         ['OS == "ios" and _toolset != "host"', {
201           'link_settings': {
202             'libraries': [
203               '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
204               '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
205               '$(SDKROOT)/System/Library/Frameworks/CoreText.framework',
206               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
207               '$(SDKROOT)/System/Library/Frameworks/UIKit.framework',
208             ],
209           },
210         }],
211         ['OS != "win" and OS != "ios"', {
212             'dependencies': ['../third_party/libevent/libevent.gyp:libevent'],
213         },],
214         ['component=="shared_library"', {
215           'conditions': [
216             ['OS=="win"', {
217               'sources!': [
218                 'debug/debug_on_start_win.cc',
219               ],
220             }],
221           ],
222         }],
223       ],
224       'sources': [
225         'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
226         'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
227         'async_socket_io_handler.h',
228         'async_socket_io_handler_posix.cc',
229         'async_socket_io_handler_win.cc',
230         'auto_reset.h',
231         'event_recorder.h',
232         'event_recorder_stubs.cc',
233         'event_recorder_win.cc',
234         'linux_util.cc',
235         'linux_util.h',
236         'message_loop/message_pump_android.cc',
237         'message_loop/message_pump_android.h',
238         'message_loop/message_pump_glib.cc',
239         'message_loop/message_pump_glib.h',
240         'message_loop/message_pump_io_ios.cc',
241         'message_loop/message_pump_io_ios.h',
242         'message_loop/message_pump_libevent.cc',
243         'message_loop/message_pump_libevent.h',
244         'message_loop/message_pump_mac.h',
245         'message_loop/message_pump_mac.mm',
246         'metrics/field_trial.cc',
247         'metrics/field_trial.h',
248         'posix/file_descriptor_shuffle.cc',
249         'posix/file_descriptor_shuffle.h',
250         'sync_socket.h',
251         'sync_socket_win.cc',
252         'sync_socket_posix.cc',
253       ],
254     },
255     {
256       'target_name': 'base_i18n',
257       'type': '<(component)',
258       'variables': {
259         'enable_wexit_time_destructors': 1,
260         'optimize': 'max',
261         'base_i18n_target': 1,
262       },
263       'dependencies': [
264         'base',
265         'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
266         '../third_party/icu/icu.gyp:icui18n',
267         '../third_party/icu/icu.gyp:icuuc',
268       ],
269       'conditions': [
270         ['OS == "win"', {
271           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
272           'msvs_disabled_warnings': [
273             4267,
274           ],
275         }],
276         ['icu_use_data_file_flag==1', {
277           'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE'],
278         }, { # else icu_use_data_file_flag !=1
279           'conditions': [
280             ['OS=="win"', {
281               'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_SHARED'],
282             }, {
283               'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC'],
284             }],
285           ],
286         }],
287       ],
288       'export_dependent_settings': [
289         'base',
290       ],
293     },
294     {
295       'target_name': 'base_message_loop_tests',
296       'type': 'static_library',
297       'dependencies': [
298         'base',
299         '../testing/gtest.gyp:gtest',
300       ],
301       'sources': [
302         'message_loop/message_loop_test.cc',
303         'message_loop/message_loop_test.h',
304       ],
305     },
306     {
307       'target_name': 'base_prefs',
308       'type': '<(component)',
309       'variables': {
310         'enable_wexit_time_destructors': 1,
311         'optimize': 'max',
312       },
313       'dependencies': [
314         'base',
315       ],
316       'export_dependent_settings': [
317         'base',
318       ],
319       'defines': [
320         'BASE_PREFS_IMPLEMENTATION',
321       ],
322       'sources': [
323         'prefs/base_prefs_export.h',
324         'prefs/default_pref_store.cc',
325         'prefs/default_pref_store.h',
326         'prefs/json_pref_store.cc',
327         'prefs/json_pref_store.h',
328         'prefs/overlay_user_pref_store.cc',
329         'prefs/overlay_user_pref_store.h',
330         'prefs/persistent_pref_store.h',
331         'prefs/pref_change_registrar.cc',
332         'prefs/pref_change_registrar.h',
333         'prefs/pref_filter.h',
334         'prefs/pref_member.cc',
335         'prefs/pref_member.h',
336         'prefs/pref_notifier.h',
337         'prefs/pref_notifier_impl.cc',
338         'prefs/pref_notifier_impl.h',
339         'prefs/pref_observer.h',
340         'prefs/pref_registry.cc',
341         'prefs/pref_registry.h',
342         'prefs/pref_registry_simple.cc',
343         'prefs/pref_registry_simple.h',
344         'prefs/pref_service.cc',
345         'prefs/pref_service.h',
346         'prefs/pref_service_factory.cc',
347         'prefs/pref_service_factory.h',
348         'prefs/pref_store.cc',
349         'prefs/pref_store.h',
350         'prefs/pref_value_map.cc',
351         'prefs/pref_value_map.h',
352         'prefs/pref_value_store.cc',
353         'prefs/pref_value_store.h',
354         'prefs/scoped_user_pref_update.cc',
355         'prefs/scoped_user_pref_update.h',
356         'prefs/value_map_pref_store.cc',
357         'prefs/value_map_pref_store.h',
358         'prefs/writeable_pref_store.h',
359       ],
360     },
361     {
362       'target_name': 'base_prefs_test_support',
363       'type': 'static_library',
364       'dependencies': [
365         'base',
366         'base_prefs',
367         '../testing/gmock.gyp:gmock',
368       ],
369       'sources': [
370         'prefs/mock_pref_change_callback.cc',
371         'prefs/pref_store_observer_mock.cc',
372         'prefs/pref_store_observer_mock.h',
373         'prefs/testing_pref_service.cc',
374         'prefs/testing_pref_service.h',
375         'prefs/testing_pref_store.cc',
376         'prefs/testing_pref_store.h',
377       ],
378     },
379     {
380       # This is the subset of files from base that should not be used with a
381       # dynamic library. Note that this library cannot depend on base because
382       # base depends on base_static.
383       'target_name': 'base_static',
384       'type': 'static_library',
385       'variables': {
386         'enable_wexit_time_destructors': 1,
387         'optimize': 'max',
388       },
389       'toolsets': ['host', 'target'],
390       'sources': [
391         'base_switches.cc',
392         'base_switches.h',
393         'win/pe_image.cc',
394         'win/pe_image.h',
395       ],
396       'include_dirs': [
397         '..',
398       ],
399     },
400     # Include this target for a main() function that simply instantiates
401     # and runs a base::TestSuite.
402     {
403       'target_name': 'run_all_unittests',
404       'type': 'static_library',
405       'dependencies': [
406         'test_support_base',
407       ],
408       'sources': [
409         'test/run_all_unittests.cc',
410       ],
411     },
412     {
413       'target_name': 'base_unittests',
414       'type': '<(gtest_target_type)',
415       'sources': [
416         'android/application_status_listener_unittest.cc',
417         'android/jni_android_unittest.cc',
418         'android/jni_array_unittest.cc',
419         'android/jni_string_unittest.cc',
420         'android/path_utils_unittest.cc',
421         'android/scoped_java_ref_unittest.cc',
422         'android/sys_utils_unittest.cc',
423         'async_socket_io_handler_unittest.cc',
424         'at_exit_unittest.cc',
425         'atomicops_unittest.cc',
426         'barrier_closure_unittest.cc',
427         'base64_unittest.cc',
428         'big_endian_unittest.cc',
429         'bind_unittest.cc',
430         'bind_unittest.nc',
431         'bits_unittest.cc',
432         'build_time_unittest.cc',
433         'callback_helpers_unittest.cc',
434         'callback_list_unittest.cc',
435         'callback_list_unittest.nc',
436         'callback_unittest.cc',
437         'callback_unittest.nc',
438         'cancelable_callback_unittest.cc',
439         'command_line_unittest.cc',
440         'containers/hash_tables_unittest.cc',
441         'containers/linked_list_unittest.cc',
442         'containers/mru_cache_unittest.cc',
443         'containers/small_map_unittest.cc',
444         'containers/stack_container_unittest.cc',
445         'cpu_unittest.cc',
446         'debug/crash_logging_unittest.cc',
447         'debug/leak_tracker_unittest.cc',
448         'debug/proc_maps_linux_unittest.cc',
449         'debug/stack_trace_unittest.cc',
450         'debug/task_annotator_unittest.cc',
451         'debug/trace_event_argument_unittest.cc',
452         'debug/trace_event_memory_unittest.cc',
453         'debug/trace_event_synthetic_delay_unittest.cc',
454         'debug/trace_event_system_stats_monitor_unittest.cc',
455         'debug/trace_event_unittest.cc',
456         'debug/trace_event_unittest.h',
457         'debug/trace_event_win_unittest.cc',
458         'deferred_sequenced_task_runner_unittest.cc',
459         'environment_unittest.cc',
460         'file_version_info_unittest.cc',
461         'files/dir_reader_posix_unittest.cc',
462         'files/file_path_unittest.cc',
463         'files/file_proxy_unittest.cc',
464         'files/file_unittest.cc',
465         'files/file_util_proxy_unittest.cc',
466         'files/file_util_unittest.cc',
467         'files/important_file_writer_unittest.cc',
468         'files/memory_mapped_file_unittest.cc',
469         'files/scoped_temp_dir_unittest.cc',
470         'gmock_unittest.cc',
471         'guid_unittest.cc',
472         'hash_unittest.cc',
473         'id_map_unittest.cc',
474         'i18n/break_iterator_unittest.cc',
475         'i18n/char_iterator_unittest.cc',
476         'i18n/case_conversion_unittest.cc',
477         'i18n/file_util_icu_unittest.cc',
478         'i18n/icu_string_conversions_unittest.cc',
479         'i18n/number_formatting_unittest.cc',
480         'i18n/rtl_unittest.cc',
481         'i18n/streaming_utf8_validator_unittest.cc',
482         'i18n/string_search_unittest.cc',
483         'i18n/time_formatting_unittest.cc',
484         'i18n/timezone_unittest.cc',
485         'ios/device_util_unittest.mm',
486         'json/json_parser_unittest.cc',
487         'json/json_reader_unittest.cc',
488         'json/json_value_converter_unittest.cc',
489         'json/json_value_serializer_unittest.cc',
490         'json/json_writer_unittest.cc',
491         'json/string_escape_unittest.cc',
492         'lazy_instance_unittest.cc',
493         'logging_unittest.cc',
494         'mac/bind_objc_block_unittest.mm',
495         'mac/foundation_util_unittest.mm',
496         'mac/libdispatch_task_runner_unittest.cc',
497         'mac/mac_util_unittest.mm',
498         'mac/objc_property_releaser_unittest.mm',
499         'mac/scoped_nsobject_unittest.mm',
500         'mac/scoped_objc_class_swizzler_unittest.mm',
501         'mac/scoped_sending_event_unittest.mm',
502         'md5_unittest.cc',
503         'memory/aligned_memory_unittest.cc',
504         'memory/discardable_memory_manager_unittest.cc',
505         'memory/discardable_memory_unittest.cc',
506         'memory/linked_ptr_unittest.cc',
507         'memory/ref_counted_memory_unittest.cc',
508         'memory/ref_counted_unittest.cc',
509         'memory/scoped_ptr_unittest.cc',
510         'memory/scoped_ptr_unittest.nc',
511         'memory/scoped_vector_unittest.cc',
512         'memory/shared_memory_unittest.cc',
513         'memory/singleton_unittest.cc',
514         'memory/weak_ptr_unittest.cc',
515         'memory/weak_ptr_unittest.nc',
516         'message_loop/message_loop_proxy_impl_unittest.cc',
517         'message_loop/message_loop_proxy_unittest.cc',
518         'message_loop/message_loop_unittest.cc',
519         'message_loop/message_pump_glib_unittest.cc',
520         'message_loop/message_pump_io_ios_unittest.cc',
521         'message_loop/message_pump_libevent_unittest.cc',
522         'metrics/sample_map_unittest.cc',
523         'metrics/sample_vector_unittest.cc',
524         'metrics/bucket_ranges_unittest.cc',
525         'metrics/field_trial_unittest.cc',
526         'metrics/histogram_base_unittest.cc',
527         'metrics/histogram_delta_serialization_unittest.cc',
528         'metrics/histogram_snapshot_manager_unittest.cc',
529         'metrics/histogram_unittest.cc',
530         'metrics/sparse_histogram_unittest.cc',
531         'metrics/stats_table_unittest.cc',
532         'metrics/statistics_recorder_unittest.cc',
533         'observer_list_unittest.cc',
534         'os_compat_android_unittest.cc',
535         'path_service_unittest.cc',
536         'pickle_unittest.cc',
537         'posix/file_descriptor_shuffle_unittest.cc',
538         'posix/unix_domain_socket_linux_unittest.cc',
539         'power_monitor/power_monitor_unittest.cc',
540         'prefs/default_pref_store_unittest.cc',
541         'prefs/json_pref_store_unittest.cc',
542         'prefs/mock_pref_change_callback.h',
543         'prefs/overlay_user_pref_store_unittest.cc',
544         'prefs/pref_change_registrar_unittest.cc',
545         'prefs/pref_member_unittest.cc',
546         'prefs/pref_notifier_impl_unittest.cc',
547         'prefs/pref_service_unittest.cc',
548         'prefs/pref_value_map_unittest.cc',
549         'prefs/pref_value_store_unittest.cc',
550         'prefs/scoped_user_pref_update_unittest.cc',
551         'process/memory_unittest.cc',
552         'process/memory_unittest_mac.h',
553         'process/memory_unittest_mac.mm',
554         'process/process_metrics_unittest.cc',
555         'process/process_metrics_unittest_ios.cc',
556         'process/process_util_unittest.cc',
557         'profiler/tracked_time_unittest.cc',
558         'rand_util_unittest.cc',
559         'numerics/safe_numerics_unittest.cc',
560         'scoped_clear_errno_unittest.cc',
561         'scoped_generic_unittest.cc',
562         'scoped_native_library_unittest.cc',
563         'security_unittest.cc',
564         'sequence_checker_unittest.cc',
565         'sha1_unittest.cc',
566         'stl_util_unittest.cc',
567         'strings/nullable_string16_unittest.cc',
568         'strings/safe_sprintf_unittest.cc',
569         'strings/string16_unittest.cc',
570         'strings/stringprintf_unittest.cc',
571         'strings/string_number_conversions_unittest.cc',
572         'strings/string_piece_unittest.cc',
573         'strings/string_split_unittest.cc',
574         'strings/string_tokenizer_unittest.cc',
575         'strings/string_util_unittest.cc',
576         'strings/stringize_macros_unittest.cc',
577         'strings/sys_string_conversions_mac_unittest.mm',
578         'strings/sys_string_conversions_unittest.cc',
579         'strings/utf_offset_string_conversions_unittest.cc',
580         'strings/utf_string_conversions_unittest.cc',
581         'supports_user_data_unittest.cc',
582         'sync_socket_unittest.cc',
583         'synchronization/cancellation_flag_unittest.cc',
584         'synchronization/condition_variable_unittest.cc',
585         'synchronization/lock_unittest.cc',
586         'synchronization/waitable_event_unittest.cc',
587         'synchronization/waitable_event_watcher_unittest.cc',
588         'sys_info_unittest.cc',
589         'system_monitor/system_monitor_unittest.cc',
590         'task/cancelable_task_tracker_unittest.cc',
591         'task_runner_util_unittest.cc',
592         'template_util_unittest.cc',
593         'test/expectations/expectation_unittest.cc',
594         'test/expectations/parser_unittest.cc',
595         'test/histogram_tester_unittest.cc',
596         'test/test_pending_task_unittest.cc',
597         'test/test_reg_util_win_unittest.cc',
598         'test/trace_event_analyzer_unittest.cc',
599         'threading/non_thread_safe_unittest.cc',
600         'threading/platform_thread_unittest.cc',
601         'threading/sequenced_worker_pool_unittest.cc',
602         'threading/simple_thread_unittest.cc',
603         'threading/thread_checker_unittest.cc',
604         'threading/thread_collision_warner_unittest.cc',
605         'threading/thread_id_name_manager_unittest.cc',
606         'threading/thread_local_storage_unittest.cc',
607         'threading/thread_local_unittest.cc',
608         'threading/thread_unittest.cc',
609         'threading/watchdog_unittest.cc',
610         'threading/worker_pool_posix_unittest.cc',
611         'threading/worker_pool_unittest.cc',
612         'time/pr_time_unittest.cc',
613         'time/time_unittest.cc',
614         'time/time_win_unittest.cc',
615         'timer/hi_res_timer_manager_unittest.cc',
616         'timer/mock_timer_unittest.cc',
617         'timer/timer_unittest.cc',
618         'tools_sanity_unittest.cc',
619         'tracked_objects_unittest.cc',
620         'tuple_unittest.cc',
621         'values_unittest.cc',
622         'version_unittest.cc',
623         'vlog_unittest.cc',
624         'win/dllmain.cc',
625         'win/enum_variant_unittest.cc',
626         'win/event_trace_consumer_unittest.cc',
627         'win/event_trace_controller_unittest.cc',
628         'win/event_trace_provider_unittest.cc',
629         'win/i18n_unittest.cc',
630         'win/iunknown_impl_unittest.cc',
631         'win/message_window_unittest.cc',
632         'win/object_watcher_unittest.cc',
633         'win/pe_image_unittest.cc',
634         'win/registry_unittest.cc',
635         'win/scoped_bstr_unittest.cc',
636         'win/scoped_comptr_unittest.cc',
637         'win/scoped_process_information_unittest.cc',
638         'win/scoped_variant_unittest.cc',
639         'win/shortcut_unittest.cc',
640         'win/startup_information_unittest.cc',
641         'win/win_util_unittest.cc',
642         'win/wrapped_window_proc_unittest.cc',
643       ],
644       'dependencies': [
645         'base',
646         'base_i18n',
647         'base_message_loop_tests',
648         'base_prefs',
649         'base_prefs_test_support',
650         'base_static',
651         'run_all_unittests',
652         'test_support_base',
653         'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
654         '../testing/gmock.gyp:gmock',
655         '../testing/gtest.gyp:gtest',
656         '../third_party/icu/icu.gyp:icui18n',
657         '../third_party/icu/icu.gyp:icuuc',
658       ],
659       'includes': ['../build/nocompile.gypi'],
660       'variables': {
661          # TODO(ajwong): Is there a way to autodetect this?
662         'module_dir': 'base'
663       },
664       'conditions': [
665         ['OS == "android"', {
666           'dependencies': [
667             'android/jni_generator/jni_generator.gyp:jni_generator_tests',
668             '../testing/android/native_test.gyp:native_test_native_code',
669           ],
670         }],
671         ['OS == "ios" and _toolset != "host"', {
672           'sources/': [
673             # Only test the iOS-meaningful portion of process_utils.
674             ['exclude', '^process/memory_unittest'],
675             ['exclude', '^process/process_util_unittest\\.cc$'],
676             ['include', '^process/process_util_unittest_ios\\.cc$'],
677             # Requires spawning processes.
678             ['exclude', '^metrics/stats_table_unittest\\.cc$'],
679             # iOS does not use message_pump_libevent.
680             ['exclude', '^message_loop/message_pump_libevent_unittest\\.cc$'],
681           ],
682           'actions': [
683             {
684               'action_name': 'copy_test_data',
685               'variables': {
686                 'test_data_files': [
687                   'test/data',
688                 ],
689                 'test_data_prefix': 'base',
690               },
691               'includes': [ '../build/copy_test_data_ios.gypi' ],
692             },
693           ],
694         }],
695         ['desktop_linux == 1 or chromeos == 1', {
696           'defines': [
697             'USE_SYMBOLIZE',
698           ],
699           'sources!': [
700             'file_version_info_unittest.cc',
701           ],
702           'conditions': [
703             [ 'desktop_linux==1', {
704               'sources': [
705                 'nix/xdg_util_unittest.cc',
706               ],
707             }],
708           ],
709         }],
710         ['use_glib == 1', {
711           'dependencies': [
712             '../build/linux/system.gyp:glib',
713           ],
714         }, {  # use_glib == 0
715           'sources!': [
716             'message_loop/message_pump_glib_unittest.cc',
717           ]
718         }],
719         ['use_ozone == 1', {
720           'sources!': [
721             'message_loop/message_pump_glib_unittest.cc',
722           ]
723         }],
724         ['OS == "linux" and use_allocator!="none"', {
725             'dependencies': [
726               'allocator/allocator.gyp:allocator',
727             ],
728           },
729         ],
730         ['OS == "win"', {
731           'sources!': [
732             'file_descriptor_shuffle_unittest.cc',
733             'files/dir_reader_posix_unittest.cc',
734             'threading/worker_pool_posix_unittest.cc',
735             'message_loop/message_pump_libevent_unittest.cc',
736           ],
737           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
738           'msvs_disabled_warnings': [
739             4267,
740           ],
741           'conditions': [
742             # This is needed so base_unittests uses the allocator shim, as
743             # SecurityTest.MemoryAllocationRestriction* tests are dependent
744             # on tcmalloc.
745             # TODO(wfh): crbug.com/246278 Move tcmalloc specific tests into
746             # their own test suite.
747             ['win_use_allocator_shim==1', {
748               'dependencies': [
749                 'allocator/allocator.gyp:allocator',
750               ],
751             }],
752             ['icu_use_data_file_flag==0', {
753               # This is needed to trigger the dll copy step on windows.
754               # TODO(mark): This should not be necessary.
755               'dependencies': [
756                 '../third_party/icu/icu.gyp:icudata',
757               ],
758             }],
759           ],
760         }, {  # OS != "win"
761           'dependencies': [
762             '../third_party/libevent/libevent.gyp:libevent'
763           ],
764         }],
765       ],  # conditions
766       'target_conditions': [
767         ['OS == "ios" and _toolset != "host"', {
768           'sources/': [
769             # Pull in specific Mac files for iOS (which have been filtered out
770             # by file name rules).
771             ['include', '^mac/bind_objc_block_unittest\\.mm$'],
772             ['include', '^mac/foundation_util_unittest\\.mm$',],
773             ['include', '^mac/objc_property_releaser_unittest\\.mm$'],
774             ['include', '^mac/scoped_nsobject_unittest\\.mm$'],
775             ['include', '^sys_string_conversions_mac_unittest\\.mm$'],
776           ],
777         }],
778         ['OS == "android" and _toolset == "target"', {
779           'sources': [
780             'memory/discardable_memory_ashmem_allocator_unittest.cc',
781           ],
782         }],
783         ['OS == "android"', {
784           'sources/': [
785             ['include', '^debug/proc_maps_linux_unittest\\.cc$'],
786           ],
787         }],
788       ],  # target_conditions
789     },
790     {
791       'target_name': 'base_perftests',
792       'type': '<(gtest_target_type)',
793       'dependencies': [
794         'base',
795         'test_support_base',
796         '../testing/gtest.gyp:gtest',
797       ],
798       'sources': [
799         'threading/thread_perftest.cc',
800         'test/run_all_unittests.cc',
801         '../testing/perf/perf_test.cc'
802       ],
803       'conditions': [
804         ['OS == "android"', {
805           'dependencies': [
806             '../testing/android/native_test.gyp:native_test_native_code',
807           ],
808         }],
809       ],
810     },
811     {
812       'target_name': 'base_i18n_perftests',
813       'type': '<(gtest_target_type)',
814       'dependencies': [
815         'test_support_base',
816         'test_support_perf',
817         '../testing/gtest.gyp:gtest',
818         'base_i18n',
819         'base',
820       ],
821       'sources': [
822         'i18n/streaming_utf8_validator_perftest.cc',
823       ],
824     },
825     {
826       # GN: //base/test:test_support
827       'target_name': 'test_support_base',
828       'type': 'static_library',
829       'dependencies': [
830         'base',
831         'base_static',
832         'base_i18n',
833         '../testing/gmock.gyp:gmock',
834         '../testing/gtest.gyp:gtest',
835         '../third_party/libxml/libxml.gyp:libxml',
836         'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
837       ],
838       'export_dependent_settings': [
839         'base',
840       ],
841       'conditions': [
842         ['os_posix==0', {
843           'sources!': [
844             'test/scoped_locale.cc',
845             'test/scoped_locale.h',
846           ],
847         }],
848         ['os_bsd==1', {
849           'sources!': [
850             'test/test_file_util_linux.cc',
851           ],
852         }],
853         ['OS == "android"', {
854           'dependencies': [
855             'base_unittests_jni_headers',
856             'base_java_unittest_support',
857           ],
858         }],
859       ],
860       'sources': [
861         'test/expectations/expectation.cc',
862         'test/expectations/expectation.h',
863         'test/expectations/parser.cc',
864         'test/expectations/parser.h',
865         'test/gtest_xml_util.cc',
866         'test/gtest_xml_util.h',
867         'test/launcher/test_launcher.cc',
868         'test/launcher/test_launcher.h',
869         'test/launcher/test_result.cc',
870         'test/launcher/test_result.h',
871         'test/launcher/test_results_tracker.cc',
872         'test/launcher/test_results_tracker.h',
873         'test/launcher/unit_test_launcher.cc',
874         'test/launcher/unit_test_launcher.h',
875         'test/launcher/unit_test_launcher_ios.cc',
876         'test/mock_chrome_application_mac.h',
877         'test/mock_chrome_application_mac.mm',
878         'test/mock_devices_changed_observer.cc',
879         'test/mock_devices_changed_observer.h',
880         'test/mock_time_provider.cc',
881         'test/mock_time_provider.h',
882         'test/multiprocess_test.cc',
883         'test/multiprocess_test.h',
884         'test/multiprocess_test_android.cc',
885         'test/null_task_runner.cc',
886         'test/null_task_runner.h',
887         'test/perf_log.cc',
888         'test/perf_log.h',
889         'test/perf_test_suite.cc',
890         'test/perf_test_suite.h',
891         'test/perf_time_logger.cc',
892         'test/perf_time_logger.h',
893         'test/power_monitor_test_base.cc',
894         'test/power_monitor_test_base.h',
895         'test/scoped_locale.cc',
896         'test/scoped_locale.h',
897         'test/scoped_path_override.cc',
898         'test/scoped_path_override.h',
899         'test/sequenced_task_runner_test_template.cc',
900         'test/sequenced_task_runner_test_template.h',
901         'test/sequenced_worker_pool_owner.cc',
902         'test/sequenced_worker_pool_owner.h',
903         'test/simple_test_clock.cc',
904         'test/simple_test_clock.h',
905         'test/simple_test_tick_clock.cc',
906         'test/simple_test_tick_clock.h',
907         'test/histogram_tester.cc',
908         'test/histogram_tester.h',
909         'test/task_runner_test_template.cc',
910         'test/task_runner_test_template.h',
911         'test/test_file_util.cc',
912         'test/test_file_util.h',
913         'test/test_file_util_android.cc',
914         'test/test_file_util_linux.cc',
915         'test/test_file_util_mac.cc',
916         'test/test_file_util_posix.cc',
917         'test/test_file_util_win.cc',
918         'test/test_io_thread.cc',
919         'test/test_io_thread.h',
920         'test/test_listener_ios.h',
921         'test/test_listener_ios.mm',
922         'test/test_pending_task.cc',
923         'test/test_pending_task.h',
924         'test/test_process_killer_win.cc',
925         'test/test_process_killer_win.h',
926         'test/test_reg_util_win.cc',
927         'test/test_reg_util_win.h',
928         'test/test_shortcut_win.cc',
929         'test/test_shortcut_win.h',
930         'test/test_simple_task_runner.cc',
931         'test/test_simple_task_runner.h',
932         'test/test_suite.cc',
933         'test/test_suite.h',
934         'test/test_support_android.cc',
935         'test/test_support_android.h',
936         'test/test_support_ios.h',
937         'test/test_support_ios.mm',
938         'test/test_switches.cc',
939         'test/test_switches.h',
940         'test/test_timeouts.cc',
941         'test/test_timeouts.h',
942         'test/thread_test_helper.cc',
943         'test/thread_test_helper.h',
944         'test/trace_event_analyzer.cc',
945         'test/trace_event_analyzer.h',
946         'test/values_test_util.cc',
947         'test/values_test_util.h',
948       ],
949       'target_conditions': [
950         ['OS == "ios"', {
951           'sources/': [
952             # Pull in specific Mac files for iOS (which have been filtered out
953             # by file name rules).
954             ['include', '^test/test_file_util_mac\\.cc$'],
955           ],
956           'sources!': [
957             # iOS uses its own unit test launcher.
958             'test/launcher/unit_test_launcher.cc',
959           ],
960         }],
961       ],  # target_conditions
962     },
963     {
964       'target_name': 'test_support_perf',
965       'type': 'static_library',
966       'dependencies': [
967         'base',
968         'test_support_base',
969         '../testing/gtest.gyp:gtest',
970       ],
971       'sources': [
972         'test/run_all_perftests.cc',
973       ],
974       'direct_dependent_settings': {
975         'defines': [
976           'PERF_TEST',
977         ],
978       },
979     },
980   ],
981   'conditions': [
982     ['OS!="ios"', {
983       'targets': [
984         {
985           'target_name': 'check_example',
986           'type': 'executable',
987           'sources': [
988             'check_example.cc',
989           ],
990           'dependencies': [
991             'base',
992           ],
993         },
994         {
995           'target_name': 'build_utf8_validator_tables',
996           'type': 'executable',
997           'toolsets': ['host'],
998           'dependencies': [
999             'base',
1000             '../third_party/icu/icu.gyp:icuuc',
1001           ],
1002           'sources': [
1003             'i18n/build_utf8_validator_tables.cc'
1004           ],
1005         },
1006       ],
1007     }],
1008     ['OS == "win" and target_arch=="ia32"', {
1009       'targets': [
1010         # The base_win64 target here allows us to use base for Win64 targets
1011         # (the normal build is 32 bits).
1012         {
1013           'target_name': 'base_win64',
1014           'type': '<(component)',
1015           'variables': {
1016             'base_target': 1,
1017           },
1018           'dependencies': [
1019             'base_static_win64',
1020             'allocator/allocator.gyp:allocator_extension_thunks_win64',
1021             '../third_party/modp_b64/modp_b64.gyp:modp_b64_win64',
1022             'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
1023           ],
1024           # TODO(gregoryd): direct_dependent_settings should be shared with the
1025           # 32-bit target, but it doesn't work due to a bug in gyp
1026           'direct_dependent_settings': {
1027             'include_dirs': [
1028               '..',
1029             ],
1030           },
1031           'defines': [
1032             'BASE_WIN64',
1033             '<@(nacl_win64_defines)',
1034           ],
1035           'configurations': {
1036             'Common_Base': {
1037               'msvs_target_platform': 'x64',
1038             },
1039           },
1040           'conditions': [
1041             ['component == "shared_library"', {
1042               'sources!': [
1043                 'debug/debug_on_start_win.cc',
1044               ],
1045             }],
1046           ],
1047           # Specify delayload for base_win64.dll.
1048           'msvs_settings': {
1049             'VCLinkerTool': {
1050               'DelayLoadDLLs': [
1051                 'powrprof.dll',
1052               ],
1053               'AdditionalDependencies': [
1054                 'powrprof.lib',
1055               ],
1056             },
1057           },
1058           # Specify delayload for components that link with base_win64.lib.
1059           'all_dependent_settings': {
1060             'msvs_settings': {
1061               'VCLinkerTool': {
1062                 'DelayLoadDLLs': [
1063                   'powrprof.dll',
1064                 ],
1065                 'AdditionalDependencies': [
1066                   'powrprof.lib',
1067                 ],
1068               },
1069             },
1070           },
1071           # TODO(rvargas): Bug 78117. Remove this.
1072           'msvs_disabled_warnings': [
1073             4244,
1074             4996,
1075             4267,
1076           ],
1077           'sources': [
1078             'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
1079             'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
1080             'async_socket_io_handler.h',
1081             'async_socket_io_handler_posix.cc',
1082             'async_socket_io_handler_win.cc',
1083             'auto_reset.h',
1084             'event_recorder.h',
1085             'event_recorder_stubs.cc',
1086             'event_recorder_win.cc',
1087             'linux_util.cc',
1088             'linux_util.h',
1089             'md5.cc',
1090             'md5.h',
1091             'message_loop/message_pump_libevent.cc',
1092             'message_loop/message_pump_libevent.h',
1093             'metrics/field_trial.cc',
1094             'metrics/field_trial.h',
1095             'posix/file_descriptor_shuffle.cc',
1096             'posix/file_descriptor_shuffle.h',
1097             'sync_socket.h',
1098             'sync_socket_win.cc',
1099             'sync_socket_posix.cc',
1100           ],
1101         },
1102         {
1103           'target_name': 'base_i18n_nacl_win64',
1104           'type': '<(component)',
1105           # TODO(gregoryd): direct_dependent_settings should be shared with the
1106           # 32-bit target, but it doesn't work due to a bug in gyp
1107           'direct_dependent_settings': {
1108             'include_dirs': [
1109               '..',
1110             ],
1111           },
1112           'defines': [
1113             '<@(nacl_win64_defines)',
1114             'BASE_I18N_IMPLEMENTATION',
1115           ],
1116           'include_dirs': [
1117             '..',
1118           ],
1119           'sources': [
1120             'i18n/icu_util_nacl_win64.cc',
1121           ],
1122           'configurations': {
1123             'Common_Base': {
1124               'msvs_target_platform': 'x64',
1125             },
1126           },
1127         },
1128         {
1129           # TODO(rvargas): Remove this when gyp finally supports a clean model.
1130           # See bug 36232.
1131           'target_name': 'base_static_win64',
1132           'type': 'static_library',
1133           'sources': [
1134             'base_switches.cc',
1135             'base_switches.h',
1136             'win/pe_image.cc',
1137             'win/pe_image.h',
1138           ],
1139           'sources!': [
1140             # base64.cc depends on modp_b64.
1141             'base64.cc',
1142           ],
1143           'include_dirs': [
1144             '..',
1145           ],
1146           'configurations': {
1147             'Common_Base': {
1148               'msvs_target_platform': 'x64',
1149             },
1150           },
1151           'defines': [
1152             '<@(nacl_win64_defines)',
1153           ],
1154           # TODO(rvargas): Bug 78117. Remove this.
1155           'msvs_disabled_warnings': [
1156             4244,
1157           ],
1158         },
1159       ],
1160     }],
1161     ['os_posix==1 and OS!="mac" and OS!="ios"', {
1162       'targets': [
1163         {
1164           'target_name': 'symbolize',
1165           'type': 'static_library',
1166           'toolsets': ['host', 'target'],
1167           'variables': {
1168             'chromium_code': 0,
1169           },
1170           'conditions': [
1171             ['OS == "solaris"', {
1172               'include_dirs': [
1173                 '/usr/gnu/include',
1174                 '/usr/gnu/include/libelf',
1175               ],
1176             },],
1177           ],
1178           'cflags': [
1179             '-Wno-sign-compare',
1180           ],
1181           'cflags!': [
1182             '-Wextra',
1183           ],
1184           'defines': [
1185             'GLOG_BUILD_CONFIG_INCLUDE="build/build_config.h"',
1186           ],
1187           'sources': [
1188             'third_party/symbolize/config.h',
1189             'third_party/symbolize/demangle.cc',
1190             'third_party/symbolize/demangle.h',
1191             'third_party/symbolize/glog/logging.h',
1192             'third_party/symbolize/glog/raw_logging.h',
1193             'third_party/symbolize/symbolize.cc',
1194             'third_party/symbolize/symbolize.h',
1195             'third_party/symbolize/utilities.h',
1196           ],
1197           'include_dirs': [
1198             '..',
1199           ],
1200         },
1201         {
1202           'target_name': 'xdg_mime',
1203           'type': 'static_library',
1204           'toolsets': ['host', 'target'],
1205           'variables': {
1206             'chromium_code': 0,
1207           },
1208           'cflags!': [
1209             '-Wextra',
1210           ],
1211           'sources': [
1212             'third_party/xdg_mime/xdgmime.c',
1213             'third_party/xdg_mime/xdgmime.h',
1214             'third_party/xdg_mime/xdgmimealias.c',
1215             'third_party/xdg_mime/xdgmimealias.h',
1216             'third_party/xdg_mime/xdgmimecache.c',
1217             'third_party/xdg_mime/xdgmimecache.h',
1218             'third_party/xdg_mime/xdgmimeglob.c',
1219             'third_party/xdg_mime/xdgmimeglob.h',
1220             'third_party/xdg_mime/xdgmimeicon.c',
1221             'third_party/xdg_mime/xdgmimeicon.h',
1222             'third_party/xdg_mime/xdgmimeint.c',
1223             'third_party/xdg_mime/xdgmimeint.h',
1224             'third_party/xdg_mime/xdgmimemagic.c',
1225             'third_party/xdg_mime/xdgmimemagic.h',
1226             'third_party/xdg_mime/xdgmimeparent.c',
1227             'third_party/xdg_mime/xdgmimeparent.h',
1228           ],
1229         },
1230       ],
1231     }],
1232     ['OS == "android"', {
1233       'targets': [
1234         {
1235           # GN: //base:base_jni_headers
1236           'target_name': 'base_jni_headers',
1237           'type': 'none',
1238           'sources': [
1239             'android/java/src/org/chromium/base/ApplicationStatus.java',
1240             'android/java/src/org/chromium/base/BuildInfo.java',
1241             'android/java/src/org/chromium/base/CommandLine.java',
1242             'android/java/src/org/chromium/base/ContentUriUtils.java',
1243             'android/java/src/org/chromium/base/CpuFeatures.java',
1244             'android/java/src/org/chromium/base/EventLog.java',
1245             'android/java/src/org/chromium/base/FieldTrialList.java',
1246             'android/java/src/org/chromium/base/ImportantFileWriterAndroid.java',
1247             'android/java/src/org/chromium/base/JNIUtils.java',
1248             'android/java/src/org/chromium/base/library_loader/LibraryLoader.java',
1249             'android/java/src/org/chromium/base/MemoryPressureListener.java',
1250             'android/java/src/org/chromium/base/JavaHandlerThread.java',
1251             'android/java/src/org/chromium/base/PathService.java',
1252             'android/java/src/org/chromium/base/PathUtils.java',
1253             'android/java/src/org/chromium/base/PowerMonitor.java',
1254             'android/java/src/org/chromium/base/SystemMessageHandler.java',
1255             'android/java/src/org/chromium/base/SysUtils.java',
1256             'android/java/src/org/chromium/base/ThreadUtils.java',
1257             'android/java/src/org/chromium/base/TraceEvent.java',
1258           ],
1259           'variables': {
1260             'jni_gen_package': 'base',
1261           },
1262           'includes': [ '../build/jni_generator.gypi' ],
1263         },
1264         {
1265           # TODO(GN)
1266           'target_name': 'base_unittests_jni_headers',
1267           'type': 'none',
1268           'sources': [
1269             'test/android/java/src/org/chromium/base/ContentUriTestUtils.java',
1270           ],
1271           'variables': {
1272             'jni_gen_package': 'base',
1273           },
1274           'includes': [ '../build/jni_generator.gypi' ],
1275         },
1276         {
1277           # GN: //base:base_native_libraries_gen
1278           'target_name': 'base_native_libraries_gen',
1279           'type': 'none',
1280           'sources': [
1281             'android/java/templates/NativeLibraries.template',
1282           ],
1283           'variables': {
1284             'package_name': 'org/chromium/base/library_loader',
1285             'template_deps': [],
1286           },
1287           'includes': [ '../build/android/java_cpp_template.gypi' ],
1288         },
1289         {
1290           # GN: //base:base_java
1291           'target_name': 'base_java',
1292           'type': 'none',
1293           'variables': {
1294             'java_in_dir': '../base/android/java',
1295             'jar_excluded_classes': [ '*/NativeLibraries.class' ],
1296           },
1297           'dependencies': [
1298             'base_java_application_state',
1299             'base_java_memory_pressure_level_list',
1300             'base_native_libraries_gen',
1301           ],
1302           'includes': [ '../build/java.gypi' ],
1303           'conditions': [
1304             ['android_webview_build==0', {
1305               'dependencies': [
1306                 '../third_party/jsr-305/jsr-305.gyp:jsr_305_javalib',
1307               ],
1308             }]
1309           ],
1310         },
1311         {
1312           # GN: //base:base_java_unittest_support
1313           'target_name': 'base_java_unittest_support',
1314           'type': 'none',
1315           'dependencies': [
1316             'base_java',
1317           ],
1318           'variables': {
1319             'java_in_dir': '../base/test/android/java',
1320           },
1321           'includes': [ '../build/java.gypi' ],
1322         },
1323         {
1324           # GN: //base:base_java_application_state
1325           'target_name': 'base_java_application_state',
1326           'type': 'none',
1327           # This target is used to auto-generate ApplicationState.java
1328           # from a template file. The source file contains a list of
1329           # Java constant declarations matching the ones in
1330           # android/application_state_list.h.
1331           'sources': [
1332             'android/java/src/org/chromium/base/ApplicationState.template',
1333           ],
1334           'variables': {
1335             'package_name': 'org/chromium/base',
1336             'template_deps': ['android/application_state_list.h'],
1337           },
1338           'includes': [ '../build/android/java_cpp_template.gypi' ],
1339         },
1340         {
1341           # GN: //base:base_java_memory_pressure_level_list
1342           'target_name': 'base_java_memory_pressure_level_list',
1343           'type': 'none',
1344           'sources': [
1345             'android/java/src/org/chromium/base/MemoryPressureLevelList.template',
1346           ],
1347           'variables': {
1348             'package_name': 'org/chromium/base',
1349             'template_deps': ['memory/memory_pressure_level_list.h'],
1350           },
1351           'includes': [ '../build/android/java_cpp_template.gypi' ],
1352         },
1353         {
1354           # GN: //base:base_java_test_support
1355           'target_name': 'base_java_test_support',
1356           'type': 'none',
1357           'dependencies': [
1358             'base_java',
1359           ],
1360           'variables': {
1361             'java_in_dir': '../base/test/android/javatests',
1362           },
1363           'includes': [ '../build/java.gypi' ],
1364         },
1365         {
1366           # GN: //base:base_javatests
1367           'target_name': 'base_javatests',
1368           'type': 'none',
1369           'dependencies': [
1370             'base_java',
1371             'base_java_test_support',
1372           ],
1373           'variables': {
1374             'java_in_dir': '../base/android/javatests',
1375           },
1376           'includes': [ '../build/java.gypi' ],
1377         },
1378         {
1379           # TODO(GN)
1380           'target_name': 'chromium_android_linker',
1381           'type': 'shared_library',
1382           'conditions': [
1383             # Avoid breaking the webview build because it
1384             # does not have <(android_ndk_root)/crazy_linker.gyp.
1385             # Note that webview never uses the linker anyway.
1386             ['android_webview_build == 0', {
1387               'sources': [
1388                 'android/linker/linker_jni.cc',
1389               ],
1390               # The crazy linker is never instrumented.
1391               'cflags!': [
1392                 '-finstrument-functions',
1393               ],
1394               'dependencies': [
1395                 # The NDK contains the crazy_linker here:
1396                 #   '<(android_ndk_root)/crazy_linker.gyp:crazy_linker'
1397                 # However, we use our own fork.  See bug 384700.
1398                 '../third_party/android_crazy_linker/crazy_linker.gyp:crazy_linker',
1399               ],
1400             }],
1401           ],
1402         },
1403         {
1404           # TODO(GN)
1405           'target_name': 'base_perftests_apk',
1406           'type': 'none',
1407           'dependencies': [
1408             'base_perftests',
1409           ],
1410           'variables': {
1411             'test_suite_name': 'base_perftests',
1412           },
1413           'includes': [ '../build/apk_test.gypi' ],
1414         },
1415         {
1416           # GN: //base:base_unittests_apk
1417           'target_name': 'base_unittests_apk',
1418           'type': 'none',
1419           'dependencies': [
1420             'base_java',
1421             'base_unittests',
1422           ],
1423           'variables': {
1424             'test_suite_name': 'base_unittests',
1425           },
1426           'includes': [ '../build/apk_test.gypi' ],
1427         },
1428       ],
1429     }],
1430     ['OS == "win"', {
1431       'targets': [
1432         {
1433           'target_name': 'debug_message',
1434           'type': 'executable',
1435           'sources': [
1436             'debug_message.cc',
1437           ],
1438           'msvs_settings': {
1439             'VCLinkerTool': {
1440               'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
1441             },
1442           },
1443         },
1444       ],
1445     }],
1446     ['test_isolation_mode != "noop"', {
1447       'targets': [
1448         {
1449           'target_name': 'base_unittests_run',
1450           'type': 'none',
1451           'dependencies': [
1452             'base_unittests',
1453           ],
1454           'includes': [
1455             '../build/isolate.gypi',
1456             'base_unittests.isolate',
1457           ],
1458           'sources': [
1459             'base_unittests.isolate',
1460           ],
1461           'conditions': [
1462             ['use_x11 == 1', {
1463               'dependencies': [
1464                 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
1465               ],
1466             }],
1467           ],
1468         },
1469       ],
1470     }],
1471   ],