blob: 0c5651123df798fc7953ab5e6cff55b9e93c40b0 [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/jumbo.gni")
import("//build/config/ui.gni")
if (is_android) {
import("//build/config/android/config.gni")
}
jumbo_component("test_runner") {
testonly = true
# See comment at the top of //content/BUILD.gn for why this is disabled in
# component builds.
if (is_component_build) {
check_includes = false
}
defines = [ "TEST_RUNNER_IMPLEMENTATION" ]
sources = [
"accessibility_controller.cc",
"accessibility_controller.h",
"app_banner_service.cc",
"app_banner_service.h",
"event_sender.cc",
"event_sender.h",
"gamepad_controller.cc",
"gamepad_controller.h",
"gc_controller.cc",
"gc_controller.h",
"layout_and_paint_async_then.cc",
"layout_and_paint_async_then.h",
"layout_dump.cc",
"layout_dump.h",
"mock_content_settings_client.cc",
"mock_content_settings_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_document_subresource_filter.cc",
"mock_web_document_subresource_filter.h",
"mock_web_midi_accessor.cc",
"mock_web_midi_accessor.h",
"mock_web_theme_engine.cc",
"mock_web_theme_engine.h",
"pixel_dump.cc",
"pixel_dump.h",
"spell_check_client.cc",
"spell_check_client.h",
"test_common.cc",
"test_common.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",
"test_runner_for_specific_view.cc",
"test_runner_for_specific_view.h",
"text_input_controller.cc",
"text_input_controller.h",
"tracked_dictionary.cc",
"tracked_dictionary.h",
"web_ax_object_proxy.cc",
"web_ax_object_proxy.h",
"web_frame_test_client.cc",
"web_frame_test_client.h",
"web_frame_test_proxy.cc",
"web_frame_test_proxy.h",
"web_test_delegate.h",
"web_test_interfaces.cc",
"web_test_interfaces.h",
"web_test_runner.h",
"web_test_runtime_flags.cc",
"web_test_runtime_flags.h",
"web_view_test_client.cc",
"web_view_test_client.h",
"web_view_test_proxy.cc",
"web_view_test_proxy.h",
"web_widget_test_client.cc",
"web_widget_test_client.h",
"web_widget_test_proxy.cc",
"web_widget_test_proxy.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/paint",
"//components/viz/common",
"//content/public/common",
"//content/public/common:service_names",
"//content/public/renderer",
"//content/renderer:for_content_tests",
"//content/shell:web_test_switches",
"//content/shell:web_test_utils",
"//content/test:test_runner_support",
"//device/base/synchronization",
"//device/gamepad/public/cpp:shared_with_blink",
"//device/gamepad/public/mojom",
"//gin",
"//gpu",
"//gpu/command_buffer/client:gles2_interface",
"//media/midi:mojo",
"//net",
"//services/device/public/mojom",
"//skia",
"//third_party/blink/public:blink",
"//third_party/blink/public:test_support",
"//ui/display",
"//ui/events:dom_keycode_converter",
"//ui/events:events_base",
"//ui/events/blink",
"//ui/gfx",
"//ui/gfx:test_support",
"//ui/gfx/geometry",
"//url",
"//v8",
]
data_deps = [
":resources",
]
if (is_mac) {
libs = [ "AppKit.framework" ]
}
}
# Font copies.
if (is_android || is_fuchsia) {
copy("copy_android_fonts_config") {
visibility = [ ":*" ]
sources = [
"resources/fonts/android_fallback_fonts.xml",
"resources/fonts/android_main_fonts.xml",
]
outputs = [
"$root_out_dir/test_fonts/{{source_file_part}}",
]
}
}
if (is_mac) {
bundle_data("test_runner_bundle_data") {
public_deps = [
"//third_party/test_fonts",
]
sources = [
"$root_out_dir/test_fonts/Ahem.ttf",
"resources/fonts/ChromiumAATTest.ttf",
]
outputs = [
"{{bundle_resources_dir}}/{{source_file_part}}",
]
}
}
group("resources") {
deps = []
data_deps = []
if (is_mac) {
deps += [ ":test_runner_bundle_data" ]
data_deps += [ ":test_runner_bundle_data" ]
} else {
deps += [ "//third_party/test_fonts" ]
data_deps += [ "//third_party/test_fonts" ]
}
if (is_android || is_fuchsia) {
deps += [ ":copy_android_fonts_config" ]
data_deps += [ ":copy_android_fonts_config" ]
}
}