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_host.gni")
9 import("//testing/test.gni")
11 # Various remoting targets need this version definition.
13 defines = [ "VERSION=$version_full" ]
16 # GYP version: remoting/remoting_test.gypi:remoting_test_common
17 source_set("test_support") {
21 # Files from remoting_test_common not in separate test_support targets.
22 "signaling/fake_signal_strategy.cc",
23 "signaling/fake_signal_strategy.h",
24 "signaling/mock_signal_strategy.cc",
25 "signaling/mock_signal_strategy.h",
26 "test/access_token_fetcher.cc",
27 "test/access_token_fetcher.h",
28 "test/app_remoting_test_driver_environment.cc",
29 "test/app_remoting_test_driver_environment.h",
30 "test/app_remoting_test_driver_environment_app_details.cc",
31 "test/fake_access_token_fetcher.cc",
32 "test/fake_access_token_fetcher.h",
33 "test/fake_network_dispatcher.cc",
34 "test/fake_network_dispatcher.h",
35 "test/fake_network_manager.cc",
36 "test/fake_network_manager.h",
37 "test/fake_port_allocator.cc",
38 "test/fake_port_allocator.h",
39 "test/fake_remote_host_info_fetcher.cc",
40 "test/fake_remote_host_info_fetcher.h",
41 "test/fake_socket_factory.cc",
42 "test/fake_socket_factory.h",
43 "test/leaky_bucket.cc",
44 "test/leaky_bucket.h",
45 "test/mock_access_token_fetcher.cc",
46 "test/mock_access_token_fetcher.h",
47 "test/refresh_token_store.cc",
48 "test/refresh_token_store.h",
49 "test/remote_application_details.h",
50 "test/remote_connection_observer.h",
51 "test/remote_host_info.cc",
52 "test/remote_host_info.h",
53 "test/remote_host_info_fetcher.cc",
54 "test/remote_host_info_fetcher.h",
55 "test/test_chromoting_client.cc",
56 "test/test_chromoting_client.h",
57 "test/test_video_renderer.cc",
58 "test/test_video_renderer.h",
67 "//remoting/protocol:test_support",
68 "//remoting/resources",
73 if (enable_configuration_policy) {
74 deps += [ "//components/policy:test_support" ]
77 if (enable_remoting_host) {
78 deps += [ "//remoting/host:test_support" ]
82 # TODO(GYP) remoting_unittests on Mac/Windows. Currently this fails with a
83 # duplicate resource error on linking on Windows. Just needs to be checked on
85 if (!is_win && !is_mac) {
86 test("remoting_unittests") {
87 # Sources not included in one of the more specific unit_tests deps.
89 "signaling/iq_sender_unittest.cc",
90 "signaling/log_to_server_unittest.cc",
91 "signaling/server_log_entry_unittest.cc",
92 "signaling/server_log_entry_unittest.h",
93 "test/access_token_fetcher_unittest.cc",
94 "test/app_remoting_test_driver_environment_unittest.cc",
95 "test/remote_host_info_fetcher_unittest.cc",
96 "test/test_chromoting_client_unittest.cc",
99 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
100 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
106 "//remoting/base:unit_tests",
107 "//remoting/client:unit_tests",
108 "//remoting/protocol:test_support",
109 "//remoting/protocol:unit_tests",
112 "//third_party/webrtc",
116 deps += [ "//testing/android:native_test_native_code" ]
119 "//remoting/client/plugin",
120 "//remoting/client/plugin:unit_tests",
124 if (enable_remoting_host) {
126 "//remoting/codec:unit_tests",
127 "//remoting/host:unit_tests",
133 "//third_party/libjingle:libjingle_webrtc",
134 "//third_party/libjingle:libpeerconnection",
139 if (enable_remoting_host) {
140 test("remoting_perftests") {
142 "codec/codec_test.cc",
143 "codec/codec_test.h",
144 "codec/video_encoder_vpx_perftest.cc",
145 "test/protocol_perftest.cc",
148 configs += [ ":version" ]
153 "//base/test:run_all_unittests",
154 "//base/test:test_support",
155 "//net:test_support",
158 "//third_party/webrtc/modules/desktop_capture",
159 "//third_party/libjingle",
163 deps += [ "//third_party/libjingle:libjingle_webrtc" ]
168 group("remoting_unittests") {
173 group("remoting_key_tester") {
175 ":remoting_key_tester_copies",
179 copy("remoting_key_tester_copies") {
181 "tools/javascript_key_tester/background.js",
182 "tools/javascript_key_tester/chord_tracker.js",
183 "tools/javascript_key_tester/event_listeners.js",
184 "tools/javascript_key_tester/icon_128.png",
185 "tools/javascript_key_tester/main.css",
186 "tools/javascript_key_tester/main.html",
187 "tools/javascript_key_tester/main.js",
188 "tools/javascript_key_tester/manifest.json",
189 "tools/javascript_key_tester/pnacl/remoting_key_tester.nmf",
191 # TODO(GYP): crbug.com/471924 "$target_out_dir/remoting_key_tester_newlib.pexe",
195 "$target_out_dir/remoting/key_tester/{{source_file_part}}",
199 ":remoting_key_tester_jscompile",
200 ":remoting_key_tester_pexe",
204 group("remoting_key_tester_jscompile") {
205 # TODO(GYP): crbug.com/471926 add support for run_jscompile=true.
206 run_jscompile = false
211 group("remoting_key_tester_pexe") {
212 # TODO(GYP): crbug.com/471924 implement me when we have a pnacl toolchain.
214 # "tools/javascript_key_tester/pnacl/remoting_key_tester.cc",