Linux: Depend on liberation-fonts package for RPMs.
[chromium-blink-merge.git] / components / test_runner / test_runner.gyp
blob30ffa758b1695b1eb1fd4eabece0cb7fad0260be
1 # Copyright 2015 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   'variables': {
7     # This turns on e.g. the filename-based detection of which
8     # platforms to include source files on (e.g. files ending in
9     # _mac.h or _mac.cc are only compiled on MacOSX).
10     'chromium_code': 1,
11   },
12   'targets': [
13     {
14       # GN version: //components/test_runner:test_runner
15       'target_name': 'test_runner',
16       'type': '<(component)',
17       'defines': [
18         'TEST_RUNNER_IMPLEMENTATION',
19       ],
20       'dependencies': [
21         'resources',
22         '../../base/base.gyp:base',
23         '../../base/base.gyp:base_i18n',
24         '../../cc/cc.gyp:cc',
25         '../../cc/blink/cc_blink.gyp:cc_blink',
26         '../../gin/gin.gyp:gin',
27         '../../gpu/gpu.gyp:gpu',
28         '../../net/net.gyp:net',
29         '../../skia/skia.gyp:skia',
30         '../../third_party/WebKit/public/blink.gyp:blink',
31         '../../ui/events/events.gyp:dom_keycode_converter',
32         '../../ui/events/events.gyp:events_base',
33         '../../ui/gfx/gfx.gyp:gfx',
34         '../../ui/gfx/gfx.gyp:gfx_geometry',
35         '../../url/url.gyp:url_lib',
36         '../../v8/tools/gyp/v8.gyp:v8',
37       ],
38       'include_dirs': [
39         '..',
40       ],
41       # Note: sources list duplicated in GN build.
42       'sources': [
43         'accessibility_controller.cc',
44         'accessibility_controller.h',
45         'app_banner_client.cc',
46         'app_banner_client.h',
47         'event_sender.cc',
48         'event_sender.h',
49         'gamepad_controller.cc',
50         'gamepad_controller.h',
51         'mock_color_chooser.cc',
52         'mock_color_chooser.h',
53         'mock_constraints.cc',
54         'mock_constraints.h',
55         'mock_credential_manager_client.cc',
56         'mock_credential_manager_client.h',
57         'mock_grammar_check.cc',
58         'mock_grammar_check.h',
59         'mock_screen_orientation_client.cc',
60         'mock_screen_orientation_client.h',
61         'mock_spell_check.cc',
62         'mock_spell_check.h',
63         'mock_web_audio_device.cc',
64         'mock_web_audio_device.h',
65         'mock_web_media_stream_center.cc',
66         'mock_web_media_stream_center.h',
67         'mock_web_midi_accessor.cc',
68         'mock_web_midi_accessor.h',
69         'mock_web_speech_recognizer.cc',
70         'mock_web_speech_recognizer.h',
71         'mock_web_theme_engine.cc',
72         'mock_web_theme_engine.h',
73         'mock_web_user_media_client.cc',
74         'mock_web_user_media_client.h',
75         'mock_webrtc_data_channel_handler.cc',
76         'mock_webrtc_data_channel_handler.h',
77         'mock_webrtc_dtmf_sender_handler.cc',
78         'mock_webrtc_dtmf_sender_handler.h',
79         'mock_webrtc_peer_connection_handler.cc',
80         'mock_webrtc_peer_connection_handler.h',
81         'spell_check_client.cc',
82         'spell_check_client.h',
83         'test_common.cc',
84         'test_common.h',
85         'test_info_extractor.cc',
86         'test_info_extractor.h',
87         'test_interfaces.cc',
88         'test_interfaces.h',
89         'test_plugin.cc',
90         'test_plugin.h',
91         'test_runner.cc',
92         'test_runner.h',
93         'test_runner_export.h',
94         'test_preferences.cc',
95         'test_preferences.h',
96         'text_input_controller.cc',
97         'text_input_controller.h',
98         'web_ax_object_proxy.cc',
99         'web_ax_object_proxy.h',
100         'web_content_settings.cc',
101         'web_content_settings.h',
102         'web_frame_test_proxy.h',
103         'web_task.cc',
104         'web_task.h',
105         'web_test_delegate.h',
106         'web_test_interfaces.cc',
107         'web_test_interfaces.h',
108         'web_test_proxy.cc',
109         'web_test_proxy.h',
110         'web_test_runner.h',
111       ],
112       'msvs_settings': {
113         'VCLinkerTool': {
114           'SubSystem': '2',  # Set /SUBSYSTEM:WINDOWS
115         },
116       },
117       'conditions': [
118         ['OS=="win" and win_use_allocator_shim==1', {
119           'dependencies': [
120             '../../base/allocator/allocator.gyp:allocator',
121           ],
122         }],
123         ['OS=="win"', {
124           'configurations': {
125             'Debug_Base': {
126               'msvs_settings': {
127                 'VCLinkerTool': {
128                   'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
129                 },
130               },
131             },
132           },
133           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
134           'msvs_disabled_warnings': [ 4267, ],
135         }],  # OS=="win"
136       ],
137     },
138     {
139       # GN version: //components/test_runner:resources
140       'target_name': 'resources',
141       'type': 'none',
142       'conditions': [
143         ['OS=="win"', {
144           'copies': [{
145             'destination': '<(PRODUCT_DIR)',
146             'files': ['resources/fonts/AHEM____.TTF'],
147           }],
148         }],
149         ['OS=="mac"', {
150           'all_dependent_settings': {
151             'mac_bundle_resources': [
152               'resources/fonts/AHEM____.TTF',
153               'resources/fonts/ChromiumAATTest.ttf',
154               '<(SHARED_INTERMEDIATE_DIR)/webkit/missingImage.png',
155               '<(SHARED_INTERMEDIATE_DIR)/webkit/textAreaResizeCorner.png',
156             ],
157           },
158         }],
159         ['use_x11 == 1', {
160           'copies': [{
161             'destination': '<(PRODUCT_DIR)',
162             'files': [
163               'resources/fonts/AHEM____.TTF',
164               'resources/fonts/fonts.conf',
165               '../../third_party/gardiner_mod/GardinerModBug.ttf',
166               '../../third_party/gardiner_mod/GardinerModCat.ttf',
167             ]
168           }],
169         }],
170         ['OS=="android"', {
171           'copies': [{
172             'destination': '<(PRODUCT_DIR)',
173             'files': [
174               'resources/fonts/AHEM____.TTF',
175               'resources/fonts/android_main_fonts.xml',
176               'resources/fonts/android_fallback_fonts.xml',
177             ]
178           }],
179         }],
180       ],
181     },
182   ],
183   'conditions': [
184     ['OS=="mac" or OS=="win"', {
185       'targets': [
186         {
187           # GN version: //components/test_runner:layout_test_helper
188           'target_name': 'layout_test_helper',
189           'type': 'executable',
190           'sources': [
191             'helper/layout_test_helper_mac.mm',
192             'helper/layout_test_helper_win.cc',
193           ],
194           'conditions': [
195             ['OS=="mac"', {
196               'link_settings': {
197                 'libraries': [
198                   '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
199                 ],
200               },
201             }],
202           ],
203         },
204       ],
205     }],  # OS=="mac" or OS=="win"
206   ]