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