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("//testing/test.gni")
10 enable_remoting_host = is_win || is_mac || is_chromeos || use_x11
12 # Various remoting targets need this version definition.
14 defines = [ "VERSION=$version_full" ]
17 # GYP version: remoting/remoting_test.gypi:remoting_test_common
18 source_set("test_support") {
22 # Files from remoting_test_common not in separate test_support targets.
23 "signaling/fake_signal_strategy.cc",
24 "signaling/fake_signal_strategy.h",
25 "signaling/mock_signal_strategy.cc",
26 "signaling/mock_signal_strategy.h",
27 "test/access_token_fetcher.cc",
28 "test/access_token_fetcher.h",
29 "test/app_remoting_test_driver_environment.cc",
30 "test/app_remoting_test_driver_environment.h",
31 "test/app_remoting_test_driver_environment_app_details.cc",
32 "test/fake_access_token_fetcher.cc",
33 "test/fake_access_token_fetcher.h",
34 "test/fake_network_dispatcher.cc",
35 "test/fake_network_dispatcher.h",
36 "test/fake_network_manager.cc",
37 "test/fake_network_manager.h",
38 "test/fake_port_allocator.cc",
39 "test/fake_port_allocator.h",
40 "test/fake_remote_host_info_fetcher.cc",
41 "test/fake_remote_host_info_fetcher.h",
42 "test/fake_socket_factory.cc",
43 "test/fake_socket_factory.h",
44 "test/leaky_bucket.cc",
45 "test/leaky_bucket.h",
46 "test/mock_access_token_fetcher.cc",
47 "test/mock_access_token_fetcher.h",
48 "test/refresh_token_store.cc",
49 "test/refresh_token_store.h",
50 "test/remote_application_details.h",
51 "test/remote_connection_observer.h",
52 "test/remote_host_info.cc",
53 "test/remote_host_info.h",
54 "test/remote_host_info_fetcher.cc",
55 "test/remote_host_info_fetcher.h",
56 "test/test_chromoting_client.cc",
57 "test/test_chromoting_client.h",
58 "test/test_video_renderer.cc",
59 "test/test_video_renderer.h",
64 "//components/policy:test_support",
69 "//remoting/protocol:test_support",
70 "//remoting/resources",
75 if (enable_remoting_host) {
76 deps += [ "//remoting/host:test_support" ]
80 # TODO(GYP) remoting_unittests on Mac/Windows. Currently this fails with a
81 # duplicate resource error on linking on Windows. Just needs to be checked on
83 if (!is_win && !is_mac) {
84 test("remoting_unittests") {
85 # Sources not included in one of the more specific unit_tests deps.
87 "signaling/iq_sender_unittest.cc",
88 "signaling/log_to_server_unittest.cc",
89 "signaling/server_log_entry_unittest.cc",
90 "signaling/server_log_entry_unittest.h",
91 "test/access_token_fetcher_unittest.cc",
92 "test/app_remoting_test_driver_environment_unittest.cc",
93 "test/remote_host_info_fetcher_unittest.cc",
94 "test/test_chromoting_client_unittest.cc",
97 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
98 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
104 "//remoting/base:unit_tests",
105 "//remoting/client:unit_tests",
106 "//remoting/protocol:test_support",
107 "//remoting/protocol:unit_tests",
110 "//third_party/webrtc",
114 deps += [ "//testing/android:native_test_native_code" ]
116 deps += [ "//remoting/client/plugin" ]
119 if (enable_remoting_host) {
121 "//remoting/codec:unit_tests",
122 "//remoting/host:unit_tests",
128 "//third_party/libjingle:libjingle_webrtc",
129 "//third_party/libjingle:libpeerconnection",
134 group("remoting_unittests") {