naiveproxy/chrome/test/media_router/BUILD.gn
2018-12-09 21:59:24 -05:00

171 lines
4.4 KiB
Plaintext

# 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.
declare_args() {
# Many of the targets defined in this file have dependencies that cannot be
# satisfied without additional downstream resources. Explicitly guard them
# them behind this flag so that we do not attempt to build or isolate targets
# in public chromium checkouts.
enable_downstream_media_tests = false
}
source_set("browser_tests") {
testonly = true
defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
sources = [
"media_router_e2e_browsertest.cc",
"media_router_e2e_browsertest.h",
"media_router_e2e_ui_browsertest.cc",
"media_router_integration_browsertest.cc",
"media_router_integration_browsertest.h",
"media_router_integration_ui_browsertest.cc",
"media_router_one_ua_integration_browsertest.cc",
]
deps = [
":test_support",
"//chrome/app:generated_resources",
"//chrome/browser",
"//chrome/browser/media/router",
"//chrome/browser/ui",
"//chrome/common",
"//chrome/common/media_router:router",
"//chrome/test:test_support_ui",
"//content/public/browser",
"//content/test:test_support",
"//media:test_support",
"//net",
"//net:test_support",
"//testing/gtest",
"//ui/base",
"//url",
]
data_deps = [
":browser_test_resources",
"//chrome/browser/resources/media_router/extension:media_router",
]
data = [
"$root_gen_dir/chrome/browser/resources/media_router/extension/",
]
}
copy("browser_test_resources") {
testonly = true
sources = [
"resources/basic_test.html",
"resources/close_route_with_error_on_send.json",
"resources/common.js",
"resources/fail_create_route.json",
"resources/fail_reconnect_session.html",
"resources/fail_reconnect_session.json",
"resources/local_media_sink.json",
"resources/local_media_sink_route_fail.json",
"resources/no_presentation_receiver.html",
"resources/no_provider.json",
"resources/no_sinks.json",
"resources/no_supported_sinks.json",
"resources/presentation_receiver.html",
"resources/route_creation_timed_out.json",
]
outputs = [
"$root_out_dir/media_router/browser_test_resources/{{source_file_part}}",
]
}
# Run separately from the Chromium waterfall with the external component
# extension. See README.md
if (enable_downstream_media_tests) {
group("media_router_e2e_tests") {
testonly = true
data_deps = [
":browser_test_resources",
":e2e_test_resources",
"//chrome/test:browser_tests",
]
data = [
"$root_out_dir/mr_extension/",
"internal/",
]
}
}
copy("e2e_test_resources") {
testonly = true
sources = [
"../../../media/test/data/bear-vp9.webm",
"../../../media/test/data/player.html",
]
outputs = [
"$root_out_dir/media_router/browser_test_resources/{{source_file_part}}",
]
}
# Run separately. TODO: Documentation on how to run
if (enable_downstream_media_tests) {
group("swarming_tests") {
testonly = true
data_deps = [
":browser_test_resources",
"//chrome/test:browser_tests",
]
data = [
"internal/",
"$root_out_dir/mr_extension/",
]
}
}
source_set("test_support") {
testonly = true
sources = [
"media_router_base_browsertest.cc",
"media_router_base_browsertest.h",
"test_media_sinks_observer.cc",
"test_media_sinks_observer.h",
]
public_deps = [
"//base",
"//chrome/browser/extensions",
"//extensions/browser",
]
deps = [
"//chrome/browser/media/router",
"//chrome/browser/media/router:test_support",
"//chrome/common:constants",
"//chrome/test:test_support",
"//chrome/test:test_support_ui",
"//content/public/common",
"//content/test:test_support",
"//extensions/common",
"//testing/gtest",
]
}
if (enable_downstream_media_tests) {
group("media_router_perf_tests") {
testonly = true
data = [
"$root_out_dir/media_router/telemetry_extension/",
"$root_out_dir/mr_extension/release/",
"internal/",
"telemetry/",
]
deps = [
"//tools/perf:perf",
]
data_deps = [
":telemetry_extension_resources",
]
}
}
copy("telemetry_extension_resources") {
sources = [
"telemetry/extension/manifest.json",
"telemetry/extension/script.js",
]
outputs = [
"$root_out_dir/media_router/telemetry_extension/{{source_file_part}}",
]
}