1 # Copyright 2014 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 # Essential components (and their tests) that are needed to build
6 # Chrome should be here. Other components that are useful only in
7 # Mojo land like mojo_shell should be in mojo.gyp.
11 'mojo_public_tests.gypi',
12 'mojo_variables.gypi',
16 'target_name': 'mojo_base',
19 # NOTE: If adding a new dependency here, please consider whether it
20 # should also be added to the list of Mojo-related dependencies of
21 # build/all.gyp:All on iOS, as All cannot depend on the mojo_base
22 # target on iOS due to the presence of the js targets, which cause v8
25 'mojo_common_unittests',
29 'mojo_message_generator',
30 'mojo_message_pipe_perftests',
31 'mojo_public_application_unittests',
32 'mojo_public_test_utils',
33 'mojo_public_bindings_unittests',
34 'mojo_public_environment_unittests',
35 'mojo_public_system_perftests',
36 'mojo_public_system_unittests',
37 'mojo_public_utility_unittests',
40 'mojo_system_unittests',
49 'libmojo_system_java',
56 'target_name': 'mojo_none',
60 # GN version: //mojo/common/test:run_all_unittests
61 'target_name': 'mojo_run_all_unittests',
62 'type': 'static_library',
64 '../base/base.gyp:base',
65 '../base/base.gyp:test_support_base',
66 '../testing/gtest.gyp:gtest',
69 'mojo_test_support_impl',
72 'common/test/run_all_unittests.cc',
76 # GN version: //mojo/common/test:run_all_perftests
77 'target_name': 'mojo_run_all_perftests',
78 'type': 'static_library',
80 '../base/base.gyp:test_support_base',
83 'mojo_test_support_impl',
86 'common/test/run_all_perftests.cc',
90 # GN version: //mojo/system
91 'target_name': 'mojo_system_impl',
92 'type': '<(component)',
94 '../base/base.gyp:base',
95 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
98 'MOJO_SYSTEM_IMPL_IMPLEMENTATION',
99 'MOJO_SYSTEM_IMPLEMENTATION',
100 'MOJO_USE_SYSTEM_IMPL',
103 'embedder/channel_init.cc',
104 'embedder/channel_init.h',
105 'embedder/embedder.cc',
106 'embedder/embedder.h',
107 'embedder/platform_channel_pair.cc',
108 'embedder/platform_channel_pair.h',
109 'embedder/platform_channel_pair_posix.cc',
110 'embedder/platform_channel_pair_win.cc',
111 'embedder/platform_channel_utils_posix.cc',
112 'embedder/platform_channel_utils_posix.h',
113 'embedder/platform_handle.cc',
114 'embedder/platform_handle.h',
115 'embedder/platform_handle_utils.h',
116 'embedder/platform_handle_utils_posix.cc',
117 'embedder/platform_handle_utils_win.cc',
118 'embedder/platform_handle_vector.h',
119 'embedder/platform_shared_buffer.h',
120 'embedder/platform_support.h',
121 'embedder/scoped_platform_handle.h',
122 'embedder/simple_platform_shared_buffer.cc',
123 'embedder/simple_platform_shared_buffer.h',
124 'embedder/simple_platform_shared_buffer_posix.cc',
125 'embedder/simple_platform_shared_buffer_win.cc',
126 'embedder/simple_platform_support.cc',
127 'embedder/simple_platform_support.h',
130 'system/channel_endpoint.cc',
131 'system/channel_endpoint.h',
132 'system/constants.h',
135 'system/data_pipe.cc',
136 'system/data_pipe.h',
137 'system/data_pipe_consumer_dispatcher.cc',
138 'system/data_pipe_consumer_dispatcher.h',
139 'system/data_pipe_producer_dispatcher.cc',
140 'system/data_pipe_producer_dispatcher.h',
141 'system/dispatcher.cc',
142 'system/dispatcher.h',
143 'system/entrypoints.cc',
144 'system/handle_signals_state.h',
145 'system/handle_table.cc',
146 'system/handle_table.h',
147 'system/local_data_pipe.cc',
148 'system/local_data_pipe.h',
149 'system/local_message_pipe_endpoint.cc',
150 'system/local_message_pipe_endpoint.h',
151 'system/mapping_table.cc',
152 'system/mapping_table.h',
155 'system/message_in_transit.cc',
156 'system/message_in_transit.h',
157 'system/message_in_transit_queue.cc',
158 'system/message_in_transit_queue.h',
159 'system/message_pipe.cc',
160 'system/message_pipe.h',
161 'system/message_pipe_dispatcher.cc',
162 'system/message_pipe_dispatcher.h',
163 'system/message_pipe_endpoint.cc',
164 'system/message_pipe_endpoint.h',
165 'system/options_validation.h',
166 'system/platform_handle_dispatcher.cc',
167 'system/platform_handle_dispatcher.h',
168 'system/proxy_message_pipe_endpoint.cc',
169 'system/proxy_message_pipe_endpoint.h',
170 'system/raw_channel.cc',
171 'system/raw_channel.h',
172 'system/raw_channel_posix.cc',
173 'system/raw_channel_win.cc',
174 'system/shared_buffer_dispatcher.cc',
175 'system/shared_buffer_dispatcher.h',
176 'system/simple_dispatcher.cc',
177 'system/simple_dispatcher.h',
178 'system/transport_data.cc',
179 'system/transport_data.h',
182 'system/waiter_list.cc',
183 'system/waiter_list.h',
185 # TODO(vtl): It's a little unfortunate that these end up in the same
186 # component as non-test-only code. In the static build, this code should
187 # hopefully be dead-stripped.
188 'embedder/test_embedder.cc',
189 'embedder/test_embedder.h',
191 'all_dependent_settings': {
192 # Ensures that dependent projects import the core functions on Windows.
193 'defines': ['MOJO_USE_SYSTEM_IMPL'],
197 # GN version: //mojo/system:mojo_system_unittests
198 'target_name': 'mojo_system_unittests',
199 'type': 'executable',
201 '../base/base.gyp:base',
202 '../testing/gtest.gyp:gtest',
203 'mojo_common_test_support',
207 'embedder/embedder_unittest.cc',
208 'embedder/platform_channel_pair_posix_unittest.cc',
209 'embedder/simple_platform_shared_buffer_unittest.cc',
210 'system/channel_unittest.cc',
211 'system/core_unittest.cc',
212 'system/core_test_base.cc',
213 'system/core_test_base.h',
214 'system/data_pipe_unittest.cc',
215 'system/dispatcher_unittest.cc',
216 'system/local_data_pipe_unittest.cc',
217 'system/memory_unittest.cc',
218 'system/message_pipe_dispatcher_unittest.cc',
219 'system/message_pipe_test_utils.h',
220 'system/message_pipe_test_utils.cc',
221 'system/message_pipe_unittest.cc',
222 'system/multiprocess_message_pipe_unittest.cc',
223 'system/options_validation_unittest.cc',
224 'system/platform_handle_dispatcher_unittest.cc',
225 'system/raw_channel_unittest.cc',
226 'system/remote_message_pipe_unittest.cc',
227 'system/run_all_unittests.cc',
228 'system/shared_buffer_dispatcher_unittest.cc',
229 'system/simple_dispatcher_unittest.cc',
230 'system/test_utils.cc',
231 'system/test_utils.h',
232 'system/waiter_list_unittest.cc',
233 'system/waiter_test_utils.cc',
234 'system/waiter_test_utils.h',
235 'system/waiter_unittest.cc',
240 'embedder/embedder_unittest.cc',
241 'system/multiprocess_message_pipe_unittest.cc',
247 # GN version: //mojo/system:mojo_message_pipe_perftests
248 'target_name': 'mojo_message_pipe_perftests',
249 'type': 'executable',
251 '../base/base.gyp:base',
252 '../base/base.gyp:test_support_base',
253 '../base/base.gyp:test_support_perf',
254 '../testing/gtest.gyp:gtest',
255 'mojo_common_test_support',
256 'mojo_environment_chromium',
260 'system/message_pipe_perftest.cc',
261 'system/message_pipe_test_utils.h',
262 'system/message_pipe_test_utils.cc',
263 'system/test_utils.cc',
264 'system/test_utils.h',
268 # GN version: //mojo/common/test:test_support_impl
269 'target_name': 'mojo_test_support_impl',
270 'type': 'static_library',
272 '../base/base.gyp:base',
275 'common/test/test_support_impl.cc',
276 'common/test/test_support_impl.h',
280 # GN version: //mojo/common
281 'target_name': 'mojo_common_lib',
282 'type': '<(component)',
284 'MOJO_COMMON_IMPLEMENTATION',
287 '../base/base.gyp:base',
288 '../url/url.gyp:url_lib',
289 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
290 '<(mojo_system_for_component)',
292 'export_dependent_settings': [
293 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
296 'common/common_type_converters.cc',
297 'common/common_type_converters.h',
298 'common/data_pipe_utils.cc',
299 'common/data_pipe_utils.h',
300 'common/handle_watcher.cc',
301 'common/handle_watcher.h',
302 'common/message_pump_mojo.cc',
303 'common/message_pump_mojo.h',
304 'common/message_pump_mojo_handler.h',
305 'common/time_helper.cc',
306 'common/time_helper.h',
310 # GN version: //mojo/common/test:test_support
311 'target_name': 'mojo_common_test_support',
312 'type': 'static_library',
314 '../base/base.gyp:base',
315 '../base/base.gyp:test_support_base',
316 '../testing/gtest.gyp:gtest',
320 'common/test/multiprocess_test_helper.cc',
321 'common/test/multiprocess_test_helper.h',
322 'common/test/test_utils.h',
323 'common/test/test_utils_posix.cc',
324 'common/test/test_utils_win.cc',
329 'common/test/multiprocess_test_helper.cc',
335 # GN version: //mojo/common:mojo_common_unittests
336 'target_name': 'mojo_common_unittests',
337 'type': 'executable',
339 '../base/base.gyp:base',
340 '../base/base.gyp:base_message_loop_tests',
341 '../testing/gtest.gyp:gtest',
342 '../url/url.gyp:url_lib',
344 'mojo_environment_chromium',
346 'mojo_common_test_support',
347 'mojo_public_test_utils',
348 'mojo_run_all_unittests',
351 'common/common_type_converters_unittest.cc',
352 'common/handle_watcher_unittest.cc',
353 'common/message_pump_mojo_unittest.cc',
354 'common/test/multiprocess_test_helper_unittest.cc',
359 'common/test/multiprocess_test_helper_unittest.cc',
365 # GN version: //mojo/environment:chromium
366 'target_name': 'mojo_environment_chromium',
367 'type': 'static_library',
369 'mojo_environment_chromium_impl',
372 'environment/environment.cc',
373 # TODO(vtl): This is kind of ugly. (See TODO in logging.h.)
374 "public/cpp/environment/logging.h",
375 "public/cpp/environment/lib/logging.cc",
380 'export_dependent_settings': [
381 'mojo_environment_chromium_impl',
385 # GN version: //mojo/environment:chromium_impl
386 'target_name': 'mojo_environment_chromium_impl',
387 'type': '<(component)',
389 'MOJO_ENVIRONMENT_IMPL_IMPLEMENTATION',
392 '../base/base.gyp:base',
393 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
395 '<(mojo_system_for_component)',
398 'environment/default_async_waiter_impl.cc',
399 'environment/default_async_waiter_impl.h',
400 'environment/default_logger_impl.cc',
401 'environment/default_logger_impl.h',
408 # GN version: //mojo/services/gles2:interfaces (for files generated from
410 # GN version: //mojo/services/gles2:bindings
411 'target_name': 'mojo_gles2_bindings',
412 'type': 'static_library',
414 'services/gles2/command_buffer.mojom',
415 'services/gles2/command_buffer_type_conversions.cc',
416 'services/gles2/command_buffer_type_conversions.h',
417 'services/gles2/mojo_buffer_backing.cc',
418 'services/gles2/mojo_buffer_backing.h',
420 'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
421 'export_dependent_settings': [
426 '../gpu/gpu.gyp:command_buffer_common',
430 # GN version: //mojo/gles2
431 'target_name': 'mojo_gles2_impl',
432 'type': '<(component)',
434 '../base/base.gyp:base',
435 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
436 '../gpu/gpu.gyp:command_buffer_client',
437 '../gpu/gpu.gyp:command_buffer_common',
438 '../gpu/gpu.gyp:gles2_cmd_helper',
439 '../gpu/gpu.gyp:gles2_implementation',
440 'mojo_environment_chromium',
441 'mojo_gles2_bindings',
442 '<(mojo_system_for_component)',
446 'GL_GLEXT_PROTOTYPES',
447 'MOJO_GLES2_IMPLEMENTATION',
448 'MOJO_GLES2_IMPL_IMPLEMENTATION',
449 'MOJO_USE_GLES2_IMPL'
451 'direct_dependent_settings': {
456 'export_dependent_settings': [
457 'mojo_gles2_bindings',
460 'gles2/command_buffer_client_impl.cc',
461 'gles2/command_buffer_client_impl.h',
462 'gles2/gles2_impl_export.h',
463 'gles2/gles2_impl.cc',
464 'gles2/gles2_context.cc',
465 'gles2/gles2_context.h',
467 'all_dependent_settings': {
468 # Ensures that dependent projects import the core functions on Windows.
469 'defines': ['MOJO_USE_GLES2_IMPL'],
473 # GN version: //mojo/application
474 'target_name': 'mojo_application_chromium',
475 'type': 'static_library',
477 'application/application_runner_chromium.cc',
478 'application/application_runner_chromium.h',
481 'mojo_application_base',
483 'mojo_environment_chromium',
485 'export_dependent_settings': [
486 'mojo_application_base',
490 # GN version: //mojo/bindings/js
491 'target_name': 'mojo_js_bindings_lib',
492 'type': 'static_library',
494 '../base/base.gyp:base',
495 '../gin/gin.gyp:gin',
496 '../v8/tools/gyp/v8.gyp:v8',
499 'export_dependent_settings': [
500 '../base/base.gyp:base',
501 '../gin/gin.gyp:gin',
505 # Sources list duplicated in GN build.
506 'bindings/js/core.cc',
507 'bindings/js/core.h',
508 'bindings/js/drain_data.cc',
509 'bindings/js/drain_data.h',
510 'bindings/js/handle.cc',
511 'bindings/js/handle.h',
512 'bindings/js/handle_close_observer.h',
513 'bindings/js/support.cc',
514 'bindings/js/support.h',
515 'bindings/js/waiting_callback.cc',
516 'bindings/js/waiting_callback.h',
520 # GN version: //mojo/tools:message_generator
521 'target_name': 'mojo_message_generator',
522 'type': 'executable',
524 '../base/base.gyp:base',
525 '../testing/gtest.gyp:gtest',
528 'mojo_environment_chromium',
532 'tools/message_generator.cc',
540 'target_name': 'mojo_jni_headers',
543 'mojo_java_set_jni_headers',
546 'android/javatests/src/org/chromium/mojo/MojoTestCase.java',
547 'android/javatests/src/org/chromium/mojo/bindings/ValidationTestUtil.java',
548 'android/system/src/org/chromium/mojo/system/impl/CoreImpl.java',
549 'services/native_viewport/android/src/org/chromium/mojo/PlatformViewportAndroid.java',
550 'shell/android/apk/src/org/chromium/mojo_shell_apk/MojoMain.java',
553 'jni_gen_package': 'mojo',
555 'includes': [ '../build/jni_generator.gypi' ],
558 'target_name': 'mojo_java_set_jni_headers',
561 'jni_gen_package': 'mojo',
562 'input_java_class': 'java/util/HashSet.class',
564 'includes': [ '../build/jar_file_jni_generator.gypi' ],
567 'target_name': 'mojo_system_java',
570 '../base/base.gyp:base_java',
574 'java_in_dir': '<(DEPTH)/mojo/android/system',
576 'includes': [ '../build/java.gypi' ],
579 'target_name': 'libmojo_system_java',
580 'type': 'static_library',
582 '../base/base.gyp:base',
583 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
585 'mojo_environment_chromium',
590 'android/system/core_impl.cc',
591 'android/system/core_impl.h',
595 'target_name': 'libmojo_java_unittest',
596 'type': 'shared_library',
598 '../base/base.gyp:base',
599 '../base/base.gyp:test_support_base',
600 'libmojo_system_java',
602 'mojo_public_bindings_test_utils',
605 'UNIT_TEST' # As exported from testing/gtest.gyp:gtest.
608 'android/javatests/mojo_test_case.cc',
609 'android/javatests/mojo_test_case.h',
610 'android/javatests/init_library.cc',
611 'android/javatests/validation_test_util.cc',
612 'android/javatests/validation_test_util.h',
616 'target_name': 'mojo_test_apk',
619 'mojo_bindings_java',
620 'mojo_public_test_interfaces',
622 '../base/base.gyp:base_java_test_support',
625 'apk_name': 'MojoTest',
626 'java_in_dir': '<(DEPTH)/mojo/android/javatests',
627 'resource_dir': '<(DEPTH)/mojo/android/javatests/apk',
628 'native_lib_target': 'libmojo_java_unittest',
630 # Given that this apk tests itself, it needs to bring emma with it
633 ['emma_coverage != 0', {
634 'emma_instrument': 1,
638 'includes': [ '../build/java_apk.gypi' ],
642 ['test_isolation_mode != "noop"', {
645 'target_name': 'mojo_js_unittests_run',
651 '../build/isolate.gypi',
652 'mojo_js_unittests.isolate',
655 'mojo_js_unittests.isolate',