Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / components / test_runner / BUILD.gn
blobf23698d2da5e6712ddb9fcc6c565eb5dc970f066
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.
5 import("//build/config/features.gni")
6 import("//build/config/ui.gni")
7 if (is_android) {
8   import("//build/config/android/config.gni")
11 component("test_runner") {
12   testonly = true
14   defines = [ "TEST_RUNNER_IMPLEMENTATION" ]
16   sources = [
17     "accessibility_controller.cc",
18     "accessibility_controller.h",
19     "app_banner_client.cc",
20     "app_banner_client.h",
21     "event_sender.cc",
22     "event_sender.h",
23     "gamepad_controller.cc",
24     "gamepad_controller.h",
25     "mock_color_chooser.cc",
26     "mock_color_chooser.h",
27     "mock_constraints.cc",
28     "mock_constraints.h",
29     "mock_credential_manager_client.cc",
30     "mock_credential_manager_client.h",
31     "mock_grammar_check.cc",
32     "mock_grammar_check.h",
33     "mock_screen_orientation_client.cc",
34     "mock_screen_orientation_client.h",
35     "mock_spell_check.cc",
36     "mock_spell_check.h",
37     "mock_web_audio_device.cc",
38     "mock_web_audio_device.h",
39     "mock_web_media_stream_center.cc",
40     "mock_web_media_stream_center.h",
41     "mock_web_midi_accessor.cc",
42     "mock_web_midi_accessor.h",
43     "mock_web_speech_recognizer.cc",
44     "mock_web_speech_recognizer.h",
45     "mock_web_theme_engine.cc",
46     "mock_web_theme_engine.h",
47     "mock_web_user_media_client.cc",
48     "mock_web_user_media_client.h",
49     "mock_webrtc_data_channel_handler.cc",
50     "mock_webrtc_data_channel_handler.h",
51     "mock_webrtc_dtmf_sender_handler.cc",
52     "mock_webrtc_dtmf_sender_handler.h",
53     "mock_webrtc_peer_connection_handler.cc",
54     "mock_webrtc_peer_connection_handler.h",
55     "spell_check_client.cc",
56     "spell_check_client.h",
57     "test_common.cc",
58     "test_common.h",
59     "test_info_extractor.cc",
60     "test_info_extractor.h",
61     "test_interfaces.cc",
62     "test_interfaces.h",
63     "test_plugin.cc",
64     "test_plugin.h",
65     "test_preferences.cc",
66     "test_preferences.h",
67     "test_runner.cc",
68     "test_runner.h",
69     "test_runner_export.h",
70     "text_input_controller.cc",
71     "text_input_controller.h",
72     "web_ax_object_proxy.cc",
73     "web_ax_object_proxy.h",
74     "web_content_settings.cc",
75     "web_content_settings.h",
76     "web_frame_test_proxy.h",
77     "web_task.cc",
78     "web_task.h",
79     "web_test_delegate.h",
80     "web_test_interfaces.cc",
81     "web_test_interfaces.h",
82     "web_test_proxy.cc",
83     "web_test_proxy.h",
84     "web_test_runner.h",
85   ]
87   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
88   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
90   deps = [
91     ":resources",
92     "//base:base",
93     "//base:i18n",
94     "//cc",
95     "//cc/blink",
96     "//gin",
97     "//gpu",
98     "//net",
99     "//skia",
100     "//third_party/WebKit/public:blink",
101     "//ui/events:dom_keycode_converter",
102     "//ui/events:events_base",
103     "//ui/gfx",
104     "//ui/gfx/geometry",
105     "//url",
106     "//v8",
108     #'copy_test_netscape_plugin',  TODO(GYP)
109   ]
112 # Font copies.
113 if (!is_mac) {
114   copy("copy_ahem") {
115     visibility = [ ":*" ]
116     sources = [
117       "resources/fonts/AHEM____.TTF",
118     ]
119     outputs = [
120       "$root_out_dir/AHEM____.TTF",
121     ]
122   }
124 if (use_x11) {
125   copy("copy_x11_fonts") {
126     visibility = [ ":*" ]
127     sources = [
128       "//third_party/gardiner_mod/GardinerModBug.ttf",
129       "//third_party/gardiner_mod/GardinerModCat.ttf",
130       "resources/fonts/fonts.conf",
131     ]
132     outputs = [
133       "$root_out_dir/{{source_file_part}}",
134     ]
135   }
137 if (is_android) {
138   copy("copy_android_fonts") {
139     visibility = [ ":*" ]
140     sources = [
141       "resources/fonts/android_fallback_fonts.xml",
142       "resources/fonts/android_main_fonts.xml",
143     ]
144     outputs = [
145       "$root_out_dir/{{source_file_part}}",
146     ]
147   }
150 group("resources") {
151   deps = []
153   if (is_mac) {
154     # TODO(GYP) Mac bundle resources.
155     #'all_dependent_settings': {
156     #  'mac_bundle_resources': [
157     #    'resources/fonts/AHEM____.TTF',
158     #    'resources/fonts/ChromiumAATTest.ttf',
159     #    '<(SHARED_INTERMEDIATE_DIR)/webkit/missingImage.png',
160     #    '<(SHARED_INTERMEDIATE_DIR)/webkit/textAreaResizeCorner.png',
161     #  ],
162     #},
163   } else {
164     deps += [ ":copy_ahem" ]
165   }
167   if (use_x11) {
168     deps += [ ":copy_x11_fonts" ]
169   }
170   if (is_android) {
171     deps += [ ":copy_android_fonts" ]
172   }
175 if (is_mac || is_win) {
176   # GYP version: components/test_runner/test_runner.gyp:layout_test_helper
177   executable("layout_test_helper") {
178     sources = [
179       "helper/layout_test_helper_mac.mm",
180       "helper/layout_test_helper_win.cc",
181     ]
183     if (is_mac) {
184       libs = [ "AppKit.framework" ]
185     }
187     deps = [
188       "//build/config/sanitizers:deps",
189     ]
190   }