Embed a mojo ApplicationManager in content/browser
[chromium-blink-merge.git] / remoting / remoting_test.gypi
blobcc87e5f432d3a9d1512c24b5d17718173c477443
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_app_details.cc',
53         'test/app_remoting_test_driver_environment.h',
54         'test/fake_access_token_fetcher.cc',
55         'test/fake_access_token_fetcher.h',
56         'test/fake_network_dispatcher.cc',
57         'test/fake_network_dispatcher.h',
58         'test/fake_network_manager.cc',
59         'test/fake_network_manager.h',
60         'test/fake_port_allocator.cc',
61         'test/fake_port_allocator.h',
62         'test/fake_remote_host_info_fetcher.cc',
63         'test/fake_remote_host_info_fetcher.h',
64         'test/fake_socket_factory.cc',
65         'test/fake_socket_factory.h',
66         'test/leaky_bucket.cc',
67         'test/leaky_bucket.h',
68         'test/mock_access_token_fetcher.cc',
69         'test/mock_access_token_fetcher.h',
70         'test/refresh_token_store.cc',
71         'test/refresh_token_store.h',
72         'test/remote_application_details.h',
73         'test/remote_connection_observer.h',
74         'test/remote_host_info.cc',
75         'test/remote_host_info.h',
76         'test/remote_host_info_fetcher.cc',
77         'test/remote_host_info_fetcher.h',
78         'test/test_chromoting_client.cc',
79         'test/test_chromoting_client.h',
80         'test/test_video_renderer.cc',
81         'test/test_video_renderer.h',
82       ],
83       'conditions': [
84         ['enable_remoting_host == 0', {
85           'dependencies!': [
86             'remoting_host',
87           ],
88           'sources/': [
89             ['exclude', '^host/'],
90           ]
91         }],
92       ],
93     },
95     # Remoting unit tests
96     {
97       # GN version: //remoting:remoting_unittests
98       # Note that many of the sources are broken out into subdir-specific unit
99       # test source set targets that then GN version then brings together.
100       'target_name': 'remoting_unittests',
101       'type': '<(gtest_target_type)',
102       'dependencies': [
103         '../base/base.gyp:base',
104         '../base/base.gyp:base_i18n',
105         '../base/base.gyp:test_support_base',
106         '../components/components.gyp:policy',
107         '../ipc/ipc.gyp:ipc',
108         '../net/net.gyp:net_test_support',
109         '../ppapi/ppapi.gyp:ppapi_cpp',
110         '../testing/gmock.gyp:gmock',
111         '../testing/gtest.gyp:gtest',
112         '../third_party/libyuv/libyuv.gyp:libyuv',
113         '../third_party/webrtc/modules/modules.gyp:desktop_capture',
114         '../ui/base/ui_base.gyp:ui_base',
115         '../ui/gfx/gfx.gyp:gfx',
116         '../ui/gfx/gfx.gyp:gfx_geometry',
117         'remoting_base',
118         'remoting_breakpad',
119         'remoting_client',
120         'remoting_client_plugin',
121         'remoting_host',
122         'remoting_host_setup_base',
123         'remoting_it2me_host_static',
124         'remoting_native_messaging_base',
125         'remoting_protocol',
126         'remoting_resources',
127         'remoting_test_common',
128       ],
129       'defines': [
130         'VERSION=<(version_full)',
131       ],
132       'include_dirs': [
133         '../testing/gmock/include',
134       ],
135       'sources': [
136         # Note: sources list duplicated in GN build.
137         'base/auto_thread_task_runner_unittest.cc',
138         'base/auto_thread_unittest.cc',
139         'base/breakpad_win_unittest.cc',
140         'base/buffered_socket_writer_unittest.cc',
141         'base/capabilities_unittest.cc',
142         'base/compound_buffer_unittest.cc',
143         'base/rate_counter_unittest.cc',
144         'base/resources_unittest.cc',
145         'base/rsa_key_pair_unittest.cc',
146         'base/run_all_unittests.cc',
147         'base/running_average_unittest.cc',
148         'base/test_rsa_key_pair.h',
149         'base/typed_buffer_unittest.cc',
150         'base/util_unittest.cc',
151         'client/audio_player_unittest.cc',
152         'client/client_status_logger_unittest.cc',
153         'client/key_event_mapper_unittest.cc',
154         'client/plugin/empty_cursor_filter_unittest.cc',
155         'client/plugin/normalizing_input_filter_cros_unittest.cc',
156         'client/plugin/normalizing_input_filter_mac_unittest.cc',
157         'client/plugin/touch_input_scaler_unittest.cc',
158         'client/server_log_entry_client_unittest.cc',
159         'codec/audio_encoder_opus_unittest.cc',
160         'codec/codec_test.cc',
161         'codec/codec_test.h',
162         'codec/video_decoder_vpx_unittest.cc',
163         'codec/video_encoder_helper_unittest.cc',
164         'codec/video_encoder_verbatim_unittest.cc',
165         'codec/video_encoder_vpx_unittest.cc',
166         'host/audio_pump_unittest.cc',
167         'host/audio_silence_detector_unittest.cc',
168         'host/backoff_timer_unittest.cc',
169         'host/branding.cc',
170         'host/branding.h',
171         'host/capture_scheduler_unittest.cc',
172         'host/chromeos/aura_desktop_capturer_unittest.cc',
173         'host/chromeos/clipboard_aura_unittest.cc',
174         'host/chromoting_host_context_unittest.cc',
175         'host/chromoting_host_unittest.cc',
176         'host/client_session_unittest.cc',
177         'host/config_file_watcher_unittest.cc',
178         'host/daemon_process_unittest.cc',
179         'host/desktop_process_unittest.cc',
180         'host/desktop_shape_tracker_unittest.cc',
181         'host/fake_desktop_capturer.cc',
182         'host/fake_desktop_capturer.h',
183         'host/fake_host_extension.cc',
184         'host/fake_host_extension.h',
185         'host/fake_host_status_monitor.h',
186         'host/fake_oauth_token_getter.cc',
187         'host/fake_oauth_token_getter.h',
188         'host/gcd_rest_client_unittest.cc',
189         'host/gcd_state_updater_unittest.cc',
190         'host/gnubby_auth_handler_posix_unittest.cc',
191         'host/heartbeat_sender_unittest.cc',
192         'host/host_change_notification_listener_unittest.cc',
193         'host/host_config_unittest.cc',
194         'host/host_extension_session_manager_unittest.cc',
195         'host/host_mock_objects.cc',
196         'host/host_status_logger_unittest.cc',
197         'host/ipc_desktop_environment_unittest.cc',
198         'host/it2me/it2me_confirmation_dialog_proxy_unittest.cc',
199         'host/it2me/it2me_native_messaging_host_unittest.cc',
200         'host/linux/audio_pipe_reader_unittest.cc',
201         'host/linux/unicode_to_keysym_unittest.cc',
202         'host/linux/x_server_clipboard_unittest.cc',
203         'host/local_input_monitor_unittest.cc',
204         'host/mouse_shape_pump_unittest.cc',
205         'host/native_messaging/native_messaging_reader_unittest.cc',
206         'host/native_messaging/native_messaging_writer_unittest.cc',
207         'host/pairing_registry_delegate_linux_unittest.cc',
208         'host/pairing_registry_delegate_win_unittest.cc',
209         'host/pin_hash_unittest.cc',
210         'host/policy_watcher_unittest.cc',
211         'host/register_support_host_request_unittest.cc',
212         'host/remote_input_filter_unittest.cc',
213         'host/resizing_host_observer_unittest.cc',
214         'host/screen_resolution_unittest.cc',
215         'host/server_log_entry_host_unittest.cc',
216         'host/setup/mock_oauth_client.cc',
217         'host/setup/mock_oauth_client.h',
218         'host/setup/me2me_native_messaging_host.cc',
219         'host/setup/me2me_native_messaging_host.h',
220         'host/setup/me2me_native_messaging_host_unittest.cc',
221         'host/setup/oauth_helper_unittest.cc',
222         'host/setup/pin_validator_unittest.cc',
223         'host/shaped_desktop_capturer_unittest.cc',
224         'host/third_party_auth_config_unittest.cc',
225         'host/token_validator_factory_impl_unittest.cc',
226         'host/touch_injector_win_unittest.cc',
227         'host/video_frame_pump_unittest.cc',
228         'host/video_frame_recorder_unittest.cc',
229         'host/win/rdp_client_unittest.cc',
230         'host/win/worker_process_launcher.cc',
231         'host/win/worker_process_launcher.h',
232         'host/win/worker_process_launcher_unittest.cc',
233         'protocol/authenticator_test_base.cc',
234         'protocol/authenticator_test_base.h',
235         'protocol/channel_multiplexer_unittest.cc',
236         'protocol/chromium_socket_factory_unittest.cc',
237         'protocol/client_video_dispatcher_unittest.cc',
238         'protocol/clipboard_echo_filter_unittest.cc',
239         'protocol/clipboard_filter_unittest.cc',
240         'protocol/connection_tester.cc',
241         'protocol/connection_tester.h',
242         'protocol/connection_to_client_unittest.cc',
243         'protocol/content_description_unittest.cc',
244         'protocol/input_event_tracker_unittest.cc',
245         'protocol/input_filter_unittest.cc',
246         'protocol/jingle_messages_unittest.cc',
247         'protocol/jingle_session_unittest.cc',
248         'protocol/message_decoder_unittest.cc',
249         'protocol/message_reader_unittest.cc',
250         'protocol/monitored_video_stub_unittest.cc',
251         'protocol/mouse_input_filter_unittest.cc',
252         'protocol/negotiating_authenticator_unittest.cc',
253         'protocol/pairing_registry_unittest.cc',
254         'protocol/port_range_unittest.cc',
255         'protocol/ppapi_module_stub.cc',
256         'protocol/ssl_hmac_channel_authenticator_unittest.cc',
257         'protocol/third_party_authenticator_unittest.cc',
258         'protocol/v2_authenticator_unittest.cc',
259         'signaling/iq_sender_unittest.cc',
260         'signaling/jid_util_unittest.cc',
261         'signaling/log_to_server_unittest.cc',
262         'signaling/push_notification_subscriber_unittest.cc',
263         'signaling/server_log_entry_unittest.cc',
264         'signaling/server_log_entry_unittest.h',
265         'signaling/xmpp_login_handler_unittest.cc',
266         'signaling/xmpp_stream_parser_unittest.cc',
267         'signaling/xmpp_signal_strategy_unittest.cc',
268         'test/access_token_fetcher_unittest.cc',
269         'test/app_remoting_test_driver_environment_unittest.cc',
270         'test/remote_host_info_fetcher_unittest.cc',
271         'test/test_chromoting_client_unittest.cc',
272       ],
273       'conditions': [
274         [ 'OS=="win"', {
275           'defines': [
276             '_ATL_NO_EXCEPTIONS',
277           ],
278           'include_dirs': [
279             '../breakpad/src',
280           ],
281           'link_settings': {
282             'libraries': [
283               '-lrpcrt4.lib',
284               '-lwtsapi32.lib',
285             ],
286           },
287         }],
288         [ 'OS=="android"', {
289           'dependencies!': [
290             'remoting_client_plugin',
291           ],
292           'sources/': [
293             ['exclude', '^client/plugin/'],
294           ]
295         }],
296         [ 'OS=="android"', {
297           'dependencies': [
298             '../testing/android/native_test.gyp:native_test_native_code',
299           ],
300         }],
301         [ 'chromeos==0', {
302           'sources!': [
303             'client/plugin/normalizing_input_filter_cros_unittest.cc',
304             'host/chromeos/aura_desktop_capturer_unittest.cc',
305             'host/clipboard_aura_unittest.cc',
306           ],
307         }, { # chromeos==1
308           'sources!': [
309             'host/linux/x_server_clipboard_unittest.cc',
310             'host/local_input_monitor_unittest.cc',
311           ],
312         }],
313         [ 'use_ozone==1', {
314           'sources!': [
315             'host/local_input_monitor_unittest.cc',
316           ],
317         }],
318         ['enable_remoting_host == 0', {
319           'dependencies!': [
320             'remoting_host',
321             'remoting_host_setup_base',
322             'remoting_it2me_host_static',
323             'remoting_native_messaging_base',
324           ],
325           'sources/': [
326             ['exclude', '^codec/'],
327             ['exclude', '^host/'],
328             ['exclude', '^base/resources_unittest\\.cc$'],
329           ]
330         }],
331         [ 'OS == "linux" and use_allocator!="none"', {
332           'dependencies': [
333             '../base/allocator/allocator.gyp:allocator',
334           ],
335         }],
336       ],  # end of 'conditions'
337     },  # end of target 'remoting_unittests'
338     {
339       'target_name': 'remoting_browser_test_resources',
340       'type': 'none',
341       'copies': [
342         {
343           'destination': '<(PRODUCT_DIR)/remoting/browser_test_resources',
344             'files': [
345               '<@(remoting_webapp_browsertest_main_html_extra_files)',
346             ],
347         },
348       ], # end of copies
349     },  # end of target 'remoting_browser_test_resources'
350     {
351       'target_name': 'remoting_webapp_browser_test_main_html',
352       'type': 'none',
353       'actions': [
354         {
355           'action_name': 'Build Remoting Webapp Browser test main.html',
356           'inputs': [
357             'webapp/build-html.py',
358             '<(remoting_webapp_template_main)',
359             '<@(remoting_webapp_template_files)',
360             '<@(remoting_webapp_crd_main_html_all_js_files)',
361             '<@(remoting_webapp_browsertest_main_html_extra_files)',
362           ],
363           'outputs': [
364             '<(SHARED_INTERMEDIATE_DIR)/browser_test/main.html',
365           ],
366           'action': [
367             'python', 'webapp/build-html.py',
368             '<(SHARED_INTERMEDIATE_DIR)/browser_test/main.html',
369             '<(remoting_webapp_template_main)',
370             '--template-dir', '<(DEPTH)/remoting',
371             '--templates', '<@(remoting_webapp_template_files)',
372             '--js',
373             '<@(remoting_webapp_crd_main_html_all_js_files)',
374             '<@(remoting_webapp_browsertest_main_html_extra_files)',
375           ],
376         },
377       ],  # end of actions
378     },  # end of target 'remoting_webapp_browser_test_html'
379     {
380       'target_name': 'remoting_webapp_unittests',
381       'type': 'none',
382       'variables': {
383         'output_dir': '<(PRODUCT_DIR)/remoting/unittests',
384         'webapp_js_files': [
385           '<@(remoting_webapp_unittest_html_all_js_files)',
386           '<@(remoting_webapp_wcs_sandbox_html_js_files)',
387           '<@(remoting_webapp_background_html_js_files)',
388         ]
389       },
390       'copies': [
391         {
392           'destination': '<(output_dir)/qunit',
393           'files': [
394             '../third_party/qunit/src/browser_test_harness.js',
395             '../third_party/qunit/src/qunit.css',
396             '../third_party/qunit/src/qunit.js',
397           ],
398         },
399         {
400           'destination': '<(output_dir)/blanketjs',
401           'files': [
402             '../third_party/blanketjs/src/blanket.js',
403             '../third_party/blanketjs/src/qunit_adapter.js',
404           ],
405         },
406         {
407           'destination': '<(output_dir)/sinonjs',
408           'files': [
409             '../third_party/sinonjs/src/sinon.js',
410             '../third_party/sinonjs/src/sinon-qunit.js',
411           ],
412         },
413         {
414           'destination': '<(output_dir)',
415           'files': [
416             '<@(webapp_js_files)',
417             '<@(remoting_webapp_unittests_all_files)',
418           ],
419         },
420       ],
421       'actions': [
422         {
423           'action_name': 'Build Remoting Webapp unittests.html',
424           'inputs': [
425             'webapp/build-html.py',
426             '<(remoting_webapp_unittests_template_main)',
427             '<@(webapp_js_files)',
428             '<@(remoting_webapp_unittests_all_js_files)'
429           ],
430           'outputs': [
431             '<(output_dir)/unittests.html',
432           ],
433           'action': [
434             'python', 'webapp/build-html.py',
435             '<@(_outputs)',
436             '<(remoting_webapp_unittests_template_main)',
437             # GYP automatically removes subsequent duplicated command line
438             # arguments.  Therefore, the excludejs flag must be set before the
439             # instrumentedjs flag or else GYP will ignore the files in the
440             # exclude list.
441             '--exclude-js', '<@(remoting_webapp_unittests_exclude_js_files)',
442             '--js', '<@(remoting_webapp_unittests_all_js_files)',
443             '--instrument-js', '<@(webapp_js_files)',
444            ],
445         },
446       ],
447     },  # end of target 'remoting_webapp_unittest'
448   ],  # end of targets
450   'conditions': [
451     ['enable_remoting_host==1', {
452       'targets': [
453         # Remoting performance tests
454         {
455           'target_name': 'remoting_perftests',
456           'type': '<(gtest_target_type)',
457           'dependencies': [
458             '../base/base.gyp:base',
459             '../base/base.gyp:test_support_base',
460             '../testing/gtest.gyp:gtest',
461             '../third_party/webrtc/modules/modules.gyp:desktop_capture',
462             '../third_party/libjingle/libjingle.gyp:libjingle',
463             'remoting_base',
464             'remoting_test_common',
465           ],
466           'defines': [
467             'VERSION=<(version_full)',
468           ],
469           'include_dirs': [
470             '../testing/gmock/include',
471           ],
472           'sources': [
473             'base/run_all_unittests.cc',
474             'codec/codec_test.cc',
475             'codec/codec_test.h',
476             'codec/video_encoder_vpx_perftest.cc',
477             'test/protocol_perftest.cc',
478           ],
479           'conditions': [
480             [ 'OS=="mac" or (OS=="linux" and chromeos==0)', {
481               # RunAllTests calls chrome::RegisterPathProvider() under Mac and
482               # Linux, so we need the chrome_common.gypi dependency.
483               'dependencies': [
484                 '../chrome/common_constants.gyp:common_constants',
485               ],
486             }],
487             [ 'OS=="android"', {
488               'dependencies': [
489                 '../testing/android/native_test.gyp:native_test_native_code',
490               ],
491             }],
492             [ 'OS == "linux" and use_allocator!="none"', {
493               'dependencies': [
494                 '../base/allocator/allocator.gyp:allocator',
495               ],
496             }],
497           ],  # end of 'conditions'
498         },  # end of target 'remoting_perftests'
499       ]
500     }],  # end of 'enable_remoting_host'
501     ['disable_nacl==0 and disable_nacl_untrusted==0', {
502       'targets': [
503         {
504           'target_name': 'remoting_webapp_browser_test',
505           'type': 'none',
506           'variables': {
507             'output_dir': '<(PRODUCT_DIR)/remoting/remoting.webapp.browsertest.v2',
508             'zip_path': '<(PRODUCT_DIR)/remoting-webapp.browsertest.v2.zip',
509             'webapp_type': 'v2_pnacl',
510             'main_html_file': '<(SHARED_INTERMEDIATE_DIR)/browser_test/main.html',
511             'extra_files': [
512               'webapp/crd/remoting_client_pnacl.nmf.jinja2',
513               '<(PRODUCT_DIR)/remoting_client_plugin_newlib.pexe',
514               '<@(remoting_webapp_browsertest_main_html_extra_files)',
515             ],
516           },
517           'dependencies': [
518             'remoting_nacl.gyp:remoting_client_plugin_nacl',
519             'remoting_webapp_browser_test_main_html',
520           ],
521           'includes': [ 'remoting_webapp.gypi', ],
522         },  # end of target 'remoting_webapp_browser_test'
523       ]
524     }]
525   ] # end of 'conditions'