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',
20 'mojo_common_unittests',
24 'mojo_message_generator',
25 'mojo_message_pipe_perftests',
26 'mojo_public_application_unittests',
27 'mojo_public_test_utils',
28 'mojo_public_bindings_unittests',
29 'mojo_public_environment_unittests',
30 'mojo_public_system_perftests',
31 'mojo_public_system_unittests',
32 'mojo_public_utility_unittests',
35 'mojo_system_unittests',
44 'libmojo_system_java',
51 'target_name': 'mojo_none',
55 # GN version: //mojo/common/test:run_all_unittests
56 'target_name': 'mojo_run_all_unittests',
57 'type': 'static_library',
59 '../base/base.gyp:base',
60 '../base/base.gyp:test_support_base',
61 '../testing/gtest.gyp:gtest',
64 'mojo_test_support_impl',
67 'common/test/run_all_unittests.cc',
71 'target_name': 'mojo_run_all_perftests',
72 'type': 'static_library',
74 '../base/base.gyp:test_support_base',
77 'mojo_test_support_impl',
80 'common/test/run_all_perftests.cc',
84 # GN version: //mojo/system
85 'target_name': 'mojo_system_impl',
86 'type': '<(component)',
88 '../base/base.gyp:base',
89 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
92 'MOJO_SYSTEM_IMPL_IMPLEMENTATION',
93 'MOJO_SYSTEM_IMPLEMENTATION',
94 'MOJO_USE_SYSTEM_IMPL',
97 'embedder/channel_init.cc',
98 'embedder/channel_init.h',
99 'embedder/embedder.cc',
100 'embedder/embedder.h',
101 'embedder/platform_channel_pair.cc',
102 'embedder/platform_channel_pair.h',
103 'embedder/platform_channel_pair_posix.cc',
104 'embedder/platform_channel_pair_win.cc',
105 'embedder/platform_channel_utils_posix.cc',
106 'embedder/platform_channel_utils_posix.h',
107 'embedder/platform_handle.cc',
108 'embedder/platform_handle.h',
109 'embedder/platform_handle_utils.h',
110 'embedder/platform_handle_utils_posix.cc',
111 'embedder/platform_handle_utils_win.cc',
112 'embedder/platform_handle_vector.h',
113 'embedder/platform_shared_buffer.h',
114 'embedder/platform_support.h',
115 'embedder/scoped_platform_handle.h',
116 'embedder/simple_platform_shared_buffer.cc',
117 'embedder/simple_platform_shared_buffer.h',
118 'embedder/simple_platform_shared_buffer_posix.cc',
119 'embedder/simple_platform_shared_buffer_win.cc',
120 'embedder/simple_platform_support.cc',
121 'embedder/simple_platform_support.h',
124 'system/constants.h',
127 'system/data_pipe.cc',
128 'system/data_pipe.h',
129 'system/data_pipe_consumer_dispatcher.cc',
130 'system/data_pipe_consumer_dispatcher.h',
131 'system/data_pipe_producer_dispatcher.cc',
132 'system/data_pipe_producer_dispatcher.h',
133 'system/dispatcher.cc',
134 'system/dispatcher.h',
135 'system/entrypoints.cc',
136 'system/handle_signals_state.h',
137 'system/handle_table.cc',
138 'system/handle_table.h',
139 'system/local_data_pipe.cc',
140 'system/local_data_pipe.h',
141 'system/local_message_pipe_endpoint.cc',
142 'system/local_message_pipe_endpoint.h',
143 'system/mapping_table.cc',
144 'system/mapping_table.h',
147 'system/message_in_transit.cc',
148 'system/message_in_transit.h',
149 'system/message_in_transit_queue.cc',
150 'system/message_in_transit_queue.h',
151 'system/message_pipe.cc',
152 'system/message_pipe.h',
153 'system/message_pipe_dispatcher.cc',
154 'system/message_pipe_dispatcher.h',
155 'system/message_pipe_endpoint.cc',
156 'system/message_pipe_endpoint.h',
157 'system/options_validation.h',
158 'system/platform_handle_dispatcher.cc',
159 'system/platform_handle_dispatcher.h',
160 'system/proxy_message_pipe_endpoint.cc',
161 'system/proxy_message_pipe_endpoint.h',
162 'system/raw_channel.cc',
163 'system/raw_channel.h',
164 'system/raw_channel_posix.cc',
165 'system/raw_channel_win.cc',
166 'system/shared_buffer_dispatcher.cc',
167 'system/shared_buffer_dispatcher.h',
168 'system/simple_dispatcher.cc',
169 'system/simple_dispatcher.h',
170 'system/transport_data.cc',
171 'system/transport_data.h',
174 'system/waiter_list.cc',
175 'system/waiter_list.h',
177 # TODO(vtl): It's a little unfortunate that these end up in the same
178 # component as non-test-only code. In the static build, this code should
179 # hopefully be dead-stripped.
180 'embedder/test_embedder.cc',
181 'embedder/test_embedder.h',
183 'all_dependent_settings': {
184 # Ensures that dependent projects import the core functions on Windows.
185 'defines': ['MOJO_USE_SYSTEM_IMPL'],
189 # GN version: //mojo/system:mojo_system_unittests
190 'target_name': 'mojo_system_unittests',
191 'type': 'executable',
193 '../base/base.gyp:base',
194 '../testing/gtest.gyp:gtest',
195 'mojo_common_test_support',
199 'embedder/embedder_unittest.cc',
200 'embedder/platform_channel_pair_posix_unittest.cc',
201 'embedder/simple_platform_shared_buffer_unittest.cc',
202 'system/channel_unittest.cc',
203 'system/core_unittest.cc',
204 'system/core_test_base.cc',
205 'system/core_test_base.h',
206 'system/data_pipe_unittest.cc',
207 'system/dispatcher_unittest.cc',
208 'system/local_data_pipe_unittest.cc',
209 'system/memory_unittest.cc',
210 'system/message_pipe_dispatcher_unittest.cc',
211 'system/message_pipe_test_utils.h',
212 'system/message_pipe_test_utils.cc',
213 'system/message_pipe_unittest.cc',
214 'system/multiprocess_message_pipe_unittest.cc',
215 'system/options_validation_unittest.cc',
216 'system/platform_handle_dispatcher_unittest.cc',
217 'system/raw_channel_unittest.cc',
218 'system/remote_message_pipe_unittest.cc',
219 'system/run_all_unittests.cc',
220 'system/shared_buffer_dispatcher_unittest.cc',
221 'system/simple_dispatcher_unittest.cc',
222 'system/test_utils.cc',
223 'system/test_utils.h',
224 'system/waiter_list_unittest.cc',
225 'system/waiter_test_utils.cc',
226 'system/waiter_test_utils.h',
227 'system/waiter_unittest.cc',
231 # GN version: //mojo/system:mojo_message_pipe_perftests
232 'target_name': 'mojo_message_pipe_perftests',
233 'type': 'executable',
235 '../base/base.gyp:base',
236 '../base/base.gyp:test_support_base',
237 '../base/base.gyp:test_support_perf',
238 '../testing/gtest.gyp:gtest',
239 'mojo_common_test_support',
240 'mojo_environment_chromium',
244 'system/message_pipe_perftest.cc',
245 'system/message_pipe_test_utils.h',
246 'system/message_pipe_test_utils.cc',
247 'system/test_utils.cc',
248 'system/test_utils.h',
252 # GN version: //mojo/common/test:test_support_impl
253 'target_name': 'mojo_test_support_impl',
254 'type': 'static_library',
256 '../base/base.gyp:base',
259 'common/test/test_support_impl.cc',
260 'common/test/test_support_impl.h',
264 # GN version: //mojo/common
265 'target_name': 'mojo_common_lib',
266 'type': '<(component)',
268 'MOJO_COMMON_IMPLEMENTATION',
271 '../base/base.gyp:base',
272 '../url/url.gyp:url_lib',
273 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
274 '<(mojo_system_for_component)',
276 'export_dependent_settings': [
277 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
280 'common/common_type_converters.cc',
281 'common/common_type_converters.h',
282 'common/data_pipe_utils.cc',
283 'common/data_pipe_utils.h',
284 'common/handle_watcher.cc',
285 'common/handle_watcher.h',
286 'common/message_pump_mojo.cc',
287 'common/message_pump_mojo.h',
288 'common/message_pump_mojo_handler.h',
289 'common/time_helper.cc',
290 'common/time_helper.h',
294 # GN version: //mojo/common/test:test_support
295 'target_name': 'mojo_common_test_support',
296 'type': 'static_library',
298 '../base/base.gyp:base',
299 '../base/base.gyp:test_support_base',
300 '../testing/gtest.gyp:gtest',
304 'common/test/multiprocess_test_helper.cc',
305 'common/test/multiprocess_test_helper.h',
306 'common/test/test_utils.h',
307 'common/test/test_utils_posix.cc',
308 'common/test/test_utils_win.cc',
312 # GN version: //mojo/common:mojo_common_unittests
313 'target_name': 'mojo_common_unittests',
314 'type': 'executable',
316 '../base/base.gyp:base',
317 '../base/base.gyp:base_message_loop_tests',
318 '../testing/gtest.gyp:gtest',
319 '../url/url.gyp:url_lib',
321 'mojo_environment_chromium',
323 'mojo_common_test_support',
324 'mojo_public_test_utils',
325 'mojo_run_all_unittests',
328 'common/common_type_converters_unittest.cc',
329 'common/handle_watcher_unittest.cc',
330 'common/message_pump_mojo_unittest.cc',
331 'common/test/multiprocess_test_helper_unittest.cc',
335 # GN version: //mojo/environment:chromium
336 'target_name': 'mojo_environment_chromium',
337 'type': 'static_library',
339 'mojo_environment_chromium_impl',
342 'environment/environment.cc',
343 # TODO(vtl): This is kind of ugly. (See TODO in logging.h.)
344 "public/cpp/environment/logging.h",
345 "public/cpp/environment/lib/logging.cc",
350 'export_dependent_settings': [
351 'mojo_environment_chromium_impl',
355 # GN version: //mojo/environment:chromium_impl
356 'target_name': 'mojo_environment_chromium_impl',
357 'type': '<(component)',
359 'MOJO_ENVIRONMENT_IMPL_IMPLEMENTATION',
362 '../base/base.gyp:base',
363 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
365 '<(mojo_system_for_component)',
368 'environment/default_async_waiter_impl.cc',
369 'environment/default_async_waiter_impl.h',
370 'environment/default_logger_impl.cc',
371 'environment/default_logger_impl.h',
378 # GN version: //mojo/services/gles2:interfaces (for files generated from
380 # GN version: //mojo/services/gles2:bindings
381 'target_name': 'mojo_gles2_bindings',
382 'type': 'static_library',
384 'services/gles2/command_buffer.mojom',
385 'services/gles2/command_buffer_type_conversions.cc',
386 'services/gles2/command_buffer_type_conversions.h',
387 'services/gles2/mojo_buffer_backing.cc',
388 'services/gles2/mojo_buffer_backing.h',
390 'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
391 'export_dependent_settings': [
396 '../gpu/gpu.gyp:command_buffer_common',
400 # GN version: //mojo/gles2
401 'target_name': 'mojo_gles2_impl',
402 'type': '<(component)',
404 '../base/base.gyp:base',
405 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
406 '../gpu/gpu.gyp:command_buffer_client',
407 '../gpu/gpu.gyp:command_buffer_common',
408 '../gpu/gpu.gyp:gles2_cmd_helper',
409 '../gpu/gpu.gyp:gles2_implementation',
410 'mojo_environment_chromium',
411 'mojo_gles2_bindings',
412 '<(mojo_system_for_component)',
416 'GL_GLEXT_PROTOTYPES',
417 'MOJO_GLES2_IMPLEMENTATION',
418 'MOJO_GLES2_IMPL_IMPLEMENTATION',
419 'MOJO_USE_GLES2_IMPL'
421 'direct_dependent_settings': {
426 'export_dependent_settings': [
427 'mojo_gles2_bindings',
430 'gles2/command_buffer_client_impl.cc',
431 'gles2/command_buffer_client_impl.h',
432 'gles2/gles2_impl_export.h',
433 'gles2/gles2_impl.cc',
434 'gles2/gles2_context.cc',
435 'gles2/gles2_context.h',
437 'all_dependent_settings': {
438 # Ensures that dependent projects import the core functions on Windows.
439 'defines': ['MOJO_USE_GLES2_IMPL'],
443 # GN version: //mojo/public/cpp/application:chromium
444 'target_name': 'mojo_application_chromium',
445 'type': 'static_library',
447 'public/cpp/application/lib/application_runner_chromium.cc',
448 'public/cpp/application/application_runner_chromium.h',
451 'mojo_application_base',
452 'mojo_environment_chromium',
454 'export_dependent_settings': [
455 'mojo_application_base',
459 # GN version: //mojo/bindings/js
460 'target_name': 'mojo_js_bindings_lib',
461 'type': 'static_library',
463 '../base/base.gyp:base',
464 '../gin/gin.gyp:gin',
465 '../v8/tools/gyp/v8.gyp:v8',
468 'export_dependent_settings': [
469 '../base/base.gyp:base',
470 '../gin/gin.gyp:gin',
474 # Sources list duplicated in GN build.
475 'bindings/js/core.cc',
476 'bindings/js/core.h',
477 'bindings/js/handle.cc',
478 'bindings/js/handle.h',
479 'bindings/js/support.cc',
480 'bindings/js/support.h',
481 'bindings/js/waiting_callback.cc',
482 'bindings/js/waiting_callback.h',
486 'target_name': 'mojo_message_generator',
487 'type': 'executable',
489 '../base/base.gyp:base',
490 '../testing/gtest.gyp:gtest',
493 'mojo_environment_chromium',
497 'tools/message_generator.cc',
505 'target_name': 'mojo_jni_headers',
508 'mojo_java_set_jni_headers',
511 'android/javatests/src/org/chromium/mojo/MojoTestCase.java',
512 'android/system/src/org/chromium/mojo/system/impl/CoreImpl.java',
513 'services/native_viewport/android/src/org/chromium/mojo/PlatformViewportAndroid.java',
514 'shell/android/apk/src/org/chromium/mojo_shell_apk/MojoMain.java',
517 'jni_gen_package': 'mojo',
519 'includes': [ '../build/jni_generator.gypi' ],
522 'target_name': 'mojo_java_set_jni_headers',
525 'jni_gen_package': 'mojo',
526 'input_java_class': 'java/util/HashSet.class',
528 'includes': [ '../build/jar_file_jni_generator.gypi' ],
531 'target_name': 'mojo_system_java',
534 '../base/base.gyp:base_java',
538 'java_in_dir': '<(DEPTH)/mojo/android/system',
540 'includes': [ '../build/java.gypi' ],
543 'target_name': 'libmojo_system_java',
544 'type': 'static_library',
546 '../base/base.gyp:base',
547 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
549 'mojo_environment_chromium',
554 'android/system/core_impl.cc',
555 'android/system/core_impl.h',
559 'target_name': 'libmojo_java_unittest',
560 'type': 'shared_library',
562 '../base/base.gyp:base',
563 '../base/base.gyp:test_support_base',
564 'libmojo_system_java',
568 'UNIT_TEST' # As exported from testing/gtest.gyp:gtest.
571 'android/javatests/mojo_test_case.cc',
572 'android/javatests/mojo_test_case.h',
573 'android/javatests/init_library.cc',
577 'target_name': 'mojo_test_apk',
580 'mojo_bindings_java',
581 'mojo_public_test_interfaces',
583 '../base/base.gyp:base_java_test_support',
586 'apk_name': 'MojoTest',
587 'java_in_dir': '<(DEPTH)/mojo/android/javatests',
588 'resource_dir': '<(DEPTH)/mojo/android/javatests/apk',
589 'native_lib_target': 'libmojo_java_unittest',
591 # Given that this apk tests itself, it needs to bring emma with it
594 ['emma_coverage != 0', {
595 'emma_instrument': 1,
599 'includes': [ '../build/java_apk.gypi' ],
603 ['test_isolation_mode != "noop"', {
606 'target_name': 'mojo_js_unittests_run',
612 '../build/isolate.gypi',
613 'mojo_js_unittests.isolate',
616 'mojo_js_unittests.isolate',