blob: ad1d532a0cdcb7b516d72ae6a4024769b6261faf [file] [log] [blame]
# Copyright 2018 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")
import("//mojo/public/tools/bindings/mojom.gni")
import("//testing/test.gni")
import("//services/catalog/public/tools/catalog.gni")
import("//services/service_manager/public/cpp/service.gni")
import("//services/service_manager/public/service_manifest.gni")
import("//services/service_manager/public/tools/test/service_test.gni")
component("lib") {
friend = [
":tests",
":test_support",
# It's ok for tests to depend upon private code.
"//ash:ash_unittests",
]
public = [
"ids.h",
"window_delegate_impl.h",
"window_manager_interface.h",
"window_properties.h",
"window_service.h",
"window_service_delegate.h",
"window_service_observer.h",
"window_tree.h",
"window_tree_binding.h",
"window_tree_factory.h",
]
sources = [
"client_change.cc",
"client_change.h",
"client_change_tracker.cc",
"client_change_tracker.h",
"client_root.cc",
"client_root.h",
"drag_drop_delegate.cc",
"drag_drop_delegate.h",
"embedding.cc",
"embedding.h",
"event_injector.cc",
"event_injector.h",
"focus_handler.cc",
"focus_handler.h",
"injected_event_handler.cc",
"injected_event_handler.h",
"pointer_watcher.cc",
"pointer_watcher.h",
"remoting_event_injector.cc",
"remoting_event_injector.h",
"screen_provider.cc",
"screen_provider.h",
"server_window.cc",
"server_window.h",
"topmost_window_observer.cc",
"topmost_window_observer.h",
"user_activity_monitor.cc",
"user_activity_monitor.h",
"window_delegate_impl.cc",
"window_properties.cc",
"window_server_test_impl.cc",
"window_server_test_impl.h",
"window_service.cc",
"window_service_delegate.cc",
"window_tree.cc",
"window_tree_binding.cc",
"window_tree_factory.cc",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
public_deps = [
"//components/discardable_memory/public/interfaces",
"//components/viz/host",
"//services/service_manager/public/cpp",
"//services/ws/common",
"//services/ws/ime:lib",
"//services/ws/input_devices",
"//services/ws/public/mojom",
"//ui/aura",
"//ui/base/mojo:lib",
"//ui/wm",
"//ui/wm/public",
]
deps = [
"//services/ws/public/cpp",
"//services/ws/public/cpp/host",
]
defines = [ "IS_WINDOW_SERVICE_IMPL" ]
}
source_set("host") {
public = [
"host_context_factory.h",
]
sources = [
"host_context_factory.cc",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
deps = [
":lib",
"//cc/mojo_embedder",
"//components/viz/client",
"//components/viz/common",
"//components/viz/host",
"//services/viz/privileged/interfaces/compositing",
"//services/viz/public/interfaces",
"//services/ws/public/cpp",
"//services/ws/public/cpp/gpu",
"//ui/compositor",
"//ui/compositor/host",
]
}
static_library("test_support") {
testonly = true
sources = [
"client_root_test_helper.cc",
"client_root_test_helper.h",
"event_test_utils.cc",
"event_test_utils.h",
"server_window_test_helper.cc",
"server_window_test_helper.h",
"test_change_tracker.cc",
"test_change_tracker.h",
"test_screen_provider_observer.cc",
"test_screen_provider_observer.h",
"test_window_service_delegate.cc",
"test_window_service_delegate.h",
"test_window_tree_client.cc",
"test_window_tree_client.h",
"window_server_service_test_base.cc",
"window_server_service_test_base.h",
"window_service_test_setup.cc",
"window_service_test_setup.h",
"window_tree_test_helper.cc",
"window_tree_test_helper.h",
]
deps = [
":lib",
"//base",
"//base/test:test_support",
"//components/viz/test:test_support",
"//mojo/public/cpp/bindings:bindings",
"//services/service_manager/public/cpp",
"//services/service_manager/public/cpp:service_test_support",
"//services/ws/common",
"//services/ws/public/cpp",
"//services/ws/public/cpp/host",
"//services/ws/public/mojom",
"//testing/gtest",
"//ui/aura",
"//ui/aura:test_support",
"//ui/compositor:test_support",
"//ui/display:test_support",
"//ui/gfx/geometry/mojo",
"//ui/gl",
"//ui/gl:test_support",
"//ui/wm",
]
data_deps = [
"//services/ws/ime/test_ime_driver",
]
}
service_manifest("unittests_manifest") {
name = "ui_ws2_service_unittests"
source = "test_manifest.json"
}
catalog("tests_catalog") {
testonly = true
embedded_services = [ ":unittests_manifest" ]
standalone_services = [ "//services/ws/test_ws:manifest" ]
}
source_set("tests") {
testonly = true
sources = [
"client_root_unittest.cc",
"drag_drop_delegate_unittest.cc",
"embedding_unittest.cc",
"focus_handler_unittest.cc",
"injected_event_handler_unittest.cc",
"screen_provider_unittest.cc",
"server_window_unittest.cc",
"topmost_window_observer_unittest.cc",
"user_activity_monitor_unittest.cc",
"window_delegate_impl_unittest.cc",
"window_service_observer_unittest.cc",
"window_service_unittest.cc",
"window_tree_client_unittest.cc",
"window_tree_unittest.cc",
]
deps = [
":lib",
":test_mojom",
":test_support",
"//base",
"//base/test:test_support",
"//components/viz/common",
"//components/viz/test:test_support",
"//mojo/public/cpp/bindings",
"//services/service_manager/public/cpp:service_test_support",
"//services/service_manager/public/cpp/test:test_support",
"//services/service_manager/public/mojom",
"//services/ws/common:task_runner_test_base",
"//services/ws/gpu_host:tests",
"//services/ws/public/cpp",
"//services/ws/public/cpp/host",
"//services/ws/public/mojom",
"//testing/gtest",
"//third_party/mesa_headers",
"//ui/aura:test_support",
"//ui/events:test_support",
"//ui/platform_window",
"//ui/wm",
]
data_deps = [
"//services/ws/test_ws",
]
if (toolkit_views) {
deps += [ "//services/ws/remote_view_host:tests" ]
}
}
service_manifest("manifest") {
name = "ui"
source = "manifest.json"
}
mojom("test_mojom") {
testonly = true
sources = [
"test_wm.mojom",
]
}