[Ozone-DRM] Add unittest to validate the mode used in mirror mode
[chromium-blink-merge.git] / ui / touch_selection / BUILD.gn
blobf5f2825f2eb7a07432e8c5dda0704b6586eebd01
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/ui.gni")
6 import("//testing/test.gni")
8 if (is_android) {
9   import("//build/config/android/rules.gni")
12 component("touch_selection") {
13   output_name = "ui_touch_selection"
15   sources = [
16     "longpress_drag_selector.cc",
17     "longpress_drag_selector.h",
18     "selection_event_type.h",
19     "touch_handle.cc",
20     "touch_handle.h",
21     "touch_handle_orientation.h",
22     "touch_selection_controller.cc",
23     "touch_selection_controller.h",
24     "touch_selection_draggable.h",
25     "ui_touch_selection_export.h",
26   ]
28   defines = [ "UI_TOUCH_SELECTION_IMPLEMENTATION" ]
30   deps = [
31     "//base:base",
32     "//ui/base:base",
33     "//ui/events:events",
34     "//ui/events:gesture_detection",
35     "//ui/gfx/geometry:geometry",
36   ]
38   if (use_aura) {
39     deps += [
40       "//skia:skia",
41       "//ui/aura:aura",
42       "//ui/aura_extra:aura_extra",
43       "//ui/compositor:compositor",
44       "//ui/gfx:gfx",
45     ]
47     sources += [
48       "touch_handle_drawable_aura.cc",
49       "touch_handle_drawable_aura.h",
50       "touch_selection_menu_runner.cc",
51       "touch_selection_menu_runner.h",
52     ]
53   }
56 static_library("test_support") {
57   testonly = true
59   sources = [
60     "touch_selection_controller_test_api.cc",
61     "touch_selection_controller_test_api.h",
62   ]
64   deps = [
65     ":touch_selection",
66   ]
69 # TODO(GYP): Delete this after we've converted everything to GN.
70 # The _run targets exist only for compatibility w/ GYP.
71 group("ui_touch_selection_unittests_run") {
72   testonly = true
73   deps = [
74     ":ui_touch_selection_unittests",
75   ]
78 test("ui_touch_selection_unittests") {
79   sources = [
80     "longpress_drag_selector_unittest.cc",
81     "touch_handle_unittest.cc",
82     "touch_selection_controller_unittest.cc",
83   ]
85   deps = [
86     ":test_support",
87     ":touch_selection",
88     "//base/test:run_all_unittests",
89     "//testing/gmock:gmock",
90     "//testing/gtest:gtest",
91     "//ui/base:base",
92     "//ui/events:test_support",
93     "//ui/gfx:gfx",
94     "//ui/gfx:test_support",
95   ]
97   data_deps = [ "//third_party/mesa:osmesa" ]
100 if (is_android) {
101   java_cpp_enum("ui_touch_selection_enums_srcjar") {
102     sources = [
103       "selection_event_type.h",
104     ]
105     outputs = [
106       "org/chromium/ui/touch_selection/SelectionEventType.java",
107     ]
108   }
109   java_cpp_enum("ui_touch_handle_orientation_srcjar") {
110     sources = [
111       "touch_handle_orientation.h",
112     ]
113     outputs = [
114       "org/chromium/ui/touch_selection/TouchHandleOrientation.java",
115     ]
116   }