| # 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/ozone.gni") |
| import("//build/config/ui.gni") |
| import("//testing/test.gni") |
| |
| assert(use_x11 || ozone_platform_x11) |
| |
| component("x11") { |
| output_name = "x11_window" |
| |
| deps = [ |
| "//base", |
| "//build:chromeos_buildflags", |
| "//net", |
| "//skia", |
| "//ui/base", |
| "//ui/base:hit_test", |
| "//ui/base:wm_role_names", |
| "//ui/base/dragdrop:types", |
| "//ui/base/x", |
| "//ui/events", |
| "//ui/events/devices", |
| "//ui/events/devices/x11", |
| "//ui/events/platform", |
| "//ui/events/platform/x11", |
| "//ui/gfx/x", |
| "//ui/platform_window", |
| "//ui/platform_window/common", |
| "//ui/platform_window/wm", |
| ] |
| |
| defines = [ "X11_WINDOW_IMPLEMENTATION" ] |
| |
| sources = [ |
| "x11_topmost_window_finder.cc", |
| "x11_topmost_window_finder.h", |
| "x11_window.cc", |
| "x11_window.h", |
| "x11_window_export.h", |
| "x11_window_manager.cc", |
| "x11_window_manager.h", |
| ] |
| |
| if (use_atk) { |
| sources += [ |
| "atk_event_conversion.cc", |
| "atk_event_conversion.h", |
| ] |
| configs += [ "//build/config/linux/atk" ] |
| deps += [ "//ui/events/x" ] |
| } |
| } |
| |
| test("x11_unittests") { |
| use_xvfb = true |
| |
| sources = [ |
| "test/device_data_manager_x11_unittest.cc", |
| "test/events_x_unittest.cc", |
| "test/x11_event_translation_unittest.cc", |
| "test/x11_window_unittest.cc", |
| ] |
| deps = [ |
| ":x11", |
| "//base/test:run_all_unittests", |
| "//base/test:test_support", |
| "//build:chromeos_buildflags", |
| "//skia", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//ui/base:features", |
| "//ui/base/x", |
| "//ui/base/x:test_support", |
| "//ui/events:test_support", |
| "//ui/events/platform/x11", |
| "//ui/events/x", |
| "//ui/gfx:test_support", |
| "//ui/gfx/x", |
| "//ui/platform_window", |
| ] |
| configs += [ "//build/config:precompiled_headers" ] |
| |
| # Needed for tests. Please note that if you want to run tests locally, |
| # ensure that you start them from your out directory with the xvfb |
| # script so that openbox has time to start. Otherwise, the x11_unittests |
| # will time out. e.g. - |
| # |
| # 1) cd out/Debug. |
| # 2) ../../testing/xvfb.py ./x11_unittests. |
| # |
| #TODO(dpranke): move that to appropriate place after test() template is |
| # reworked. |
| data_deps = [ "//ui/base/x/xwmstartupcheck" ] |
| } |