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_public_application_unittests',
26 'mojo_public_test_utils',
27 'mojo_public_bindings_unittests',
28 'mojo_public_environment_unittests',
29 'mojo_public_system_perftests',
30 'mojo_public_system_unittests',
31 'mojo_public_utility_unittests',
34 'mojo_system_unittests',
43 'libmojo_system_java',
50 'target_name': 'mojo_none',
54 # GN version: //mojo/common/test:run_all_unittests
55 'target_name': 'mojo_run_all_unittests',
56 'type': 'static_library',
58 '../base/base.gyp:base',
59 '../base/base.gyp:test_support_base',
60 '../testing/gtest.gyp:gtest',
63 'mojo_test_support_impl',
66 'common/test/run_all_unittests.cc',
70 'target_name': 'mojo_run_all_perftests',
71 'type': 'static_library',
73 '../base/base.gyp:test_support_base',
76 'mojo_test_support_impl',
79 'common/test/run_all_perftests.cc',
83 # GN version: //mojo/system
84 'target_name': 'mojo_system_impl',
85 'type': '<(component)',
87 '../base/base.gyp:base',
88 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
91 'MOJO_SYSTEM_IMPL_IMPLEMENTATION',
92 'MOJO_SYSTEM_IMPLEMENTATION',
93 'MOJO_USE_SYSTEM_IMPL',
96 'embedder/channel_init.cc',
97 'embedder/channel_init.h',
98 'embedder/embedder.cc',
99 'embedder/embedder.h',
100 'embedder/platform_channel_pair.cc',
101 'embedder/platform_channel_pair.h',
102 'embedder/platform_channel_pair_posix.cc',
103 'embedder/platform_channel_pair_win.cc',
104 'embedder/platform_channel_utils_posix.cc',
105 'embedder/platform_channel_utils_posix.h',
106 'embedder/platform_handle.cc',
107 'embedder/platform_handle.h',
108 'embedder/platform_handle_utils.h',
109 'embedder/platform_handle_utils_posix.cc',
110 'embedder/platform_handle_utils_win.cc',
111 'embedder/platform_handle_vector.h',
112 'embedder/platform_shared_buffer.h',
113 'embedder/platform_support.h',
114 'embedder/scoped_platform_handle.h',
115 'embedder/simple_platform_shared_buffer.cc',
116 'embedder/simple_platform_shared_buffer.h',
117 'embedder/simple_platform_shared_buffer_posix.cc',
118 'embedder/simple_platform_shared_buffer_win.cc',
119 'embedder/simple_platform_support.cc',
120 'embedder/simple_platform_support.h',
123 'system/constants.h',
126 'system/data_pipe.cc',
127 'system/data_pipe.h',
128 'system/data_pipe_consumer_dispatcher.cc',
129 'system/data_pipe_consumer_dispatcher.h',
130 'system/data_pipe_producer_dispatcher.cc',
131 'system/data_pipe_producer_dispatcher.h',
132 'system/dispatcher.cc',
133 'system/dispatcher.h',
134 'system/entrypoints.cc',
135 'system/handle_signals_state.h',
136 'system/handle_table.cc',
137 'system/handle_table.h',
138 'system/local_data_pipe.cc',
139 'system/local_data_pipe.h',
140 'system/local_message_pipe_endpoint.cc',
141 'system/local_message_pipe_endpoint.h',
142 'system/mapping_table.cc',
143 'system/mapping_table.h',
146 'system/message_in_transit.cc',
147 'system/message_in_transit.h',
148 'system/message_in_transit_queue.cc',
149 'system/message_in_transit_queue.h',
150 'system/message_pipe.cc',
151 'system/message_pipe.h',
152 'system/message_pipe_dispatcher.cc',
153 'system/message_pipe_dispatcher.h',
154 'system/message_pipe_endpoint.cc',
155 'system/message_pipe_endpoint.h',
156 'system/options_validation.h',
157 'system/platform_handle_dispatcher.cc',
158 'system/platform_handle_dispatcher.h',
159 'system/proxy_message_pipe_endpoint.cc',
160 'system/proxy_message_pipe_endpoint.h',
161 'system/raw_channel.cc',
162 'system/raw_channel.h',
163 'system/raw_channel_posix.cc',
164 'system/raw_channel_win.cc',
165 'system/shared_buffer_dispatcher.cc',
166 'system/shared_buffer_dispatcher.h',
167 'system/simple_dispatcher.cc',
168 'system/simple_dispatcher.h',
169 'system/transport_data.cc',
170 'system/transport_data.h',
173 'system/waiter_list.cc',
174 'system/waiter_list.h',
176 # TODO(vtl): It's a little unfortunate that these end up in the same
177 # component as non-test-only code. In the static build, this code should
178 # hopefully be dead-stripped.
179 'embedder/test_embedder.cc',
180 'embedder/test_embedder.h',
182 'all_dependent_settings': {
183 # Ensures that dependent projects import the core functions on Windows.
184 'defines': ['MOJO_USE_SYSTEM_IMPL'],
188 # GN version: //mojo/system:mojo_system_unittests
189 'target_name': 'mojo_system_unittests',
190 'type': 'executable',
192 '../base/base.gyp:base',
193 '../testing/gtest.gyp:gtest',
194 'mojo_common_test_support',
198 'embedder/embedder_unittest.cc',
199 'embedder/platform_channel_pair_posix_unittest.cc',
200 'embedder/simple_platform_shared_buffer_unittest.cc',
201 'system/channel_unittest.cc',
202 'system/core_unittest.cc',
203 'system/core_test_base.cc',
204 'system/core_test_base.h',
205 'system/data_pipe_unittest.cc',
206 'system/dispatcher_unittest.cc',
207 'system/local_data_pipe_unittest.cc',
208 'system/memory_unittest.cc',
209 'system/message_pipe_dispatcher_unittest.cc',
210 'system/message_pipe_unittest.cc',
211 'system/multiprocess_message_pipe_unittest.cc',
212 'system/options_validation_unittest.cc',
213 'system/platform_handle_dispatcher_unittest.cc',
214 'system/raw_channel_unittest.cc',
215 'system/remote_message_pipe_unittest.cc',
216 'system/run_all_unittests.cc',
217 'system/shared_buffer_dispatcher_unittest.cc',
218 'system/simple_dispatcher_unittest.cc',
219 'system/test_utils.cc',
220 'system/test_utils.h',
221 'system/waiter_list_unittest.cc',
222 'system/waiter_test_utils.cc',
223 'system/waiter_test_utils.h',
224 'system/waiter_unittest.cc',
228 # GN version: //mojo/common/test:test_support_impl
229 'target_name': 'mojo_test_support_impl',
230 'type': 'static_library',
232 '../base/base.gyp:base',
235 'common/test/test_support_impl.cc',
236 'common/test/test_support_impl.h',
240 # GN version: //mojo/common
241 'target_name': 'mojo_common_lib',
242 'type': '<(component)',
244 'MOJO_COMMON_IMPLEMENTATION',
247 '../base/base.gyp:base',
248 '../url/url.gyp:url_lib',
249 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
250 '<(mojo_system_for_component)',
252 'export_dependent_settings': [
253 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
256 'common/common_type_converters.cc',
257 'common/common_type_converters.h',
258 'common/data_pipe_utils.cc',
259 'common/data_pipe_utils.h',
260 'common/handle_watcher.cc',
261 'common/handle_watcher.h',
262 'common/message_pump_mojo.cc',
263 'common/message_pump_mojo.h',
264 'common/message_pump_mojo_handler.h',
265 'common/time_helper.cc',
266 'common/time_helper.h',
270 # GN version: //mojo/common/test:test_support
271 'target_name': 'mojo_common_test_support',
272 'type': 'static_library',
274 '../base/base.gyp:base',
275 '../base/base.gyp:test_support_base',
276 '../testing/gtest.gyp:gtest',
280 'common/test/multiprocess_test_helper.cc',
281 'common/test/multiprocess_test_helper.h',
282 'common/test/test_utils.h',
283 'common/test/test_utils_posix.cc',
284 'common/test/test_utils_win.cc',
288 # GN version: //mojo/common:mojo_common_unittests
289 'target_name': 'mojo_common_unittests',
290 'type': 'executable',
292 '../base/base.gyp:base',
293 '../base/base.gyp:base_message_loop_tests',
294 '../testing/gtest.gyp:gtest',
295 '../url/url.gyp:url_lib',
297 'mojo_environment_chromium',
299 'mojo_common_test_support',
300 'mojo_public_test_utils',
301 'mojo_run_all_unittests',
304 'common/common_type_converters_unittest.cc',
305 'common/handle_watcher_unittest.cc',
306 'common/message_pump_mojo_unittest.cc',
307 'common/test/multiprocess_test_helper_unittest.cc',
311 # GN version: //mojo/environment:chromium
312 'target_name': 'mojo_environment_chromium',
313 'type': 'static_library',
315 'mojo_environment_chromium_impl',
318 'environment/environment.cc',
319 # TODO(vtl): This is kind of ugly. (See TODO in logging.h.)
320 "public/cpp/environment/logging.h",
321 "public/cpp/environment/lib/logging.cc",
326 'export_dependent_settings': [
327 'mojo_environment_chromium_impl',
331 # GN version: //mojo/environment:chromium_impl
332 'target_name': 'mojo_environment_chromium_impl',
333 'type': '<(component)',
335 'MOJO_ENVIRONMENT_IMPL_IMPLEMENTATION',
338 '../base/base.gyp:base',
339 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
341 '<(mojo_system_for_component)',
344 'environment/default_async_waiter_impl.cc',
345 'environment/default_async_waiter_impl.h',
346 'environment/default_logger_impl.cc',
347 'environment/default_logger_impl.h',
354 # GN version: //mojo/services/gles2:interfaces (for files generated from
356 # GN version: //mojo/services/gles2:bindings
357 'target_name': 'mojo_gles2_bindings',
358 'type': 'static_library',
360 'services/gles2/command_buffer.mojom',
361 'services/gles2/command_buffer_type_conversions.cc',
362 'services/gles2/command_buffer_type_conversions.h',
363 'services/gles2/mojo_buffer_backing.cc',
364 'services/gles2/mojo_buffer_backing.h',
366 'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
367 'export_dependent_settings': [
372 '../gpu/gpu.gyp:command_buffer_common',
376 # GN version: //mojo/gles2
377 'target_name': 'mojo_gles2_impl',
378 'type': '<(component)',
380 '../base/base.gyp:base',
381 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
382 '../gpu/gpu.gyp:command_buffer_client',
383 '../gpu/gpu.gyp:command_buffer_common',
384 '../gpu/gpu.gyp:gles2_cmd_helper',
385 '../gpu/gpu.gyp:gles2_implementation',
386 'mojo_environment_chromium',
387 'mojo_gles2_bindings',
388 '<(mojo_system_for_component)',
392 'GL_GLEXT_PROTOTYPES',
393 'MOJO_GLES2_IMPLEMENTATION',
394 'MOJO_GLES2_IMPL_IMPLEMENTATION',
395 'MOJO_USE_GLES2_IMPL'
397 'direct_dependent_settings': {
402 'export_dependent_settings': [
403 'mojo_gles2_bindings',
406 'gles2/command_buffer_client_impl.cc',
407 'gles2/command_buffer_client_impl.h',
408 'gles2/gles2_impl_export.h',
409 'gles2/gles2_impl.cc',
410 'gles2/gles2_context.cc',
411 'gles2/gles2_context.h',
413 'all_dependent_settings': {
414 # Ensures that dependent projects import the core functions on Windows.
415 'defines': ['MOJO_USE_GLES2_IMPL'],
419 # GN version: //mojo/public/cpp/application:chromium
420 'target_name': 'mojo_application_chromium',
421 'type': 'static_library',
423 'public/cpp/application/lib/application_runner_chromium.cc',
424 'public/cpp/application/application_runner_chromium.h',
427 'mojo_application_base',
428 'mojo_environment_chromium',
430 'export_dependent_settings': [
431 'mojo_application_base',
435 # GN version: //mojo/bindings/js
436 'target_name': 'mojo_js_bindings_lib',
437 'type': 'static_library',
439 '../base/base.gyp:base',
440 '../gin/gin.gyp:gin',
441 '../v8/tools/gyp/v8.gyp:v8',
444 'export_dependent_settings': [
445 '../base/base.gyp:base',
446 '../gin/gin.gyp:gin',
450 # Sources list duplicated in GN build.
451 'bindings/js/core.cc',
452 'bindings/js/core.h',
453 'bindings/js/handle.cc',
454 'bindings/js/handle.h',
455 'bindings/js/support.cc',
456 'bindings/js/support.h',
457 'bindings/js/waiting_callback.cc',
458 'bindings/js/waiting_callback.h',
462 'target_name': 'mojo_message_generator',
463 'type': 'executable',
465 '../base/base.gyp:base',
466 '../testing/gtest.gyp:gtest',
469 'mojo_environment_chromium',
473 'tools/message_generator.cc',
481 'target_name': 'mojo_jni_headers',
484 'mojo_java_set_jni_headers',
487 'android/javatests/src/org/chromium/mojo/MojoTestCase.java',
488 'android/system/src/org/chromium/mojo/system/impl/CoreImpl.java',
489 'services/native_viewport/android/src/org/chromium/mojo/PlatformViewportAndroid.java',
490 'shell/android/apk/src/org/chromium/mojo_shell_apk/MojoMain.java',
493 'jni_gen_package': 'mojo',
495 'includes': [ '../build/jni_generator.gypi' ],
498 'target_name': 'mojo_java_set_jni_headers',
501 'jni_gen_package': 'mojo',
502 'input_java_class': 'java/util/HashSet.class',
504 'includes': [ '../build/jar_file_jni_generator.gypi' ],
507 'target_name': 'mojo_system_java',
510 '../base/base.gyp:base_java',
514 'java_in_dir': '<(DEPTH)/mojo/android/system',
516 'includes': [ '../build/java.gypi' ],
519 'target_name': 'libmojo_system_java',
520 'type': 'static_library',
522 '../base/base.gyp:base',
523 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
525 'mojo_environment_chromium',
530 'android/system/core_impl.cc',
531 'android/system/core_impl.h',
535 'target_name': 'libmojo_java_unittest',
536 'type': 'shared_library',
538 '../base/base.gyp:base',
539 '../base/base.gyp:test_support_base',
540 'libmojo_system_java',
544 'UNIT_TEST' # As exported from testing/gtest.gyp:gtest.
547 'android/javatests/mojo_test_case.cc',
548 'android/javatests/mojo_test_case.h',
549 'android/javatests/init_library.cc',
553 'target_name': 'mojo_test_apk',
556 'mojo_bindings_java',
557 'mojo_public_test_interfaces',
559 '../base/base.gyp:base_java_test_support',
562 'apk_name': 'MojoTest',
563 'java_in_dir': '<(DEPTH)/mojo/android/javatests',
564 'resource_dir': '<(DEPTH)/mojo/android/javatests/apk',
565 'native_lib_target': 'libmojo_java_unittest',
567 # Given that this apk tests itself, it needs to bring emma with it
570 ['emma_coverage != 0', {
571 'emma_instrument': 1,
575 'includes': [ '../build/java_apk.gypi' ],
579 ['test_isolation_mode != "noop"', {
582 'target_name': 'mojo_js_unittests_run',
588 '../build/isolate.gypi',
589 'mojo_js_unittests.isolate',
592 'mojo_js_unittests.isolate',