Add a FrameHostMsg_BeginNavigation IPC
[chromium-blink-merge.git] / remoting / remoting_test.gypi
blob903d88ad2966beafef6df159573f205c487f706f
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/client_status_logger_unittest.cc',
59         'client/key_event_mapper_unittest.cc',
60         'client/plugin/normalizing_input_filter_cros_unittest.cc',
61         'client/plugin/normalizing_input_filter_mac_unittest.cc',
62         'client/server_log_entry_client_unittest.cc',
63         'codec/audio_encoder_opus_unittest.cc',
64         'codec/codec_test.cc',
65         'codec/codec_test.h',
66         'codec/video_decoder_vpx_unittest.cc',
67         'codec/video_encoder_verbatim_unittest.cc',
68         'codec/video_encoder_vpx_unittest.cc',
69         'host/audio_silence_detector_unittest.cc',
70         'host/branding.cc',
71         'host/branding.h',
72         'host/capture_scheduler_unittest.cc',
73         'host/chromoting_host_context_unittest.cc',
74         'host/chromoting_host_unittest.cc',
75         'host/client_session_unittest.cc',
76         'host/config_file_watcher_unittest.cc',
77         'host/daemon_process_unittest.cc',
78         'host/desktop_process_unittest.cc',
79         'host/desktop_shape_tracker_unittest.cc',
80         'host/gnubby_auth_handler_posix_unittest.cc',
81         'host/heartbeat_sender_unittest.cc',
82         'host/host_change_notification_listener_unittest.cc',
83         'host/host_mock_objects.cc',
84         'host/host_status_logger_unittest.cc',
85         'host/host_status_monitor_fake.h',
86         'host/host_status_sender_unittest.cc',
87         'host/ipc_desktop_environment_unittest.cc',
88         'host/it2me/it2me_native_messaging_host_unittest.cc',
89         'host/json_host_config_unittest.cc',
90         'host/linux/audio_pipe_reader_unittest.cc',
91         'host/linux/unicode_to_keysym_unittest.cc',
92         'host/linux/x_server_clipboard_unittest.cc',
93         'host/local_input_monitor_unittest.cc',
94         'host/native_messaging/native_messaging_reader_unittest.cc',
95         'host/native_messaging/native_messaging_writer_unittest.cc',
96         'host/pairing_registry_delegate_linux_unittest.cc',
97         'host/pairing_registry_delegate_win_unittest.cc',
98         'host/pin_hash_unittest.cc',
99         'host/policy_hack/fake_policy_watcher.cc',
100         'host/policy_hack/fake_policy_watcher.h',
101         'host/policy_hack/mock_policy_callback.cc',
102         'host/policy_hack/mock_policy_callback.h',
103         'host/policy_hack/policy_watcher_unittest.cc',
104         'host/register_support_host_request_unittest.cc',
105         'host/remote_input_filter_unittest.cc',
106         'host/resizing_host_observer_unittest.cc',
107         'host/screen_capturer_fake.cc',
108         'host/screen_capturer_fake.h',
109         'host/screen_resolution_unittest.cc',
110         'host/server_log_entry_host_unittest.cc',
111         'host/setup/me2me_native_messaging_host.cc',
112         'host/setup/me2me_native_messaging_host.h',
113         'host/setup/me2me_native_messaging_host_unittest.cc',
114         'host/setup/oauth_helper_unittest.cc',
115         'host/setup/pin_validator_unittest.cc',
116         'host/shaped_screen_capturer_unittest.cc',
117         'host/token_validator_factory_impl_unittest.cc',
118         'host/video_frame_recorder_unittest.cc',
119         'host/video_scheduler_unittest.cc',
120         'host/win/rdp_client_unittest.cc',
121         'host/win/worker_process_launcher.cc',
122         'host/win/worker_process_launcher.h',
123         'host/win/worker_process_launcher_unittest.cc',
124         'jingle_glue/chromium_socket_factory_unittest.cc',
125         'jingle_glue/fake_signal_strategy.cc',
126         'jingle_glue/fake_signal_strategy.h',
127         'jingle_glue/iq_sender_unittest.cc',
128         'jingle_glue/log_to_server_unittest.cc',
129         'jingle_glue/mock_objects.cc',
130         'jingle_glue/mock_objects.h',
131         'jingle_glue/network_settings_unittest.cc',
132         'jingle_glue/server_log_entry_unittest.cc',
133         'jingle_glue/server_log_entry_unittest.h',
134         'protocol/authenticator_test_base.cc',
135         'protocol/authenticator_test_base.h',
136         'protocol/buffered_socket_writer_unittest.cc',
137         'protocol/channel_multiplexer_unittest.cc',
138         'protocol/clipboard_echo_filter_unittest.cc',
139         'protocol/clipboard_filter_unittest.cc',
140         'protocol/connection_tester.cc',
141         'protocol/connection_tester.h',
142         'protocol/connection_to_client_unittest.cc',
143         'protocol/content_description_unittest.cc',
144         'protocol/fake_authenticator.cc',
145         'protocol/fake_authenticator.h',
146         'protocol/fake_session.cc',
147         'protocol/fake_session.h',
148         'protocol/input_event_tracker_unittest.cc',
149         'protocol/input_filter_unittest.cc',
150         'protocol/jingle_messages_unittest.cc',
151         'protocol/jingle_session_unittest.cc',
152         'protocol/message_decoder_unittest.cc',
153         'protocol/message_reader_unittest.cc',
154         'protocol/monitored_video_stub_unittest.cc',
155         'protocol/mouse_input_filter_unittest.cc',
156         'protocol/negotiating_authenticator_unittest.cc',
157         'protocol/pairing_registry_unittest.cc',
158         'protocol/ppapi_module_stub.cc',
159         'protocol/protocol_mock_objects.cc',
160         'protocol/protocol_mock_objects.h',
161         'protocol/ssl_hmac_channel_authenticator_unittest.cc',
162         'protocol/third_party_authenticator_unittest.cc',
163         'protocol/v2_authenticator_unittest.cc',
164       ],
165       'conditions': [
166         [ 'OS=="win"', {
167           'defines': [
168             '_ATL_NO_EXCEPTIONS',
169           ],
170           'include_dirs': [
171             '../breakpad/src',
172           ],
173           'link_settings': {
174             'libraries': [
175               '-lrpcrt4.lib',
176               '-lwtsapi32.lib',
177             ],
178           },
179         }],
180         [ 'OS=="mac" or (OS=="linux" and chromeos==0)', {
181           # Javascript unittests are disabled on CrOS because they cause
182           # valgrind and test errors.
183           #
184           # Javascript unittests are disabled on Windows because they add a
185           # dependency on 'common_constants' which (only on Windows) requires
186           # additional dependencies:
187           #   '../content/content.gyp:content_common',
188           #   'installer_util',
189           # These targets are defined in .gypi files that would need to be
190           # included here:
191           #   '../chrome/chrome_common.gypi',
192           #   '../chrome/chrome_installer.gypi',
193           #   '../chrome/chrome_installer_util.gypi',
194           # But we can't do that because ninja will complain about multiple
195           # target definitions.
196           # TODO(garykac): Move installer_util into a proper .gyp file so that
197           # it can be included in multiple .gyp files.
198           'includes': [
199             '../chrome/js_unittest_rules.gypi',
200           ],
201           'dependencies': [
202             '../chrome/common_constants.gyp:common_constants',
203             '../v8/tools/gyp/v8.gyp:v8',
204           ],
205           'sources': [
206             '../chrome/test/base/v8_unit_test.cc',
207             '../chrome/test/base/v8_unit_test.h',
208             'webapp/browser_globals.gtestjs',
209             'webapp/all_js_load.gtestjs',
210             'webapp/format_iq.gtestjs',
211             '<@(remoting_webapp_all_js_files)',
212           ],
213         }],
214         [ 'OS=="android"', {
215           'dependencies!': [
216             'remoting_client_plugin',
217           ],
218         }],
219         [ 'OS=="android"', {
220           'dependencies': [
221             '../testing/android/native_test.gyp:native_test_native_code',
222           ],
223         }],
224         [ 'chromeos==0', {
225           'sources!': [
226             'client/plugin/normalizing_input_filter_cros_unittest.cc',
227           ],
228         }],
229         ['enable_remoting_host == 0', {
230           'dependencies!': [
231             'remoting_host',
232             'remoting_host_setup_base',
233             'remoting_it2me_host_static',
234             'remoting_native_messaging_base',
235           ],
236           'sources/': [
237             ['exclude', '^codec/'],
238             ['exclude', '^host/'],
239             ['exclude', '^base/resources_unittest\\.cc$'],
240           ]
241         }],
242         [ 'OS == "linux" and use_allocator!="none"', {
243           'dependencies': [
244             '../base/allocator/allocator.gyp:allocator',
245           ],
246         }],
247       ],  # end of 'conditions'
248     },  # end of target 'remoting_unittests'
249     # Remoting performance tests
250     {
251       'target_name': 'remoting_perftests',
252       'type': '<(gtest_target_type)',
253       'dependencies': [
254         '../base/base.gyp:base',
255         '../base/base.gyp:test_support_base',
256         '../testing/gtest.gyp:gtest',
257         '../third_party/webrtc/modules/modules.gyp:desktop_capture',
258         'remoting_base',
259       ],
260       'defines': [
261         'VERSION=<(version_full)',
262       ],
263       'include_dirs': [
264         '../testing/gmock/include',
265       ],
266       'sources': [
267         '../chrome/test/base/run_all_remoting_unittests.cc',
268         'codec/codec_test.cc',
269         'codec/codec_test.h',
270         'codec/video_encoder_vpx_perftest.cc',
271       ],
272       'conditions': [
273         [ 'OS=="mac" or (OS=="linux" and chromeos==0)', {
274           # RunAllTests calls chrome::RegisterPathProvider() under Mac and
275           # Linux, so we need the chrome_common.gypi dependency.
276           'dependencies': [
277             '../chrome/common_constants.gyp:common_constants',
278           ],
279         }],
280         [ 'OS=="android"', {
281           'dependencies': [
282             '../testing/android/native_test.gyp:native_test_native_code',
283           ],
284         }],
285         [ 'OS == "linux" and use_allocator!="none"', {
286           'dependencies': [
287             '../base/allocator/allocator.gyp:allocator',
288           ],
289         }],
290       ],  # end of 'conditions'
291     },  # end of target 'remoting_perftests'
292     {
293       'target_name': 'remoting_browser_test_resources',
294       'type': 'none',
295       'variables': {
296         'zip_script': '../build/android/gyp/zip.py',
297       },
298       'copies': [
299         {
300           'destination': '<(PRODUCT_DIR)',
301             'files': [
302               '<@(remoting_webapp_js_browser_test_files)',
303             ],
304         },
305       ], #end of copies
306       'actions': [
307         {
308           # Store the browser test resources into a zip file so there is a
309           # consistent filename to reference for build archiving (i.e. in
310           # FILES.cfg).
311           'action_name': 'zip browser test resources',
312           'inputs': [
313             '<(zip_script)',
314             '<@(remoting_webapp_js_browser_test_files)'
315           ],
316           'outputs': [
317             '<(PRODUCT_DIR)/remoting-browser-tests.zip',
318           ],
319           'action': [
320             'python',
321             '<(zip_script)',
322             '--input-dir', 'webapp/browser_test',
323             '--output', '<@(_outputs)',
324            ],
325         },
326       ], # end of actions
327     },  # end of target 'remoting_browser_test_resources'
328     {
329       'target_name': 'remoting_webapp_unittest',
330       'type': 'none',
331       'variables': {
332         'output_dir': '<(PRODUCT_DIR)/remoting/unittests',
333       },
334       'copies': [
335         {
336           'destination': '<(output_dir)/qunit',
337           'files': [
338             '../third_party/qunit/src/browser_test_harness.js',
339             '../third_party/qunit/src/qunit.css',
340             '../third_party/qunit/src/qunit.js',
341           ],
342         },
343         {
344           'destination': '<(output_dir)/blanketjs',
345           'files': [
346             '../third_party/blanketjs/src/blanket.js',
347             '../third_party/blanketjs/src/qunit_adapter.js',
348           ],
349         },
350         {
351           'destination': '<(output_dir)/sinonjs',
352           'files': [
353             '../third_party/sinonjs/src/sinon.js',
354             '../third_party/sinonjs/src/sinon-qunit.js',
355           ],
356         },
357         {
358           'destination': '<(output_dir)',
359           'files': [
360             '<@(remoting_webapp_main_html_js_files)',
361           ],
362         },
363         {
364           'destination': '<(output_dir)',
365           'files': [
366             '<@(remoting_webapp_unittest_cases)'
367           ],
368         },
369       ],
370       'actions': [
371         {
372           'action_name': 'Build Remoting Webapp unittest.html',
373           'inputs': [
374             'webapp/build-html.py',
375             '<(remoting_webapp_unittest_template_main)',
376             '<@(remoting_webapp_main_html_js_files)',
377             '<@(remoting_webapp_unittest_cases)'
378           ],
379           'outputs': [
380             '<(output_dir)/unittest.html',
381           ],
382           'action': [
383             'python', 'webapp/build-html.py',
384             '<@(_outputs)',
385             '<(remoting_webapp_unittest_template_main)',
386             # GYP automatically removes subsequent duplicated command line
387             # arguments.  Therefore, the excludejs flag must be set before the
388             # instrumentedjs flag or else GYP will ignore the files in the
389             # exclude list.
390             '--exclude-js', '<@(remoting_webapp_unittest_exclude_files)',
391             '--js', '<@(remoting_webapp_unittest_cases)',
392             '--instrument-js', '<@(remoting_webapp_main_html_js_files)',
393            ],
394         },
395       ],
396     },  # end of target 'remoting_webapp_js_unittest'
397   ],  # end of targets