[Extensions Page] Fix the flicker of "No extensions" before extension data loads
[chromium-blink-merge.git] / remoting / BUILD.gn
blobecf6fb5395bcdf90745b78ecff55ca3c4e5e7390
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.
13 config("version") {
14   defines = [ "VERSION=$version_full" ]
17 # GYP version: remoting/remoting_test.gypi:remoting_test_common
18 source_set("test_support") {
19   testonly = true
21   sources = [
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/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_connection_observer.h",
50     "test/remote_host_info.cc",
51     "test/remote_host_info.h",
52     "test/remote_host_info_fetcher.cc",
53     "test/remote_host_info_fetcher.h",
54     "test/test_chromoting_client.cc",
55     "test/test_chromoting_client.h",
56     "test/test_video_renderer.cc",
57     "test/test_video_renderer.h",
58   ]
60   deps = [
61     "//base",
62     "//components/policy:test_support",
63     "//net",
64     "//remoting/base",
65     "//remoting/client",
66     "//remoting/codec",
67     "//remoting/protocol:test_support",
68     "//remoting/resources",
69     "//testing/gmock",
70     "//testing/gtest",
71   ]
73   if (enable_remoting_host) {
74     deps += [ "//remoting/host:test_support" ]
75   }
78 # TODO(GYP) remoting_unittests on Mac/Windows. Currently this fails with a
79 # duplicate resource error on linking on Windows. Just needs to be checked on
80 # Mac.
81 if (!is_win && !is_mac) {
82   test("remoting_unittests") {
83     # Sources not included in one of the more specific unit_tests deps.
84     sources = [
85       "signaling/iq_sender_unittest.cc",
86       "signaling/log_to_server_unittest.cc",
87       "signaling/server_log_entry_unittest.cc",
88       "signaling/server_log_entry_unittest.h",
89       "test/access_token_fetcher_unittest.cc",
90       "test/app_remoting_test_driver_environment_unittest.cc",
91       "test/remote_host_info_fetcher_unittest.cc",
92       "test/test_chromoting_client_unittest.cc",
93     ]
95     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
96     configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
98     deps = [
99       ":test_support",
100       "//base/allocator",
101       "//google_apis",
102       "//remoting/base:unit_tests",
103       "//remoting/client:unit_tests",
104       "//remoting/protocol:test_support",
105       "//remoting/protocol:unit_tests",
106       "//testing/gmock",
107       "//testing/gtest",
108       "//third_party/webrtc",
109     ]
111     if (is_android) {
112       deps += [ "//testing/android:native_test_native_code" ]
113     } else {
114       deps += [ "//remoting/client/plugin" ]
115     }
117     if (enable_remoting_host) {
118       deps += [
119         "//remoting/codec:unit_tests",
120         "//remoting/host:unit_tests",
121       ]
122     }
124     if (enable_webrtc) {
125       deps += [
126         "//third_party/libjingle:libjingle_webrtc",
127         "//third_party/libjingle:libpeerconnection",
128       ]
129     }
130   }
131 } else {
132   group("remoting_unittests") {
133   }