Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / remoting / BUILD.gn
blob5e2b5c4704205716ac01e79a2c6d02f569685c65
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("//build/util/version.gni")
8 import("//remoting/remoting_version.gni")
9 import("//remoting/remoting_enable.gni")
10 import("//testing/test.gni")
12 # Various remoting targets need this version definition.
13 config("version") {
14   defines = [ "VERSION=$chrome_version_full" ]
17 group("remoting_all") {
18   testonly = true
20   deps = [
21     #"//remoting:remoting_browser_test_resources",
22     "//remoting:remoting_unittests",
23     #"//remoting:remoting_webapp_unittests",
24     #"//app_remoting_test.gyp:ar_sample_test_driver",
25     #"//app_remoting_webapp.gyp:ar_sample_app",
26   ]
28   # TODO(GYP): add is_mac
29   if ((is_linux && !is_chromeos) || is_win) {
30     deps += [ "//remoting/webapp" ]
31   }
33   if (is_win) {
34     deps += [
35       #"//remoting:remoting_breakpad_tester",
36       #"//remoting:remoting_console",
37       #"//remoting:remoting_desktop",
38       #"//remoting:remoting_host_installation",
39     ]
40   }
42   if (is_android) {
43     deps += [
44       #"//remoting:remoting_apk",
45       #"//remoting:remoting_test_apk",
46       #"//remoting:remoting_unittests_apk",
47     ]
48   }
50   if (enable_remoting_host) {
51     deps += [
52       "//remoting:remoting_perftests",
53       "//remoting/host",
54       "//remoting/host:remoting_start_host",
55       "//remoting/host/it2me:remote_assistance_host",
57       #"//remoting:remoting_it2me_native_messaging_host",
58       #"//remoting:remoting_native_messaging_manifests",
59     ]
60   }
62   if (enable_me2me_host) {
63     deps += [
64       "//remoting/host:remoting_me2me_host",
65       #"//remoting/host:remoting_me2me_host_archive",
66     ]
67   }
69   if (enable_pnacl) {
70     deps += [ "//remoting/tools/javascript_key_tester" ]
71   }
74 # GYP version: remoting/remoting_test.gypi:remoting_test_support
75 source_set("test_support") {
76   testonly = true
78   deps = [
79     "//base",
80     "//net",
81     "//remoting/base",
82     "//remoting/client",
83     "//remoting/codec",
84     "//remoting/protocol:test_support",
85     "//remoting/resources",
86     "//remoting/signaling:test_support",
87     "//remoting/test:test_support",
88     "//testing/gmock",
89     "//testing/gtest",
90   ]
92   if (enable_configuration_policy) {
93     deps += [ "//components/policy:test_support" ]
94   }
96   if (enable_remoting_host) {
97     deps += [ "//remoting/host:test_support" ]
98   }
101 # TODO(GYP) remoting_unittests on Mac. Needs to be tested.
102 if (!is_mac) {
103   # TODO(GYP): Delete this after we've converted everything to GN.
104   # The _run targets exist only for compatibility w/ GYP.
105   group("remoting_unittests_run") {
106     testonly = true
107     deps = [
108       ":remoting_unittests",
109     ]
110   }
112   test("remoting_unittests") {
113     configs += [
114       ":version",
116       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
117       "//build/config/compiler:no_size_t_to_int_warning",
118     ]
120     data = [
121       "//net/data/ssl/certificates/ok_cert.pem",
122       "//net/data/ssl/certificates/unittest.key.bin",
123       "//net/data/ssl/certificates/unittest.selfsigned.der",
124     ]
126     deps = [
127       ":test_support",
128       "//base/allocator",
129       "//google_apis",
130       "//remoting/base:unit_tests",
131       "//remoting/client:unit_tests",
132       "//remoting/protocol:unit_tests",
133       "//remoting/signaling:unit_tests",
134       "//remoting/test:unit_tests",
135       "//testing/gmock",
136       "//testing/gtest",
137       "//third_party/webrtc",
138     ]
140     if (is_android) {
141       deps += [ "//testing/android/native_test:native_test_native_code" ]
142     }
144     if (enable_remoting_host) {
145       deps += [
146         "//remoting/codec:unit_tests",
147         "//remoting/host:unit_tests",
148         "//ui/gfx",
149       ]
150     }
152     if (enable_webrtc) {
153       deps += [
154         "//third_party/libjingle:libjingle_webrtc",
155         "//third_party/libjingle:libpeerconnection",
156       ]
157     }
158   }
160   if (enable_remoting_host) {
161     test("remoting_perftests") {
162       sources = [
163         "codec/codec_test.cc",
164         "codec/codec_test.h",
165         "codec/video_encoder_vpx_perftest.cc",
166         "test/protocol_perftest.cc",
167       ]
169       configs += [ ":version" ]
171       deps = [
172         ":test_support",
173         "//base",
174         "//base/test:run_all_unittests",
175         "//base/test:test_support",
176         "//net:test_support",
177         "//remoting/base",
178         "//testing/gtest",
179         "//third_party/webrtc/modules/desktop_capture",
180         "//third_party/libjingle",
181       ]
183       if (enable_webrtc) {
184         deps += [ "//third_party/libjingle:libjingle_webrtc" ]
185       }
186     }
187   }
188 } else {
189   group("remoting_unittests") {
190   }