blob: 6015e53cc6696b6d879ed07d61bb21da591a825a [file] [log] [blame]
# Copyright 2015 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("//chrome/common/features.gni")
import("//build/config/ui.gni")
import("//testing/test.gni")
source_set("exo") {
sources = [
"buffer.cc",
"buffer.h",
"data_device.cc",
"data_device.h",
"data_device_delegate.h",
"data_offer.cc",
"data_offer.h",
"data_offer_delegate.h",
"data_source.cc",
"data_source.h",
"data_source_delegate.h",
"display.cc",
"display.h",
"gaming_seat.h",
"keyboard.cc",
"keyboard.h",
"keyboard_delegate.h",
"keyboard_device_configuration_delegate.h",
"keyboard_observer.h",
"layer_tree_frame_sink_holder.cc",
"layer_tree_frame_sink_holder.h",
"notification_surface.cc",
"notification_surface.h",
"notification_surface_manager.h",
"pointer.cc",
"pointer.h",
"pointer_delegate.h",
"shared_memory.cc",
"shared_memory.h",
"shell_surface.cc",
"shell_surface.h",
"sub_surface.cc",
"sub_surface.h",
"surface.cc",
"surface.h",
"surface_delegate.h",
"surface_observer.h",
"surface_tree_host.cc",
"surface_tree_host.h",
"touch.cc",
"touch.h",
"touch_delegate.h",
"wm_helper.cc",
"wm_helper.h",
"wm_helper_ash.cc",
"wm_helper_ash.h",
"wm_helper_mus.cc",
"wm_helper_mus.h",
]
deps = [
"//ash",
"//ash/public/cpp:ash_public_cpp",
"//base",
"//cc",
"//cc/ipc:interfaces",
"//cc/surfaces",
"//device/gamepad",
"//device/gamepad/public/cpp:shared_with_blink",
"//gpu",
"//gpu/command_buffer/client:gles2_interface",
"//skia",
"//ui/aura",
"//ui/compositor",
"//ui/display/manager",
"//ui/events/devices:devices",
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/gl",
"//ui/views",
"//ui/views/mus",
"//ui/wm",
"//ui/wm/public",
]
if (enable_exo_ozone_gamepad) {
defines = [ "USE_OZONE_GAMEPAD" ]
sources += [ "gaming_seat_ozone.cc" ]
deps += [ "//ui/ozone" ]
deps += [ "//ui/events/ozone:events_ozone_evdev" ]
} else {
sources += [ "gaming_seat.cc" ]
}
if (is_chromeos) {
deps += [ "//chromeos" ]
}
}
source_set("test_support") {
testonly = true
sources = [
"test/exo_test_base.cc",
"test/exo_test_base.h",
"test/exo_test_helper.cc",
"test/exo_test_helper.h",
]
deps = [
":exo",
"//ash:test_support_without_content",
"//ash/public/cpp:ash_public_cpp",
"//base",
"//gpu",
"//skia",
"//testing/gtest",
"//ui/aura",
"//ui/compositor",
"//ui/gfx/geometry",
"//ui/views",
"//ui/wm",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"buffer_unittest.cc",
"display_unittest.cc",
"keyboard_unittest.cc",
"pointer_unittest.cc",
"shared_memory_unittest.cc",
"shell_surface_unittest.cc",
"sub_surface_unittest.cc",
"surface_unittest.cc",
"touch_unittest.cc",
]
deps = [
":exo",
":test_support",
"//ash",
"//ash:test_support_without_content",
"//ash/public/cpp:ash_public_cpp",
"//base",
"//base/test:test_support",
"//cc",
"//cc:test_support",
"//cc/surfaces:surfaces",
"//components/user_manager",
"//components/viz/service",
"//components/viz/test:test_support",
"//device/gamepad:test_helpers",
"//gpu/command_buffer/client:gles2_interface",
"//skia",
"//testing/gmock",
"//testing/gtest",
"//ui/aura",
"//ui/events:dom_keycode_converter",
"//ui/events:test_support",
"//ui/gfx",
"//ui/keyboard",
"//ui/message_center",
"//ui/views",
"//ui/wm",
]
if (use_ozone) {
deps += [ "//ui/ozone" ]
}
if (enable_exo_ozone_gamepad) {
sources += [
"../../ui/events/ozone/gamepad/gamepad_event.cc",
"gaming_seat_unittest.cc",
]
deps += [ "//ui/events/ozone:events_ozone_evdev" ]
}
}
test("exo_unittests") {
sources = [
"../../ash/test/ash_test_suite.cc",
"../../ash/test/ash_test_suite.h",
"test/run_all_unittests.cc",
]
deps = [
":unit_tests",
"//ash:test_support_without_content",
"//ash/public/cpp:ash_public_cpp",
"//base",
"//base/test:test_support",
"//cc:test_support",
"//components/viz/test:test_support",
"//device/gamepad:test_helpers",
"//mojo/edk/embedder:headers",
"//testing/gtest",
"//ui/aura",
"//ui/base",
"//ui/compositor:test_support",
"//ui/gl:test_support",
]
data_deps = [
"//ash/strings:ash_test_strings",
"//ash/resources:ash_test_resources_100_percent",
"//ash/resources:ash_test_resources_200_percent",
]
if (is_linux) {
deps += [ "//components/exo/wayland:unit_tests" ]
}
}