Windows GN tests, webcrypto warnings
[chromium-blink-merge.git] / remoting / BUILD.gn
bloba7c9e247000c9389111a30d35cff28d2363d4f2a
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",
23     #"//remoting:remoting_webapp",
24     "//remoting/webapp:html",
26     #"//remoting:remoting_webapp_unittests",
27     #"//app_remoting_test.gyp:ar_sample_test_driver",
28     #"//app_remoting_webapp.gyp:ar_sample_app",
29   ]
31   if (is_win) {
32     deps += [
33       #"//remoting:remoting_breakpad_tester",
34       #"//remoting:remoting_console",
35       #"//remoting:remoting_desktop",
36       #"//remoting:remoting_host_installation",
37     ]
38   }
40   if (is_android) {
41     deps += [
42       #"//remoting:remoting_apk",
43       #"//remoting:remoting_test_apk",
44       #"//remoting:remoting_unittests_apk",
45     ]
46   }
48   if (enable_remoting_host) {
49     deps += [
50       "//remoting:remoting_perftests",
51       "//remoting/host",
52       "//remoting/host:remoting_start_host",
53       "//remoting/host/it2me:remote_assistance_host",
55       #"//remoting:remoting_it2me_native_messaging_host",
56       #"//remoting:remoting_native_messaging_manifests",
57     ]
58   }
60   if (enable_me2me_host) {
61     deps += [
62       "//remoting/host:remoting_me2me_host",
63       #"//remoting/host:remoting_me2me_host_archive",
64     ]
65   }
67   # TODO(GYP) Depends on crbug.com/471924 being fixed for PNaCl.
68   if (enable_nacl) {
69     deps += [ "//remoting:remoting_key_tester" ]
70   }
73 # GYP version: remoting/remoting_test.gypi:remoting_test_common
74 source_set("test_support") {
75   testonly = true
77   sources = [
78     # Files from remoting_test_common not in separate test_support targets.
79     "signaling/fake_signal_strategy.cc",
80     "signaling/fake_signal_strategy.h",
81     "signaling/mock_signal_strategy.cc",
82     "signaling/mock_signal_strategy.h",
83     "test/access_token_fetcher.cc",
84     "test/access_token_fetcher.h",
85     "test/app_remoting_test_driver_environment.cc",
86     "test/app_remoting_test_driver_environment.h",
87     "test/app_remoting_test_driver_environment_app_details.cc",
88     "test/fake_access_token_fetcher.cc",
89     "test/fake_access_token_fetcher.h",
90     "test/fake_network_dispatcher.cc",
91     "test/fake_network_dispatcher.h",
92     "test/fake_network_manager.cc",
93     "test/fake_network_manager.h",
94     "test/fake_port_allocator.cc",
95     "test/fake_port_allocator.h",
96     "test/fake_remote_host_info_fetcher.cc",
97     "test/fake_remote_host_info_fetcher.h",
98     "test/fake_socket_factory.cc",
99     "test/fake_socket_factory.h",
100     "test/leaky_bucket.cc",
101     "test/leaky_bucket.h",
102     "test/mock_access_token_fetcher.cc",
103     "test/mock_access_token_fetcher.h",
104     "test/refresh_token_store.cc",
105     "test/refresh_token_store.h",
106     "test/remote_application_details.h",
107     "test/remote_connection_observer.h",
108     "test/remote_host_info.cc",
109     "test/remote_host_info.h",
110     "test/remote_host_info_fetcher.cc",
111     "test/remote_host_info_fetcher.h",
112     "test/test_chromoting_client.cc",
113     "test/test_chromoting_client.h",
114     "test/test_video_renderer.cc",
115     "test/test_video_renderer.h",
116   ]
118   deps = [
119     "//base",
120     "//net",
121     "//remoting/base",
122     "//remoting/client",
123     "//remoting/codec",
124     "//remoting/protocol:test_support",
125     "//remoting/resources",
126     "//testing/gmock",
127     "//testing/gtest",
128   ]
130   if (enable_configuration_policy) {
131     deps += [ "//components/policy:test_support" ]
132   }
134   if (enable_remoting_host) {
135     deps += [ "//remoting/host:test_support" ]
136   }
139 # TODO(GYP) remoting_unittests on Mac. Needs to be tested.
140 if (!is_mac) {
141   test("remoting_unittests") {
142     # Sources not included in one of the more specific unit_tests deps.
143     sources = [
144       "signaling/iq_sender_unittest.cc",
145       "signaling/log_to_server_unittest.cc",
146       "signaling/server_log_entry_unittest.cc",
147       "signaling/server_log_entry_unittest.h",
148       "test/access_token_fetcher_unittest.cc",
149       "test/app_remoting_test_driver_environment_unittest.cc",
150       "test/remote_host_info_fetcher_unittest.cc",
151       "test/test_chromoting_client_unittest.cc",
152     ]
154     configs += [
155       ":version",
157       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
158       "//build/config/compiler:no_size_t_to_int_warning",
159     ]
161     deps = [
162       ":test_support",
163       "//base/allocator",
164       "//google_apis",
165       "//remoting/base:unit_tests",
166       "//remoting/client:unit_tests",
167       "//remoting/protocol:test_support",
168       "//remoting/protocol:unit_tests",
169       "//testing/gmock",
170       "//testing/gtest",
171       "//third_party/webrtc",
172     ]
174     if (is_android) {
175       deps += [ "//testing/android/native_test:native_test_native_code" ]
176     } else {
177       deps += [
178         "//remoting/client/plugin",
179         "//remoting/client/plugin:unit_tests",
180       ]
181     }
183     if (enable_remoting_host) {
184       deps += [
185         "//remoting/codec:unit_tests",
186         "//remoting/host:unit_tests",
187       ]
188     }
190     if (enable_webrtc) {
191       deps += [
192         "//third_party/libjingle:libjingle_webrtc",
193         "//third_party/libjingle:libpeerconnection",
194       ]
195     }
196   }
198   if (enable_remoting_host) {
199     test("remoting_perftests") {
200       sources = [
201         "codec/codec_test.cc",
202         "codec/codec_test.h",
203         "codec/video_encoder_vpx_perftest.cc",
204         "test/protocol_perftest.cc",
205       ]
207       configs += [ ":version" ]
209       deps = [
210         ":test_support",
211         "//base",
212         "//base/test:run_all_unittests",
213         "//base/test:test_support",
214         "//net:test_support",
215         "//remoting/base",
216         "//testing/gtest",
217         "//third_party/webrtc/modules/desktop_capture",
218         "//third_party/libjingle",
219       ]
221       if (enable_webrtc) {
222         deps += [ "//third_party/libjingle:libjingle_webrtc" ]
223       }
224     }
225   }
226 } else {
227   group("remoting_unittests") {
228   }
231 if (enable_pnacl) {
232   group("remoting_key_tester") {
233     deps = [
234       ":remoting_key_tester_copies",
235     ]
236   }
238   copy("remoting_key_tester_copies") {
239     sources = [
240       "tools/javascript_key_tester/background.js",
241       "tools/javascript_key_tester/chord_tracker.js",
242       "tools/javascript_key_tester/event_listeners.js",
243       "tools/javascript_key_tester/icon_128.png",
244       "tools/javascript_key_tester/main.css",
245       "tools/javascript_key_tester/main.html",
246       "tools/javascript_key_tester/main.js",
247       "tools/javascript_key_tester/manifest.json",
248       "tools/javascript_key_tester/pnacl/remoting_key_tester.nmf",
250       # TODO(GYP): crbug.com/471924 "$target_out_dir/remoting_key_tester_newlib.pexe",
251     ]
253     outputs = [
254       "$target_out_dir/remoting/key_tester/{{source_file_part}}",
255     ]
257     deps = [
258       ":remoting_key_tester_jscompile",
259       ":remoting_key_tester_pexe",
260     ]
261   }
263   group("remoting_key_tester_jscompile") {
264     # TODO(GYP): crbug.com/471926 add support for run_jscompile=true.
265     run_jscompile = false
266     if (run_jscompile) {
267     }
268   }
270   group("remoting_key_tester_pexe") {
271     # TODO(GYP): crbug.com/471924 implement me when we have a pnacl toolchain.
272     #sources = [
273     # "tools/javascript_key_tester/pnacl/remoting_key_tester.cc",
274     #]
275   }