diff options
42 files changed, 523 insertions, 500 deletions
diff --git a/build/all.gyp b/build/all.gyp index 64fdba4..dad0538 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -42,15 +42,15 @@ # NOTE: This list of targets is present because # mojo_base.gyp:mojo_base cannot be built on iOS, as # javascript-related targets cause v8 to be built. + '../mojo/edk/mojo_edk.gyp:mojo_public_bindings_unittests', + '../mojo/edk/mojo_edk.gyp:mojo_public_environment_unittests', + '../mojo/edk/mojo_edk.gyp:mojo_public_system_perftests', + '../mojo/edk/mojo_edk.gyp:mojo_public_system_unittests', + '../mojo/edk/mojo_edk.gyp:mojo_public_utility_unittests', + '../mojo/edk/mojo_edk.gyp:mojo_system_impl', + '../mojo/edk/mojo_edk.gyp:mojo_system_unittests', '../mojo/mojo_base.gyp:mojo_common_lib', '../mojo/mojo_base.gyp:mojo_common_unittests', - '../mojo/mojo_base.gyp:mojo_public_bindings_unittests', - '../mojo/mojo_base.gyp:mojo_public_environment_unittests', - '../mojo/mojo_base.gyp:mojo_public_system_perftests', - '../mojo/mojo_base.gyp:mojo_public_system_unittests', - '../mojo/mojo_base.gyp:mojo_public_utility_unittests', - '../mojo/mojo_base.gyp:mojo_system_impl', - '../mojo/mojo_base.gyp:mojo_system_unittests', '../mojo/public/mojo_public.gyp:mojo_cpp_bindings', '../mojo/public/mojo_public.gyp:mojo_public_test_utils', '../mojo/public/mojo_public.gyp:mojo_system', diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index c9e9133..1251fca 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -2911,9 +2911,9 @@ '../content/app/resources/content_resources.gyp:content_resources', '../media/cast/cast.gyp:cast_net', '../media/media.gyp:media', + '../mojo/edk/mojo_edk.gyp:mojo_system_impl', '../mojo/mojo_base.gyp:mojo_common_lib', '../mojo/mojo_base.gyp:mojo_environment_chromium', - '../mojo/mojo_base.gyp:mojo_system_impl', '../mojo/public/mojo_public.gyp:mojo_cpp_bindings', '../mojo/public/mojo_public.gyp:mojo_js_bindings', '../net/net.gyp:net_extras', diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi index e7ee42a..3dd0334 100644 --- a/chrome/chrome_browser_ui.gypi +++ b/chrome/chrome_browser_ui.gypi @@ -2621,7 +2621,7 @@ '../components/components.gyp:translate_content_common', '../content/app/resources/content_resources.gyp:content_resources', '../media/media.gyp:media', - '../mojo/mojo_base.gyp:mojo_system_impl', + '../mojo/edk/mojo_edk.gyp:mojo_system_impl', '../net/net.gyp:net_with_v8', '../storage/storage_browser.gyp:storage', '../storage/storage_common.gyp:storage_common', diff --git a/chrome/chrome_tests_unit.gypi b/chrome/chrome_tests_unit.gypi index 02f8927..09883b6 100644 --- a/chrome/chrome_tests_unit.gypi +++ b/chrome/chrome_tests_unit.gypi @@ -1885,8 +1885,8 @@ 'common', 'test_support_common', '../base/base.gyp:base', + '../mojo/edk/mojo_edk.gyp:mojo_system_impl', '../mojo/mojo_base.gyp:mojo_environment_chromium', - '../mojo/mojo_base.gyp:mojo_system_impl', '../skia/skia.gyp:skia', '../sync/sync.gyp:sync', '../testing/gmock.gyp:gmock', diff --git a/content/content_app.gypi b/content/content_app.gypi index ddb46b6..12c2177 100644 --- a/content/content_app.gypi +++ b/content/content_app.gypi @@ -64,8 +64,8 @@ ], }, { # OS!="ios" 'dependencies': [ + '../mojo/edk/mojo_edk.gyp:mojo_system_impl', '../mojo/mojo_base.gyp:mojo_environment_chromium', - '../mojo/mojo_base.gyp:mojo_system_impl', '../mojo/public/mojo_public.gyp:mojo_application_bindings', ], }], diff --git a/content/content_common.gypi b/content/content_common.gypi index 29c4dc5..97ccfba 100644 --- a/content/content_common.gypi +++ b/content/content_common.gypi @@ -566,8 +566,8 @@ '../ipc/mojo/ipc_mojo.gyp:ipc_mojo', '../media/media.gyp:media', '../media/media.gyp:shared_memory_support', + '../mojo/edk/mojo_edk.gyp:mojo_system_impl', '../mojo/mojo_base.gyp:mojo_environment_chromium', - '../mojo/mojo_base.gyp:mojo_system_impl', '../mojo/public/mojo_public.gyp:mojo_application_bindings', '../mojo/public/mojo_public.gyp:mojo_cpp_bindings', '../storage/storage_browser.gyp:storage', diff --git a/content/content_tests.gypi b/content/content_tests.gypi index 9a95466..84ab7f4 100644 --- a/content/content_tests.gypi +++ b/content/content_tests.gypi @@ -1119,9 +1119,9 @@ '../ipc/ipc.gyp:test_support_ipc', '../media/media.gyp:media_test_support', '../media/media.gyp:shared_memory_support', - '../mojo/mojo_base.gyp:mojo_common_test_support', + '../mojo/edk/mojo_edk.gyp:mojo_common_test_support', + '../mojo/edk/mojo_edk.gyp:mojo_system_impl', '../mojo/mojo_base.gyp:mojo_environment_chromium', - '../mojo/mojo_base.gyp:mojo_system_impl', '../mojo/public/mojo_public.gyp:mojo_cpp_bindings', '../mojo/public/mojo_public.gyp:mojo_js_bindings', '../net/net.gyp:net_test_support', diff --git a/device/device_tests.gyp b/device/device_tests.gyp index 5cb565a..4f77fbe 100644 --- a/device/device_tests.gyp +++ b/device/device_tests.gyp @@ -12,8 +12,8 @@ 'type': '<(gtest_target_type)', 'dependencies': [ '../base/base.gyp:test_support_base', + '../mojo/edk/mojo_edk.gyp:mojo_system_impl', '../mojo/mojo_base.gyp:mojo_environment_chromium', - '../mojo/mojo_base.gyp:mojo_system_impl', '../testing/gmock.gyp:gmock', '../testing/gtest.gyp:gtest', '../tools/usb_gadget/usb_gadget.gyp:usb_gadget', diff --git a/extensions/extensions.gyp b/extensions/extensions.gyp index d7316ff..e657635 100644 --- a/extensions/extensions.gyp +++ b/extensions/extensions.gyp @@ -1065,9 +1065,9 @@ '../device/bluetooth/bluetooth.gyp:device_bluetooth_mocks', '../device/serial/serial.gyp:device_serial', '../device/serial/serial.gyp:device_serial_test_util', + '../mojo/edk/mojo_edk.gyp:mojo_system_impl', '../mojo/mojo_base.gyp:mojo_environment_chromium', '../mojo/mojo_base.gyp:mojo_js_bindings_lib', - '../mojo/mojo_base.gyp:mojo_system_impl', '../mojo/public/mojo_public.gyp:mojo_cpp_bindings', '../testing/gmock.gyp:gmock', '../testing/gtest.gyp:gtest', diff --git a/extensions/shell/app_shell.gyp b/extensions/shell/app_shell.gyp index 3f0b331..2284655 100644 --- a/extensions/shell/app_shell.gyp +++ b/extensions/shell/app_shell.gyp @@ -32,8 +32,8 @@ '<(DEPTH)/extensions/extensions.gyp:extensions_renderer', '<(DEPTH)/extensions/extensions.gyp:extensions_shell_and_test_pak', '<(DEPTH)/extensions/extensions_resources.gyp:extensions_resources', + '<(DEPTH)/mojo/edk/mojo_edk.gyp:mojo_system_impl', '<(DEPTH)/mojo/mojo_base.gyp:mojo_environment_chromium', - '<(DEPTH)/mojo/mojo_base.gyp:mojo_system_impl', '<(DEPTH)/skia/skia.gyp:skia', '<(DEPTH)/third_party/WebKit/public/blink.gyp:blink', '<(DEPTH)/ui/wm/wm.gyp:wm', diff --git a/ipc/mojo/ipc_mojo.gyp b/ipc/mojo/ipc_mojo.gyp index 74c90413..1dde7ee 100644 --- a/ipc/mojo/ipc_mojo.gyp +++ b/ipc/mojo/ipc_mojo.gyp @@ -21,8 +21,8 @@ '../ipc.gyp:ipc', '../../base/base.gyp:base', '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', + '../../mojo/edk/mojo_edk.gyp:mojo_system_impl', '../../mojo/mojo_base.gyp:mojo_environment_chromium', - '../../mojo/mojo_base.gyp:mojo_system_impl', '../../mojo/public/mojo_public.gyp:mojo_cpp_bindings', ], 'sources': [ @@ -54,8 +54,8 @@ '../../base/base.gyp:base', '../../base/base.gyp:base_i18n', '../../base/base.gyp:test_support_base', + '../../mojo/edk/mojo_edk.gyp:mojo_system_impl', '../../mojo/mojo_base.gyp:mojo_environment_chromium', - '../../mojo/mojo_base.gyp:mojo_system_impl', '../../mojo/public/mojo_public.gyp:mojo_cpp_bindings', '../../testing/gtest.gyp:gtest', 'ipc_mojo', @@ -81,8 +81,8 @@ '../../base/base.gyp:base_i18n', '../../base/base.gyp:test_support_base', '../../base/base.gyp:test_support_perf', + '../../mojo/edk/mojo_edk.gyp:mojo_system_impl', '../../mojo/mojo_base.gyp:mojo_environment_chromium', - '../../mojo/mojo_base.gyp:mojo_system_impl', '../../mojo/public/mojo_public.gyp:mojo_cpp_bindings', '../../testing/gtest.gyp:gtest', 'ipc_mojo', diff --git a/media/media.gyp b/media/media.gyp index 28e1460..e2f677f 100644 --- a/media/media.gyp +++ b/media/media.gyp @@ -1095,8 +1095,8 @@ '../base/base.gyp:base', '../base/base.gyp:test_support_base', '../testing/gtest.gyp:gtest', + '../mojo/edk/mojo_edk.gyp:mojo_run_all_unittests', '../mojo/mojo_base.gyp:mojo_environment_chromium', - '../mojo/mojo_base.gyp:mojo_run_all_unittests', ], 'sources': [ 'mojo/services/media_type_converters_unittest.cc', diff --git a/media/mojo/services/BUILD.gn b/media/mojo/services/BUILD.gn index 04e1686..304c6c14 100644 --- a/media/mojo/services/BUILD.gn +++ b/media/mojo/services/BUILD.gn @@ -76,8 +76,8 @@ test("media_mojo_lib_unittests") { "//base/test:test_support", "//media", "//media/mojo/interfaces", - "//mojo/common/test:run_all_unittests", "//mojo/edk/system", + "//mojo/edk/test:run_all_unittests", "//mojo/environment:chromium", "//testing/gtest", ":lib" diff --git a/mojo/application_manager/BUILD.gn b/mojo/application_manager/BUILD.gn index 22c0edd..f788086 100644 --- a/mojo/application_manager/BUILD.gn +++ b/mojo/application_manager/BUILD.gn @@ -51,7 +51,7 @@ test("mojo_application_manager_unittests") { "//base", "//mojo/application", "//mojo/common", - "//mojo/common/test:run_all_unittests", + "//mojo/edk/test:run_all_unittests", "//mojo/environment:chromium", "//mojo/public/cpp/bindings", "//testing/gtest", diff --git a/mojo/apps/js/test/BUILD.gn b/mojo/apps/js/test/BUILD.gn index 2b09e71..1258316 100644 --- a/mojo/apps/js/test/BUILD.gn +++ b/mojo/apps/js/test/BUILD.gn @@ -11,7 +11,7 @@ test("mojo_apps_js_unittests") { "//gin:gin_test", "//mojo/apps/js", "//mojo/common", - "//mojo/common/test:run_all_unittests", + "//mojo/edk/test:run_all_unittests", "//mojo/edk/test:test_support", "//mojo/public/interfaces/bindings/tests:test_interfaces", ] diff --git a/mojo/bindings/js/tests/BUILD.gn b/mojo/bindings/js/tests/BUILD.gn index c85e68f..2d13ff4 100644 --- a/mojo/bindings/js/tests/BUILD.gn +++ b/mojo/bindings/js/tests/BUILD.gn @@ -7,7 +7,7 @@ test("mojo_js_unittests") { deps = [ "//gin:gin_test", "//mojo/bindings/js", - "//mojo/common/test:run_all_unittests", + "//mojo/edk/test:run_all_unittests", "//mojo/edk/test:test_support", "//mojo/public/cpp/environment:standalone", "//mojo/public/cpp/utility", diff --git a/mojo/common/BUILD.gn b/mojo/common/BUILD.gn index a825189..df1e4df 100644 --- a/mojo/common/BUILD.gn +++ b/mojo/common/BUILD.gn @@ -36,7 +36,7 @@ test("mojo_common_unittests") { ":common", "//base", "//base:message_loop_tests", - "//mojo/common/test:run_all_unittests", + "//mojo/edk/test:run_all_unittests", "//mojo/edk/test:test_support", "//mojo/environment:chromium", "//mojo/public/cpp/bindings", diff --git a/mojo/common/test/BUILD.gn b/mojo/common/test/BUILD.gn deleted file mode 100644 index ebad97e..0000000 --- a/mojo/common/test/BUILD.gn +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# GYP version: mojo/mojo_base.gyp:mojo_run_all_unittests -source_set("run_all_unittests") { - testonly = true - deps = [ - ":test_support_impl", - "//base", - "//base/test:test_support", - "//mojo/edk/system", - "//mojo/public/c/test_support", - "//testing/gtest", - ] - - sources = [ "run_all_unittests.cc" ] -} - -# GYP version: mojo/mojo_base.gyp:mojo_run_all_perftests -source_set("run_all_perftests") { - testonly = true - deps = [ - ":test_support_impl", - "//base", - "//base/test:test_support", - "//mojo/edk/system", - "//mojo/public/c/test_support", - ] - - sources = [ "run_all_perftests.cc" ] -} - - -# GYP version: mojo/mojo_base.gyp:mojo_test_support_impl -source_set("test_support_impl") { - testonly = true - deps = [ - "//base", - ] - - sources = [ - "test_support_impl.cc", - "test_support_impl.h", - ] -} diff --git a/mojo/common/test/DEPS b/mojo/common/test/DEPS deleted file mode 100644 index 61ef5fec..0000000 --- a/mojo/common/test/DEPS +++ /dev/null @@ -1,3 +0,0 @@ -include_rules = [ - "+mojo/edk/embedder", -] diff --git a/mojo/edk/mojo_edk.gyp b/mojo/edk/mojo_edk.gyp new file mode 100644 index 0000000..ac5ba95 --- /dev/null +++ b/mojo/edk/mojo_edk.gyp @@ -0,0 +1,405 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Essential components (and their tests) that are needed to build +# Chrome should be here. Other components that are useful only in +# Mojo land like mojo_shell should be in mojo.gyp. +{ + 'includes': [ + '../mojo_variables.gypi', + ], + 'targets': [ + { + 'target_name': 'mojo_edk', + 'type': 'none', + 'dependencies': [ + # NOTE: If adding a new dependency here, please consider whether it + # should also be added to the list of Mojo-related dependencies of + # build/all.gyp:All on iOS, as All cannot depend on the mojo_base + # target on iOS due to the presence of the js targets, which cause v8 + # to be built. + 'mojo_message_pipe_perftests', + 'mojo_public_application_unittests', + 'mojo_public_bindings_unittests', + 'mojo_public_environment_unittests', + 'mojo_public_system_perftests', + 'mojo_public_system_unittests', + 'mojo_public_utility_unittests', + 'mojo_system_impl', + 'mojo_system_unittests', + ], + }, + { + 'target_name': 'mojo_none', + 'type': 'none', + }, + { + # GN version: //mojo/edk/test:run_all_unittests + 'target_name': 'mojo_run_all_unittests', + 'type': 'static_library', + 'dependencies': [ + '../../base/base.gyp:base', + '../../base/base.gyp:test_support_base', + '../../testing/gtest.gyp:gtest', + 'mojo_system_impl', + 'mojo_test_support_impl', + '../public/mojo_public.gyp:mojo_test_support', + ], + 'sources': [ + 'test/run_all_unittests.cc', + ], + }, + { + # GN version: //mojo/edk/test:run_all_perftests + 'target_name': 'mojo_run_all_perftests', + 'type': 'static_library', + 'dependencies': [ + '../../base/base.gyp:test_support_base', + 'mojo_system_impl', + 'mojo_test_support_impl', + '../public/mojo_public.gyp:mojo_test_support', + ], + 'sources': [ + 'test/run_all_perftests.cc', + ], + }, + # TODO(vtl): Reorganize the mojo_public_*_unittests. + { + # GN version: //mojo/public/cpp/bindings/tests:mojo_public_bindings_unittests + 'target_name': 'mojo_public_bindings_unittests', + 'type': 'executable', + 'dependencies': [ + '../../testing/gtest.gyp:gtest', + 'mojo_run_all_unittests', + '../public/mojo_public.gyp:mojo_cpp_bindings', + '../public/mojo_public.gyp:mojo_environment_standalone', + '../public/mojo_public.gyp:mojo_public_bindings_test_utils', + '../public/mojo_public.gyp:mojo_public_test_interfaces', + '../public/mojo_public.gyp:mojo_public_test_utils', + '../public/mojo_public.gyp:mojo_utility', + ], + 'sources': [ + '../public/cpp/bindings/tests/array_unittest.cc', + '../public/cpp/bindings/tests/bounds_checker_unittest.cc', + '../public/cpp/bindings/tests/buffer_unittest.cc', + '../public/cpp/bindings/tests/connector_unittest.cc', + '../public/cpp/bindings/tests/handle_passing_unittest.cc', + '../public/cpp/bindings/tests/interface_ptr_unittest.cc', + '../public/cpp/bindings/tests/request_response_unittest.cc', + '../public/cpp/bindings/tests/router_unittest.cc', + '../public/cpp/bindings/tests/sample_service_unittest.cc', + '../public/cpp/bindings/tests/serialization_warning_unittest.cc', + '../public/cpp/bindings/tests/string_unittest.cc', + '../public/cpp/bindings/tests/struct_unittest.cc', + '../public/cpp/bindings/tests/type_conversion_unittest.cc', + '../public/cpp/bindings/tests/validation_unittest.cc', + ], + }, + { + # GN version: //mojo/public/cpp/environment/tests:mojo_public_environment_unittests + 'target_name': 'mojo_public_environment_unittests', + 'type': 'executable', + 'dependencies': [ + '../../testing/gtest.gyp:gtest', + 'mojo_run_all_unittests', + '../public/mojo_public.gyp:mojo_environment_standalone', + '../public/mojo_public.gyp:mojo_public_test_utils', + '../public/mojo_public.gyp:mojo_utility', + ], + 'include_dirs': [ '../..' ], + 'sources': [ + '../public/cpp/environment/tests/async_waiter_unittest.cc', + '../public/cpp/environment/tests/logger_unittest.cc', + '../public/cpp/environment/tests/logging_unittest.cc', + ], + }, + { + # GN version: //mojo/public/cpp/application/tests:mojo_public_application_unittests + 'target_name': 'mojo_public_application_unittests', + 'type': 'executable', + 'dependencies': [ + '../../base/base.gyp:base', + '../../testing/gtest.gyp:gtest', + 'mojo_run_all_unittests', + '../public/mojo_public.gyp:mojo_application_standalone', + '../public/mojo_public.gyp:mojo_utility', + '../public/mojo_public.gyp:mojo_environment_standalone', + ], + 'sources': [ + '../public/cpp/application/tests/service_registry_unittest.cc', + ], + }, + { + # GN version: //mojo/public/cpp/application/tests:mojo_public_system_unittests + 'target_name': 'mojo_public_system_unittests', + 'type': 'executable', + 'dependencies': [ + '../../testing/gtest.gyp:gtest', + 'mojo_run_all_unittests', + '../public/mojo_public.gyp:mojo_public_test_utils', + ], + 'include_dirs': [ '../..' ], + 'sources': [ + '<@(mojo_public_system_unittest_sources)', + ], + }, + { + # GN version: //mojo/public/cpp/application/tests:mojo_public_utility_unittests + 'target_name': 'mojo_public_utility_unittests', + 'type': 'executable', + 'dependencies': [ + '../../testing/gtest.gyp:gtest', + 'mojo_run_all_unittests', + '../public/mojo_public.gyp:mojo_public_test_utils', + '../public/mojo_public.gyp:mojo_utility', + ], + 'include_dirs': [ '../..' ], + 'sources': [ + '../public/cpp/utility/tests/mutex_unittest.cc', + '../public/cpp/utility/tests/run_loop_unittest.cc', + '../public/cpp/utility/tests/thread_unittest.cc', + ], + 'conditions': [ + # See crbug.com/342893: + ['OS=="win"', { + 'sources!': [ + '../public/cpp/utility/tests/mutex_unittest.cc', + '../public/cpp/utility/tests/thread_unittest.cc', + ], + }], + ], + }, + { + # GN version: //mojo/public/c/system/tests:perftests + 'target_name': 'mojo_public_system_perftests', + 'type': 'executable', + 'dependencies': [ + '../../base/base.gyp:base', + '../../testing/gtest.gyp:gtest', + 'mojo_run_all_perftests', + '../public/mojo_public.gyp:mojo_public_test_utils', + '../public/mojo_public.gyp:mojo_utility', + ], + 'sources': [ + '../public/c/system/tests/core_perftest.cc', + ], + }, + + { + # GN version: //mojo/edk/system + 'target_name': 'mojo_system_impl', + 'type': '<(component)', + 'dependencies': [ + '../../base/base.gyp:base', + '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', + ], + 'defines': [ + 'MOJO_SYSTEM_IMPL_IMPLEMENTATION', + 'MOJO_SYSTEM_IMPLEMENTATION', + 'MOJO_USE_SYSTEM_IMPL', + ], + 'sources': [ + 'embedder/channel_init.cc', + 'embedder/channel_init.h', + 'embedder/embedder.cc', + 'embedder/embedder.h', + 'embedder/platform_channel_pair.cc', + 'embedder/platform_channel_pair.h', + 'embedder/platform_channel_pair_posix.cc', + 'embedder/platform_channel_pair_win.cc', + 'embedder/platform_channel_utils_posix.cc', + 'embedder/platform_channel_utils_posix.h', + 'embedder/platform_handle.cc', + 'embedder/platform_handle.h', + 'embedder/platform_handle_utils.h', + 'embedder/platform_handle_utils_posix.cc', + 'embedder/platform_handle_utils_win.cc', + 'embedder/platform_handle_vector.h', + 'embedder/platform_shared_buffer.h', + 'embedder/platform_support.h', + 'embedder/scoped_platform_handle.h', + 'embedder/simple_platform_shared_buffer.cc', + 'embedder/simple_platform_shared_buffer.h', + 'embedder/simple_platform_shared_buffer_posix.cc', + 'embedder/simple_platform_shared_buffer_win.cc', + 'embedder/simple_platform_support.cc', + 'embedder/simple_platform_support.h', + 'system/channel.cc', + 'system/channel.h', + 'system/channel_endpoint.cc', + 'system/channel_endpoint.h', + 'system/channel_endpoint_id.h', + 'system/constants.h', + 'system/core.cc', + 'system/core.h', + 'system/data_pipe.cc', + 'system/data_pipe.h', + 'system/data_pipe_consumer_dispatcher.cc', + 'system/data_pipe_consumer_dispatcher.h', + 'system/data_pipe_producer_dispatcher.cc', + 'system/data_pipe_producer_dispatcher.h', + 'system/dispatcher.cc', + 'system/dispatcher.h', + 'system/entrypoints.cc', + 'system/handle_signals_state.h', + 'system/handle_table.cc', + 'system/handle_table.h', + 'system/local_data_pipe.cc', + 'system/local_data_pipe.h', + 'system/local_message_pipe_endpoint.cc', + 'system/local_message_pipe_endpoint.h', + 'system/mapping_table.cc', + 'system/mapping_table.h', + 'system/memory.cc', + 'system/memory.h', + 'system/message_in_transit.cc', + 'system/message_in_transit.h', + 'system/message_in_transit_queue.cc', + 'system/message_in_transit_queue.h', + 'system/message_pipe.cc', + 'system/message_pipe.h', + 'system/message_pipe_dispatcher.cc', + 'system/message_pipe_dispatcher.h', + 'system/message_pipe_endpoint.cc', + 'system/message_pipe_endpoint.h', + 'system/options_validation.h', + 'system/platform_handle_dispatcher.cc', + 'system/platform_handle_dispatcher.h', + 'system/proxy_message_pipe_endpoint.cc', + 'system/proxy_message_pipe_endpoint.h', + 'system/raw_channel.cc', + 'system/raw_channel.h', + 'system/raw_channel_posix.cc', + 'system/raw_channel_win.cc', + 'system/shared_buffer_dispatcher.cc', + 'system/shared_buffer_dispatcher.h', + 'system/simple_dispatcher.cc', + 'system/simple_dispatcher.h', + 'system/transport_data.cc', + 'system/transport_data.h', + 'system/waiter.cc', + 'system/waiter.h', + 'system/waiter_list.cc', + 'system/waiter_list.h', + # Test-only code: + # TODO(vtl): It's a little unfortunate that these end up in the same + # component as non-test-only code. In the static build, this code should + # hopefully be dead-stripped. + 'embedder/test_embedder.cc', + 'embedder/test_embedder.h', + ], + 'all_dependent_settings': { + # Ensures that dependent projects import the core functions on Windows. + 'defines': ['MOJO_USE_SYSTEM_IMPL'], + } + }, + { + # GN version: //mojo/edk/system:mojo_system_unittests + 'target_name': 'mojo_system_unittests', + 'type': 'executable', + 'dependencies': [ + '../../base/base.gyp:base', + '../../testing/gtest.gyp:gtest', + 'mojo_common_test_support', + 'mojo_system_impl', + ], + 'sources': [ + 'embedder/embedder_unittest.cc', + 'embedder/platform_channel_pair_posix_unittest.cc', + 'embedder/simple_platform_shared_buffer_unittest.cc', + 'system/channel_unittest.cc', + 'system/core_unittest.cc', + 'system/core_test_base.cc', + 'system/core_test_base.h', + 'system/data_pipe_unittest.cc', + 'system/dispatcher_unittest.cc', + 'system/local_data_pipe_unittest.cc', + 'system/memory_unittest.cc', + 'system/message_pipe_dispatcher_unittest.cc', + 'system/message_pipe_test_utils.h', + 'system/message_pipe_test_utils.cc', + 'system/message_pipe_unittest.cc', + 'system/multiprocess_message_pipe_unittest.cc', + 'system/options_validation_unittest.cc', + 'system/platform_handle_dispatcher_unittest.cc', + 'system/raw_channel_unittest.cc', + 'system/remote_message_pipe_unittest.cc', + 'system/run_all_unittests.cc', + 'system/shared_buffer_dispatcher_unittest.cc', + 'system/simple_dispatcher_unittest.cc', + 'system/test_utils.cc', + 'system/test_utils.h', + 'system/waiter_list_unittest.cc', + 'system/waiter_test_utils.cc', + 'system/waiter_test_utils.h', + 'system/waiter_unittest.cc', + ], + 'conditions': [ + ['OS=="ios"', { + 'sources!': [ + 'embedder/embedder_unittest.cc', + 'system/multiprocess_message_pipe_unittest.cc', + ], + }], + ], + }, + { + # GN version: //mojo/edk/system:mojo_message_pipe_perftests + 'target_name': 'mojo_message_pipe_perftests', + 'type': 'executable', + 'dependencies': [ + '../../base/base.gyp:base', + '../../base/base.gyp:test_support_base', + '../../base/base.gyp:test_support_perf', + '../../testing/gtest.gyp:gtest', + 'mojo_common_test_support', + 'mojo_system_impl', + ], + 'sources': [ + 'system/message_pipe_perftest.cc', + 'system/message_pipe_test_utils.h', + 'system/message_pipe_test_utils.cc', + 'system/test_utils.cc', + 'system/test_utils.h', + ], + }, + { + # GN version: //mojo/common/test:test_support_impl + 'target_name': 'mojo_test_support_impl', + 'type': 'static_library', + 'dependencies': [ + '../../base/base.gyp:base', + ], + 'sources': [ + 'test/test_support_impl.cc', + 'test/test_support_impl.h', + ], + }, + { + # GN version: //mojo/edk/test:test_support + 'target_name': 'mojo_common_test_support', + 'type': 'static_library', + 'dependencies': [ + '../../base/base.gyp:base', + '../../base/base.gyp:test_support_base', + '../../testing/gtest.gyp:gtest', + 'mojo_system_impl', + ], + 'sources': [ + 'test/multiprocess_test_helper.cc', + 'test/multiprocess_test_helper.h', + 'test/test_utils.h', + 'test/test_utils_posix.cc', + 'test/test_utils_win.cc', + ], + 'conditions': [ + ['OS=="ios"', { + 'sources!': [ + 'test/multiprocess_test_helper.cc', + ], + }], + ], + }, + ], +} diff --git a/mojo/edk/system/BUILD.gn b/mojo/edk/system/BUILD.gn index 72407c3..7baec81 100644 --- a/mojo/edk/system/BUILD.gn +++ b/mojo/edk/system/BUILD.gn @@ -86,7 +86,7 @@ component("system") { ] } -# GYP version: mojo/mojo_base.gyp:mojo_system_unittests +# GYP version: mojo/edk/mojo_edk.gyp:mojo_system_unittests test("mojo_system_unittests") { deps = [ ":system", @@ -127,7 +127,7 @@ test("mojo_system_unittests") { ] } -# GYP version: mojo/mojo_base.gyp:mojo_message_pipe_perftests +# GYP version: mojo/edk/mojo_edk.gyp:mojo_message_pipe_perftests test("mojo_message_pipe_perftests") { deps = [ ":system", diff --git a/mojo/edk/test/BUILD.gn b/mojo/edk/test/BUILD.gn index 6a6f312..e5d53b5 100644 --- a/mojo/edk/test/BUILD.gn +++ b/mojo/edk/test/BUILD.gn @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# GYP version: mojo/mojo_base.gyp:mojo_common_test_support +# GYP version: mojo/edk/mojo_edk.gyp:mojo_common_test_support source_set("test_support") { testonly = true sources = [ @@ -20,3 +20,46 @@ source_set("test_support") { "//testing/gtest", ] } + +# GYP version: mojo/edk/mojo_edk.gyp:mojo_run_all_unittests +source_set("run_all_unittests") { + testonly = true + deps = [ + ":test_support_impl", + "//base", + "//base/test:test_support", + "//mojo/edk/system", + "//mojo/public/c/test_support", + "//testing/gtest", + ] + + sources = [ "run_all_unittests.cc" ] +} + +# GYP version: mojo/edk/mojo_edk.gyp:mojo_run_all_perftests +source_set("run_all_perftests") { + testonly = true + deps = [ + ":test_support_impl", + "//base", + "//base/test:test_support", + "//mojo/edk/system", + "//mojo/public/c/test_support", + ] + + sources = [ "run_all_perftests.cc" ] +} + + +# GYP version: mojo/edk/mojo_edk.gyp:mojo_test_support_impl +source_set("test_support_impl") { + testonly = true + deps = [ + "//base", + ] + + sources = [ + "test_support_impl.cc", + "test_support_impl.h", + ] +} diff --git a/mojo/common/test/run_all_perftests.cc b/mojo/edk/test/run_all_perftests.cc index e3f41aa..f0eacc6 100644 --- a/mojo/common/test/run_all_perftests.cc +++ b/mojo/edk/test/run_all_perftests.cc @@ -3,8 +3,8 @@ // found in the LICENSE file. #include "base/test/perf_test_suite.h" -#include "mojo/common/test/test_support_impl.h" #include "mojo/edk/embedder/test_embedder.h" +#include "mojo/edk/test/test_support_impl.h" #include "mojo/public/tests/test_support_private.h" int main(int argc, char** argv) { diff --git a/mojo/common/test/run_all_unittests.cc b/mojo/edk/test/run_all_unittests.cc index 48c054e..6805dcd 100644 --- a/mojo/common/test/run_all_unittests.cc +++ b/mojo/edk/test/run_all_unittests.cc @@ -5,8 +5,8 @@ #include "base/bind.h" #include "base/test/launcher/unit_test_launcher.h" #include "base/test/test_suite.h" -#include "mojo/common/test/test_support_impl.h" #include "mojo/edk/embedder/test_embedder.h" +#include "mojo/edk/test/test_support_impl.h" #include "mojo/public/tests/test_support_private.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/mojo/common/test/test_support_impl.cc b/mojo/edk/test/test_support_impl.cc index 89e6de1..fae3a8f 100644 --- a/mojo/common/test/test_support_impl.cc +++ b/mojo/edk/test/test_support_impl.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "mojo/common/test/test_support_impl.h" +#include "mojo/edk/test/test_support_impl.h" #include <stdlib.h> #include <string.h> diff --git a/mojo/common/test/test_support_impl.h b/mojo/edk/test/test_support_impl.h index 9f69bfe..fce0b4a 100644 --- a/mojo/common/test/test_support_impl.h +++ b/mojo/edk/test/test_support_impl.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef MOJO_COMMON_TEST_TEST_SUPPORT_IMPL_H_ -#define MOJO_COMMON_TEST_TEST_SUPPORT_IMPL_H_ +#ifndef MOJO_EDK_TEST_TEST_SUPPORT_IMPL_H_ +#define MOJO_EDK_TEST_TEST_SUPPORT_IMPL_H_ #include "base/macros.h" #include "mojo/public/tests/test_support_private.h" @@ -30,4 +30,4 @@ class TestSupportImpl : public TestSupport { } // namespace test } // namespace mojo -#endif // MOJO_COMMON_TEST_TEST_SUPPORT_IMPL_H_ +#endif // MOJO_EDK_TEST_TEST_SUPPORT_IMPL_H_ diff --git a/mojo/mojo.gyp b/mojo/mojo.gyp index e927a20..3d23d25 100644 --- a/mojo/mojo.gyp +++ b/mojo/mojo.gyp @@ -25,6 +25,7 @@ 'target_name': 'mojo', 'type': 'none', 'dependencies': [ + 'edk/mojo_edk.gyp:mojo_edk', 'mojo_application_manager', 'mojo_application_manager_unittests', 'mojo_apps_js_unittests', @@ -149,10 +150,10 @@ '../base/base.gyp:base', '../base/base.gyp:base_static', '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', + 'edk/mojo_edk.gyp:mojo_system_impl', 'mojo_application_manager', 'mojo_base.gyp:mojo_application_chromium', 'mojo_base.gyp:mojo_common_lib', - 'mojo_base.gyp:mojo_system_impl', 'mojo_external_service_bindings', 'mojo_gles2_impl', 'mojo_network_bindings', @@ -227,7 +228,7 @@ 'target_name': 'mojo_shell_test_support', 'type': 'static_library', 'dependencies': [ - 'mojo_base.gyp:mojo_system_impl', + 'edk/mojo_edk.gyp:mojo_system_impl', 'mojo_shell_lib', ], 'sources': [ @@ -267,10 +268,10 @@ '../testing/gtest.gyp:gtest', '../net/net.gyp:net_test_support', '../url/url.gyp:url_lib', + 'edk/mojo_edk.gyp:mojo_system_impl', 'mojo_application_manager', 'mojo_base.gyp:mojo_common_lib', 'mojo_base.gyp:mojo_environment_chromium', - 'mojo_base.gyp:mojo_system_impl', 'mojo_shell_lib', 'mojo_test_app', 'mojo_test_request_tracker_app', @@ -334,11 +335,11 @@ '../base/base.gyp:base', '../testing/gtest.gyp:gtest', '../url/url.gyp:url_lib', + 'edk/mojo_edk.gyp:mojo_run_all_unittests', 'mojo_application_manager', - 'mojo_base.gyp:mojo_common_lib', 'mojo_base.gyp:mojo_application_chromium', + 'mojo_base.gyp:mojo_common_lib', 'mojo_base.gyp:mojo_environment_chromium', - 'mojo_base.gyp:mojo_run_all_unittests', 'public/mojo_public.gyp:mojo_cpp_bindings', ], 'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ], @@ -425,9 +426,9 @@ 'type': 'executable', 'dependencies': [ '../gin/gin.gyp:gin_test', - 'mojo_base.gyp:mojo_common_test_support', + 'edk/mojo_edk.gyp:mojo_common_test_support', + 'edk/mojo_edk.gyp:mojo_run_all_unittests', 'mojo_base.gyp:mojo_js_bindings_lib', - 'mojo_base.gyp:mojo_run_all_unittests', 'public/mojo_public.gyp:mojo_environment_standalone', 'public/mojo_public.gyp:mojo_public_test_interfaces', 'public/mojo_public.gyp:mojo_utility', @@ -503,10 +504,10 @@ '../testing/gtest.gyp:gtest', '../net/net.gyp:net_test_support', '../url/url.gyp:url_lib', + 'edk/mojo_edk.gyp:mojo_system_impl', 'mojo_application_manager', 'mojo_base.gyp:mojo_common_lib', 'mojo_base.gyp:mojo_environment_chromium', - 'mojo_base.gyp:mojo_system_impl', 'mojo_shell_lib', ], 'sources': [ @@ -643,7 +644,7 @@ 'python/system/mojo/embedder.pyx', ], 'dependencies': [ - 'mojo_base.gyp:mojo_system_impl', + 'edk/mojo_edk.gyp:mojo_system_impl', ], 'includes': [ '../third_party/cython/cython_compiler.gypi' ], }, diff --git a/mojo/mojo_apps.gypi b/mojo/mojo_apps.gypi index 57c8362..f1a74ac 100644 --- a/mojo/mojo_apps.gypi +++ b/mojo/mojo_apps.gypi @@ -66,10 +66,10 @@ 'type': 'executable', 'dependencies': [ '../gin/gin.gyp:gin_test', + 'edk/mojo_edk.gyp:mojo_common_test_support', + 'edk/mojo_edk.gyp:mojo_run_all_unittests', 'mojo_apps_js_bindings', 'mojo_base.gyp:mojo_common_lib', - 'mojo_base.gyp:mojo_common_test_support', - 'mojo_base.gyp:mojo_run_all_unittests', 'mojo_js_lib', 'public/mojo_public.gyp:mojo_public_test_interfaces', ], diff --git a/mojo/mojo_base.gyp b/mojo/mojo_base.gyp index 9427fbe..704651f 100644 --- a/mojo/mojo_base.gyp +++ b/mojo/mojo_base.gyp @@ -22,15 +22,6 @@ 'mojo_common_lib', 'mojo_common_unittests', 'mojo_message_generator', - 'mojo_message_pipe_perftests', - 'mojo_public_application_unittests', - 'mojo_public_bindings_unittests', - 'mojo_public_environment_unittests', - 'mojo_public_system_perftests', - 'mojo_public_system_unittests', - 'mojo_public_utility_unittests', - 'mojo_system_impl', - 'mojo_system_unittests', ], 'conditions': [ ['OS == "android"', { @@ -49,349 +40,6 @@ 'type': 'none', }, { - # GN version: //mojo/common/test:run_all_unittests - 'target_name': 'mojo_run_all_unittests', - 'type': 'static_library', - 'dependencies': [ - '../base/base.gyp:base', - '../base/base.gyp:test_support_base', - '../testing/gtest.gyp:gtest', - 'mojo_system_impl', - 'mojo_test_support_impl', - 'public/mojo_public.gyp:mojo_test_support', - ], - 'sources': [ - 'common/test/run_all_unittests.cc', - ], - }, - { - # GN version: //mojo/common/test:run_all_perftests - 'target_name': 'mojo_run_all_perftests', - 'type': 'static_library', - 'dependencies': [ - '../base/base.gyp:test_support_base', - 'mojo_system_impl', - 'mojo_test_support_impl', - 'public/mojo_public.gyp:mojo_test_support', - ], - 'sources': [ - 'common/test/run_all_perftests.cc', - ], - }, - # TODO(vtl): Reorganize the mojo_public_*_unittests. - { - # GN version: //mojo/public/cpp/bindings/tests:mojo_public_bindings_unittests - 'target_name': 'mojo_public_bindings_unittests', - 'type': 'executable', - 'dependencies': [ - '../testing/gtest.gyp:gtest', - 'mojo_run_all_unittests', - 'public/mojo_public.gyp:mojo_cpp_bindings', - 'public/mojo_public.gyp:mojo_environment_standalone', - 'public/mojo_public.gyp:mojo_public_bindings_test_utils', - 'public/mojo_public.gyp:mojo_public_test_interfaces', - 'public/mojo_public.gyp:mojo_public_test_utils', - 'public/mojo_public.gyp:mojo_utility', - ], - 'sources': [ - 'public/cpp/bindings/tests/array_unittest.cc', - 'public/cpp/bindings/tests/bounds_checker_unittest.cc', - 'public/cpp/bindings/tests/buffer_unittest.cc', - 'public/cpp/bindings/tests/connector_unittest.cc', - 'public/cpp/bindings/tests/handle_passing_unittest.cc', - 'public/cpp/bindings/tests/interface_ptr_unittest.cc', - 'public/cpp/bindings/tests/request_response_unittest.cc', - 'public/cpp/bindings/tests/router_unittest.cc', - 'public/cpp/bindings/tests/sample_service_unittest.cc', - 'public/cpp/bindings/tests/serialization_warning_unittest.cc', - 'public/cpp/bindings/tests/string_unittest.cc', - 'public/cpp/bindings/tests/struct_unittest.cc', - 'public/cpp/bindings/tests/type_conversion_unittest.cc', - 'public/cpp/bindings/tests/validation_unittest.cc', - ], - }, - { - # GN version: //mojo/public/cpp/environment/tests:mojo_public_environment_unittests - 'target_name': 'mojo_public_environment_unittests', - 'type': 'executable', - 'dependencies': [ - '../testing/gtest.gyp:gtest', - 'mojo_run_all_unittests', - 'public/mojo_public.gyp:mojo_environment_standalone', - 'public/mojo_public.gyp:mojo_public_test_utils', - 'public/mojo_public.gyp:mojo_utility', - ], - 'include_dirs': [ '..' ], - 'sources': [ - 'public/cpp/environment/tests/async_waiter_unittest.cc', - 'public/cpp/environment/tests/logger_unittest.cc', - 'public/cpp/environment/tests/logging_unittest.cc', - ], - }, - { - # GN version: //mojo/public/cpp/application/tests:mojo_public_application_unittests - 'target_name': 'mojo_public_application_unittests', - 'type': 'executable', - 'dependencies': [ - '../base/base.gyp:base', - '../testing/gtest.gyp:gtest', - 'mojo_run_all_unittests', - 'public/mojo_public.gyp:mojo_application_standalone', - 'public/mojo_public.gyp:mojo_utility', - 'public/mojo_public.gyp:mojo_environment_standalone', - ], - 'sources': [ - 'public/cpp/application/tests/service_registry_unittest.cc', - ], - }, - { - # GN version: //mojo/public/cpp/application/tests:mojo_public_system_unittests - 'target_name': 'mojo_public_system_unittests', - 'type': 'executable', - 'dependencies': [ - '../testing/gtest.gyp:gtest', - 'mojo_base.gyp:mojo_run_all_unittests', - 'public/mojo_public.gyp:mojo_public_test_utils', - ], - 'include_dirs': [ '..' ], - 'sources': [ - '<@(mojo_public_system_unittest_sources)', - ], - }, - { - # GN version: //mojo/public/cpp/application/tests:mojo_public_utility_unittests - 'target_name': 'mojo_public_utility_unittests', - 'type': 'executable', - 'dependencies': [ - '../testing/gtest.gyp:gtest', - 'mojo_base.gyp:mojo_run_all_unittests', - 'public/mojo_public.gyp:mojo_public_test_utils', - 'public/mojo_public.gyp:mojo_utility', - ], - 'include_dirs' : [ '..' ], - 'sources': [ - 'public/cpp/utility/tests/mutex_unittest.cc', - 'public/cpp/utility/tests/run_loop_unittest.cc', - 'public/cpp/utility/tests/thread_unittest.cc', - ], - 'conditions': [ - # See crbug.com/342893: - ['OS=="win"', { - 'sources!': [ - 'public/cpp/utility/tests/mutex_unittest.cc', - 'public/cpp/utility/tests/thread_unittest.cc', - ], - }], - ], - }, - { - # GN version: //mojo/public/c/system/tests:perftests - 'target_name': 'mojo_public_system_perftests', - 'type': 'executable', - 'dependencies': [ - '../base/base.gyp:base', - '../testing/gtest.gyp:gtest', - 'mojo_run_all_perftests', - 'public/mojo_public.gyp:mojo_public_test_utils', - 'public/mojo_public.gyp:mojo_utility', - ], - 'sources': [ - 'public/c/system/tests/core_perftest.cc', - ], - }, - - { - # GN version: //mojo/edk/system - 'target_name': 'mojo_system_impl', - 'type': '<(component)', - 'dependencies': [ - '../base/base.gyp:base', - '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', - ], - 'defines': [ - 'MOJO_SYSTEM_IMPL_IMPLEMENTATION', - 'MOJO_SYSTEM_IMPLEMENTATION', - 'MOJO_USE_SYSTEM_IMPL', - ], - 'sources': [ - 'edk/embedder/channel_init.cc', - 'edk/embedder/channel_init.h', - 'edk/embedder/embedder.cc', - 'edk/embedder/embedder.h', - 'edk/embedder/platform_channel_pair.cc', - 'edk/embedder/platform_channel_pair.h', - 'edk/embedder/platform_channel_pair_posix.cc', - 'edk/embedder/platform_channel_pair_win.cc', - 'edk/embedder/platform_channel_utils_posix.cc', - 'edk/embedder/platform_channel_utils_posix.h', - 'edk/embedder/platform_handle.cc', - 'edk/embedder/platform_handle.h', - 'edk/embedder/platform_handle_utils.h', - 'edk/embedder/platform_handle_utils_posix.cc', - 'edk/embedder/platform_handle_utils_win.cc', - 'edk/embedder/platform_handle_vector.h', - 'edk/embedder/platform_shared_buffer.h', - 'edk/embedder/platform_support.h', - 'edk/embedder/scoped_platform_handle.h', - 'edk/embedder/simple_platform_shared_buffer.cc', - 'edk/embedder/simple_platform_shared_buffer.h', - 'edk/embedder/simple_platform_shared_buffer_posix.cc', - 'edk/embedder/simple_platform_shared_buffer_win.cc', - 'edk/embedder/simple_platform_support.cc', - 'edk/embedder/simple_platform_support.h', - 'edk/system/channel.cc', - 'edk/system/channel.h', - 'edk/system/channel_endpoint.cc', - 'edk/system/channel_endpoint.h', - 'edk/system/channel_endpoint_id.h', - 'edk/system/constants.h', - 'edk/system/core.cc', - 'edk/system/core.h', - 'edk/system/data_pipe.cc', - 'edk/system/data_pipe.h', - 'edk/system/data_pipe_consumer_dispatcher.cc', - 'edk/system/data_pipe_consumer_dispatcher.h', - 'edk/system/data_pipe_producer_dispatcher.cc', - 'edk/system/data_pipe_producer_dispatcher.h', - 'edk/system/dispatcher.cc', - 'edk/system/dispatcher.h', - 'edk/system/entrypoints.cc', - 'edk/system/handle_signals_state.h', - 'edk/system/handle_table.cc', - 'edk/system/handle_table.h', - 'edk/system/local_data_pipe.cc', - 'edk/system/local_data_pipe.h', - 'edk/system/local_message_pipe_endpoint.cc', - 'edk/system/local_message_pipe_endpoint.h', - 'edk/system/mapping_table.cc', - 'edk/system/mapping_table.h', - 'edk/system/memory.cc', - 'edk/system/memory.h', - 'edk/system/message_in_transit.cc', - 'edk/system/message_in_transit.h', - 'edk/system/message_in_transit_queue.cc', - 'edk/system/message_in_transit_queue.h', - 'edk/system/message_pipe.cc', - 'edk/system/message_pipe.h', - 'edk/system/message_pipe_dispatcher.cc', - 'edk/system/message_pipe_dispatcher.h', - 'edk/system/message_pipe_endpoint.cc', - 'edk/system/message_pipe_endpoint.h', - 'edk/system/options_validation.h', - 'edk/system/platform_handle_dispatcher.cc', - 'edk/system/platform_handle_dispatcher.h', - 'edk/system/proxy_message_pipe_endpoint.cc', - 'edk/system/proxy_message_pipe_endpoint.h', - 'edk/system/raw_channel.cc', - 'edk/system/raw_channel.h', - 'edk/system/raw_channel_posix.cc', - 'edk/system/raw_channel_win.cc', - 'edk/system/shared_buffer_dispatcher.cc', - 'edk/system/shared_buffer_dispatcher.h', - 'edk/system/simple_dispatcher.cc', - 'edk/system/simple_dispatcher.h', - 'edk/system/transport_data.cc', - 'edk/system/transport_data.h', - 'edk/system/waiter.cc', - 'edk/system/waiter.h', - 'edk/system/waiter_list.cc', - 'edk/system/waiter_list.h', - # Test-only code: - # TODO(vtl): It's a little unfortunate that these end up in the same - # component as non-test-only code. In the static build, this code should - # hopefully be dead-stripped. - 'edk/embedder/test_embedder.cc', - 'edk/embedder/test_embedder.h', - ], - 'all_dependent_settings': { - # Ensures that dependent projects import the core functions on Windows. - 'defines': ['MOJO_USE_SYSTEM_IMPL'], - } - }, - { - # GN version: //mojo/edk/system:mojo_system_unittests - 'target_name': 'mojo_system_unittests', - 'type': 'executable', - 'dependencies': [ - '../base/base.gyp:base', - '../testing/gtest.gyp:gtest', - 'mojo_common_test_support', - 'mojo_system_impl', - ], - 'sources': [ - 'edk/embedder/embedder_unittest.cc', - 'edk/embedder/platform_channel_pair_posix_unittest.cc', - 'edk/embedder/simple_platform_shared_buffer_unittest.cc', - 'edk/system/channel_unittest.cc', - 'edk/system/core_unittest.cc', - 'edk/system/core_test_base.cc', - 'edk/system/core_test_base.h', - 'edk/system/data_pipe_unittest.cc', - 'edk/system/dispatcher_unittest.cc', - 'edk/system/local_data_pipe_unittest.cc', - 'edk/system/memory_unittest.cc', - 'edk/system/message_pipe_dispatcher_unittest.cc', - 'edk/system/message_pipe_test_utils.h', - 'edk/system/message_pipe_test_utils.cc', - 'edk/system/message_pipe_unittest.cc', - 'edk/system/multiprocess_message_pipe_unittest.cc', - 'edk/system/options_validation_unittest.cc', - 'edk/system/platform_handle_dispatcher_unittest.cc', - 'edk/system/raw_channel_unittest.cc', - 'edk/system/remote_message_pipe_unittest.cc', - 'edk/system/run_all_unittests.cc', - 'edk/system/shared_buffer_dispatcher_unittest.cc', - 'edk/system/simple_dispatcher_unittest.cc', - 'edk/system/test_utils.cc', - 'edk/system/test_utils.h', - 'edk/system/waiter_list_unittest.cc', - 'edk/system/waiter_test_utils.cc', - 'edk/system/waiter_test_utils.h', - 'edk/system/waiter_unittest.cc', - ], - 'conditions': [ - ['OS=="ios"', { - 'sources!': [ - 'edk/embedder/embedder_unittest.cc', - 'edk/system/multiprocess_message_pipe_unittest.cc', - ], - }], - ], - }, - { - # GN version: //mojo/edk/system:mojo_message_pipe_perftests - 'target_name': 'mojo_message_pipe_perftests', - 'type': 'executable', - 'dependencies': [ - '../base/base.gyp:base', - '../base/base.gyp:test_support_base', - '../base/base.gyp:test_support_perf', - '../testing/gtest.gyp:gtest', - 'mojo_common_test_support', - 'mojo_environment_chromium', - 'mojo_system_impl', - ], - 'sources': [ - 'edk/system/message_pipe_perftest.cc', - 'edk/system/message_pipe_test_utils.h', - 'edk/system/message_pipe_test_utils.cc', - 'edk/system/test_utils.cc', - 'edk/system/test_utils.h', - ], - }, - { - # GN version: //mojo/common/test:test_support_impl - 'target_name': 'mojo_test_support_impl', - 'type': 'static_library', - 'dependencies': [ - '../base/base.gyp:base', - ], - 'sources': [ - 'common/test/test_support_impl.cc', - 'common/test/test_support_impl.h', - ], - }, - { # GN version: //mojo/common 'target_name': 'mojo_common_lib', 'type': '<(component)', @@ -422,31 +70,6 @@ ], }, { - # GN version: //mojo/edk/test:test_support - 'target_name': 'mojo_common_test_support', - 'type': 'static_library', - 'dependencies': [ - '../base/base.gyp:base', - '../base/base.gyp:test_support_base', - '../testing/gtest.gyp:gtest', - 'mojo_system_impl', - ], - 'sources': [ - 'edk/test/multiprocess_test_helper.cc', - 'edk/test/multiprocess_test_helper.h', - 'edk/test/test_utils.h', - 'edk/test/test_utils_posix.cc', - 'edk/test/test_utils_win.cc', - ], - 'conditions': [ - ['OS=="ios"', { - 'sources!': [ - 'edk/test/multiprocess_test_helper.cc', - ], - }], - ], - }, - { # GN version: //mojo/common:mojo_common_unittests 'target_name': 'mojo_common_unittests', 'type': 'executable', @@ -455,10 +78,10 @@ '../base/base.gyp:base_message_loop_tests', '../testing/gtest.gyp:gtest', '../url/url.gyp:url_lib', + 'edk/mojo_edk.gyp:mojo_common_test_support', + 'edk/mojo_edk.gyp:mojo_run_all_unittests', 'mojo_common_lib', - 'mojo_common_test_support', 'mojo_environment_chromium', - 'mojo_run_all_unittests', 'public/mojo_public.gyp:mojo_cpp_bindings', 'public/mojo_public.gyp:mojo_public_test_utils', ], @@ -573,9 +196,9 @@ 'dependencies': [ '../base/base.gyp:base', '../testing/gtest.gyp:gtest', + 'edk/mojo_edk.gyp:mojo_system_impl', 'mojo_common_lib', 'mojo_environment_chromium', - 'mojo_system_impl', 'public/mojo_public.gyp:mojo_cpp_bindings', ], 'sources': [ @@ -631,10 +254,10 @@ 'dependencies': [ '../base/base.gyp:base', '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', + 'edk/mojo_edk.gyp:mojo_system_impl', 'mojo_common_lib', 'mojo_environment_chromium', 'mojo_jni_headers', - 'mojo_system_impl', ], 'sources': [ 'android/system/core_impl.cc', diff --git a/mojo/mojo_nacl.gyp b/mojo/mojo_nacl.gyp index a813046..ea16dee 100644 --- a/mojo/mojo_nacl.gyp +++ b/mojo/mojo_nacl.gyp @@ -61,7 +61,7 @@ 'type': 'executable', 'dependencies': [ '../base/base.gyp:base', - 'mojo_base.gyp:mojo_system_impl', + 'edk/mojo_edk.gyp:mojo_system_impl', 'monacl_sel', ], 'sources': [ diff --git a/mojo/mojo_services.gypi b/mojo/mojo_services.gypi index 5c5bd7a..eb9b0db 100644 --- a/mojo/mojo_services.gypi +++ b/mojo/mojo_services.gypi @@ -46,10 +46,10 @@ '../base/base.gyp:base', '../base/base.gyp:test_support_base', '../testing/gtest.gyp:gtest', + 'edk/mojo_edk.gyp:mojo_run_all_unittests', + 'edk/mojo_edk.gyp:mojo_system_impl', 'mojo_application_manager', 'mojo_base.gyp:mojo_application_chromium', - 'mojo_base.gyp:mojo_run_all_unittests', - 'mojo_base.gyp:mojo_system_impl', 'mojo_clipboard_bindings', 'mojo_shell_test_support', ], @@ -279,8 +279,8 @@ '../ui/gfx/gfx.gyp:gfx', '../ui/gfx/gfx.gyp:gfx_geometry', '../ui/gfx/gfx.gyp:gfx_test_support', + 'edk/mojo_edk.gyp:mojo_run_all_unittests', 'mojo_base.gyp:mojo_environment_chromium', - 'mojo_base.gyp:mojo_run_all_unittests', 'mojo_geometry_lib', 'mojo_surfaces_bindings', 'mojo_surfaces_lib', @@ -686,7 +686,7 @@ ], }, { # use_aura==0 'dependencies': [ - 'mojo_base.gyp:mojo_run_all_unittests', + 'edk/mojo_edk.gyp:mojo_run_all_unittests', ], }], ], @@ -900,8 +900,8 @@ '../testing/gtest.gyp:gtest', '../ui/aura/aura.gyp:aura', '../ui/gfx/gfx.gyp:gfx_geometry', + 'edk/mojo_edk.gyp:mojo_system_impl', 'mojo_application_manager', - 'mojo_base.gyp:mojo_system_impl', 'mojo_base.gyp:mojo_application_chromium', 'mojo_geometry_bindings', 'mojo_geometry_lib', @@ -979,8 +979,8 @@ 'dependencies': [ '../base/base.gyp:test_support_base', '../testing/gtest.gyp:gtest', + 'edk/mojo_edk.gyp:mojo_system_impl', 'mojo_application_manager', - 'mojo_base.gyp:mojo_system_impl', 'mojo_base.gyp:mojo_environment_chromium', 'mojo_core_window_manager_bindings', 'mojo_shell_test_support', diff --git a/mojo/mojo_variables.gypi b/mojo/mojo_variables.gypi index b80ebfc..6e73b5a 100644 --- a/mojo/mojo_variables.gypi +++ b/mojo/mojo_variables.gypi @@ -32,8 +32,8 @@ # which Mojo system library they are using. # ['component=="shared_library"', { - 'mojo_system_for_component': "<(DEPTH)/mojo/mojo_base.gyp:mojo_system_impl", - 'mojo_system_for_loadable_module': "<(DEPTH)/mojo/mojo_base.gyp:mojo_system_impl", + 'mojo_system_for_component': "<(DEPTH)/mojo/edk/mojo_edk.gyp:mojo_system_impl", + 'mojo_system_for_loadable_module': "<(DEPTH)/mojo/edk/mojo_edk.gyp:mojo_system_impl", 'mojo_gles2_for_component': "<(DEPTH)/mojo/mojo_base.gyp:mojo_gles2_impl", }, { 'mojo_system_for_component': "<(DEPTH)/mojo/mojo_base.gyp:mojo_none", diff --git a/mojo/public/c/system/tests/BUILD.gn b/mojo/public/c/system/tests/BUILD.gn index 499d057..02b591a 100644 --- a/mojo/public/c/system/tests/BUILD.gn +++ b/mojo/public/c/system/tests/BUILD.gn @@ -30,7 +30,7 @@ executable("perftests") { deps = [ "//base", - "//mojo/common/test:run_all_perftests", + "//mojo/edk/test:run_all_perftests", "//mojo/public/c/environment", "//mojo/public/cpp/system", "//mojo/public/cpp/test_support:test_utils", diff --git a/mojo/public/cpp/application/tests/BUILD.gn b/mojo/public/cpp/application/tests/BUILD.gn index a57d0f6..61678ab 100644 --- a/mojo/public/cpp/application/tests/BUILD.gn +++ b/mojo/public/cpp/application/tests/BUILD.gn @@ -6,7 +6,7 @@ test("mojo_public_application_unittests") { deps = [ "//base", - "//mojo/common/test:run_all_unittests", + "//mojo/edk/test:run_all_unittests", "//mojo/public/cpp/application:standalone", "//mojo/public/cpp/environment:standalone", "//mojo/public/cpp/utility", diff --git a/mojo/public/cpp/bindings/tests/BUILD.gn b/mojo/public/cpp/bindings/tests/BUILD.gn index a072556..12b122c3 100644 --- a/mojo/public/cpp/bindings/tests/BUILD.gn +++ b/mojo/public/cpp/bindings/tests/BUILD.gn @@ -22,7 +22,7 @@ test("mojo_public_bindings_unittests") { ] deps = [ - "//mojo/common/test:run_all_unittests", + "//mojo/edk/test:run_all_unittests", "//mojo/public/cpp/bindings", "//mojo/public/cpp/environment:standalone", "//mojo/public/cpp/system", diff --git a/mojo/public/cpp/environment/tests/BUILD.gn b/mojo/public/cpp/environment/tests/BUILD.gn index d5eecd8..6fb56f8 100644 --- a/mojo/public/cpp/environment/tests/BUILD.gn +++ b/mojo/public/cpp/environment/tests/BUILD.gn @@ -11,7 +11,7 @@ test("mojo_public_environment_unittests") { ] deps = [ - "//mojo/common/test:run_all_unittests", + "//mojo/edk/test:run_all_unittests", "//mojo/public/c/environment", "//mojo/public/cpp/environment:standalone", "//mojo/public/cpp/system", diff --git a/mojo/public/cpp/system/tests/BUILD.gn b/mojo/public/cpp/system/tests/BUILD.gn index 9ceb50f..a0270c2 100644 --- a/mojo/public/cpp/system/tests/BUILD.gn +++ b/mojo/public/cpp/system/tests/BUILD.gn @@ -5,7 +5,7 @@ # GYP version: mojo/mojo_base.gyp:mojo_public_system_unittests test("mojo_public_system_unittests") { deps = [ - "//mojo/common/test:run_all_unittests", + "//mojo/edk/test:run_all_unittests", "//mojo/public/c/system/tests", "//mojo/public/cpp/system", "//mojo/public/cpp/test_support:test_utils", diff --git a/mojo/public/cpp/utility/tests/BUILD.gn b/mojo/public/cpp/utility/tests/BUILD.gn index 489b007..dd1d154 100644 --- a/mojo/public/cpp/utility/tests/BUILD.gn +++ b/mojo/public/cpp/utility/tests/BUILD.gn @@ -5,7 +5,7 @@ # GYP version: mojo/mojo_base.gyp:mojo_public_utility_unittests test("mojo_public_utility_unittests") { deps = [ - "//mojo/common/test:run_all_unittests", + "//mojo/edk/test:run_all_unittests", "//mojo/public/cpp/system", "//mojo/public/cpp/test_support:test_utils", "//mojo/public/cpp/utility", diff --git a/mojo/services/clipboard/BUILD.gn b/mojo/services/clipboard/BUILD.gn index 5c3b78e..42ab408 100644 --- a/mojo/services/clipboard/BUILD.gn +++ b/mojo/services/clipboard/BUILD.gn @@ -30,8 +30,8 @@ test("mojo_clipboard_unittests") { "//mojo/application", "//mojo/application_manager", "//mojo/common", - "//mojo/common/test:run_all_unittests", "//mojo/edk/system", + "//mojo/edk/test:run_all_unittests", "//mojo/environment:chromium", "//mojo/services/public/interfaces/clipboard:clipboard", "//mojo/shell:test_support", diff --git a/mojo/services/public/cpp/surfaces/tests/BUILD.gn b/mojo/services/public/cpp/surfaces/tests/BUILD.gn index 10810fe..4211eff 100644 --- a/mojo/services/public/cpp/surfaces/tests/BUILD.gn +++ b/mojo/services/public/cpp/surfaces/tests/BUILD.gn @@ -10,17 +10,17 @@ test("mojo_surfaces_lib_unittests") { "//cc", "//cc/surfaces", "//gpu", + "//mojo/edk/test:run_all_unittests", + "//mojo/environment:chromium", + "//mojo/services/public/cpp/geometry", + "//mojo/services/public/cpp/surfaces", + "//mojo/services/public/interfaces/geometry", + "//mojo/services/public/interfaces/surfaces", "//skia", "//testing/gtest", "//ui/gfx", "//ui/gfx/geometry", "//ui/gfx:test_support", - "//mojo/environment:chromium", - "//mojo/services/public/interfaces/surfaces", - "//mojo/services/public/interfaces/geometry", - "//mojo/services/public/cpp/geometry", - "//mojo/services/public/cpp/surfaces", - "//mojo/common/test:run_all_unittests", ] sources = [ "surface_unittest.cc" ] diff --git a/mojo/services/public/cpp/view_manager/tests/BUILD.gn b/mojo/services/public/cpp/view_manager/tests/BUILD.gn index a468a92..9b7fb67 100644 --- a/mojo/services/public/cpp/view_manager/tests/BUILD.gn +++ b/mojo/services/public/cpp/view_manager/tests/BUILD.gn @@ -28,6 +28,6 @@ test("mojo_view_manager_lib_unittests") { if (use_aura) { deps += [ "//mojo/services/public/cpp/view_manager/lib:run_unittests" ] } else { - deps += [ "//mojo/common/test:run_all_unittests" ] + deps += [ "//mojo/edk/test:run_all_unittests" ] } } diff --git a/ui/keyboard/keyboard.gyp b/ui/keyboard/keyboard.gyp index 6a44b1f..db251ec 100644 --- a/ui/keyboard/keyboard.gyp +++ b/ui/keyboard/keyboard.gyp @@ -55,8 +55,8 @@ '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '../../content/content.gyp:content_browser', '../../ipc/ipc.gyp:ipc', + '../../mojo/edk/mojo_edk.gyp:mojo_system_impl', '../../mojo/mojo_base.gyp:mojo_environment_chromium', - '../../mojo/mojo_base.gyp:mojo_system_impl', '../../mojo/public/mojo_public.gyp:mojo_cpp_bindings', '../../mojo/public/mojo_public.gyp:mojo_js_bindings', '../../skia/skia.gyp:skia', |