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