blob: 3c35927d35d7602624038a34818458ce1225bc9e [file] [log] [blame]
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/features.gni")
import("//build/config/ui.gni")
if (is_android) {
import("//build/config/android/config.gni")
}
component("test_runner") {
testonly = true
defines = [ "TEST_RUNNER_IMPLEMENTATION" ]
sources = [
"accessibility_controller.cc",
"accessibility_controller.h",
"app_banner_client.cc",
"app_banner_client.h",
"blink_test_platform_support.h",
"blink_test_platform_support_android.cc",
"blink_test_platform_support_linux.cc",
"blink_test_platform_support_mac.mm",
"blink_test_platform_support_win.cc",
"event_sender.cc",
"event_sender.h",
"gamepad_controller.cc",
"gamepad_controller.h",
"gc_controller.cc",
"gc_controller.h",
"mock_color_chooser.cc",
"mock_color_chooser.h",
"mock_constraints.cc",
"mock_constraints.h",
"mock_credential_manager_client.cc",
"mock_credential_manager_client.h",
"mock_grammar_check.cc",
"mock_grammar_check.h",
"mock_screen_orientation_client.cc",
"mock_screen_orientation_client.h",
"mock_spell_check.cc",
"mock_spell_check.h",
"mock_web_audio_device.cc",
"mock_web_audio_device.h",
"mock_web_media_stream_center.cc",
"mock_web_media_stream_center.h",
"mock_web_midi_accessor.cc",
"mock_web_midi_accessor.h",
"mock_web_speech_recognizer.cc",
"mock_web_speech_recognizer.h",
"mock_web_theme_engine.cc",
"mock_web_theme_engine.h",
"mock_web_user_media_client.cc",
"mock_web_user_media_client.h",
"mock_webrtc_data_channel_handler.cc",
"mock_webrtc_data_channel_handler.h",
"mock_webrtc_dtmf_sender_handler.cc",
"mock_webrtc_dtmf_sender_handler.h",
"mock_webrtc_peer_connection_handler.cc",
"mock_webrtc_peer_connection_handler.h",
"spell_check_client.cc",
"spell_check_client.h",
"test_common.cc",
"test_common.h",
"test_info_extractor.cc",
"test_info_extractor.h",
"test_interfaces.cc",
"test_interfaces.h",
"test_plugin.cc",
"test_plugin.h",
"test_preferences.cc",
"test_preferences.h",
"test_runner.cc",
"test_runner.h",
"test_runner_export.h",
"text_input_controller.cc",
"text_input_controller.h",
"web_ax_object_proxy.cc",
"web_ax_object_proxy.h",
"web_content_settings.cc",
"web_content_settings.h",
"web_frame_test_proxy.h",
"web_task.cc",
"web_task.h",
"web_test_delegate.h",
"web_test_interfaces.cc",
"web_test_interfaces.h",
"web_test_proxy.cc",
"web_test_proxy.h",
"web_test_runner.h",
]
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
deps = [
":resources",
"//base:base",
"//base:i18n",
"//cc",
"//cc/blink",
"//gin",
"//gpu",
"//net",
"//skia",
"//third_party/WebKit/public:blink",
"//ui/events:dom_keycode_converter",
"//ui/events:events_base",
"//ui/gfx",
"//ui/gfx:test_support",
"//ui/gfx/geometry",
"//url",
"//v8",
#'copy_test_netscape_plugin', TODO(GYP)
]
}
# Font copies.
if (!is_mac) {
copy("copy_ahem") {
visibility = [ ":*" ]
sources = [
"resources/fonts/AHEM____.TTF",
]
outputs = [
"$root_out_dir/AHEM____.TTF",
]
}
}
if (use_x11) {
copy("copy_x11_fonts") {
visibility = [ ":*" ]
sources = [
"//third_party/gardiner_mod/GardinerModBug.ttf",
"//third_party/gardiner_mod/GardinerModCat.ttf",
"resources/fonts/fonts.conf",
]
outputs = [
"$root_out_dir/{{source_file_part}}",
]
}
}
if (is_android) {
copy("copy_android_fonts") {
visibility = [ ":*" ]
sources = [
"resources/fonts/android_fallback_fonts.xml",
"resources/fonts/android_main_fonts.xml",
]
outputs = [
"$root_out_dir/{{source_file_part}}",
]
}
}
group("resources") {
deps = []
if (is_mac) {
# TODO(GYP) Mac bundle resources.
#'all_dependent_settings': {
# 'mac_bundle_resources': [
# 'resources/fonts/AHEM____.TTF',
# 'resources/fonts/ChromiumAATTest.ttf',
# '<(SHARED_INTERMEDIATE_DIR)/webkit/missingImage.png',
# '<(SHARED_INTERMEDIATE_DIR)/webkit/textAreaResizeCorner.png',
# ],
#},
} else {
deps += [ ":copy_ahem" ]
}
if (use_x11) {
deps += [ ":copy_x11_fonts" ]
}
if (is_android) {
deps += [ ":copy_android_fonts" ]
}
}
if (is_mac || is_win) {
# GYP version: components/test_runner/test_runner.gyp:layout_test_helper
executable("layout_test_helper") {
sources = [
"helper/layout_test_helper_mac.mm",
"helper/layout_test_helper_win.cc",
]
if (is_mac) {
libs = [ "AppKit.framework" ]
}
deps = [
"//build/config/sanitizers:deps",
]
}
}