Rewrite AndroidSyncSettings to be significantly simpler.
[chromium-blink-merge.git] / remoting / remoting_test.gypi
blob8a6bd4be95d73117bf08792805730cf54844997a
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     {
8       'target_name': 'remoting_test_common',
9       'type': 'static_library',
10       'dependencies': [
11         '../base/base.gyp:base',
12         '../components/components.gyp:policy_component_test_support',
13         '../net/net.gyp:net_test_support',
14         '../testing/gmock.gyp:gmock',
15         '../testing/gtest.gyp:gtest',
16         'remoting_base',
17         'remoting_client',
18         'remoting_host',
19         'remoting_protocol',
20         'remoting_resources',
21       ],
22       'sources': [
23         'host/fake_desktop_capturer.cc',
24         'host/fake_desktop_capturer.h',
25         'host/fake_desktop_environment.cc',
26         'host/fake_desktop_environment.h',
27         'host/fake_host_status_monitor.h',
28         'host/fake_mouse_cursor_monitor.cc',
29         'host/fake_mouse_cursor_monitor.h',
30         'protocol/fake_authenticator.cc',
31         'protocol/fake_authenticator.h',
32         'protocol/fake_datagram_socket.cc',
33         'protocol/fake_datagram_socket.h',
34         'protocol/fake_session.cc',
35         'protocol/fake_session.h',
36         'protocol/fake_stream_socket.cc',
37         'protocol/fake_stream_socket.h',
38         'protocol/protocol_mock_objects.cc',
39         'protocol/protocol_mock_objects.h',
40         'signaling/fake_signal_strategy.cc',
41         'signaling/fake_signal_strategy.h',
42         'signaling/mock_signal_strategy.cc',
43         'signaling/mock_signal_strategy.h',
44         'test/access_token_fetcher.cc',
45         'test/app_remoting_test_driver_environment.cc',
46         'test/fake_access_token_fetcher.cc',
47         'test/fake_network_dispatcher.cc',
48         'test/fake_network_dispatcher.h',
49         'test/fake_network_manager.cc',
50         'test/fake_network_manager.h',
51         'test/fake_port_allocator.cc',
52         'test/fake_port_allocator.h',
53         'test/fake_socket_factory.cc',
54         'test/fake_socket_factory.h',
55         'test/leaky_bucket.cc',
56         'test/leaky_bucket.h',
57         'test/mock_access_token_fetcher.cc',
58         'test/refresh_token_store.cc',
59       ],
60       'conditions': [
61         ['enable_remoting_host == 0', {
62           'dependencies!': [
63             'remoting_host',
64           ],
65           'sources/': [
66             ['exclude', '^host/'],
67           ]
68         }],
69       ],
70     },
72     # Remoting unit tests
73     {
74       'target_name': 'remoting_unittests',
75       'type': '<(gtest_target_type)',
76       'dependencies': [
77         '../base/base.gyp:base',
78         '../base/base.gyp:base_i18n',
79         '../base/base.gyp:test_support_base',
80         '../components/components.gyp:policy',
81         '../ipc/ipc.gyp:ipc',
82         '../net/net.gyp:net_test_support',
83         '../ppapi/ppapi.gyp:ppapi_cpp',
84         '../testing/gmock.gyp:gmock',
85         '../testing/gtest.gyp:gtest',
86         '../third_party/libyuv/libyuv.gyp:libyuv',
87         '../third_party/webrtc/modules/modules.gyp:desktop_capture',
88         '../ui/base/ui_base.gyp:ui_base',
89         '../ui/gfx/gfx.gyp:gfx',
90         '../ui/gfx/gfx.gyp:gfx_geometry',
91         'remoting_base',
92         'remoting_breakpad',
93         'remoting_client',
94         'remoting_client_plugin',
95         'remoting_host',
96         'remoting_host_setup_base',
97         'remoting_it2me_host_static',
98         'remoting_native_messaging_base',
99         'remoting_protocol',
100         'remoting_resources',
101         'remoting_test_common',
102       ],
103       'defines': [
104         'VERSION=<(version_full)',
105       ],
106       'include_dirs': [
107         '../testing/gmock/include',
108       ],
109       'sources': [
110         'base/auth_token_util_unittest.cc',
111         'base/auto_thread_task_runner_unittest.cc',
112         'base/auto_thread_unittest.cc',
113         'base/breakpad_win_unittest.cc',
114         'base/capabilities_unittest.cc',
115         'base/compound_buffer_unittest.cc',
116         'base/rate_counter_unittest.cc',
117         'base/resources_unittest.cc',
118         'base/rsa_key_pair_unittest.cc',
119         'base/run_all_unittests.cc',
120         'base/running_average_unittest.cc',
121         'base/test_rsa_key_pair.h',
122         'base/typed_buffer_unittest.cc',
123         'base/util_unittest.cc',
124         'client/audio_player_unittest.cc',
125         'client/client_status_logger_unittest.cc',
126         'client/key_event_mapper_unittest.cc',
127         'client/plugin/empty_cursor_filter_unittest.cc',
128         'client/plugin/normalizing_input_filter_cros_unittest.cc',
129         'client/plugin/normalizing_input_filter_mac_unittest.cc',
130         'client/server_log_entry_client_unittest.cc',
131         'codec/audio_encoder_opus_unittest.cc',
132         'codec/codec_test.cc',
133         'codec/codec_test.h',
134         'codec/video_decoder_vpx_unittest.cc',
135         'codec/video_encoder_helper_unittest.cc',
136         'codec/video_encoder_verbatim_unittest.cc',
137         'codec/video_encoder_vpx_unittest.cc',
138         'host/audio_pump_unittest.cc',
139         'host/audio_silence_detector_unittest.cc',
140         'host/branding.cc',
141         'host/branding.h',
142         'host/capture_scheduler_unittest.cc',
143         'host/chromeos/aura_desktop_capturer_unittest.cc',
144         'host/chromeos/clipboard_aura_unittest.cc',
145         'host/chromoting_host_context_unittest.cc',
146         'host/chromoting_host_unittest.cc',
147         'host/client_session_unittest.cc',
148         'host/config_file_watcher_unittest.cc',
149         'host/daemon_process_unittest.cc',
150         'host/desktop_process_unittest.cc',
151         'host/desktop_shape_tracker_unittest.cc',
152         'host/fake_desktop_capturer.cc',
153         'host/fake_desktop_capturer.h',
154         'host/fake_host_extension.cc',
155         'host/fake_host_extension.h',
156         'host/fake_host_status_monitor.h',
157         'host/gnubby_auth_handler_posix_unittest.cc',
158         'host/heartbeat_sender_unittest.cc',
159         'host/host_change_notification_listener_unittest.cc',
160         'host/host_config_unittest.cc',
161         'host/host_extension_session_manager_unittest.cc',
162         'host/host_mock_objects.cc',
163         'host/host_status_logger_unittest.cc',
164         'host/ipc_desktop_environment_unittest.cc',
165         'host/it2me/it2me_confirmation_dialog_proxy_unittest.cc',
166         'host/it2me/it2me_native_messaging_host_unittest.cc',
167         'host/linux/audio_pipe_reader_unittest.cc',
168         'host/linux/unicode_to_keysym_unittest.cc',
169         'host/linux/x_server_clipboard_unittest.cc',
170         'host/local_input_monitor_unittest.cc',
171         'host/mouse_shape_pump_unittest.cc',
172         'host/native_messaging/native_messaging_reader_unittest.cc',
173         'host/native_messaging/native_messaging_writer_unittest.cc',
174         'host/pairing_registry_delegate_linux_unittest.cc',
175         'host/pairing_registry_delegate_win_unittest.cc',
176         'host/pin_hash_unittest.cc',
177         'host/policy_watcher_unittest.cc',
178         'host/register_support_host_request_unittest.cc',
179         'host/remote_input_filter_unittest.cc',
180         'host/resizing_host_observer_unittest.cc',
181         'host/screen_resolution_unittest.cc',
182         'host/server_log_entry_host_unittest.cc',
183         'host/setup/me2me_native_messaging_host.cc',
184         'host/setup/me2me_native_messaging_host.h',
185         'host/setup/me2me_native_messaging_host_unittest.cc',
186         'host/setup/oauth_helper_unittest.cc',
187         'host/setup/pin_validator_unittest.cc',
188         'host/shaped_desktop_capturer_unittest.cc',
189         'host/token_validator_factory_impl_unittest.cc',
190         'host/video_frame_pump_unittest.cc',
191         'host/video_frame_recorder_unittest.cc',
192         'host/win/rdp_client_unittest.cc',
193         'host/win/worker_process_launcher.cc',
194         'host/win/worker_process_launcher.h',
195         'host/win/worker_process_launcher_unittest.cc',
196         'protocol/authenticator_test_base.cc',
197         'protocol/authenticator_test_base.h',
198         'protocol/buffered_socket_writer_unittest.cc',
199         'protocol/channel_multiplexer_unittest.cc',
200         'protocol/chromium_socket_factory_unittest.cc',
201         'protocol/client_video_dispatcher_unittest.cc',
202         'protocol/clipboard_echo_filter_unittest.cc',
203         'protocol/clipboard_filter_unittest.cc',
204         'protocol/connection_tester.cc',
205         'protocol/connection_tester.h',
206         'protocol/connection_to_client_unittest.cc',
207         'protocol/content_description_unittest.cc',
208         'protocol/input_event_tracker_unittest.cc',
209         'protocol/input_filter_unittest.cc',
210         'protocol/jingle_messages_unittest.cc',
211         'protocol/jingle_session_unittest.cc',
212         'protocol/message_decoder_unittest.cc',
213         'protocol/message_reader_unittest.cc',
214         'protocol/monitored_video_stub_unittest.cc',
215         'protocol/mouse_input_filter_unittest.cc',
216         'protocol/negotiating_authenticator_unittest.cc',
217         'protocol/network_settings_unittest.cc',
218         'protocol/pairing_registry_unittest.cc',
219         'protocol/ppapi_module_stub.cc',
220         'protocol/ssl_hmac_channel_authenticator_unittest.cc',
221         'protocol/third_party_authenticator_unittest.cc',
222         'protocol/v2_authenticator_unittest.cc',
223         'signaling/fake_signal_strategy.cc',
224         'signaling/fake_signal_strategy.h',
225         'signaling/iq_sender_unittest.cc',
226         'signaling/log_to_server_unittest.cc',
227         'signaling/server_log_entry_unittest.cc',
228         'signaling/server_log_entry_unittest.h',
229         'test/access_token_fetcher_unittest.cc',
230         'test/app_remoting_test_driver_environment_unittest.cc'
231       ],
232       'conditions': [
233         [ 'OS=="win"', {
234           'defines': [
235             '_ATL_NO_EXCEPTIONS',
236           ],
237           'include_dirs': [
238             '../breakpad/src',
239           ],
240           'link_settings': {
241             'libraries': [
242               '-lrpcrt4.lib',
243               '-lwtsapi32.lib',
244             ],
245           },
246         }],
247         [ 'OS=="android"', {
248           'dependencies!': [
249             'remoting_client_plugin',
250           ],
251         }],
252         [ 'OS=="android"', {
253           'dependencies': [
254             '../testing/android/native_test.gyp:native_test_native_code',
255           ],
256         }],
257         [ 'chromeos==0', {
258           'sources!': [
259             'client/plugin/normalizing_input_filter_cros_unittest.cc',
260             'host/chromeos/aura_desktop_capturer_unittest.cc',
261             'host/clipboard_aura_unittest.cc',
262           ],
263         }, { # chromeos==1
264           'sources!': [
265             'host/linux/x_server_clipboard_unittest.cc',
266             'host/local_input_monitor_unittest.cc',
267           ],
268         }],
269         [ 'use_ozone==1', {
270           'sources!': [
271             'host/local_input_monitor_unittest.cc',
272           ],
273         }],
274         ['enable_remoting_host == 0', {
275           'dependencies!': [
276             'remoting_host',
277             'remoting_host_setup_base',
278             'remoting_it2me_host_static',
279             'remoting_native_messaging_base',
280           ],
281           'sources/': [
282             ['exclude', '^codec/'],
283             ['exclude', '^host/'],
284             ['exclude', '^base/resources_unittest\\.cc$'],
285           ]
286         }],
287         [ 'OS == "linux" and use_allocator!="none"', {
288           'dependencies': [
289             '../base/allocator/allocator.gyp:allocator',
290           ],
291         }],
292       ],  # end of 'conditions'
293     },  # end of target 'remoting_unittests'
294     {
295       'target_name': 'remoting_browser_test_resources',
296       'type': 'none',
297       'copies': [
298         {
299           'destination': '<(PRODUCT_DIR)/remoting/browser_test_resources',
300             'files': [
301               '<@(remoting_webapp_browsertest_all_js_files)',
302             ],
303         },
304       ], # end of copies
305     },  # end of target 'remoting_browser_test_resources'
306     {
307       'target_name': 'remoting_webapp_unittest',
308       'type': 'none',
309       'variables': {
310         'output_dir': '<(PRODUCT_DIR)/remoting/unittests',
311         'webapp_js_files': [
312           '<@(remoting_webapp_shared_main_html_js_files)',
313           '<@(remoting_webapp_js_wcs_sandbox_files)',
314           '<@(remoting_webapp_background_js_files)',
315         ]
316       },
317       'copies': [
318         {
319           'destination': '<(output_dir)/qunit',
320           'files': [
321             '../third_party/qunit/src/browser_test_harness.js',
322             '../third_party/qunit/src/qunit.css',
323             '../third_party/qunit/src/qunit.js',
324           ],
325         },
326         {
327           'destination': '<(output_dir)/blanketjs',
328           'files': [
329             '../third_party/blanketjs/src/blanket.js',
330             '../third_party/blanketjs/src/qunit_adapter.js',
331           ],
332         },
333         {
334           'destination': '<(output_dir)/sinonjs',
335           'files': [
336             '../third_party/sinonjs/src/sinon.js',
337             '../third_party/sinonjs/src/sinon-qunit.js',
338           ],
339         },
340         {
341           'destination': '<(output_dir)',
342           'files': [
343             '<@(webapp_js_files)',
344             '<@(remoting_webapp_unittest_all_files)',
345           ],
346         },
347       ],
348       'actions': [
349         {
350           'action_name': 'Build Remoting Webapp unittest.html',
351           'inputs': [
352             'webapp/build-html.py',
353             '<(remoting_webapp_unittest_template_main)',
354             '<@(webapp_js_files)',
355             '<@(remoting_webapp_unittest_all_js_files)'
356           ],
357           'outputs': [
358             '<(output_dir)/unittest.html',
359           ],
360           'action': [
361             'python', 'webapp/build-html.py',
362             '<@(_outputs)',
363             '<(remoting_webapp_unittest_template_main)',
364             # GYP automatically removes subsequent duplicated command line
365             # arguments.  Therefore, the excludejs flag must be set before the
366             # instrumentedjs flag or else GYP will ignore the files in the
367             # exclude list.
368             '--exclude-js', '<@(remoting_webapp_unittest_exclude_js_files)',
369             '--js', '<@(remoting_webapp_unittest_all_js_files)',
370             '--instrument-js', '<@(webapp_js_files)',
371            ],
372         },
373       ],
374     },  # end of target 'remoting_webapp_unittest'
375   ],  # end of targets
377   'conditions': [
378     ['enable_remoting_host==1', {
379       'targets': [
380         # Remoting performance tests
381         {
382           'target_name': 'remoting_perftests',
383           'type': '<(gtest_target_type)',
384           'dependencies': [
385             '../base/base.gyp:base',
386             '../base/base.gyp:test_support_base',
387             '../testing/gtest.gyp:gtest',
388             '../third_party/webrtc/modules/modules.gyp:desktop_capture',
389             '../third_party/libjingle/libjingle.gyp:libjingle',
390             'remoting_base',
391             'remoting_test_common',
392           ],
393           'defines': [
394             'VERSION=<(version_full)',
395           ],
396           'include_dirs': [
397             '../testing/gmock/include',
398           ],
399           'sources': [
400             'base/run_all_unittests.cc',
401             'codec/codec_test.cc',
402             'codec/codec_test.h',
403             'codec/video_encoder_vpx_perftest.cc',
404             'test/protocol_perftest.cc',
405           ],
406           'conditions': [
407             [ 'OS=="mac" or (OS=="linux" and chromeos==0)', {
408               # RunAllTests calls chrome::RegisterPathProvider() under Mac and
409               # Linux, so we need the chrome_common.gypi dependency.
410               'dependencies': [
411                 '../chrome/common_constants.gyp:common_constants',
412               ],
413             }],
414             [ 'OS=="android"', {
415               'dependencies': [
416                 '../testing/android/native_test.gyp:native_test_native_code',
417               ],
418             }],
419             [ 'OS == "linux" and use_allocator!="none"', {
420               'dependencies': [
421                 '../base/allocator/allocator.gyp:allocator',
422               ],
423             }],
424           ],  # end of 'conditions'
425         },  # end of target 'remoting_perftests'
426       ]
427     }]
428   ]