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