Use output_name for Mojo and Mandoline test targets.
[chromium-blink-merge.git] / components / view_manager / BUILD.gn
blobc40181018c93c124bf5423d0fb7c191f96638dd1
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")
7 import("//third_party/mojo/src/mojo/public/mojo_application.gni")
9 mojo_native_application("view_manager") {
10   sources = [
11     "main.cc",
12     "view_manager_app.cc",
13     "view_manager_app.h",
14   ]
16   deps = [
17     ":view_manager_lib",
18     "//base",
19     "//components/view_manager/public/interfaces",
20     "//components/window_manager/public/interfaces",
21     "//mojo/application",
22     "//mojo/common:tracing_impl",
23     "//mojo/converters/geometry",
24     "//mojo/environment:chromium",
25     "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
26   ]
29 source_set("view_manager_lib") {
30   sources = [
31     "access_policy.h",
32     "access_policy_delegate.h",
33     "animation_runner.cc",
34     "animation_runner.h",
35     "animation_runner_observer.h",
36     "client_connection.cc",
37     "client_connection.h",
38     "connection_manager.cc",
39     "connection_manager.h",
40     "connection_manager_delegate.h",
41     "default_access_policy.cc",
42     "default_access_policy.h",
43     "display_manager.cc",
44     "display_manager.h",
45     "event_dispatcher.cc",
46     "event_dispatcher.h",
47     "focus_controller.cc",
48     "focus_controller.h",
49     "focus_controller_delegate.h",
50     "gesture_manager.cc",
51     "gesture_manager.h",
52     "gesture_manager_delegate.h",
53     "scheduled_animation_group.cc",
54     "scheduled_animation_group.h",
55     "server_view.cc",
56     "server_view.h",
57     "server_view_delegate.h",
58     "server_view_drawn_tracker.cc",
59     "server_view_drawn_tracker.h",
60     "server_view_drawn_tracker_observer.h",
61     "server_view_observer.h",
62     "view_coordinate_conversions.cc",
63     "view_coordinate_conversions.h",
64     "view_locator.cc",
65     "view_locator.h",
66     "view_manager_service_impl.cc",
67     "view_manager_service_impl.h",
68     "window_manager_access_policy.cc",
69     "window_manager_access_policy.h",
70   ]
72   public_deps = [
73     "//components/view_manager/public/cpp",
74   ]
76   deps = [
77     "//base",
78     "//cc/surfaces",
79     "//cc/surfaces:surface_id",
80     "//components/native_viewport/public/interfaces",
81     "//components/surfaces/public/interfaces",
82     "//components/view_manager/public/cpp:common",
83     "//components/view_manager/public/interfaces",
84     "//components/window_manager/public/interfaces",
85     "//mojo/application",
86     "//mojo/common",
87     "//mojo/converters/geometry",
88     "//mojo/converters/input_events",
89     "//mojo/converters/surfaces",
90     "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
91     "//third_party/mojo/src/mojo/public/cpp/bindings:callback",
92     "//third_party/mojo/src/mojo/public/interfaces/application",
93     "//ui/mojo/geometry:interfaces",
94     "//ui/mojo/events:interfaces",
95     "//ui/gfx",
96     "//ui/gfx/geometry",
97   ]
99   data_deps = [
100     "//components/native_viewport",
101     "//components/surfaces",
103     # TODO(msw|sky): VM and WM connect to each other; avoid circular dependency.
104     #"//components/window_manager:lib",
105   ]
108 source_set("test_support") {
109   testonly = true
111   sources = [
112     "test_change_tracker.cc",
113     "test_change_tracker.h",
114   ]
116   deps = [
117     "//base",
118     "//components/view_manager/public/cpp",
119     "//components/view_manager/public/cpp:common",
120     "//components/view_manager/public/interfaces",
121     "//mojo/common",
122     "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
123     "//ui/mojo/geometry:interfaces",
124   ]
127 test("tests") {
128   output_name = "view_manager_unittests"
129   sources = [
130     "animation_runner_unittest.cc",
131     "focus_controller_unittest.cc",
132     "gesture_manager_unittest.cc",
133     "scheduled_animation_group_unittest.cc",
134     "server_view_drawn_tracker_unittest.cc",
135     "test_server_view_delegate.cc",
136     "test_server_view_delegate.h",
137     "view_coordinate_conversions_unittest.cc",
138     "view_manager_service_unittest.cc",
139   ]
141   deps = [
142     ":test_support",
143     ":view_manager_lib",
144     "//base",
145     "//base/test:test_config",
146     "//components/native_viewport/public/cpp:args",
147     "//components/view_manager/public/cpp:common",
148     "//components/view_manager/public/interfaces",
149     "//components/window_manager/public/interfaces",
150     "//mojo/converters/geometry",
151     "//mojo/converters/input_events",
152     "//mojo/environment:chromium",
153     "//third_party/mojo/src/mojo/edk/test:run_all_unittests",
154     "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
155     "//third_party/mojo/src/mojo/public/interfaces/application",
156     "//ui/mojo/geometry:interfaces",
157     "//ui/mojo/events:interfaces",
158     "//testing/gtest",
159     "//ui/gfx",
160     "//ui/gfx:test_support",
161     "//ui/gfx/geometry",
162   ]
164   if (!is_android) {  # TODO(GYP) Enable on Android when osmesa links.
165     deps += [ "//third_party/mesa:osmesa" ]
166   }
169 mojo_native_application("apptests") {
170   output_name = "view_manager_apptests"
171   testonly = true
173   sources = [
174     "view_manager_client_apptest.cc",
175     "view_manager_service_apptest.cc",
176   ]
178   deps = [
179     ":test_support",
180     "//base",
181     "//base/test:test_config",
182     "//components/view_manager/public/cpp",
183     "//components/view_manager/public/interfaces",
184     "//components/window_manager/public/interfaces",
185     "//mojo/application",
186     "//mojo/application:test_support",
187     "//mojo/common",
188     "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
189     "//ui/mojo/geometry:interfaces",
190     "//ui/mojo/geometry:util",
191   ]