blob: d5c2015779ba771c63bd484fbc93bedccaba2fb8 [file] [log] [blame]
# Copyright 2014 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/chrome_build.gni")
import("//build/config/compiler/compiler.gni")
import("//build/config/crypto.gni")
import("//build/config/features.gni")
import("//build/config/ui.gni")
import("//mojo/public/tools/bindings/mojom.gni")
import("//testing/test.gni")
import("//v8/gni/v8.gni")
# Use a static library here because many test binaries depend on this but don't
# require many files from it. This makes linking more efficient.
static_library("test_support") {
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
}
sources = [
"../browser/download/mock_download_file.cc",
"../browser/download/mock_download_file.h",
"../public/test/async_file_test_helper.cc",
"../public/test/async_file_test_helper.h",
"../public/test/background_sync_test_util.cc",
"../public/test/background_sync_test_util.h",
"../public/test/browser_side_navigation_test_utils.cc",
"../public/test/browser_side_navigation_test_utils.h",
"../public/test/browser_test.h",
"../public/test/browser_test_base.cc",
"../public/test/browser_test_base.h",
"../public/test/browser_test_utils.cc",
"../public/test/browser_test_utils.h",
"../public/test/content_test_suite_base.cc",
"../public/test/content_test_suite_base.h",
"../public/test/download_test_observer.cc",
"../public/test/download_test_observer.h",
"../public/test/fake_speech_recognition_manager.cc",
"../public/test/fake_speech_recognition_manager.h",
"../public/test/frame_load_waiter.cc",
"../public/test/frame_load_waiter.h",
"../public/test/javascript_test_observer.cc",
"../public/test/javascript_test_observer.h",
"../public/test/mock_blob_url_request_context.cc",
"../public/test/mock_blob_url_request_context.h",
"../public/test/mock_download_item.cc",
"../public/test/mock_download_item.h",
"../public/test/mock_download_manager.cc",
"../public/test/mock_download_manager.h",
"../public/test/mock_notification_observer.cc",
"../public/test/mock_notification_observer.h",
"../public/test/mock_render_process_host.cc",
"../public/test/mock_render_process_host.h",
"../public/test/mock_render_thread.cc",
"../public/test/mock_render_thread.h",
"../public/test/mock_resource_context.cc",
"../public/test/mock_resource_context.h",
"../public/test/mock_special_storage_policy.cc",
"../public/test/mock_special_storage_policy.h",
"../public/test/mock_storage_client.cc",
"../public/test/mock_storage_client.h",
"../public/test/ppapi_test_utils.cc",
"../public/test/ppapi_test_utils.h",
"../public/test/render_view_test.cc",
"../public/test/render_view_test.h",
"../public/test/sandbox_file_system_test_helper.cc",
"../public/test/sandbox_file_system_test_helper.h",
"../public/test/test_browser_context.cc",
"../public/test/test_browser_context.h",
"../public/test/test_browser_thread.cc",
"../public/test/test_browser_thread.h",
"../public/test/test_browser_thread_bundle.cc",
"../public/test/test_browser_thread_bundle.h",
"../public/test/test_content_client_initializer.cc",
"../public/test/test_content_client_initializer.h",
"../public/test/test_download_request_handler.cc",
"../public/test/test_download_request_handler.h",
"../public/test/test_file_error_injector.cc",
"../public/test/test_file_error_injector.h",
"../public/test/test_file_system_backend.cc",
"../public/test/test_file_system_backend.h",
"../public/test/test_file_system_context.cc",
"../public/test/test_file_system_context.h",
"../public/test/test_file_system_options.cc",
"../public/test/test_file_system_options.h",
"../public/test/test_launcher.cc",
"../public/test/test_launcher.h",
"../public/test/test_mojo_app.cc",
"../public/test/test_mojo_app.h",
"../public/test/test_mojo_shell_context.cc",
"../public/test/test_mojo_shell_context.h",
"../public/test/test_navigation_observer.cc",
"../public/test/test_navigation_observer.h",
"../public/test/test_notification_tracker.cc",
"../public/test/test_notification_tracker.h",
"../public/test/test_renderer_host.cc",
"../public/test/test_renderer_host.h",
"../public/test/test_synchronous_compositor_android.cc",
"../public/test/test_synchronous_compositor_android.h",
"../public/test/test_utils.cc",
"../public/test/test_utils.h",
"../public/test/test_web_contents_factory.h",
"../public/test/test_web_ui.cc",
"../public/test/test_web_ui.h",
"../public/test/text_input_test_utils.cc",
"../public/test/text_input_test_utils.h",
"../public/test/unittest_test_suite.cc",
"../public/test/unittest_test_suite.h",
"../public/test/web_contents_tester.cc",
"../public/test/web_contents_tester.h",
"accessibility_browser_test_utils.cc",
"accessibility_browser_test_utils.h",
"appcache_test_helper.cc",
"appcache_test_helper.h",
"blink_test_environment.cc",
"blink_test_environment.h",
"content_browser_sanity_checker.cc",
"content_browser_sanity_checker.h",
"content_test_suite.cc",
"content_test_suite.h",
"dwrite_font_fake_sender_win.cc",
"dwrite_font_fake_sender_win.h",
"fake_compositor_dependencies.cc",
"fake_compositor_dependencies.h",
"fake_plugin_service.cc",
"fake_plugin_service.h",
"mock_background_sync_controller.cc",
"mock_background_sync_controller.h",
"mock_google_streaming_server.cc",
"mock_google_streaming_server.h",
"mock_gpu_channel_establish_factory.cc",
"mock_gpu_channel_establish_factory.h",
"mock_keyboard.cc",
"mock_keyboard.h",
"mock_keyboard_driver_win.cc",
"mock_keyboard_driver_win.h",
"mock_permission_manager.cc",
"mock_permission_manager.h",
"mock_render_process.cc",
"mock_render_process.h",
"mock_ssl_host_state_delegate.cc",
"mock_ssl_host_state_delegate.h",
"mock_webblob_registry_impl.cc",
"mock_webblob_registry_impl.h",
"mock_webclipboard_impl.cc",
"mock_webclipboard_impl.h",
"mock_webframeclient.h",
"mock_weburlloader.cc",
"mock_weburlloader.h",
"net/url_request_abort_on_end_job.cc",
"net/url_request_abort_on_end_job.h",
"ppapi_unittest.cc",
"ppapi_unittest.h",
"test_background_sync_context.cc",
"test_background_sync_context.h",
"test_background_sync_manager.cc",
"test_background_sync_manager.h",
"test_blink_web_unit_test_support.cc",
"test_blink_web_unit_test_support.h",
"test_content_browser_client.cc",
"test_content_browser_client.h",
"test_content_client.cc",
"test_content_client.h",
"test_frame_navigation_observer.cc",
"test_frame_navigation_observer.h",
"test_navigation_url_loader.cc",
"test_navigation_url_loader.h",
"test_navigation_url_loader_delegate.cc",
"test_navigation_url_loader_delegate.h",
"test_navigation_url_loader_factory.cc",
"test_navigation_url_loader_factory.h",
"test_render_frame.cc",
"test_render_frame.h",
"test_render_frame_host.cc",
"test_render_frame_host.h",
"test_render_frame_host_factory.cc",
"test_render_frame_host_factory.h",
"test_render_view_host.cc",
"test_render_view_host.h",
"test_render_view_host_factory.cc",
"test_render_view_host_factory.h",
"test_web_contents.cc",
"test_web_contents.h",
"test_web_contents_factory.cc",
"web_contents_observer_sanity_checker.cc",
"web_contents_observer_sanity_checker.h",
"web_gesture_curve_mock.cc",
"web_gesture_curve_mock.h",
]
configs += [
"//build/config:precompiled_headers",
"//v8:external_startup_data",
]
public_deps = [
"//content/public/app:both",
"//content/public/browser",
"//content/public/common",
"//third_party/WebKit/public:blink",
"//third_party/WebKit/public:test_support",
]
deps = [
":content_test_mojo_bindings",
"//base/third_party/dynamic_annotations",
"//cc:test_support",
"//cc/blink",
"//cc/ipc",
"//cc/surfaces",
"//components/display_compositor",
"//content/app:both_for_content_tests",
"//content/browser:for_content_tests",
"//content/browser/speech/proto",
"//content/child:for_content_tests",
"//content/gpu",
"//content/public/browser",
"//content/public/child",
"//content/public/renderer",
"//content/public/utility",
"//content/renderer:for_content_tests",
"//content/shell:pak",
"//content/utility:for_content_tests",
"//device/geolocation:device_geolocation",
"//device/nfc:mojo_bindings",
"//ipc:test_support",
"//media",
"//media/capture",
"//media/mojo/interfaces:image_capture",
"//mojo/edk/system",
"//mojo/edk/test:test_support",
"//net:test_support",
"//services/shell/public/cpp",
"//skia",
"//storage/browser",
"//storage/common",
"//testing/gmock",
"//testing/gtest",
"//ui/accessibility:ax_gen",
"//ui/base",
"//ui/base:test_support",
"//ui/base:ui_data_pack",
"//ui/base/ime",
"//ui/compositor:test_support",
"//ui/display",
"//ui/events:dom_keycode_converter",
"//ui/events:events_base",
"//ui/events:gesture_detection",
"//ui/events:test_support",
"//ui/gfx:test_support",
"//ui/gl",
"//ui/gl:test_support",
"//ui/resources",
"//ui/surface",
"//url",
"//url/mojo:url_mojom_gurl",
"//v8",
]
if (is_android) {
sources -= [
"mock_google_streaming_server.cc",
"mock_google_streaming_server.h",
]
}
if (enable_plugins) {
deps += [
"//content/ppapi_plugin",
"//ppapi/host",
"//ppapi/proxy",
"//ppapi/proxy:test_support",
"//ppapi/shared_impl",
"//ppapi/shared_impl:test_support",
]
} else {
sources -= [ "ppapi_unittest.cc" ]
}
if (enable_webrtc) {
sources += [
"../renderer/media/mock_data_channel_impl.cc",
"../renderer/media/mock_data_channel_impl.h",
"../renderer/media/mock_media_stream_dispatcher.cc",
"../renderer/media/mock_media_stream_dispatcher.h",
"../renderer/media/mock_peer_connection_impl.cc",
"../renderer/media/mock_peer_connection_impl.h",
"../renderer/media/mock_web_rtc_peer_connection_handler_client.cc",
"../renderer/media/mock_web_rtc_peer_connection_handler_client.h",
"../renderer/media/webrtc/mock_peer_connection_dependency_factory.cc",
"../renderer/media/webrtc/mock_peer_connection_dependency_factory.h",
]
deps += [
"//third_party/libjingle:libjingle_webrtc",
"//third_party/webrtc/api:libjingle_peerconnection",
"//third_party/webrtc/base:rtc_base",
"//third_party/webrtc/media:rtc_media",
"//third_party/webrtc/modules/video_capture",
]
}
if (use_glib) {
configs += [ "//build/config/linux:glib" ]
}
if (use_aura) {
deps += [
"//ui/aura:test_support",
"//ui/resources:ui_test_pak",
"//ui/wm",
]
}
if (use_aura || is_mac) {
deps += [
"//third_party/libvpx",
"//ui/compositor",
]
sources += [
"../browser/compositor/test/no_transport_image_transport_factory.cc",
"../browser/compositor/test/no_transport_image_transport_factory.h",
]
}
if (use_ozone) {
deps += [ "//ui/ozone" ]
}
if (is_win) {
deps += [
"//content:sandbox_helper_win",
"//third_party/iaccessible2",
]
}
if (is_android) {
deps += [
"//device/geolocation:geolocation_java",
"//media/capture/video/android:android",
"//ui/android",
"//ui/shell_dialogs",
]
}
if (is_win) {
deps += [ "//sandbox" ]
}
if (v8_use_external_startup_data) {
deps += [ "//gin:gin" ]
}
if (is_mac) {
deps += [ "//ui/accelerated_widget_mac" ]
}
}
# browsertest_support can be used by targets that run content_shell based
# browser tests.
static_library("browsertest_support") {
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
}
sources = [
"../public/test/content_browser_test.cc",
"../public/test/content_browser_test.h",
"../public/test/content_browser_test_utils.cc",
"../public/test/content_browser_test_utils.h",
"../public/test/content_browser_test_utils_mac.mm",
"content_browser_test_utils_internal.cc",
"content_browser_test_utils_internal.h",
"content_test_launcher.cc",
]
deps = [
":layouttest_support",
":test_support",
"//base",
"//base:i18n",
"//base/test:test_config",
"//base/test:test_support",
"//cc/surfaces",
"//content/app:both_for_content_tests",
"//content/browser:for_content_tests",
"//content/shell:content_shell_lib",
"//gin",
"//media",
"//net",
"//skia",
"//testing/gtest",
"//ui/accessibility:ax_gen",
"//ui/base",
"//ui/base/ime",
]
if (is_android) {
deps += [ "//content/public/app:both" ]
} else {
deps += [ "//content/public/browser" ]
}
configs += [ "//v8:external_startup_data" ]
}
mojom("content_test_mojo_bindings") {
sources = [
"../public/test/test_mojo_service.mojom",
"test_browser_associated_interfaces.mojom",
]
}
mojom("web_ui_test_mojo_bindings") {
sources = [
"data/web_ui_test_mojo_bindings.mojom",
]
}
static_library("layouttest_support") {
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
}
sources = [
"../public/test/layouttest_support.h",
"../public/test/nested_message_pump_android.cc",
"../public/test/nested_message_pump_android.h",
"layouttest_support.cc",
]
deps = [
":test_support",
"//cc",
"//cc/blink",
"//components/test_runner:test_runner",
"//content/browser:for_content_tests",
"//content/child:for_content_tests",
"//content/public/common",
"//content/renderer:for_content_tests",
"//device/bluetooth",
"//skia",
"//ui/accessibility:ax_gen",
"//v8",
]
if (is_android) {
deps += [ "//content/public/test/android:test_support_content_jni_headers" ]
}
}
if (is_android) {
import("//build/config/android/rules.gni")
jinja_template("content_browsertests_manifest") {
testonly = true
input =
"//content/shell/android/browsertests_apk/AndroidManifest.xml.jinja2"
output =
"${target_gen_dir}/content_browsertests_manifest/AndroidManifest.xml"
}
android_library("content_browsertests_java") {
testonly = true
java_files = [
"../shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java",
"../shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsApplication.java",
]
deps = [
":content_browsertests_resources",
"//base:base_java",
"//base:base_java_test_support",
"//content/public/android:content_java",
"//content/public/test/android:content_java_test_support",
"//content/shell/android:content_shell_browsertests_java",
"//testing/android/native_test:native_test_java",
"//ui/android:ui_java",
]
}
android_resources("content_browsertests_resources") {
testonly = true
resource_dirs = [ "//content/shell/android/browsertests_apk/res" ]
custom_package = "org.chromium.content_browsertests_apk"
}
}
# TODO(GYP_GONE): Delete this after we've converted everything to GN.
# The _run targets exist only for compatibility w/ GYP.
group("content_site_isolation_browsertests_run") {
testonly = true
deps = [
":content_browsertests",
]
}
group("content_site_isolation_browsertests") {
testonly = true
data = [
"//testing/buildbot/filters/site-per-process.content_browsertests.filter",
]
data_deps = [
":content_browsertests",
]
}
test("content_browsertests") {
# See comment at the top of //content/BUILD.gn for why this is disabled in
# component builds.
if (is_component_build) {
check_includes = false
}
sources = [
"../app/mojo/mojo_browsertest.cc",
"../browser/accessibility/accessibility_event_recorder.cc",
"../browser/accessibility/accessibility_event_recorder.h",
"../browser/accessibility/accessibility_event_recorder_mac.mm",
"../browser/accessibility/accessibility_event_recorder_win.cc",
"../browser/accessibility/accessibility_ipc_error_browsertest.cc",
"../browser/accessibility/accessibility_mode_browsertest.cc",
"../browser/accessibility/cross_platform_accessibility_browsertest.cc",
"../browser/accessibility/dump_accessibility_browsertest_base.cc",
"../browser/accessibility/dump_accessibility_browsertest_base.h",
"../browser/accessibility/dump_accessibility_events_browsertest.cc",
"../browser/accessibility/dump_accessibility_tree_browsertest.cc",
"../browser/accessibility/hit_testing_browsertest.cc",
"../browser/accessibility/site_per_process_accessibility_browsertest.cc",
"../browser/accessibility/snapshot_ax_tree_browsertest.cc",
"../browser/accessibility/touch_accessibility_aura_browsertest.cc",
"../browser/background_sync/background_sync_browsertest.cc",
"../browser/battery_status/battery_monitor_impl_browsertest.cc",
"../browser/battery_status/battery_monitor_integration_browsertest.cc",
"../browser/bookmarklet_browsertest.cc",
"../browser/browser_side_navigation_browsertest.cc",
"../browser/browsing_data/clear_site_data_throttle_browsertest.cc",
"../browser/child_process_launcher_browsertest.cc",
"../browser/child_process_security_policy_browsertest.cc",
"../browser/compositor/image_transport_factory_browsertest.cc",
"../browser/cross_site_transfer_browsertest.cc",
"../browser/database_browsertest.cc",
"../browser/device_sensors/device_sensor_browsertest.cc",
"../browser/devtools/protocol/devtools_protocol_browsertest.cc",
"../browser/devtools/site_per_process_devtools_browsertest.cc",
"../browser/dom_storage/dom_storage_browsertest.cc",
"../browser/download/download_browsertest.cc",
"../browser/download/drag_download_file_browsertest.cc",
"../browser/download/mhtml_generation_browsertest.cc",
"../browser/download/save_package_browsertest.cc",
"../browser/fileapi/file_system_browsertest.cc",
"../browser/find_request_manager_browsertest.cc",
"../browser/frame_host/frame_tree_browsertest.cc",
"../browser/frame_host/interstitial_page_impl_browsertest.cc",
"../browser/frame_host/navigation_controller_impl_browsertest.cc",
"../browser/frame_host/navigation_handle_impl_browsertest.cc",
"../browser/frame_host/render_frame_host_impl_browsertest.cc",
"../browser/frame_host/render_frame_host_manager_browsertest.cc",
"../browser/frame_host/render_frame_message_filter_browsertest.cc",
"../browser/frame_host/render_widget_host_view_child_frame_browsertest.cc",
"../browser/gpu/gpu_ipc_browsertests.cc",
"../browser/host_zoom_map_impl_browsertest.cc",
"../browser/iframe_zoom_browsertest.cc",
"../browser/indexed_db/indexed_db_browsertest.cc",
"../browser/indexed_db/mock_browsertest_indexed_db_class_factory.cc",
"../browser/indexed_db/mock_browsertest_indexed_db_class_factory.h",
"../browser/loader/async_resource_handler_browsertest.cc",
"../browser/loader/async_revalidation_manager_browsertest.cc",
"../browser/loader/cross_site_resource_handler_browsertest.cc",
"../browser/loader/reload_cache_control_browsertest.cc",
"../browser/loader/resource_dispatcher_host_browsertest.cc",
"../browser/manifest/manifest_browsertest.cc",
"../browser/media/android/browser_media_session_manager_browsertest.cc",
"../browser/media/encrypted_media_browsertest.cc",
"../browser/media/media_browsertest.cc",
"../browser/media/media_browsertest.h",
"../browser/media/media_canplaytype_browsertest.cc",
"../browser/media/media_redirect_browsertest.cc",
"../browser/media/media_source_browsertest.cc",
"../browser/media/midi_browsertest.cc",
"../browser/media/session/media_session_browsertest.cc",
"../browser/media/session/media_session_delegate_default_browsertest.cc",
"../browser/media/session/media_session_visibility_browsertest.cc",
"../browser/media/session/mock_media_session_observer.cc",
"../browser/media/session/mock_media_session_observer.h",
"../browser/memory/memory_coordinator_browsertest.cc",
"../browser/memory/memory_pressure_controller_impl_browsertest.cc",
"../browser/message_port_provider_browsertest.cc",
"../browser/net_info_browsertest.cc",
"../browser/renderer_host/input/composited_scrolling_browsertest.cc",
"../browser/renderer_host/input/main_thread_event_queue_browsertest.cc",
"../browser/renderer_host/input/non_blocking_event_browsertest.cc",
"../browser/renderer_host/input/touch_action_browsertest.cc",
"../browser/renderer_host/input/touch_input_browsertest.cc",
"../browser/renderer_host/input/touch_selection_controller_client_aura_browsertest.cc",
"../browser/renderer_host/render_process_host_browsertest.cc",
"../browser/renderer_host/render_view_host_browsertest.cc",
"../browser/renderer_host/render_widget_host_view_browsertest.cc",
"../browser/resource_loading_browsertest.cc",
"../browser/screen_orientation/screen_orientation_browsertest.cc",
"../browser/security_exploit_browsertest.cc",
"../browser/service_worker/service_worker_browsertest.cc",
"../browser/session_history_browsertest.cc",
"../browser/shared_worker/worker_browsertest.cc",
"../browser/site_per_process_browsertest.cc",
"../browser/site_per_process_browsertest.h",
"../browser/top_document_isolation_browsertest.cc",
"../browser/tracing/background_tracing_manager_browsertest.cc",
"../browser/tracing/memory_tracing_browsertest.cc",
"../browser/tracing/tracing_controller_browsertest.cc",
"../browser/utility_process_host_impl_browsertest.cc",
"../browser/utility_process_mojo_client_browsertest.cc",
"../browser/vibration_browsertest.cc",
"../browser/wake_lock/wake_lock_browsertest.cc",
"../browser/web_contents/opened_by_dom_browsertest.cc",
"../browser/web_contents/web_contents_impl_browsertest.cc",
"../browser/web_contents/web_contents_view_aura_browsertest.cc",
"../browser/webkit_browsertest.cc",
"../browser/webui/web_ui_mojo_browsertest.cc",
"../child/site_isolation_stats_gatherer_browsertest.cc",
"../renderer/accessibility/render_accessibility_impl_browsertest.cc",
"../renderer/devtools/v8_sampling_profiler_browsertest.cc",
"../renderer/gin_browsertest.cc",
"../renderer/history_controller_browsertest.cc",
"../renderer/media/renderer_webmediaplayer_delegate_browsertest.cc",
"../renderer/mouse_lock_dispatcher_browsertest.cc",
"../renderer/render_frame_impl_browsertest.cc",
"../renderer/render_thread_impl_browsertest.cc",
"../renderer/render_view_browsertest.cc",
"../renderer/render_view_browsertest_mac.mm",
"../renderer/render_widget_browsertest.cc",
"../renderer/visual_state_browsertest.cc",
"../renderer/webclipboard_impl_browsertest.cc",
"../test/browser_test_utils_browsertest.cc",
"../test/content_browser_test_test.cc",
"../test/webui_resource_browsertest.cc",
]
if (is_android || is_linux || is_mac || is_win) {
data = [
"$root_out_dir/content_shell.pak",
"data/",
"//media/test/data/",
]
if (!is_android) {
data += [
"//net/tools/testserver/",
"//ppapi/tests/test_case.html",
"//ppapi/tests/test_page.css",
"//third_party/pyftpdlib/",
"//third_party/pywebsocket/",
"//third_party/tlslite/",
]
if (is_mac) {
data += [ "$root_out_dir/Content Shell.app/" ]
}
if (is_win) {
if (symbol_level != 0) {
data += [ "$root_out_dir/content_browsertests.exe.pdb" ]
}
}
if (is_linux) {
data += [ "//testing/buildbot/filters/browser-side-navigation.linux.content_browsertests.filter" ]
}
}
}
defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
configs += [
"//build/config:precompiled_headers",
"//build/config/compiler:no_size_t_to_int_warning",
]
deps = [
":browsertest_support",
":content_test_mojo_bindings",
":layouttest_support",
":test_support",
":web_ui_test_mojo_bindings",
"//base/test:test_support",
"//components/memory_coordinator/browser",
"//content:resources",
"//content/app:both_for_content_tests",
"//content/browser:for_content_tests",
"//content/browser/background_sync:background_sync_proto",
"//content/child:for_content_tests",
"//content/gpu",
"//content/public/browser",
"//content/public/child",
"//content/public/common",
"//content/public/renderer",
"//content/renderer:for_content_tests",
"//content/shell:content_shell_lib",
"//content/shell:pak",
"//content/test:test_support",
"//device/battery",
"//device/battery:mojo_bindings",
"//device/power_save_blocker",
"//device/vibration:mojo_bindings",
"//gin",
"//gpu",
"//ipc:mojom",
"//ipc:test_support",
"//media",
"//media:test_support",
"//media/audio:test_support",
"//media/base:test_support",
"//mojo/edk/system",
"//mojo/edk/test:test_support",
"//mojo/public/cpp/bindings",
"//mojo/public/js",
"//net:test_support",
"//services/shell/public/cpp",
"//storage/browser",
"//testing/gmock",
"//testing/gtest",
"//third_party/WebKit/public:blink",
"//third_party/leveldatabase",
"//third_party/mesa:osmesa",
"//third_party/zlib",
"//ui/accessibility",
"//ui/accessibility:ax_gen",
"//ui/base:test_support",
"//ui/base/ime",
"//ui/compositor",
"//ui/display",
"//ui/events:test_support",
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/gl",
"//ui/gl:test_support",
"//ui/resources",
"//ui/shell_dialogs",
"//ui/snapshot",
]
data_deps = [
"//third_party/mesa:osmesa",
]
if (enable_plugins) {
deps += [
"//ppapi/host",
"//ppapi/proxy",
"//ppapi/proxy:ipc",
"//ppapi/shared_impl:test_support",
]
data_deps += [ "//ppapi:ppapi_tests" ]
if (is_mac) {
data += [ "$root_out_dir/ppapi_tests.plugin/" ]
}
}
if (is_win) {
sources += [ "../browser/accessibility/accessibility_win_browsertest.cc" ]
deps += [
"//content/app/strings",
"//net:net_resources",
"//third_party/WebKit/public:resources",
"//third_party/iaccessible2",
"//third_party/isimpledom",
]
libs = [ "oleacc.lib" ]
}
if (is_linux) {
sources += [ "../zygote/zygote_browsertest.cc" ]
}
if (is_android) {
sources += [
"../browser/accessibility/android_granularity_movement_browsertest.cc",
"../browser/media/session/media_session_delegate_android_browsertest.cc",
"../shell/android/browsertests_apk/content_browser_tests_jni_onload.cc",
]
sources -= [
"../browser/battery_status/battery_monitor_impl_browsertest.cc",
"../browser/media/session/media_session_delegate_default_browsertest.cc",
]
deps += [
":content_browsertests_java",
"//content/shell:content_shell_lib",
"//content/shell/android:content_shell_assets",
"//content/shell/android:content_shell_jni_headers",
"//testing/android/native_test:native_test_support",
]
deps -= [ "//device/battery" ]
android_manifest =
"${target_gen_dir}/content_browsertests_manifest/AndroidManifest.xml"
android_manifest_dep = ":content_browsertests_manifest"
use_default_launcher = false
}
if (is_mac) {
sources += [ "../renderer/external_popup_menu_browsertest.cc" ]
deps += [ "//content/shell:content_shell" ]
}
if (is_chromeos) {
deps += [ "//chromeos" ]
}
if (use_aura && !is_win) {
deps += [ "//ui/events:test_support" ]
}
if (!use_aura && !is_mac) {
sources -=
[ "../browser/compositor/image_transport_factory_browsertest.cc" ]
}
if (enable_webrtc) {
sources += [
"../browser/webrtc/webrtc_audio_browsertest.cc",
"../browser/webrtc/webrtc_audio_debug_recordings_browsertest.cc",
"../browser/webrtc/webrtc_browsertest.cc",
"../browser/webrtc/webrtc_capture_from_element_browsertest.cc",
"../browser/webrtc/webrtc_constraints_browsertest.cc",
"../browser/webrtc/webrtc_content_browsertest_base.cc",
"../browser/webrtc/webrtc_content_browsertest_base.h",
"../browser/webrtc/webrtc_data_browsertest.cc",
"../browser/webrtc/webrtc_datachannel_browsertest.cc",
"../browser/webrtc/webrtc_getusermedia_browsertest.cc",
"../browser/webrtc/webrtc_image_capture_browsertest.cc",
"../browser/webrtc/webrtc_internals_browsertest.cc",
"../browser/webrtc/webrtc_ip_permissions_browsertest.cc",
"../browser/webrtc/webrtc_media_recorder_browsertest.cc",
"../browser/webrtc/webrtc_webcam_browsertest.cc",
"../browser/webrtc/webrtc_webcam_browsertest.h",
]
deps += [ "//testing/perf" ]
}
if (enable_plugins) {
sources += [
"../renderer/pepper/fake_pepper_plugin_instance.cc",
"../renderer/pepper/mock_renderer_ppapi_host.cc",
"../renderer/pepper/pepper_device_enumeration_host_helper_unittest.cc",
"../renderer/pepper/pepper_file_chooser_host_unittest.cc",
"../renderer/pepper/pepper_graphics_2d_host_unittest.cc",
"../renderer/pepper/pepper_url_request_unittest.cc",
"../renderer/pepper/pepper_webplugin_impl_browsertest.cc",
"../renderer/pepper/plugin_power_saver_helper_browsertest.cc",
"../test/ppapi/ppapi_browsertest.cc",
"../test/ppapi/ppapi_test.cc",
"../test/ppapi/ppapi_test.h",
]
deps += [ "//ppapi/proxy:test_support" ]
data_deps += [ "//ppapi:ppapi_tests" ]
}
if (enable_web_speech) {
sources += [ "../browser/speech/speech_recognition_browsertest.cc" ]
}
if (!is_chrome_branded) {
# These tests depend on single process mode, which is disabled
# in official builds.
sources += [
"../child/child_thread_impl_browsertest.cc",
"../renderer/browser_render_view_browsertest.cc",
"../renderer/dom_serializer_browsertest.cc",
"../renderer/resource_fetcher_browsertest.cc",
"../renderer/savable_resources_browsertest.cc",
]
}
if (use_aura) {
deps += [
"//ui/aura",
"//ui/touch_selection:test_support",
"//ui/touch_selection:touch_selection",
]
} else {
sources -= [
"../browser/accessibility/touch_accessibility_aura_browsertest.cc",
"../browser/renderer_host/input/touch_selection_controller_client_aura_browsertest.cc",
"../browser/web_contents/web_contents_view_aura_browsertest.cc",
]
}
}
test("content_unittests") {
# 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 = []
sources = [
"../browser/accessibility/accessibility_mode_helper_unittest.cc",
"../browser/accessibility/browser_accessibility_mac_unittest.mm",
"../browser/accessibility/browser_accessibility_manager_unittest.cc",
"../browser/accessibility/browser_accessibility_win_unittest.cc",
"../browser/accessibility/one_shot_accessibility_tree_search_unittest.cc",
"../browser/appcache/appcache_database_unittest.cc",
"../browser/appcache/appcache_disk_cache_unittest.cc",
"../browser/appcache/appcache_group_unittest.cc",
"../browser/appcache/appcache_host_unittest.cc",
"../browser/appcache/appcache_manifest_parser_unittest.cc",
"../browser/appcache/appcache_quota_client_unittest.cc",
"../browser/appcache/appcache_request_handler_unittest.cc",
"../browser/appcache/appcache_response_unittest.cc",
"../browser/appcache/appcache_service_unittest.cc",
"../browser/appcache/appcache_storage_impl_unittest.cc",
"../browser/appcache/appcache_storage_unittest.cc",
"../browser/appcache/appcache_unittest.cc",
"../browser/appcache/appcache_update_job_unittest.cc",
"../browser/appcache/appcache_url_request_job_unittest.cc",
"../browser/appcache/chrome_appcache_service_unittest.cc",
"../browser/appcache/mock_appcache_policy.cc",
"../browser/appcache/mock_appcache_policy.h",
"../browser/appcache/mock_appcache_service.cc",
"../browser/appcache/mock_appcache_service.h",
"../browser/appcache/mock_appcache_storage.cc",
"../browser/appcache/mock_appcache_storage.h",
"../browser/appcache/mock_appcache_storage_unittest.cc",
"../browser/background_sync/background_sync_manager_unittest.cc",
"../browser/background_sync/background_sync_network_observer_unittest.cc",
"../browser/background_sync/background_sync_service_impl_unittest.cc",
"../browser/blob_storage/blob_async_builder_host_unittest.cc",
"../browser/blob_storage/blob_async_transport_request_builder_unittest.cc",
"../browser/blob_storage/blob_dispatcher_host_unittest.cc",
"../browser/blob_storage/blob_reader_unittest.cc",
"../browser/blob_storage/blob_storage_context_unittest.cc",
"../browser/blob_storage/blob_storage_registry_unittest.cc",
"../browser/blob_storage/blob_url_request_job_unittest.cc",
"../browser/bluetooth/bluetooth_allowed_devices_map_unittest.cc",
"../browser/bluetooth/bluetooth_blacklist_unittest.cc",
"../browser/bluetooth/bluetooth_device_chooser_controller_unittest.cc",
"../browser/bluetooth/frame_connected_bluetooth_devices_unittest.cc",
"../browser/browser_associated_interface_unittest.cc",
"../browser/browser_thread_unittest.cc",
"../browser/browser_url_handler_impl_unittest.cc",
"../browser/browsing_data/clear_site_data_throttle_unittest.cc",
"../browser/byte_stream_unittest.cc",
"../browser/cache_storage/cache_storage_blob_to_disk_cache_unittest.cc",
"../browser/cache_storage/cache_storage_cache_unittest.cc",
"../browser/cache_storage/cache_storage_manager_unittest.cc",
"../browser/cache_storage/cache_storage_operation_unittest.cc",
"../browser/cache_storage/cache_storage_scheduler_unittest.cc",
"../browser/child_process_security_policy_unittest.cc",
"../browser/cocoa/system_hotkey_map_unittest.mm",
"../browser/compositor/reflector_impl_unittest.cc",
"../browser/compositor/software_browser_compositor_output_surface_unittest.cc",
"../browser/compositor/software_output_device_ozone_unittest.cc",
"../browser/database_quota_client_unittest.cc",
"../browser/database_tracker_unittest.cc",
"../browser/database_util_unittest.cc",
"../browser/databases_table_unittest.cc",
"../browser/device_sensors/data_fetcher_shared_memory_base_unittest.cc",
"../browser/device_sensors/sensor_manager_android_unittest.cc",
"../browser/device_sensors/sensor_manager_chromeos_unittest.cc",
"../browser/devtools/devtools_http_handler_unittest.cc",
"../browser/devtools/devtools_manager_unittest.cc",
"../browser/devtools/protocol/tracing_handler_unittest.cc",
"../browser/devtools/shared_worker_devtools_manager_unittest.cc",
"../browser/dom_storage/dom_storage_area_unittest.cc",
"../browser/dom_storage/dom_storage_context_impl_unittest.cc",
"../browser/dom_storage/dom_storage_database_unittest.cc",
"../browser/dom_storage/session_storage_database_unittest.cc",
"../browser/download/base_file_unittest.cc",
"../browser/download/download_file_unittest.cc",
"../browser/download/download_item_impl_unittest.cc",
"../browser/download/download_manager_impl_unittest.cc",
"../browser/download/file_metadata_unittest_linux.cc",
"../browser/download/rate_estimator_unittest.cc",
"../browser/download/save_package_unittest.cc",
"../browser/fileapi/copy_or_move_file_validator_unittest.cc",
"../browser/fileapi/copy_or_move_operation_delegate_unittest.cc",
"../browser/fileapi/dragged_file_util_unittest.cc",
"../browser/fileapi/external_mount_points_unittest.cc",
"../browser/fileapi/file_system_context_unittest.cc",
"../browser/fileapi/file_system_dir_url_request_job_unittest.cc",
"../browser/fileapi/file_system_file_stream_reader_unittest.cc",
"../browser/fileapi/file_system_operation_impl_unittest.cc",
"../browser/fileapi/file_system_operation_impl_write_unittest.cc",
"../browser/fileapi/file_system_operation_runner_unittest.cc",
"../browser/fileapi/file_system_quota_client_unittest.cc",
"../browser/fileapi/file_system_url_request_job_unittest.cc",
"../browser/fileapi/file_system_url_unittest.cc",
"../browser/fileapi/file_system_usage_cache_unittest.cc",
"../browser/fileapi/file_writer_delegate_unittest.cc",
"../browser/fileapi/fileapi_message_filter_unittest.cc",
"../browser/fileapi/isolated_context_unittest.cc",
"../browser/fileapi/local_file_stream_reader_unittest.cc",
"../browser/fileapi/local_file_stream_writer_unittest.cc",
"../browser/fileapi/local_file_util_unittest.cc",
"../browser/fileapi/mock_file_change_observer.cc",
"../browser/fileapi/mock_file_change_observer.h",
"../browser/fileapi/mock_file_update_observer.cc",
"../browser/fileapi/mock_file_update_observer.h",
"../browser/fileapi/mock_url_request_delegate.cc",
"../browser/fileapi/mock_url_request_delegate.h",
"../browser/fileapi/native_file_util_unittest.cc",
"../browser/fileapi/obfuscated_file_util_unittest.cc",
"../browser/fileapi/plugin_private_file_system_backend_unittest.cc",
"../browser/fileapi/recursive_operation_delegate_unittest.cc",
"../browser/fileapi/sandbox_database_test_helper.cc",
"../browser/fileapi/sandbox_database_test_helper.h",
"../browser/fileapi/sandbox_directory_database_unittest.cc",
"../browser/fileapi/sandbox_file_system_backend_delegate_unittest.cc",
"../browser/fileapi/sandbox_file_system_backend_unittest.cc",
"../browser/fileapi/sandbox_isolated_origin_database_unittest.cc",
"../browser/fileapi/sandbox_origin_database_unittest.cc",
"../browser/fileapi/sandbox_prioritized_origin_database_unittest.cc",
"../browser/fileapi/timed_task_helper_unittest.cc",
"../browser/fileapi/transient_file_util_unittest.cc",
"../browser/fileapi/upload_file_system_file_element_reader_unittest.cc",
"../browser/frame_host/frame_tree_node_blame_context_unittest.cc",
"../browser/frame_host/frame_tree_unittest.cc",
"../browser/frame_host/navigation_controller_impl_unittest.cc",
"../browser/frame_host/navigation_entry_impl_unittest.cc",
"../browser/frame_host/navigation_handle_impl_unittest.cc",
"../browser/frame_host/navigator_impl_unittest.cc",
"../browser/frame_host/render_frame_host_manager_unittest.cc",
"../browser/frame_host/render_widget_host_view_child_frame_unittest.cc",
"../browser/frame_host/render_widget_host_view_guest_unittest.cc",
"../browser/gamepad/gamepad_service_test_helpers.cc",
"../browser/gamepad/gamepad_service_test_helpers.h",
"../browser/gamepad/gamepad_service_unittest.cc",
"../browser/gpu/gpu_data_manager_impl_private_unittest.cc",
"../browser/gpu/shader_disk_cache_unittest.cc",
"../browser/host_zoom_map_impl_unittest.cc",
"../browser/indexed_db/indexed_db_active_blob_registry_unittest.cc",
"../browser/indexed_db/indexed_db_backing_store_unittest.cc",
"../browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc",
"../browser/indexed_db/indexed_db_database_unittest.cc",
"../browser/indexed_db/indexed_db_factory_unittest.cc",
"../browser/indexed_db/indexed_db_fake_backing_store.cc",
"../browser/indexed_db/indexed_db_fake_backing_store.h",
"../browser/indexed_db/indexed_db_leveldb_coding_unittest.cc",
"../browser/indexed_db/indexed_db_quota_client_unittest.cc",
"../browser/indexed_db/indexed_db_transaction_unittest.cc",
"../browser/indexed_db/indexed_db_unittest.cc",
"../browser/indexed_db/leveldb/leveldb_unittest.cc",
"../browser/indexed_db/leveldb/mock_leveldb_factory.cc",
"../browser/indexed_db/leveldb/mock_leveldb_factory.h",
"../browser/indexed_db/list_set_unittest.cc",
"../browser/indexed_db/mock_indexed_db_callbacks.cc",
"../browser/indexed_db/mock_indexed_db_callbacks.h",
"../browser/indexed_db/mock_indexed_db_database_callbacks.cc",
"../browser/indexed_db/mock_indexed_db_database_callbacks.h",
"../browser/indexed_db/mock_indexed_db_factory.cc",
"../browser/indexed_db/mock_indexed_db_factory.h",
"../browser/loader/async_resource_handler_unittest.cc",
"../browser/loader/async_revalidation_driver_unittest.cc",
"../browser/loader/async_revalidation_manager_unittest.cc",
"../browser/loader/intercepting_resource_handler_unittest.cc",
"../browser/loader/mime_sniffing_resource_handler_unittest.cc",
"../browser/loader/mojo_async_resource_handler_unittest.cc",
"../browser/loader/navigation_url_loader_unittest.cc",
"../browser/loader/resource_buffer_unittest.cc",
"../browser/loader/resource_dispatcher_host_unittest.cc",
"../browser/loader/resource_loader_unittest.cc",
"../browser/loader/resource_scheduler_unittest.cc",
"../browser/loader/temporary_file_stream_unittest.cc",
"../browser/loader/test_url_loader_client.cc",
"../browser/loader/test_url_loader_client.h",
"../browser/loader/upload_data_stream_builder_unittest.cc",
"../browser/loader/url_loader_factory_impl_unittest.cc",
"../browser/mach_broker_mac_unittest.cc",
"../browser/media/audible_metrics_unittest.cc",
"../browser/media/audio_stream_monitor_unittest.cc",
"../browser/media/capture/audio_mirroring_manager_unittest.cc",
"../browser/media/capture/cursor_renderer_aura_unittest.cc",
"../browser/media/capture/web_contents_audio_input_stream_unittest.cc",
"../browser/media/capture/web_contents_video_capture_device_unittest.cc",
"../browser/media/cdm_service_impl_unittest.cc",
"../browser/media/media_internals_unittest.cc",
"../browser/media/midi_host_unittest.cc",
"../browser/media/session/audio_focus_manager_unittest.cc",
"../browser/media/session/media_session_controller_unittest.cc",
"../browser/media/session/media_session_uma_helper_unittest.cc",
"../browser/net/quota_policy_cookie_store_unittest.cc",
"../browser/notification_service_impl_unittest.cc",
"../browser/notifications/notification_database_data_unittest.cc",
"../browser/notifications/notification_database_unittest.cc",
"../browser/notifications/notification_id_generator_unittest.cc",
"../browser/notifications/platform_notification_context_unittest.cc",
"../browser/notifications/type_converters_unittest.cc",
"../browser/power_monitor_message_broadcaster_unittest.cc",
"../browser/power_usage_monitor_impl_unittest.cc",
"../browser/presentation/presentation_service_impl_unittest.cc",
"../browser/presentation/presentation_type_converters_unittest.cc",
"../browser/quota/mock_quota_manager.cc",
"../browser/quota/mock_quota_manager.h",
"../browser/quota/mock_quota_manager_proxy.cc",
"../browser/quota/mock_quota_manager_proxy.h",
"../browser/quota/mock_quota_manager_unittest.cc",
"../browser/quota/quota_backend_impl_unittest.cc",
"../browser/quota/quota_database_unittest.cc",
"../browser/quota/quota_manager_unittest.cc",
"../browser/quota/quota_reservation_manager_unittest.cc",
"../browser/quota/quota_temporary_storage_evictor_unittest.cc",
"../browser/quota/storage_monitor_unittest.cc",
"../browser/quota/usage_tracker_unittest.cc",
"../browser/renderer_host/clipboard_message_filter_unittest.cc",
"../browser/renderer_host/dwrite_font_proxy_message_filter_win_unittest.cc",
"../browser/renderer_host/input/gesture_event_queue_unittest.cc",
"../browser/renderer_host/input/input_router_impl_unittest.cc",
"../browser/renderer_host/input/mock_input_ack_handler.cc",
"../browser/renderer_host/input/mock_input_ack_handler.h",
"../browser/renderer_host/input/mock_input_router_client.cc",
"../browser/renderer_host/input/mock_input_router_client.h",
"../browser/renderer_host/input/motion_event_web_unittest.cc",
"../browser/renderer_host/input/mouse_wheel_event_queue_unittest.cc",
"../browser/renderer_host/input/mouse_wheel_rails_filter_unittest_mac.cc",
"../browser/renderer_host/input/render_widget_host_latency_tracker_unittest.cc",
"../browser/renderer_host/input/stylus_text_selector_unittest.cc",
"../browser/renderer_host/input/synthetic_gesture_controller_unittest.cc",
"../browser/renderer_host/input/synthetic_pointer_action_unittest.cc",
"../browser/renderer_host/input/tap_suppression_controller_unittest.cc",
"../browser/renderer_host/input/touch_action_filter_unittest.cc",
"../browser/renderer_host/input/touch_emulator_unittest.cc",
"../browser/renderer_host/input/touch_event_queue_unittest.cc",
"../browser/renderer_host/input/web_input_event_builders_android_unittest.cc",
"../browser/renderer_host/input/web_input_event_builders_mac_unittest.mm",
"../browser/renderer_host/input/web_input_event_util_unittest.cc",
"../browser/renderer_host/media/audio_input_debug_writer_unittest.cc",
"../browser/renderer_host/media/audio_input_device_manager_unittest.cc",
"../browser/renderer_host/media/audio_input_sync_writer_unittest.cc",
"../browser/renderer_host/media/audio_output_device_enumerator_unittest.cc",
"../browser/renderer_host/media/audio_renderer_host_unittest.cc",
"../browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc",
"../browser/renderer_host/media/media_stream_manager_unittest.cc",
"../browser/renderer_host/media/media_stream_ui_proxy_unittest.cc",
"../browser/renderer_host/media/video_capture_buffer_pool_unittest.cc",
"../browser/renderer_host/media/video_capture_controller_unittest.cc",
"../browser/renderer_host/media/video_capture_device_client_unittest.cc",
"../browser/renderer_host/media/video_capture_host_unittest.cc",
"../browser/renderer_host/media/video_capture_manager_unittest.cc",
"../browser/renderer_host/render_process_host_unittest.cc",
"../browser/renderer_host/render_view_host_unittest.cc",
"../browser/renderer_host/render_widget_host_unittest.cc",
"../browser/renderer_host/render_widget_host_view_aura_unittest.cc",
"../browser/renderer_host/render_widget_host_view_base_unittest.cc",
"../browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm",
"../browser/renderer_host/render_widget_host_view_mac_unittest.mm",
"../browser/renderer_host/text_input_client_mac_unittest.mm",
"../browser/resolve_proxy_msg_helper_unittest.cc",
"../browser/service_worker/embedded_worker_instance_unittest.cc",
"../browser/service_worker/embedded_worker_test_helper.cc",
"../browser/service_worker/embedded_worker_test_helper.h",
"../browser/service_worker/link_header_support_unittest.cc",
"../browser/service_worker/service_worker_cache_writer_unittest.cc",
"../browser/service_worker/service_worker_context_core_unittest.cc",
"../browser/service_worker/service_worker_context_request_handler_unittest.cc",
"../browser/service_worker/service_worker_context_unittest.cc",
"../browser/service_worker/service_worker_controllee_request_handler_unittest.cc",
"../browser/service_worker/service_worker_database_unittest.cc",
"../browser/service_worker/service_worker_dispatcher_host_unittest.cc",
"../browser/service_worker/service_worker_handle_unittest.cc",
"../browser/service_worker/service_worker_job_unittest.cc",
"../browser/service_worker/service_worker_process_manager_unittest.cc",
"../browser/service_worker/service_worker_provider_host_unittest.cc",
"../browser/service_worker/service_worker_read_from_cache_job_unittest.cc",
"../browser/service_worker/service_worker_registration_unittest.cc",
"../browser/service_worker/service_worker_request_handler_unittest.cc",
"../browser/service_worker/service_worker_storage_unittest.cc",
"../browser/service_worker/service_worker_url_request_job_unittest.cc",
"../browser/service_worker/service_worker_version_unittest.cc",
"../browser/service_worker/service_worker_write_to_cache_job_unittest.cc",
"../browser/shareable_file_reference_unittest.cc",
"../browser/shared_worker/shared_worker_instance_unittest.cc",
"../browser/shared_worker/shared_worker_service_impl_unittest.cc",
"../browser/site_instance_impl_unittest.cc",
"../browser/startup_task_runner_unittest.cc",
"../browser/storage_partition_impl_map_unittest.cc",
"../browser/storage_partition_impl_unittest.cc",
"../browser/streams/stream_unittest.cc",
"../browser/streams/stream_url_request_job_unittest.cc",
"../browser/tracing/background_tracing_config_unittest.cc",
"../browser/wake_lock/wake_lock_service_context_unittest.cc",
"../browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc",
"../browser/web_contents/aura/overscroll_window_animation_unittest.cc",
"../browser/web_contents/aura/overscroll_window_delegate_unittest.cc",
"../browser/web_contents/web_contents_delegate_unittest.cc",
"../browser/web_contents/web_contents_impl_unittest.cc",
"../browser/web_contents/web_contents_user_data_unittest.cc",
"../browser/web_contents/web_contents_view_aura_unittest.cc",
"../browser/web_contents/web_contents_view_mac_unittest.mm",
"../browser/web_contents/web_drag_dest_mac_unittest.mm",
"../browser/web_contents/web_drag_source_mac_unittest.mm",
"../browser/websockets/websocket_manager_unittest.cc",
"../browser/webui/url_data_manager_backend_unittest.cc",
"../browser/webui/web_ui_data_source_unittest.cc",
"../browser/webui/web_ui_message_handler_unittest.cc",
"../child/background_sync/background_sync_type_converters_unittest.cc",
"../child/blink_platform_impl_unittest.cc",
"../child/blob_storage/blob_consolidation_unittest.cc",
"../child/blob_storage/blob_transport_controller_unittest.cc",
"../child/dwrite_font_proxy/dwrite_font_proxy_win_unittest.cc",
"../child/dwrite_font_proxy/font_fallback_win_unittest.cc",
"../child/fileapi/webfilewriter_base_unittest.cc",
"../child/font_warmup_win_unittest.cc",
"../child/indexed_db/indexed_db_dispatcher_unittest.cc",
"../child/indexed_db/mock_webidbcallbacks.cc",
"../child/indexed_db/mock_webidbcallbacks.h",
"../child/indexed_db/webidbcursor_impl_unittest.cc",
"../child/notifications/notification_data_conversions_unittest.cc",
"../child/power_monitor_broadcast_source_unittest.cc",
"../child/resource_dispatcher_unittest.cc",
"../child/service_worker/service_worker_dispatcher_unittest.cc",
"../child/shared_memory_data_consumer_handle_unittest.cc",
"../child/shared_memory_received_data_factory_unittest.cc",
"../child/simple_webmimeregistry_impl_unittest.cc",
"../child/site_isolation_stats_gatherer_unittest.cc",
"../child/url_response_body_consumer_unittest.cc",
"../child/v8_value_converter_impl_unittest.cc",
"../child/web_data_consumer_handle_impl_unittest.cc",
"../child/web_url_loader_impl_unittest.cc",
"../child/worker_thread_registry_unittest.cc",
"../common/android/address_parser_unittest.cc",
"../common/android/gin_java_bridge_value_unittest.cc",
"../common/bluetooth/web_bluetooth_device_id_unittest.cc",
"../common/common_param_traits_unittest.cc",
"../common/cross_site_document_classifier_unittest.cc",
"../common/cursors/webcursor_unittest.cc",
"../common/database_connections_unittest.cc",
"../common/database_identifier_unittest.cc",
"../common/discardable_shared_memory_heap_unittest.cc",
"../common/dom_storage/dom_storage_map_unittest.cc",
"../common/fileapi/file_system_util_unittest.cc",
"../common/host_discardable_shared_memory_manager_unittest.cc",
"../common/host_shared_bitmap_manager_unittest.cc",
"../common/indexed_db/indexed_db_key_unittest.cc",
"../common/input/event_with_latency_info_unittest.cc",
"../common/input/gesture_event_stream_validator_unittest.cc",
"../common/input/input_param_traits_unittest.cc",
"../common/input/touch_event_stream_validator_unittest.cc",
"../common/inter_process_time_ticks_converter_unittest.cc",
"../common/mac/attributed_string_coder_unittest.mm",
"../common/mac/font_descriptor_unittest.mm",
"../common/manifest_util_unittest.cc",
"../common/navigation_params_unittest.cc",
"../common/one_writer_seqlock_unittest.cc",
"../common/origin_trials/trial_token_unittest.cc",
"../common/origin_trials/trial_token_validator_unittest.cc",
"../common/origin_util_unittest.cc",
"../common/page_state_serialization_unittest.cc",
"../common/page_zoom_unittest.cc",
"../common/plugin_list_unittest.cc",
"../common/sandbox_mac_compiler_unittest.mm",
"../common/sandbox_mac_diraccess_unittest.mm",
"../common/sandbox_mac_fontloading_unittest.mm",
"../common/sandbox_mac_system_access_unittest.mm",
"../common/sandbox_mac_unittest_helper.h",
"../common/sandbox_mac_unittest_helper.mm",
"../common/service_worker/service_worker_utils_unittest.cc",
"../common/webplugininfo_unittest.cc",
"../renderer/android/disambiguation_popup_helper_unittest.cc",
"../renderer/android/email_detector_unittest.cc",
"../renderer/android/phone_number_detector_unittest.cc",
"../renderer/bmp_image_decoder_unittest.cc",
"../renderer/categorized_worker_pool_unittest.cc",
"../renderer/device_sensors/device_light_event_pump_unittest.cc",
"../renderer/device_sensors/device_motion_event_pump_unittest.cc",
"../renderer/device_sensors/device_orientation_event_pump_unittest.cc",
"../renderer/dom_storage/dom_storage_cached_area_unittest.cc",
"../renderer/gpu/compositor_forwarding_message_filter_unittest.cc",
"../renderer/gpu/frame_swap_message_queue_unittest.cc",
"../renderer/gpu/queue_message_swap_promise_unittest.cc",
"../renderer/gpu/render_widget_compositor_unittest.cc",
"../renderer/ico_image_decoder_unittest.cc",
"../renderer/input/input_event_filter_unittest.cc",
"../renderer/input/main_thread_event_queue_unittest.cc",
"../renderer/manifest/manifest_parser_unittest.cc",
"../renderer/media/android/media_info_loader_unittest.cc",
"../renderer/media/audio_message_filter_unittest.cc",
"../renderer/media/audio_renderer_mixer_manager_unittest.cc",
"../renderer/media/audio_renderer_sink_cache_unittest.cc",
"../renderer/media/midi_message_filter_unittest.cc",
"../renderer/media/mock_audio_device_factory.cc",
"../renderer/media/mock_audio_device_factory.h",
"../renderer/media/render_media_client_unittest.cc",
"../renderer/media/render_media_log_unittest.cc",
"../renderer/media/video_capture_impl_manager_unittest.cc",
"../renderer/media/video_capture_impl_unittest.cc",
"../renderer/media/video_capture_message_filter_unittest.cc",
"../renderer/media/webmediaplayer_ms_unittest.cc",
"../renderer/peripheral_content_heuristic_unittest.cc",
"../renderer/render_thread_impl_unittest.cc",
"../renderer/render_widget_unittest.cc",
"../renderer/scheduler/resource_dispatch_throttler_unittest.cc",
"../renderer/screen_orientation/screen_orientation_dispatcher_unittest.cc",
"../renderer/skia_benchmarking_extension_unittest.cc",
"fileapi_test_file_set.cc",
"fileapi_test_file_set.h",
"image_decoder_test.cc",
"image_decoder_test.h",
"run_all_unittests.cc",
]
if (is_android || is_linux || is_mac || is_win) {
data = [
"$root_out_dir/content_shell.pak",
"data/",
"//media/test/data/",
]
}
configs += [ "//build/config:precompiled_headers" ]
deps = [
":content_test_mojo_bindings",
":test_support",
"//base/test:test_support",
"//base/third_party/dynamic_annotations",
"//cc",
"//cc:test_support",
"//cc/ipc",
"//cc/surfaces",
"//components/display_compositor",
"//content:resources",
"//content/app:both_for_content_tests",
"//content/browser:for_content_tests",
"//content/browser/cache_storage:cache_storage_proto",
"//content/browser/notifications:notification_proto",
"//content/browser/service_worker:service_worker_proto",
"//content/browser/speech/proto",
"//content/child:for_content_tests",
"//content/gpu",
"//content/public/browser",
"//content/public/child",
"//content/public/common",
"//content/public/renderer",
"//content/renderer:for_content_tests",
"//crypto",
"//device/battery",
"//device/battery:mojo_bindings",
"//device/bluetooth",
"//device/bluetooth:mocks",
"//device/gamepad",
"//device/gamepad:test_helpers",
"//device/sensors/public/interfaces",
"//gin",
"//gpu",
"//gpu:test_support",
"//ipc:test_support",
"//media:shared_memory_support",
"//media:test_support",
"//media/audio:test_support",
"//media/base:test_support",
"//media/blink",
"//media/capture",
"//media/midi:midi",
"//mojo/edk/test:test_support",
"//mojo/public/cpp/bindings",
"//net:extras",
"//net:test_support",
"//ppapi/c",
"//printing",
"//skia",
"//sql",
"//sql:test_support",
"//storage/browser",
"//storage/common",
"//testing/gmock",
"//testing/gtest",
"//third_party/WebKit/public:blink",
"//third_party/icu",
"//third_party/leveldatabase",
"//third_party/libjingle",
"//third_party/re2",
"//third_party/widevine/cdm:version_h",
"//ui/accessibility",
"//ui/base:test_support",
"//ui/compositor:test_support",
"//ui/display",
"//ui/display:test_support",
"//ui/events:gesture_detection",
"//ui/events:test_support",
"//ui/events/blink",
"//ui/gfx:test_support",
"//ui/gfx/geometry",
"//ui/gfx/ipc",
"//ui/gfx/ipc/skia",
"//ui/gl",
"//ui/gl:test_support",
]
data_deps = [
"//third_party/mesa:osmesa",
]
if (!is_win) {
sources += [ "../browser/file_descriptor_info_impl_unittest.cc" ]
}
if (enable_plugins) {
# Put WebRTC-related plugins sources in the "enable_webrtc &&
# enable_plugins" section below.
sources += [
"../browser/renderer_host/pepper/browser_ppapi_host_test.cc",
"../browser/renderer_host/pepper/browser_ppapi_host_test.h",
"../browser/renderer_host/pepper/pepper_file_system_browser_host_unittest.cc",
"../browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc",
"../browser/renderer_host/pepper/pepper_printing_host_unittest.cc",
"../browser/renderer_host/pepper/quota_reservation_unittest.cc",
"../renderer/pepper/event_conversion_unittest.cc",
"../renderer/pepper/host_var_tracker_unittest.cc",
"../renderer/pepper/mock_resource.h",
"../renderer/pepper/pepper_broker_unittest.cc",
"../renderer/pepper/plugin_instance_throttler_impl_unittest.cc",
"../renderer/pepper/v8_var_converter_unittest.cc",
]
deps += [
"//ppapi/host",
"//ppapi/proxy:test_support",
"//ppapi/shared_impl:test_support",
]
}
if (enable_webrtc) {
# Put WebRTC-related plugins sources in the "enable_webrtc &&
# enable_plugins" section below.
sources += [
"../browser/renderer_host/p2p/socket_host_tcp_server_unittest.cc",
"../browser/renderer_host/p2p/socket_host_tcp_unittest.cc",
"../browser/renderer_host/p2p/socket_host_test_utils.cc",
"../browser/renderer_host/p2p/socket_host_test_utils.h",
"../browser/renderer_host/p2p/socket_host_udp_unittest.cc",
"../browser/webrtc/webrtc_eventlog_host_unittest.cc",
"../browser/webrtc/webrtc_internals_unittest.cc",
"../renderer/media/audio_repetition_detector_unittest.cc",
"../renderer/media/audio_track_recorder_unittest.cc",
"../renderer/media/canvas_capture_handler_unittest.cc",
"../renderer/media/gpu/rtc_video_decoder_unittest.cc",
"../renderer/media/gpu/rtc_video_encoder_unittest.cc",
"../renderer/media/html_audio_element_capturer_source_unittest.cc",
"../renderer/media/html_video_element_capturer_source_unittest.cc",
"../renderer/media/media_recorder_handler_unittest.cc",
"../renderer/media/media_stream_audio_processor_unittest.cc",
"../renderer/media/media_stream_audio_unittest.cc",
"../renderer/media/media_stream_constraints_util_unittest.cc",
"../renderer/media/media_stream_dispatcher_unittest.cc",
"../renderer/media/media_stream_video_capturer_source_unittest.cc",
"../renderer/media/media_stream_video_renderer_sink_unittest.cc",
"../renderer/media/media_stream_video_source_unittest.cc",
"../renderer/media/media_stream_video_track_unittest.cc",
"../renderer/media/mock_constraint_factory.cc",
"../renderer/media/mock_media_stream_registry.cc",
"../renderer/media/mock_media_stream_registry.h",
"../renderer/media/mock_media_stream_video_sink.cc",
"../renderer/media/mock_media_stream_video_sink.h",
"../renderer/media/mock_media_stream_video_source.cc",
"../renderer/media/mock_media_stream_video_source.h",
"../renderer/media/peer_connection_tracker_unittest.cc",
"../renderer/media/rtc_data_channel_handler_unittest.cc",
"../renderer/media/rtc_peer_connection_handler_unittest.cc",
"../renderer/media/speech_recognition_audio_sink_unittest.cc",
"../renderer/media/user_media_client_impl_unittest.cc",
"../renderer/media/video_track_recorder_unittest.cc",
"../renderer/media/webrtc/media_stream_remote_video_source_unittest.cc",
"../renderer/media/webrtc/media_stream_track_metrics_unittest.cc",
"../renderer/media/webrtc/peer_connection_dependency_factory_unittest.cc",
"../renderer/media/webrtc/processed_local_audio_source_unittest.cc",
"../renderer/media/webrtc/stun_field_trial_unittest.cc",
"../renderer/media/webrtc/webrtc_media_stream_adapter_unittest.cc",
"../renderer/media/webrtc/webrtc_video_capturer_adapter_unittest.cc",
"../renderer/media/webrtc_audio_renderer_unittest.cc",
"../renderer/media/webrtc_local_audio_source_provider_unittest.cc",
"../renderer/media/webrtc_uma_histograms_unittest.cc",
"../renderer/p2p/filtering_network_manager_unittest.cc",
"../renderer/p2p/ipc_network_manager_unittest.cc",
"//third_party/webrtc/base/task_queue_unittest.cc",
]
deps += [
"//third_party/libjingle:libjingle_webrtc",
"//third_party/webrtc/api:libjingle_peerconnection",
"//third_party/webrtc/base:rtc_base",
"//third_party/webrtc/media:rtc_media",
"//third_party/webrtc/modules/desktop_capture:primitives",
"//third_party/webrtc/modules/video_capture",
"//ui/shell_dialogs:shell_dialogs",
]
if (is_linux || is_mac || is_win) {
sources +=
[ "../browser/media/capture/desktop_capture_device_unittest.cc" ]
deps += [ "//third_party/webrtc/modules/desktop_capture" ]
}
if (is_chromeos) {
sources +=
[ "../browser/media/capture/desktop_capture_device_aura_unittest.cc" ]
}
if (is_chromecast) {
sources -= [
"../renderer/media/audio_track_recorder_unittest.cc",
"../renderer/media/media_recorder_handler_unittest.cc",
"../renderer/media/video_track_recorder_unittest.cc",
]
}
}
if (enable_webrtc && enable_plugins) {
sources += [
"../renderer/media/pepper_to_video_track_adapter_unittest.cc",
"../renderer/media/video_track_to_pepper_adapter_unittest.cc",
]
}
if (enable_web_speech) {
sources += [
"../browser/speech/chunked_byte_buffer_unittest.cc",
"../browser/speech/endpointer/endpointer_unittest.cc",
"../browser/speech/speech_recognition_engine_unittest.cc",
"../browser/speech/speech_recognizer_impl_unittest.cc",
]
}
if (is_linux) {
if (use_dbus) {
deps += [ "//dbus:test_support" ]
}
}
if (is_win) {
deps += [ "//third_party/iaccessible2" ]
libs = [ "dwrite.lib" ]
}
if (is_mac) {
deps += [
"//third_party/mozilla",
"//third_party/ocmock",
"//ui/accelerated_widget_mac",
]
}
if (is_chromeos) {
deps += [ "//chromeos" ]
}
if (is_android) {
sources += [
"../browser/android/java/gin_java_method_invocation_helper_unittest.cc",
"../browser/android/java/java_type_unittest.cc",
"../browser/android/java/jni_helper_unittest.cc",
"../browser/android/url_request_content_job_unittest.cc",
"../renderer/java/gin_java_bridge_value_converter_unittest.cc",
"../renderer/media/android/stream_texture_wrapper_impl_unittest.cc",
"../renderer/media/android/webmediasession_android_unittest.cc",
]
sources -= [
"../browser/power_usage_monitor_impl_unittest.cc",
"../browser/webui/url_data_manager_backend_unittest.cc",
]
deps -= [ "//device/battery" ]
deps += [
"//base:base_java_unittest_support",
"//content/public/android:content_java",
"//device/geolocation:geolocation_java",
"//v8:v8_external_startup_data_assets",
]
defines += [ "APPCACHE_USE_SIMPLE_CACHE" ]
}
if (!is_android) {
deps += [ "//third_party/libvpx" ]
}
if (use_aura) {
deps += [
"//services/ui/public/cpp/tests:unittest_support",
"//ui/aura:test_support",
"//ui/aura_extra",
"//ui/wm",
]
sources += [ "../renderer/mus/compositor_mus_connection_unittest.cc" ]
} else {
sources -= [
"../browser/renderer_host/render_widget_host_view_aura_unittest.cc",
"../browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc",
"../browser/web_contents/aura/overscroll_window_animation_unittest.cc",
"../browser/web_contents/aura/overscroll_window_delegate_unittest.cc",
"../browser/web_contents/web_contents_view_aura_unittest.cc",
]
}
# Avoid windows due to non-availability of cursor resources in test.
if (!use_aura || is_win) {
sources -= [ "../browser/media/capture/cursor_renderer_aura_unittest.cc" ]
}
if (use_aura || toolkit_views) {
deps += [ "//ui/events:test_support" ]
}
if (!use_aura && !is_mac) {
sources -= [
"../browser/compositor/reflector_impl_unittest.cc",
"../browser/compositor/software_browser_compositor_output_surface_unittest.cc",
]
}
if (!is_win && !is_mac) {
sources -= [ "../common/plugin_list_unittest.cc" ]
}
if (use_ozone) {
deps += [ "//ui/ozone" ]
} else {
sources -=
[ "../browser/compositor/software_output_device_ozone_unittest.cc" ]
}
if (is_mac) {
deps += [ "//third_party/boringssl" ]
}
if (use_x11) {
deps += [ "//ui/gfx/x" ]
}
}
test("content_perftests") {
# See comment at the top of //content/BUILD.gn for why this is disabled in
# component builds.
if (is_component_build) {
check_includes = false
}
sources = [
"../browser/renderer_host/input/input_router_impl_perftest.cc",
"../common/discardable_shared_memory_heap_perftest.cc",
"../test/run_all_perftests.cc",
]
deps = [
"//base/test:test_support",
"//cc",
"//cc/ipc",
"//content/browser:for_content_tests",
"//content/public/browser",
"//content/public/common",
"//content/test:test_support",
"//skia",
"//testing/gtest",
"//testing/perf",
"//ui/events/blink",
"//ui/gfx",
"//ui/gfx/geometry",
]
if (is_android) {
deps += [ "//testing/android/native_test:native_test_native_code" ]
}
}
group("fuzzers") {
deps = [
"//content/test/fuzzer",
]
}