summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mojo/BUILD.gn17
-rw-r--r--mojo/application_manager/BUILD.gn27
-rw-r--r--mojo/apps/js/BUILD.gn18
-rw-r--r--mojo/apps/js/bindings/BUILD.gn20
-rw-r--r--mojo/apps/js/bindings/gl/BUILD.gn24
-rw-r--r--mojo/apps/js/test/BUILD.gn27
-rw-r--r--mojo/common/BUILD.gn24
-rw-r--r--mojo/common/test/BUILD.gn47
-rw-r--r--mojo/embedder/BUILD.gn69
-rw-r--r--mojo/mojo.gyp1
-rw-r--r--mojo/mojo_apps.gypi4
-rw-r--r--mojo/mojo_base.gyp5
-rw-r--r--mojo/mojo_public_tests.gypi18
-rw-r--r--mojo/mojo_services.gypi1
-rw-r--r--mojo/public/c/system/tests/BUILD.gn17
-rw-r--r--mojo/public/c/test_support/BUILD.gn24
-rw-r--r--mojo/public/cpp/application/tests/BUILD.gn17
-rw-r--r--mojo/public/cpp/bindings/tests/BUILD.gn35
-rw-r--r--mojo/public/cpp/environment/tests/BUILD.gn20
-rw-r--r--mojo/public/cpp/system/tests/BUILD.gn18
-rw-r--r--mojo/public/cpp/test_support/BUILD.gn18
-rw-r--r--mojo/public/cpp/utility/tests/BUILD.gn19
-rw-r--r--mojo/public/js/bindings/tests/BUILD.gn17
-rw-r--r--mojo/services/public/cpp/surfaces/tests/BUILD.gn27
-rw-r--r--mojo/system/BUILD.gn87
25 files changed, 556 insertions, 45 deletions
diff --git a/mojo/BUILD.gn b/mojo/BUILD.gn
index 58afc23..a2c246f 100644
--- a/mojo/BUILD.gn
+++ b/mojo/BUILD.gn
@@ -4,12 +4,29 @@
group("mojo") {
deps = [
+ ":tests",
"//mojo/common",
"//mojo/examples",
"//mojo/public",
"//mojo/services",
"//mojo/shell:mojo_shell",
+ ]
+}
+
+group("tests") {
+ deps = [
+ "//mojo/application_manager:mojo_application_manager_unittests",
+ "//mojo/apps/js/test:mojo_apps_js_unittests",
+ "//mojo/common:mojo_common_unittests",
+ "//mojo/public/cpp/application/tests:mojo_public_application_unittests",
+ "//mojo/public/cpp/bindings/tests:mojo_public_bindings_unittests",
+ "//mojo/public/cpp/environment/tests:mojo_public_environment_unittests",
+ "//mojo/public/cpp/system/tests:mojo_public_system_unittests",
+ "//mojo/public/cpp/utility/tests:mojo_public_utility_unittests",
+ "//mojo/public/js/bindings/tests:mojo_js_unittests",
+ "//mojo/services/public/cpp/surfaces/tests:mojo_surfaces_lib_unittests",
"//mojo/shell:mojo_shell_tests",
+ "//mojo/system:mojo_system_unittests",
]
}
diff --git a/mojo/application_manager/BUILD.gn b/mojo/application_manager/BUILD.gn
index 267fa68..ed57f0c 100644
--- a/mojo/application_manager/BUILD.gn
+++ b/mojo/application_manager/BUILD.gn
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//mojo/public/tools/bindings/mojom.gni")
+
# GYP version: mojo.gyp:mojo_application_manager
component("application_manager") {
output_name = "mojo_application_manager"
@@ -36,3 +38,28 @@ component("application_manager") {
"//mojo/public/interfaces/application:application",
]
}
+
+# GYP version: mojo.gyp:mojo_application_manager_unittests
+test("mojo_application_manager_unittests") {
+ deps = [
+ ":application_manager",
+ ":test_bindings",
+ "//base",
+ "//testing/gtest",
+ "//url",
+ "//mojo/common",
+ "//mojo/environment:chromium",
+ "//mojo/public/cpp/application:chromium",
+ "//mojo/common/test:run_all_unittests",
+ "//mojo/public/cpp/bindings",
+ ]
+
+ sources = [
+ "application_manager_unittest.cc",
+ "background_shell_application_loader_unittest.cc",
+ ]
+}
+
+mojom("test_bindings") {
+ sources = [ "test.mojom" ]
+}
diff --git a/mojo/apps/js/BUILD.gn b/mojo/apps/js/BUILD.gn
new file mode 100644
index 0000000..16332d9
--- /dev/null
+++ b/mojo/apps/js/BUILD.gn
@@ -0,0 +1,18 @@
+# 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: part of mojo/mojo_apps.gypi:mojo_js_lib
+source_set("js") {
+ deps = [
+ "//base",
+ "//gin",
+ "//mojo/apps/js/bindings",
+ "//mojo/apps/js/bindings/gl",
+ "//mojo/bindings/js",
+ ]
+ sources = [
+ "mojo_runner_delegate.cc",
+ "mojo_runner_delegate.h",
+ ]
+}
diff --git a/mojo/apps/js/bindings/BUILD.gn b/mojo/apps/js/bindings/BUILD.gn
new file mode 100644
index 0000000..bc72747
--- /dev/null
+++ b/mojo/apps/js/bindings/BUILD.gn
@@ -0,0 +1,20 @@
+# 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: part of mojo/mojo_apps.gypi:mojo_js_lib
+source_set("bindings") {
+ deps = [
+ "//base",
+ "//gin",
+ "//v8",
+ "//mojo/bindings/js",
+ ]
+
+ sources = [
+ "threading.cc",
+ "threading.h",
+ "monotonic_clock.cc",
+ "monotonic_clock.h",
+ ]
+}
diff --git a/mojo/apps/js/bindings/gl/BUILD.gn b/mojo/apps/js/bindings/gl/BUILD.gn
new file mode 100644
index 0000000..0404698
--- /dev/null
+++ b/mojo/apps/js/bindings/gl/BUILD.gn
@@ -0,0 +1,24 @@
+# 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.
+
+import("//mojo/system.gni")
+
+# GYP version: part of mojo/mojo_apps.gypi:mojo_js_lib
+source_set("gl") {
+ deps = [
+ "//base",
+ "//gin",
+ "//v8",
+ "//mojo/services/gles2:bindings",
+ "//mojo/environment:chromium",
+ ] + mojo_gles2_for_shared_library
+
+
+ sources = [
+ "context.cc",
+ "context.h",
+ "module.cc",
+ "module.h",
+ ]
+}
diff --git a/mojo/apps/js/test/BUILD.gn b/mojo/apps/js/test/BUILD.gn
new file mode 100644
index 0000000..aeaf68a
--- /dev/null
+++ b/mojo/apps/js/test/BUILD.gn
@@ -0,0 +1,27 @@
+# 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.
+
+import("//mojo/public/tools/bindings/mojom.gni")
+
+# GYP version: mojo/mojo_apps.gypi:mojo_apps_js_unittests
+test("mojo_apps_js_unittests") {
+ deps = [
+ ":js_to_cpp_bindings",
+ "//gin:gin_test",
+ "//mojo/apps/js",
+ "//mojo/common",
+ "//mojo/common/test:run_all_unittests",
+ "//mojo/common/test:test_support",
+ "//mojo/public/interfaces/bindings/tests:test_interfaces",
+ ]
+
+ sources = [
+ "js_to_cpp_unittest.cc",
+ "run_apps_js_tests.cc",
+ ]
+}
+
+mojom("js_to_cpp_bindings") {
+ sources = [ "js_to_cpp.mojom" ]
+}
diff --git a/mojo/common/BUILD.gn b/mojo/common/BUILD.gn
index 72171ba..5bd139f 100644
--- a/mojo/common/BUILD.gn
+++ b/mojo/common/BUILD.gn
@@ -27,5 +27,29 @@ component("common") {
deps = [
"//base",
"//base/third_party/dynamic_annotations",
+ "//url",
] + mojo_system_for_component
}
+
+# GYP version: mojo/mojo_base.gyp:mojo_common_unittests
+test("mojo_common_unittests") {
+ deps = [
+ ":common",
+ "//base",
+ "//base:message_loop_tests",
+ "//mojo/common/test:run_all_unittests",
+ "//mojo/common/test:test_support",
+ "//mojo/environment:chromium",
+ "//mojo/public/cpp/bindings",
+ "//mojo/public/cpp/test_support:test_utils",
+ "//testing/gtest",
+ "//url",
+ ]
+
+ sources = [
+ "common_type_converters_unittest.cc",
+ "handle_watcher_unittest.cc",
+ "message_pump_mojo_unittest.cc",
+ "test/multiprocess_test_helper_unittest.cc",
+ ]
+}
diff --git a/mojo/common/test/BUILD.gn b/mojo/common/test/BUILD.gn
new file mode 100644
index 0000000..a0df6d0
--- /dev/null
+++ b/mojo/common/test/BUILD.gn
@@ -0,0 +1,47 @@
+# 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") {
+ deps = [
+ ":test_support_impl",
+ "//base",
+ "//base/test:test_support",
+ "//mojo/public/c/test_support",
+ "//mojo/system",
+ "//testing/gtest",
+ ]
+
+ sources = [ "run_all_unittests.cc" ]
+}
+
+# GYP version: mojo/mojo_base.gyp:mojo_test_support_impl
+source_set("test_support_impl") {
+ deps = [
+ "//base",
+ ]
+
+ sources = [
+ "test_support_impl.cc",
+ "test_support_impl.h",
+ ]
+}
+
+# GYP version: mojo/mojo_base.gyp:mojo_common_test_support
+source_set("test_support") {
+ deps = [
+ "//base",
+ "//base/test:test_support",
+ "//testing/gtest",
+ "//mojo/system",
+ ]
+
+ sources = [
+ "multiprocess_test_helper.cc",
+ "multiprocess_test_helper.h",
+ "test_utils.h",
+ "test_utils_posix.cc",
+ "test_utils_win.cc",
+ ]
+}
diff --git a/mojo/embedder/BUILD.gn b/mojo/embedder/BUILD.gn
new file mode 100644
index 0000000..04e3759
--- /dev/null
+++ b/mojo/embedder/BUILD.gn
@@ -0,0 +1,69 @@
+# 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.
+
+source_set("embedder") {
+ # This isn't really a standalone target, it must be linked into the
+ # mojo_system_impl component.
+ visibility = [ "//mojo/system" ]
+
+ deps = [ "//base", ]
+
+ defines = [
+ "MOJO_SYSTEM_IMPL_IMPLEMENTATION",
+ "MOJO_SYSTEM_IMPLEMENTATION",
+ ]
+
+ configs += [ "//mojo/system:system_config" ]
+
+ sources = [
+ "channel_init.cc",
+ "channel_init.h",
+ "embedder.cc",
+ "embedder.h",
+ "platform_channel_pair.cc",
+ "platform_channel_pair.h",
+ "platform_channel_pair_posix.cc",
+ "platform_channel_pair_win.cc",
+ "platform_channel_utils_posix.cc",
+ "platform_channel_utils_posix.h",
+ "platform_handle.cc",
+ "platform_handle.h",
+ "platform_handle_utils.h",
+ "platform_handle_utils_posix.cc",
+ "platform_handle_utils_win.cc",
+ "platform_handle_vector.h",
+ "platform_shared_buffer.h",
+ "platform_support.h",
+ "scoped_platform_handle.h",
+ "simple_platform_shared_buffer.cc",
+ "simple_platform_shared_buffer.h",
+ "simple_platform_shared_buffer_posix.cc",
+ "simple_platform_shared_buffer_win.cc",
+ "simple_platform_support.cc",
+ "simple_platform_support.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.
+ "test_embedder.cc",
+ "test_embedder.h",
+ ]
+}
+
+source_set("embedder_unittests") {
+ visibility = [ "//mojo/system:mojo_system_unittests" ]
+
+ deps = [
+ "//base",
+ "//mojo/common/test:test_support",
+ "//mojo/system",
+ "//testing/gtest",
+ ]
+
+ sources = [
+ "embedder_unittest.cc",
+ "platform_channel_pair_posix_unittest.cc",
+ "simple_platform_shared_buffer_unittest.cc",
+ ]
+}
diff --git a/mojo/mojo.gyp b/mojo/mojo.gyp
index 5544e96..17a5b2d 100644
--- a/mojo/mojo.gyp
+++ b/mojo/mojo.gyp
@@ -336,6 +336,7 @@
],
},
{
+ # GN version: //mojo/application_manager:unittests
'target_name': 'mojo_application_manager_unittests',
'type': 'executable',
'dependencies': [
diff --git a/mojo/mojo_apps.gypi b/mojo/mojo_apps.gypi
index fda9084..363af0c 100644
--- a/mojo/mojo_apps.gypi
+++ b/mojo/mojo_apps.gypi
@@ -5,6 +5,9 @@
{
'targets': [
{
+ # GN version: //mojo/apps/js
+ # //mojo/apps/js/bindings
+ # //mojo/apps/js/bindings/gl
'target_name': 'mojo_js_lib',
'type': 'static_library',
'dependencies': [
@@ -55,6 +58,7 @@
],
},
{
+ # GN version: //mojo/apps/js/test/mojo_apps_js_unittests
'target_name': 'mojo_apps_js_unittests',
'type': 'executable',
'dependencies': [
diff --git a/mojo/mojo_base.gyp b/mojo/mojo_base.gyp
index b06997f..b3c3449 100644
--- a/mojo/mojo_base.gyp
+++ b/mojo/mojo_base.gyp
@@ -51,6 +51,7 @@
'type': 'none',
},
{
+ # GN version: //mojo/common/test:run_all_unittests
'target_name': 'mojo_run_all_unittests',
'type': 'static_library',
'dependencies': [
@@ -184,6 +185,7 @@
}
},
{
+ # GN version: //mojo/system:mojo_system_unittests
'target_name': 'mojo_system_unittests',
'type': 'executable',
'dependencies': [
@@ -223,6 +225,7 @@
],
},
{
+ # GN version: //mojo/common/test:test_support_impl
'target_name': 'mojo_test_support_impl',
'type': 'static_library',
'dependencies': [
@@ -264,6 +267,7 @@
],
},
{
+ # GN version: //mojo/common/test:test_support
'target_name': 'mojo_common_test_support',
'type': 'static_library',
'dependencies': [
@@ -281,6 +285,7 @@
],
},
{
+ # GN version: //mojo/common:mojo_common_unittests
'target_name': 'mojo_common_unittests',
'type': 'executable',
'dependencies': [
diff --git a/mojo/mojo_public_tests.gypi b/mojo/mojo_public_tests.gypi
index 25ce4e7..97f78210 100644
--- a/mojo/mojo_public_tests.gypi
+++ b/mojo/mojo_public_tests.gypi
@@ -5,6 +5,7 @@
{
'targets': [
{
+ # GN version: //mojo/public/c/test_support
'target_name': 'mojo_test_support',
'type': 'shared_library',
'defines': [
@@ -21,6 +22,7 @@
'sources': [
'public/c/test_support/test_support.h',
'public/c/test_support/test_support_export.h',
+ # TODO(vtl): Convert this to thunks http://crbug.com/386799
'public/tests/test_support_private.cc',
'public/tests/test_support_private.h',
],
@@ -34,6 +36,7 @@
],
},
{
+ # GN version: //mojo/public/cpp/test_support:test_utils
'target_name': 'mojo_public_test_utils',
'type': 'static_library',
'dependencies': [
@@ -49,6 +52,7 @@
},
# 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': [
@@ -80,16 +84,17 @@
],
},
{
+ # GN version: //mojo/public/cpp/environment/tests:mojo_public_environment_unittests
'target_name': 'mojo_public_environment_unittests',
'type': 'executable',
'dependencies': [
- '../base/base.gyp:base',
'../testing/gtest.gyp:gtest',
'mojo_environment_standalone',
'mojo_public_test_utils',
'mojo_run_all_unittests',
'mojo_utility',
],
+ 'include_dirs': [ '..' ],
'sources': [
'public/cpp/environment/tests/async_waiter_unittest.cc',
'public/cpp/environment/tests/logger_unittest.cc',
@@ -97,6 +102,7 @@
],
},
{
+ # GN version: //mojo/public/cpp/application/tests:mojo_public_application_unittests
'target_name': 'mojo_public_application_unittests',
'type': 'executable',
'dependencies': [
@@ -112,15 +118,15 @@
],
},
{
+ # GN version: //mojo/public/cpp/application/tests:mojo_public_system_unittests
'target_name': 'mojo_public_system_unittests',
'type': 'executable',
'dependencies': [
- '../base/base.gyp:base',
'../testing/gtest.gyp:gtest',
- 'mojo_cpp_bindings',
'mojo_public_test_utils',
'mojo_run_all_unittests',
],
+ 'include_dirs': [ '..' ],
'sources': [
'public/c/system/tests/core_unittest.cc',
'public/c/system/tests/core_unittest_pure_c.c',
@@ -130,16 +136,16 @@
],
},
{
+ # GN version: //mojo/public/cpp/application/tests:mojo_public_utility_unittests
'target_name': 'mojo_public_utility_unittests',
'type': 'executable',
'dependencies': [
- '../base/base.gyp:base',
'../testing/gtest.gyp:gtest',
- 'mojo_cpp_bindings',
'mojo_public_test_utils',
'mojo_run_all_unittests',
'mojo_utility',
],
+ 'include_dirs' : [ '..' ],
'sources': [
'public/cpp/utility/tests/mutex_unittest.cc',
'public/cpp/utility/tests/run_loop_unittest.cc',
@@ -170,6 +176,7 @@
],
},
{
+ # GN version: //mojo/public/interfaces/bindings/tests:test_interfaces
'target_name': 'mojo_public_test_interfaces',
'type': 'static_library',
'sources': [
@@ -193,6 +200,7 @@
],
},
{
+ # GN version: //mojo/public/js/bindings/tests:mojo_js_unittests
'target_name': 'mojo_js_unittests',
'type': 'executable',
'dependencies': [
diff --git a/mojo/mojo_services.gypi b/mojo/mojo_services.gypi
index 92f50bf..2dc3f27 100644
--- a/mojo/mojo_services.gypi
+++ b/mojo/mojo_services.gypi
@@ -175,6 +175,7 @@
],
},
{
+ # GN version: //mojo/services/public/cpp/surfaces/tests
'target_name': 'mojo_surfaces_lib_unittests',
'type': 'executable',
'dependencies': [
diff --git a/mojo/public/c/system/tests/BUILD.gn b/mojo/public/c/system/tests/BUILD.gn
new file mode 100644
index 0000000..579b881
--- /dev/null
+++ b/mojo/public/c/system/tests/BUILD.gn
@@ -0,0 +1,17 @@
+# 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.
+
+source_set("tests") {
+ visibility = [ "//mojo/public/cpp/system/tests:mojo_public_system_unittests" ]
+
+ deps = [
+ "//testing/gtest",
+ ]
+
+ sources = [
+ "core_unittest.cc",
+ "core_unittest_pure_c.c",
+ "macros_unittest.cc",
+ ]
+}
diff --git a/mojo/public/c/test_support/BUILD.gn b/mojo/public/c/test_support/BUILD.gn
new file mode 100644
index 0000000..42db434
--- /dev/null
+++ b/mojo/public/c/test_support/BUILD.gn
@@ -0,0 +1,24 @@
+# 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_public_tests.gypi:mojo_test_support
+shared_library("test_support") {
+ output_name = "mojo_test_support"
+
+ defines = [ "MOJO_TEST_SUPPORT_IMPLEMENTATION" ]
+
+ sources = [
+ "test_support.h",
+ "test_support_export.h",
+ # TODO(vtl): Convert this to thunks http://crbug.com/386799
+ "../../tests/test_support_private.cc",
+ "../../tests/test_support_private.h",
+ ]
+
+ if (is_mac) {
+# TODO(GYP)
+# # Make it a run-path dependent library.
+# 'DYLIB_INSTALL_NAME_BASE': '@loader_path',
+ }
+}
diff --git a/mojo/public/cpp/application/tests/BUILD.gn b/mojo/public/cpp/application/tests/BUILD.gn
new file mode 100644
index 0000000..4c22c19
--- /dev/null
+++ b/mojo/public/cpp/application/tests/BUILD.gn
@@ -0,0 +1,17 @@
+# 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_public_tests.gypi:mojo_public_application_unittests
+test("mojo_public_application_unittests") {
+ deps = [
+ "//base",
+ "//mojo/common/test:run_all_unittests",
+ "//mojo/public/cpp/application:standalone",
+ "//mojo/public/cpp/environment:standalone",
+ "//mojo/public/cpp/utility",
+ "//testing/gtest",
+ ]
+
+ sources = [ "service_registry_unittest.cc" ]
+}
diff --git a/mojo/public/cpp/bindings/tests/BUILD.gn b/mojo/public/cpp/bindings/tests/BUILD.gn
new file mode 100644
index 0000000..46fc5f3
--- /dev/null
+++ b/mojo/public/cpp/bindings/tests/BUILD.gn
@@ -0,0 +1,35 @@
+# 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_public_tests.gypi:mojo_public_bindings_unittests
+test("mojo_public_bindings_unittests") {
+ deps = [
+ "//mojo/common/test:run_all_unittests",
+ "//mojo/public/cpp/bindings",
+ "//mojo/public/cpp/environment:standalone",
+ "//mojo/public/cpp/test_support:test_utils",
+ "//mojo/public/cpp/utility",
+ "//mojo/public/interfaces/bindings/tests:test_interfaces",
+ "//testing/gtest",
+ ]
+
+ sources = [
+ "array_unittest.cc",
+ "bounds_checker_unittest.cc",
+ "buffer_unittest.cc",
+ "connector_unittest.cc",
+ "handle_passing_unittest.cc",
+ "interface_ptr_unittest.cc",
+ "request_response_unittest.cc",
+ "router_unittest.cc",
+ "sample_service_unittest.cc",
+ "serialization_warning_unittest.cc",
+ "string_unittest.cc",
+ "struct_unittest.cc",
+ "type_conversion_unittest.cc",
+ "validation_test_input_parser.cc",
+ "validation_test_input_parser.h",
+ "validation_unittest.cc",
+ ]
+}
diff --git a/mojo/public/cpp/environment/tests/BUILD.gn b/mojo/public/cpp/environment/tests/BUILD.gn
new file mode 100644
index 0000000..644723f
--- /dev/null
+++ b/mojo/public/cpp/environment/tests/BUILD.gn
@@ -0,0 +1,20 @@
+# 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_public_tests.gypi:mojo_public_environment_unittests
+test("mojo_public_environment_unittests") {
+ deps = [
+ "//mojo/common/test:run_all_unittests",
+ "//mojo/public/cpp/environment:standalone",
+ "//mojo/public/cpp/test_support:test_utils",
+ "//mojo/public/cpp/utility",
+ "//testing/gtest",
+ ]
+
+ sources = [
+ "async_waiter_unittest.cc",
+ "logger_unittest.cc",
+ "logging_unittest.cc",
+ ]
+}
diff --git a/mojo/public/cpp/system/tests/BUILD.gn b/mojo/public/cpp/system/tests/BUILD.gn
new file mode 100644
index 0000000..0c629a1
--- /dev/null
+++ b/mojo/public/cpp/system/tests/BUILD.gn
@@ -0,0 +1,18 @@
+# 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_public_tests.gypi:mojo_public_system_unittests
+test("mojo_public_system_unittests") {
+ deps = [
+ "//mojo/common/test:run_all_unittests",
+ "//mojo/public/c/system/tests",
+ "//mojo/public/cpp/test_support:test_utils",
+ "//testing/gtest",
+ ]
+
+ sources = [
+ "core_unittest.cc",
+ "macros_unittest.cc",
+ ]
+}
diff --git a/mojo/public/cpp/test_support/BUILD.gn b/mojo/public/cpp/test_support/BUILD.gn
new file mode 100644
index 0000000..9599161
--- /dev/null
+++ b/mojo/public/cpp/test_support/BUILD.gn
@@ -0,0 +1,18 @@
+# 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_public_tests.gypi:mojo_public_test_utils
+source_set("test_utils") {
+ deps = [
+ "//base",
+ "//testing/gtest",
+ "//mojo/public/c/test_support",
+ ]
+
+ sources = [
+ "lib/test_support.cc",
+ "lib/test_utils.cc",
+ "test_utils.h",
+ ]
+}
diff --git a/mojo/public/cpp/utility/tests/BUILD.gn b/mojo/public/cpp/utility/tests/BUILD.gn
new file mode 100644
index 0000000..0def088
--- /dev/null
+++ b/mojo/public/cpp/utility/tests/BUILD.gn
@@ -0,0 +1,19 @@
+# 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_public_tests.gypi:mojo_public_utility_unittests
+test("mojo_public_utility_unittests") {
+ deps = [
+ "//mojo/common/test:run_all_unittests",
+ "//mojo/public/cpp/test_support:test_utils",
+ "//mojo/public/cpp/utility",
+ "//testing/gtest",
+ ]
+
+ sources = [
+ "mutex_unittest.cc",
+ "run_loop_unittest.cc",
+ "thread_unittest.cc",
+ ]
+}
diff --git a/mojo/public/js/bindings/tests/BUILD.gn b/mojo/public/js/bindings/tests/BUILD.gn
new file mode 100644
index 0000000..6e5090d
--- /dev/null
+++ b/mojo/public/js/bindings/tests/BUILD.gn
@@ -0,0 +1,17 @@
+# 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_public_tests.gypi:mojo_js_unittests
+test("mojo_js_unittests") {
+ deps = [
+ "//gin:gin_test",
+ "//mojo/common/test:run_all_unittests",
+ "//mojo/common/test:test_support",
+ "//mojo/environment:chromium",
+ "//mojo/public/interfaces/bindings/tests:test_interfaces",
+ "//mojo/bindings/js",
+ ]
+
+ sources = [ "run_js_tests.cc" ]
+}
diff --git a/mojo/services/public/cpp/surfaces/tests/BUILD.gn b/mojo/services/public/cpp/surfaces/tests/BUILD.gn
new file mode 100644
index 0000000..10810fe
--- /dev/null
+++ b/mojo/services/public/cpp/surfaces/tests/BUILD.gn
@@ -0,0 +1,27 @@
+# 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_services.gypi:mojo_surfaces_lib_unittests
+test("mojo_surfaces_lib_unittests") {
+ deps = [
+ "//base",
+ "//base/test:test_support",
+ "//cc",
+ "//cc/surfaces",
+ "//gpu",
+ "//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/system/BUILD.gn b/mojo/system/BUILD.gn
index c45c4c8..d8dcb75 100644
--- a/mojo/system/BUILD.gn
+++ b/mojo/system/BUILD.gn
@@ -12,33 +12,20 @@ config("system_config") {
component("system") {
output_name = "mojo_system_impl"
+ deps = [
+ "//base",
+ "//base/third_party/dynamic_annotations",
+ "//mojo/embedder",
+ ]
+
+ defines = [
+ "MOJO_SYSTEM_IMPL_IMPLEMENTATION",
+ "MOJO_SYSTEM_IMPLEMENTATION",
+ ]
+
+ all_dependent_configs = [ ":system_config" ]
+
sources = [
- # Should there be a separate "embedder" target?
- "../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",
"channel.cc",
"channel.h",
"constants.h",
@@ -93,23 +80,43 @@ component("system") {
"waiter.h",
"waiter_list.cc",
"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",
]
+}
- defines = [
- "MOJO_SYSTEM_IMPL_IMPLEMENTATION",
- "MOJO_SYSTEM_IMPLEMENTATION",
- ]
-
- all_dependent_configs = [ ":system_config" ]
-
+# GYP version: mojo/mojo_base.gyp:mojo_system_unittests
+test("mojo_system_unittests") {
deps = [
+ ":system",
"//base",
- "//base/third_party/dynamic_annotations",
+ "//mojo/common/test:test_support",
+ "//mojo/embedder:embedder_unittests",
+ "//testing/gtest",
+ ]
+
+ sources = [
+ "channel_unittest.cc",
+ "core_unittest.cc",
+ "core_test_base.cc",
+ "core_test_base.h",
+ "data_pipe_unittest.cc",
+ "dispatcher_unittest.cc",
+ "local_data_pipe_unittest.cc",
+ "memory_unittest.cc",
+ "message_pipe_dispatcher_unittest.cc",
+ "message_pipe_unittest.cc",
+ "multiprocess_message_pipe_unittest.cc",
+ "options_validation_unittest.cc",
+ "platform_handle_dispatcher_unittest.cc",
+ "raw_channel_unittest.cc",
+ "remote_message_pipe_unittest.cc",
+ "run_all_unittests.cc",
+ "shared_buffer_dispatcher_unittest.cc",
+ "simple_dispatcher_unittest.cc",
+ "test_utils.cc",
+ "test_utils.h",
+ "waiter_list_unittest.cc",
+ "waiter_test_utils.cc",
+ "waiter_test_utils.h",
+ "waiter_unittest.cc",
]
}