Don't preload rarely seen large images
[chromium-blink-merge.git] / components / test_runner / BUILD.gn
blob30d7fb2745ee6f60f094c0584a883ca4cedcbc14
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_interfaces.cc",
60     "test_interfaces.h",
61     "test_plugin.cc",
62     "test_plugin.h",
63     "test_preferences.cc",
64     "test_preferences.h",
65     "test_runner.cc",
66     "test_runner.h",
67     "test_runner_export.h",
68     "text_input_controller.cc",
69     "text_input_controller.h",
70     "web_ax_object_proxy.cc",
71     "web_ax_object_proxy.h",
72     "web_content_settings.cc",
73     "web_content_settings.h",
74     "web_frame_test_proxy.h",
75     "web_task.cc",
76     "web_task.h",
77     "web_test_delegate.h",
78     "web_test_interfaces.cc",
79     "web_test_interfaces.h",
80     "web_test_proxy.cc",
81     "web_test_proxy.h",
82     "web_test_runner.h",
83   ]
85   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
86   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
88   deps = [
89     ":resources",
90     "//base:base",
91     "//base:i18n",
92     "//cc",
93     "//gin",
94     "//gpu",
95     "//skia",
96     "//third_party/WebKit/public:blink",
97     "//ui/events:dom_keycode_converter",
98     "//ui/events:events_base",
99     "//ui/gfx",
100     "//ui/gfx/geometry",
101     "//url",
102     "//v8",
104     #'copy_test_netscape_plugin',  TODO(GYP)
105   ]
108 # Font copies.
109 if (!is_mac) {
110   copy("copy_ahem") {
111     visibility = [ ":*" ]
112     sources = [
113       "resources/fonts/AHEM____.TTF",
114     ]
115     outputs = [
116       "$root_out_dir/AHEM____.TTF",
117     ]
118   }
120 if (use_x11) {
121   copy("copy_x11_fonts") {
122     visibility = [ ":*" ]
123     sources = [
124       "//third_party/gardiner_mod/GardinerModBug.ttf",
125       "//third_party/gardiner_mod/GardinerModCat.ttf",
126       "resources/fonts/fonts.conf",
127     ]
128     outputs = [
129       "$root_out_dir/{{source_file_part}}",
130     ]
131   }
133 if (is_android) {
134   copy("copy_android_fonts") {
135     visibility = [ ":*" ]
136     sources = [
137       "resources/fonts/android_fallback_fonts.xml",
138       "resources/fonts/android_main_fonts.xml",
139     ]
140     outputs = [
141       "$root_out_dir/{{source_file_part}}",
142     ]
143   }
146 group("resources") {
147   deps = []
149   if (is_mac) {
150     # TODO(GYP) Mac bundle resources.
151     #'all_dependent_settings': {
152     #  'mac_bundle_resources': [
153     #    'resources/fonts/AHEM____.TTF',
154     #    'resources/fonts/ChromiumAATTest.ttf',
155     #    '<(SHARED_INTERMEDIATE_DIR)/webkit/missingImage.png',
156     #    '<(SHARED_INTERMEDIATE_DIR)/webkit/textAreaResizeCorner.png',
157     #  ],
158     #},
159   } else {
160     deps += [ ":copy_ahem" ]
161   }
163   if (use_x11) {
164     deps += [ ":copy_x11_fonts" ]
165   }
166   if (is_android) {
167     deps += [ ":copy_android_fonts" ]
168   }
171 if (is_mac || is_win) {
172   # GYP version: components/test_runner/test_runner.gyp:layout_test_helper
173   executable("layout_test_helper") {
174     sources = [
175       "helper/layout_test_helper_mac.mm",
176       "helper/layout_test_helper_win.cc",
177     ]
179     if (is_mac) {
180       libs = [ "AppKit.framework" ]
181     }
182   }