Add screen space opacity to opacity tree
[chromium-blink-merge.git] / remoting / BUILD.gn
blob314a484f70ff3783be2c154954de4c1023e8e6a2
1 # Copyright 2015 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/features.gni")
6 import("//build/config/ui.gni")
7 import("//remoting/remoting_version.gni")
8 import("//remoting/remoting_enable.gni")
9 import("//testing/test.gni")
11 # Various remoting targets need this version definition.
12 config("version") {
13   defines = [ "VERSION=$version_full" ]
16 group("remoting_all") {
17   testonly = true
19   deps = [
20     #"//remoting:remoting_browser_test_resources",
21     "//remoting:remoting_unittests",
22     #"//remoting:remoting_webapp_unittests",
23     #"//app_remoting_test.gyp:ar_sample_test_driver",
24     #"//app_remoting_webapp.gyp:ar_sample_app",
25   ]
27   # TODO(GYP): add is_mac
28   if ((is_linux && !is_chromeos) || is_win) {
29     deps += [ "//remoting/webapp" ]
30   }
32   if (is_win) {
33     deps += [
34       #"//remoting:remoting_breakpad_tester",
35       #"//remoting:remoting_console",
36       #"//remoting:remoting_desktop",
37       #"//remoting:remoting_host_installation",
38     ]
39   }
41   if (is_android) {
42     deps += [
43       #"//remoting:remoting_apk",
44       #"//remoting:remoting_test_apk",
45       #"//remoting:remoting_unittests_apk",
46     ]
47   }
49   if (enable_remoting_host) {
50     deps += [
51       "//remoting:remoting_perftests",
52       "//remoting/host",
53       "//remoting/host:remoting_start_host",
54       "//remoting/host/it2me:remote_assistance_host",
56       #"//remoting:remoting_it2me_native_messaging_host",
57       #"//remoting:remoting_native_messaging_manifests",
58     ]
59   }
61   if (enable_me2me_host) {
62     deps += [
63       "//remoting/host:remoting_me2me_host",
64       #"//remoting/host:remoting_me2me_host_archive",
65     ]
66   }
68   # TODO(GYP) Depends on crbug.com/471924 being fixed for PNaCl.
69   if (enable_nacl) {
70     deps += [ "//remoting:remoting_key_tester" ]
71   }
74 # GYP version: remoting/remoting_test.gypi:remoting_test_common
75 source_set("test_support") {
76   testonly = true
78   sources = [
79     # Files from remoting_test_common not in separate test_support targets.
80     "signaling/fake_signal_strategy.cc",
81     "signaling/fake_signal_strategy.h",
82     "signaling/mock_signal_strategy.cc",
83     "signaling/mock_signal_strategy.h",
84     "test/access_token_fetcher.cc",
85     "test/access_token_fetcher.h",
86     "test/app_remoting_test_driver_environment.cc",
87     "test/app_remoting_test_driver_environment.h",
88     "test/app_remoting_test_driver_environment_app_details.cc",
89     "test/fake_access_token_fetcher.cc",
90     "test/fake_access_token_fetcher.h",
91     "test/fake_network_dispatcher.cc",
92     "test/fake_network_dispatcher.h",
93     "test/fake_network_manager.cc",
94     "test/fake_network_manager.h",
95     "test/fake_port_allocator.cc",
96     "test/fake_port_allocator.h",
97     "test/fake_remote_host_info_fetcher.cc",
98     "test/fake_remote_host_info_fetcher.h",
99     "test/fake_socket_factory.cc",
100     "test/fake_socket_factory.h",
101     "test/leaky_bucket.cc",
102     "test/leaky_bucket.h",
103     "test/mock_access_token_fetcher.cc",
104     "test/mock_access_token_fetcher.h",
105     "test/refresh_token_store.cc",
106     "test/refresh_token_store.h",
107     "test/remote_application_details.h",
108     "test/remote_connection_observer.h",
109     "test/remote_host_info.cc",
110     "test/remote_host_info.h",
111     "test/remote_host_info_fetcher.cc",
112     "test/remote_host_info_fetcher.h",
113     "test/test_chromoting_client.cc",
114     "test/test_chromoting_client.h",
115     "test/test_video_renderer.cc",
116     "test/test_video_renderer.h",
117   ]
119   deps = [
120     "//base",
121     "//net",
122     "//remoting/base",
123     "//remoting/client",
124     "//remoting/codec",
125     "//remoting/protocol:test_support",
126     "//remoting/resources",
127     "//testing/gmock",
128     "//testing/gtest",
129   ]
131   if (enable_configuration_policy) {
132     deps += [ "//components/policy:test_support" ]
133   }
135   if (enable_remoting_host) {
136     deps += [ "//remoting/host:test_support" ]
137   }
140 # TODO(GYP) remoting_unittests on Mac. Needs to be tested.
141 if (!is_mac) {
142   test("remoting_unittests") {
143     # Sources not included in one of the more specific unit_tests deps.
144     sources = [
145       "signaling/iq_sender_unittest.cc",
146       "signaling/log_to_server_unittest.cc",
147       "signaling/server_log_entry_unittest.cc",
148       "signaling/server_log_entry_unittest.h",
149       "test/access_token_fetcher_unittest.cc",
150       "test/app_remoting_test_driver_environment_unittest.cc",
151       "test/remote_host_info_fetcher_unittest.cc",
152       "test/test_chromoting_client_unittest.cc",
153       "test/test_video_renderer_unittest.cc",
154     ]
156     configs += [
157       ":version",
159       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
160       "//build/config/compiler:no_size_t_to_int_warning",
161     ]
163     deps = [
164       ":test_support",
165       "//base/allocator",
166       "//google_apis",
167       "//remoting/base:unit_tests",
168       "//remoting/client:unit_tests",
169       "//remoting/protocol:test_support",
170       "//remoting/protocol:unit_tests",
171       "//testing/gmock",
172       "//testing/gtest",
173       "//third_party/webrtc",
174     ]
176     if (is_android) {
177       deps += [ "//testing/android/native_test:native_test_native_code" ]
178     } else {
179       deps += [
180         "//remoting/client/plugin",
181         "//remoting/client/plugin:unit_tests",
182       ]
183     }
185     if (enable_remoting_host) {
186       deps += [
187         "//remoting/codec:unit_tests",
188         "//remoting/host:unit_tests",
189         "//ui/gfx",
190       ]
191     }
193     if (enable_webrtc) {
194       deps += [
195         "//third_party/libjingle:libjingle_webrtc",
196         "//third_party/libjingle:libpeerconnection",
197       ]
198     }
199   }
201   if (enable_remoting_host) {
202     test("remoting_perftests") {
203       sources = [
204         "codec/codec_test.cc",
205         "codec/codec_test.h",
206         "codec/video_encoder_vpx_perftest.cc",
207         "test/protocol_perftest.cc",
208       ]
210       configs += [ ":version" ]
212       deps = [
213         ":test_support",
214         "//base",
215         "//base/test:run_all_unittests",
216         "//base/test:test_support",
217         "//net:test_support",
218         "//remoting/base",
219         "//testing/gtest",
220         "//third_party/webrtc/modules/desktop_capture",
221         "//third_party/libjingle",
222       ]
224       if (enable_webrtc) {
225         deps += [ "//third_party/libjingle:libjingle_webrtc" ]
226       }
227     }
228   }
229 } else {
230   group("remoting_unittests") {
231   }
234 if (enable_pnacl) {
235   group("remoting_key_tester") {
236     deps = [
237       ":remoting_key_tester_copies",
238     ]
239   }
241   copy("remoting_key_tester_copies") {
242     sources = [
243       "tools/javascript_key_tester/background.js",
244       "tools/javascript_key_tester/chord_tracker.js",
245       "tools/javascript_key_tester/event_listeners.js",
246       "tools/javascript_key_tester/icon_128.png",
247       "tools/javascript_key_tester/main.css",
248       "tools/javascript_key_tester/main.html",
249       "tools/javascript_key_tester/main.js",
250       "tools/javascript_key_tester/manifest.json",
251       "tools/javascript_key_tester/pnacl/remoting_key_tester.nmf",
253       # TODO(GYP): crbug.com/471924 "$target_out_dir/remoting_key_tester_newlib.pexe",
254     ]
256     outputs = [
257       "$target_out_dir/remoting/key_tester/{{source_file_part}}",
258     ]
260     deps = [
261       ":remoting_key_tester_jscompile",
262       ":remoting_key_tester_pexe",
263     ]
264   }
266   group("remoting_key_tester_jscompile") {
267     # TODO(GYP): crbug.com/471926 add support for run_jscompile=true.
268     run_jscompile = false
269     if (run_jscompile) {
270     }
271   }
273   group("remoting_key_tester_pexe") {
274     # TODO(GYP): crbug.com/471924 implement me when we have a pnacl toolchain.
275     #sources = [
276     # "tools/javascript_key_tester/pnacl/remoting_key_tester.cc",
277     #]
278   }