Enforce minimum visibility only for normal and panel windows
[chromium-blink-merge.git] / remoting / remoting_test.gypi
blob7fef1c39d466130cae57f0712417f45e50e569c4
1 # Copyright 2014 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.
6   'targets': [
7     # Remoting unit tests
8     {
9       'target_name': 'remoting_unittests',
10       'type': '<(gtest_target_type)',
11       'dependencies': [
12         '../base/base.gyp:base',
13         '../base/base.gyp:base_i18n',
14         '../base/base.gyp:test_support_base',
15         '../ipc/ipc.gyp:ipc',
16         '../net/net.gyp:net_test_support',
17         '../ppapi/ppapi.gyp:ppapi_cpp',
18         '../testing/gmock.gyp:gmock',
19         '../testing/gtest.gyp:gtest',
20         '../third_party/libyuv/libyuv.gyp:libyuv',
21         '../third_party/webrtc/modules/modules.gyp:desktop_capture',
22         '../ui/base/ui_base.gyp:ui_base',
23         '../ui/gfx/gfx.gyp:gfx',
24         '../ui/gfx/gfx.gyp:gfx_geometry',
25         'remoting_base',
26         'remoting_breakpad',
27         'remoting_client',
28         'remoting_client_plugin',
29         'remoting_host',
30         'remoting_host_setup_base',
31         'remoting_it2me_host_static',
32         'remoting_native_messaging_base',
33         'remoting_protocol',
34         'remoting_resources',
35       ],
36       'defines': [
37         'VERSION=<(version_full)',
38       ],
39       'include_dirs': [
40         '../testing/gmock/include',
41       ],
42       'sources': [
43         '../chrome/test/base/run_all_remoting_unittests.cc',
44         'base/auth_token_util_unittest.cc',
45         'base/auto_thread_task_runner_unittest.cc',
46         'base/auto_thread_unittest.cc',
47         'base/breakpad_win_unittest.cc',
48         'base/capabilities_unittest.cc',
49         'base/compound_buffer_unittest.cc',
50         'base/rate_counter_unittest.cc',
51         'base/resources_unittest.cc',
52         'base/rsa_key_pair_unittest.cc',
53         'base/running_average_unittest.cc',
54         'base/test_rsa_key_pair.h',
55         'base/typed_buffer_unittest.cc',
56         'base/util_unittest.cc',
57         'client/audio_player_unittest.cc',
58         'client/key_event_mapper_unittest.cc',
59         'client/plugin/normalizing_input_filter_cros_unittest.cc',
60         'client/plugin/normalizing_input_filter_mac_unittest.cc',
61         'client/server_log_entry_client_unittest.cc',
62         'codec/audio_encoder_opus_unittest.cc',
63         'codec/codec_test.cc',
64         'codec/codec_test.h',
65         'codec/video_decoder_vpx_unittest.cc',
66         'codec/video_encoder_verbatim_unittest.cc',
67         'codec/video_encoder_vpx_unittest.cc',
68         'host/audio_silence_detector_unittest.cc',
69         'host/branding.cc',
70         'host/branding.h',
71         'host/capture_scheduler_unittest.cc',
72         'host/chromoting_host_context_unittest.cc',
73         'host/chromoting_host_unittest.cc',
74         'host/client_session_unittest.cc',
75         'host/config_file_watcher_unittest.cc',
76         'host/daemon_process_unittest.cc',
77         'host/desktop_process_unittest.cc',
78         'host/desktop_shape_tracker_unittest.cc',
79         'host/gnubby_auth_handler_posix_unittest.cc',
80         'host/heartbeat_sender_unittest.cc',
81         'host/host_change_notification_listener_unittest.cc',
82         'host/host_mock_objects.cc',
83         'host/host_status_monitor_fake.h',
84         'host/host_status_sender_unittest.cc',
85         'host/ipc_desktop_environment_unittest.cc',
86         'host/it2me/it2me_native_messaging_host_unittest.cc',
87         'host/json_host_config_unittest.cc',
88         'host/linux/audio_pipe_reader_unittest.cc',
89         'host/linux/unicode_to_keysym_unittest.cc',
90         'host/linux/x_server_clipboard_unittest.cc',
91         'host/local_input_monitor_unittest.cc',
92         'host/log_to_server_unittest.cc',
93         'host/native_messaging/native_messaging_reader_unittest.cc',
94         'host/native_messaging/native_messaging_writer_unittest.cc',
95         'host/pairing_registry_delegate_linux_unittest.cc',
96         'host/pairing_registry_delegate_win_unittest.cc',
97         'host/pin_hash_unittest.cc',
98         'host/policy_hack/fake_policy_watcher.cc',
99         'host/policy_hack/fake_policy_watcher.h',
100         'host/policy_hack/mock_policy_callback.cc',
101         'host/policy_hack/mock_policy_callback.h',
102         'host/policy_hack/policy_watcher_unittest.cc',
103         'host/register_support_host_request_unittest.cc',
104         'host/remote_input_filter_unittest.cc',
105         'host/resizing_host_observer_unittest.cc',
106         'host/screen_capturer_fake.cc',
107         'host/screen_capturer_fake.h',
108         'host/screen_resolution_unittest.cc',
109         'host/server_log_entry_host_unittest.cc',
110         'host/setup/me2me_native_messaging_host.cc',
111         'host/setup/me2me_native_messaging_host.h',
112         'host/setup/me2me_native_messaging_host_unittest.cc',
113         'host/setup/oauth_helper_unittest.cc',
114         'host/setup/pin_validator_unittest.cc',
115         'host/shaped_screen_capturer_unittest.cc',
116         'host/token_validator_factory_impl_unittest.cc',
117         'host/video_scheduler_unittest.cc',
118         'host/win/rdp_client_unittest.cc',
119         'host/win/worker_process_launcher.cc',
120         'host/win/worker_process_launcher.h',
121         'host/win/worker_process_launcher_unittest.cc',
122         'jingle_glue/chromium_socket_factory_unittest.cc',
123         'jingle_glue/fake_signal_strategy.cc',
124         'jingle_glue/fake_signal_strategy.h',
125         'jingle_glue/iq_sender_unittest.cc',
126         'jingle_glue/mock_objects.cc',
127         'jingle_glue/mock_objects.h',
128         'jingle_glue/network_settings_unittest.cc',
129         'jingle_glue/server_log_entry_unittest.cc',
130         'jingle_glue/server_log_entry_unittest.h',
131         'protocol/authenticator_test_base.cc',
132         'protocol/authenticator_test_base.h',
133         'protocol/buffered_socket_writer_unittest.cc',
134         'protocol/channel_multiplexer_unittest.cc',
135         'protocol/clipboard_echo_filter_unittest.cc',
136         'protocol/clipboard_filter_unittest.cc',
137         'protocol/connection_tester.cc',
138         'protocol/connection_tester.h',
139         'protocol/connection_to_client_unittest.cc',
140         'protocol/content_description_unittest.cc',
141         'protocol/fake_authenticator.cc',
142         'protocol/fake_authenticator.h',
143         'protocol/fake_session.cc',
144         'protocol/fake_session.h',
145         'protocol/input_event_tracker_unittest.cc',
146         'protocol/input_filter_unittest.cc',
147         'protocol/jingle_messages_unittest.cc',
148         'protocol/jingle_session_unittest.cc',
149         'protocol/message_decoder_unittest.cc',
150         'protocol/message_reader_unittest.cc',
151         'protocol/monitored_video_stub_unittest.cc',
152         'protocol/mouse_input_filter_unittest.cc',
153         'protocol/negotiating_authenticator_unittest.cc',
154         'protocol/pairing_registry_unittest.cc',
155         'protocol/ppapi_module_stub.cc',
156         'protocol/protocol_mock_objects.cc',
157         'protocol/protocol_mock_objects.h',
158         'protocol/ssl_hmac_channel_authenticator_unittest.cc',
159         'protocol/third_party_authenticator_unittest.cc',
160         'protocol/v2_authenticator_unittest.cc',
161       ],
162       'conditions': [
163         [ 'OS=="win"', {
164           'defines': [
165             '_ATL_NO_EXCEPTIONS',
166           ],
167           'include_dirs': [
168             '../breakpad/src',
169           ],
170           'link_settings': {
171             'libraries': [
172               '-lrpcrt4.lib',
173               '-lwtsapi32.lib',
174             ],
175           },
176         }],
177         [ 'OS=="mac" or (OS=="linux" and chromeos==0)', {
178           # Javascript unittests are disabled on CrOS because they cause
179           # valgrind and test errors.
180           #
181           # Javascript unittests are disabled on Windows because they add a
182           # dependency on 'common_constants' which (only on Windows) requires
183           # additional dependencies:
184           #   '../content/content.gyp:content_common',
185           #   'installer_util',
186           # These targets are defined in .gypi files that would need to be
187           # included here:
188           #   '../chrome/chrome_common.gypi',
189           #   '../chrome/chrome_installer.gypi',
190           #   '../chrome/chrome_installer_util.gypi',
191           # But we can't do that because ninja will complain about multiple
192           # target definitions.
193           # TODO(garykac): Move installer_util into a proper .gyp file so that
194           # it can be included in multiple .gyp files.
195           'includes': [
196             '../chrome/js_unittest_rules.gypi',
197           ],
198           'dependencies': [
199             '../chrome/common_constants.gyp:common_constants',
200             '../v8/tools/gyp/v8.gyp:v8',
201           ],
202           'sources': [
203             '../chrome/test/base/v8_unit_test.cc',
204             '../chrome/test/base/v8_unit_test.h',
205             'webapp/browser_globals.gtestjs',
206             'webapp/all_js_load.gtestjs',
207             'webapp/format_iq.gtestjs',
208             '<@(remoting_webapp_all_js_files)',
209           ],
210         }],
211         [ 'OS=="android"', {
212           'dependencies!': [
213             'remoting_client_plugin',
214           ],
215         }],
216         [ 'OS=="android"', {
217           'dependencies': [
218             '../testing/android/native_test.gyp:native_test_native_code',
219           ],
220         }],
221         [ 'chromeos==0', {
222           'sources!': [
223             'client/plugin/normalizing_input_filter_cros_unittest.cc',
224           ],
225         }],
226         ['enable_remoting_host == 0', {
227           'dependencies!': [
228             'remoting_host',
229             'remoting_host_setup_base',
230             'remoting_it2me_host_static',
231             'remoting_native_messaging_base',
232           ],
233           'sources/': [
234             ['exclude', '^codec/'],
235             ['exclude', '^host/'],
236             ['exclude', '^base/resources_unittest\\.cc$'],
237           ]
238         }],
239         [ 'OS == "linux" and use_allocator!="none"', {
240           'dependencies': [
241             '../base/allocator/allocator.gyp:allocator',
242           ],
243         }],
244       ],  # end of 'conditions'
245     },  # end of target 'remoting_unittests'
246     {
247       'target_name': 'remoting_browser_test_resources',
248       'type': 'none',
249       'copies': [
250         {
251           'destination': '<(PRODUCT_DIR)',
252             'files': [
253               '<@(remoting_webapp_js_browser_test_files)',
254             ],
255         },
256       ], #end of copies
257     },  # end of target 'remoting_browser_test_resources'
258     {
259       'target_name': 'remoting_webapp_unittest',
260       'type': 'none',
261       'variables': {
262         'output_dir': '<(PRODUCT_DIR)/remoting/unittests',
263       },
264       'copies': [
265         {
266           'destination': '<(output_dir)/qunit',
267           'files': [
268             '../third_party/qunit/src/',
269           ],
270         },
271         {
272           'destination': '<(output_dir)/blanketjs',
273           'files': [
274             '../third_party/blanketjs/src/',
275           ],
276         },
277         {
278           'destination': '<(output_dir)/sinonjs',
279           'files': [
280             '../third_party/sinonjs/src/',
281           ],
282         },
283         {
284           'destination': '<(output_dir)',
285           'files': [
286             '<@(remoting_webapp_main_html_js_files)',
287           ],
288         },
289         {
290           'destination': '<(output_dir)',
291           'files': [
292             '<@(remoting_webapp_unittest_cases)'
293           ],
294         },
295       ],
296       'actions': [
297         {
298           'action_name': 'Build Remoting Webapp ut.html',
299           'inputs': [
300             'webapp/build-html.py',
301             '<(remoting_webapp_unittest_template_main)',
302             '<@(remoting_webapp_main_html_js_files)',
303             '<@(remoting_webapp_unittest_exclude_files)',
304             '<@(remoting_webapp_unittest_cases)'
305           ],
306           'outputs': [
307             '<(PRODUCT_DIR)/ut.html',
308           ],
309           'action': [
310             'python', 'webapp/build-html.py',
311             '<(output_dir)/unittest.html',
312             '<(remoting_webapp_unittest_template_main)',
313             # GYP automatically removes subsequent duplicated command line
314             # arguments.  Therefore, the excludejs flag must be set before the
315             # instrumentedjs flag or else GYP will ignore the files in the
316             # exclude list.
317             '--exclude-js', '<@(remoting_webapp_unittest_exclude_files)',
318             '--js', '<@(remoting_webapp_unittest_cases)',
319             '--instrument-js', '<@(remoting_webapp_main_html_js_files)',
320            ],
321         },
322       ],
323     },  # end of target 'remoting_webapp_js_unittest'
324   ],  # end of targets