Commit 13ce0871 authored by jamesr@chromium.org's avatar jamesr@chromium.org

GN build rules for all unit test targets in mojo/

R=viettrungluu@chromium.org

Review URL: https://codereview.chromium.org/495223002

Cr-Commit-Position: refs/heads/master@{#291373}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291373 0039d316-1c4b-4281-b951-d872f2087c98
parent e0a60ad2
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("//build/config/ui.gni")
group("mojo") { group("mojo") {
deps = [ deps = [
":tests", ":tests",
...@@ -28,6 +30,14 @@ group("tests") { ...@@ -28,6 +30,14 @@ group("tests") {
"//mojo/shell:mojo_shell_tests", "//mojo/shell:mojo_shell_tests",
"//mojo/system:mojo_system_unittests", "//mojo/system:mojo_system_unittests",
] ]
if (use_aura) {
deps += [
"//mojo/services/public/cpp/view_manager/tests:mojo_view_manager_lib_unittests",
"//mojo/services/view_manager:mojo_view_manager_unittests",
"//mojo/services/window_manager:mojo_core_window_manager_unittests",
]
}
} }
if (is_android) { if (is_android) {
......
# 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: mojo/mojo.gyp:mojo_aura_support
source_set("aura") {
sources = [
"aura_init.cc",
"aura_init.h",
"context_factory_mojo.cc",
"context_factory_mojo.h",
"screen_mojo.cc",
"screen_mojo.h",
"window_tree_host_mojo.cc",
"window_tree_host_mojo.h",
"window_tree_host_mojo_delegate.h",
]
deps = [
"//cc",
"//skia",
"//ui/aura",
"//ui/compositor",
"//ui/events",
"//ui/events:events_base",
"//ui/gl",
"//webkit/common/gpu",
"//mojo/cc",
"//mojo/services/public/interfaces/native_viewport",
"//mojo/services/public/cpp/view_manager",
] + mojo_gles2_for_shared_library
forward_dependent_configs_from = [
"//mojo/services/public/cpp/view_manager",
]
}
...@@ -223,6 +223,7 @@ ...@@ -223,6 +223,7 @@
], ],
}, },
{ {
# GN version: //mojo/shell:test_support
'target_name': 'mojo_shell_test_support', 'target_name': 'mojo_shell_test_support',
'type': 'static_library', 'type': 'static_library',
'dependencies': [ 'dependencies': [
...@@ -453,6 +454,7 @@ ...@@ -453,6 +454,7 @@
['use_aura==1', { ['use_aura==1', {
'targets': [ 'targets': [
{ {
# GN version: //mojo/aura
'target_name': 'mojo_aura_support', 'target_name': 'mojo_aura_support',
'type': 'static_library', 'type': 'static_library',
'dependencies': [ 'dependencies': [
......
...@@ -416,6 +416,7 @@ ...@@ -416,6 +416,7 @@
} }
}, },
{ {
# GN version: //mojo/public/cpp/application:chromium
'target_name': 'mojo_application_chromium', 'target_name': 'mojo_application_chromium',
'type': 'static_library', 'type': 'static_library',
'sources': [ 'sources': [
......
...@@ -545,6 +545,7 @@ ...@@ -545,6 +545,7 @@
], ],
}, },
{ {
# GN version: //mojo/services/public/cpp/view_manager/tests:mojo_view_manager_lib_unittests
'target_name': 'mojo_view_manager_lib_unittests', 'target_name': 'mojo_view_manager_lib_unittests',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
...@@ -742,6 +743,7 @@ ...@@ -742,6 +743,7 @@
], ],
}, },
{ {
# GN version: //mojo/services/public/cpp/view_manager/lib:run_unittests
'target_name': 'mojo_view_manager_run_unittests', 'target_name': 'mojo_view_manager_run_unittests',
'type': 'static_library', 'type': 'static_library',
'dependencies': [ 'dependencies': [
...@@ -769,6 +771,7 @@ ...@@ -769,6 +771,7 @@
], ],
}, },
{ {
# GN version: //mojo/services/view_manager:mojo_view_manager_unittests
'target_name': 'mojo_view_manager_unittests', 'target_name': 'mojo_view_manager_unittests',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
...@@ -805,6 +808,7 @@ ...@@ -805,6 +808,7 @@
'includes': [ 'build/package_app.gypi' ], 'includes': [ 'build/package_app.gypi' ],
}, },
{ {
# GN version: //mojo/services/window_manager:lib
'target_name': 'mojo_core_window_manager_lib', 'target_name': 'mojo_core_window_manager_lib',
'type': 'static_library', 'type': 'static_library',
'dependencies': [ 'dependencies': [
...@@ -828,6 +832,7 @@ ...@@ -828,6 +832,7 @@
], ],
}, },
{ {
# GN version: //mojo/services/window_manager
'target_name': 'mojo_core_window_manager', 'target_name': 'mojo_core_window_manager',
'type': 'loadable_module', 'type': 'loadable_module',
'dependencies': [ 'dependencies': [
...@@ -839,6 +844,7 @@ ...@@ -839,6 +844,7 @@
], ],
}, },
{ {
# GN version: //mojo/services/window_manager:mojo_core_window_manager_unittests
'target_name': 'mojo_core_window_manager_unittests', 'target_name': 'mojo_core_window_manager_unittests',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
......
...@@ -2,17 +2,26 @@ ...@@ -2,17 +2,26 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
source_set("base") { # GYP version: mojo/mojo_public.gypi:mojo_application_base
source_set("application") {
sources = [ sources = [
"application_connection.h",
"application_delegate.h",
"application_impl.h", "application_impl.h",
"connect.h", "connect.h",
"service_provider_impl.h",
"interface_factory.h",
"interface_factory_impl.h",
"lib/application_connection.cc",
"lib/application_delegate.cc",
"lib/application_impl.cc", "lib/application_impl.cc",
"lib/service_provider_impl.cc",
"lib/service_connector.cc", "lib/service_connector.cc",
"lib/service_connector.h", "lib/service_connector.h",
"lib/application_connection.cc",
"lib/application_delegate.cc",
"lib/service_registry.cc", "lib/service_registry.cc",
"lib/service_registry.h", "lib/service_registry.h",
"lib/weak_service_provider.cc",
"lib/weak_service_provider.h",
] ]
deps = [ deps = [
...@@ -21,21 +30,26 @@ source_set("base") { ...@@ -21,21 +30,26 @@ source_set("base") {
] ]
} }
# GYP version: mojo/mojo_base.gyp:mojo_application_chromium
source_set("chromium") { source_set("chromium") {
sources = [ sources = [
"lib/application_runner_chromium.cc" "lib/application_runner_chromium.cc"
] ]
deps = [ ":base" ] deps = [
":application",
"//mojo/environment:chromium",
]
} }
# GYP version: mojo/mojo_public.gypi:mojo_application_standalone
source_set("standalone") { source_set("standalone") {
sources = [ sources = [
"lib/application_runner.cc" "lib/application_runner.cc"
] ]
deps = [ deps = [
":base", ":application",
"//mojo/public/cpp/environment:standalone", "//mojo/public/cpp/environment:standalone",
] ]
} }
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("//build/config/ui.gni")
group("services") { group("services") {
deps = [ deps = [
"//mojo/services/dbus_echo:bindings", "//mojo/services/dbus_echo:bindings",
...@@ -15,9 +17,14 @@ group("services") { ...@@ -15,9 +17,14 @@ group("services") {
"//mojo/services/public/interfaces/navigation", "//mojo/services/public/interfaces/navigation",
"//mojo/services/public/interfaces/network", "//mojo/services/public/interfaces/network",
"//mojo/services/public/interfaces/surfaces", "//mojo/services/public/interfaces/surfaces",
"//mojo/services/public/interfaces/view_manager",
"//mojo/services/public/interfaces/window_manager",
"//mojo/services/surfaces", "//mojo/services/surfaces",
"//mojo/services/test_service:bindings", "//mojo/services/test_service:bindings",
] ]
if (use_aura) {
deps += [
"//mojo/services/public/interfaces/view_manager",
"//mojo/services/public/interfaces/window_manager",
"//mojo/services/window_manager",
]
}
} }
...@@ -2,22 +2,8 @@ ...@@ -2,22 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
# GYP version: mojo/mojo_services.gypi:mojo_view_manager_lib
source_set("view_manager") { source_set("view_manager") {
deps = [
":common",
"//base",
"//mojo/public/cpp/application:chromium",
"//mojo/public/interfaces/application",
"//mojo/services/public/cpp/geometry",
"//mojo/services/public/interfaces/geometry",
"//mojo/services/public/interfaces/view_manager",
"//mojo/services/public/interfaces/window_manager",
"//skia",
"//ui/events",
"//ui/gfx",
"//ui/gfx/geometry",
]
sources = [ sources = [
"lib/view.cc", "lib/view.cc",
"lib/view_manager_client_factory.cc", "lib/view_manager_client_factory.cc",
...@@ -33,6 +19,23 @@ source_set("view_manager") { ...@@ -33,6 +19,23 @@ source_set("view_manager") {
"view_observer.h", "view_observer.h",
"window_manager_delegate.h", "window_manager_delegate.h",
] ]
deps = [
":common",
"//base",
"//mojo/public/cpp/application:chromium",
"//mojo/public/interfaces/application",
"//mojo/services/public/cpp/geometry",
"//mojo/services/public/interfaces/geometry",
"//mojo/services/public/interfaces/view_manager",
"//mojo/services/public/interfaces/window_manager",
"//skia",
"//ui/events",
"//ui/gfx",
"//ui/gfx/geometry",
]
forward_dependent_configs_from = [ "//skia" ]
} }
source_set("common") { source_set("common") {
......
# 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("//build/config/ui.gni")
# GYP version: mojo/mojo_services.gypi:mojo_view_manager_run_unittests
source_set("run_unittests") {
sources = [
"view_manager_test_suite.cc",
"view_manager_test_suite.h",
"view_manager_unittests.cc",
]
deps = [
"//base",
"//base/test:test_support",
"//ui/gl",
]
if (is_linux) {
deps += [
"//third_party/mesa:osmesa",
"//mojo/services/native_viewport",
]
}
if (use_x11) {
deps += [ "//ui/gfx/x" ]
}
}
# 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("//build/config/ui.gni")
# GYP version: mojo/mojo_services.gypi:mojo_view_manager_lib_unittests
test("mojo_view_manager_lib_unittests") {
sources = [
"view_unittest.cc",
"view_manager_unittest.cc",
]
deps = [
"//base",
"//base/test:test_support",
"//testing/gtest",
"//ui/gfx",
"//ui/gfx:test_support",
"//mojo/environment:chromium",
"//mojo/services/public/interfaces/geometry",
"//mojo/services/public/cpp/geometry",
"//mojo/shell:test_support",
"//mojo/services/public/interfaces/view_manager",
"//mojo/services/public/cpp/view_manager",
]
if (use_aura) {
deps += [ "//mojo/services/public/cpp/view_manager/lib:run_unittests" ]
} else {
deps += [ "//mojo/common/test:run_all_unittests" ]
}
}
...@@ -68,3 +68,35 @@ component("view_manager") { ...@@ -68,3 +68,35 @@ component("view_manager") {
"window_tree_host_impl.h", "window_tree_host_impl.h",
] ]
} }
# GYP version: mojo/mojo_services.gypi:mojo_view_manager_unittests
test("mojo_view_manager_unittests") {
deps = [
"//base",
"//base/test:test_support",
"//mojo/application_manager",
"//mojo/environment:chromium",
"//mojo/public/cpp/application:chromium",
"//mojo/services/public/cpp/input_events",
"//mojo/services/public/cpp/geometry",
"//mojo/services/public/cpp/view_manager",
"//mojo/services/public/cpp/view_manager/lib:run_unittests",
"//mojo/services/public/cpp/view_manager:common",
"//mojo/services/public/interfaces/input_events",
"//mojo/services/public/interfaces/geometry",
"//mojo/services/public/interfaces/view_manager",
"//mojo/shell:test_support",
"//mojo/system",
"//skia",
"//testing/gtest",
"//ui/aura",
"//ui/gfx/geometry",
"//ui/gl",
]
sources = [
"test_change_tracker.cc",
"test_change_tracker.h",
"view_manager_unittest.cc",
]
}
# 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("//build/config/ui.gni")
if (use_aura) {
import("//mojo/system.gni")
# GYP version: mojo/mojo_services.gypi:mojo_core_window_manager
shared_library("window_manager") {
output_name = "mojo_core_window_manager"
sources = [ "main.cc" ]
deps = [
":lib",
"//mojo/public/cpp/application:chromium",
] + mojo_system_for_shared_library
}
# GYP version: mojo/mojo_services.gypi:mojo_core_window_manager_lib
source_set("lib") {
sources = [
"window_manager_app.cc",
"window_manager_app.h",
"window_manager_service_impl.cc",
"window_manager_service_impl.h",
]
deps = [
"//base",
"//mojo/aura",
"//mojo/common",
"//mojo/environment:chromium",
"//mojo/public/cpp/application:chromium",
"//mojo/services/public/cpp/input_events",
"//mojo/services/public/cpp/view_manager",
"//mojo/services/public/interfaces/window_manager",
"//ui/base",
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/wm",
]
forward_dependent_configs_from = [ "//mojo/aura" ]
}
# GYP version: mojo/mojo_services.gypi:mojo_core_window_manager_unittests
test("mojo_core_window_manager_unittests") {
sources = [
"window_manager_api_unittest.cc",
"window_manager_unittests.cc",
]
deps = [
"//base/test:test_support",
"//mojo/application_manager",
"//mojo/environment:chromium",
"//mojo/services/public/cpp/view_manager",
"//mojo/services/public/interfaces/view_manager",
"//mojo/services/public/interfaces/window_manager",
"//mojo/shell:test_support",
"//mojo/system",
"//testing/gtest",
"//ui/gl",
]
if (is_linux) {
deps += [
"//third_party/mesa:osmesa",
"//mojo/services/native_viewport",
]
}
if (use_x11) {
deps += [ "//ui/gfx/x" ]
}
}
} # use_aura
...@@ -164,3 +164,20 @@ test("mojo_shell_tests") { ...@@ -164,3 +164,20 @@ test("mojo_shell_tests") {
] ]
} }
} }
# GYP version: mojo/mojo.gyp:mojo_shell_test_support
source_set("test_support") {
sources = [
"shell_test_helper.cc",
"shell_test_helper.h",
]
deps = [
":lib",
"//base",
"//base:base_static",
"//mojo/application_manager",
"//mojo/system",
"//url",
]
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment