blob: 458373416897b4396f267d13ac8b6790774d889c [file] [log] [blame]
# Copyright 2018 The Fuchsia 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/package.gni")
import("//build/testing/environments.gni")
import("//src/sys/build/components.gni")
source_set("web_context") {
testonly = true
sources = [
"web_context.cc",
"web_context.h",
]
deps = [
"//sdk/lib/fdio",
"//sdk/lib/syslog/cpp",
"//third_party/googletest:gtest",
]
public_deps = [
"//sdk/fidl/fuchsia.web",
"//sdk/lib/sys/cpp",
]
}
source_set("test_server") {
testonly = true
sources = [
"test_server.cc",
"test_server.h",
]
deps = [
"//src/lib/fxl",
"//zircon/public/lib/fit",
]
}
source_set("mock_server") {
testonly = true
sources = [
"mock_get.cc",
"mock_get.h",
]
public_deps = [ ":test_server" ]
deps = [
"//sdk/lib/syslog/cpp",
"//src/lib/fxl",
"//third_party/googletest:gtest",
]
}
executable("web_runner_integration_tests_bin") {
testonly = true
sources = [ "web_runner_integration_tests.cc" ]
deps = [
":test_server",
":web_context",
"//garnet/public/lib/gtest",
"//sdk/fidl/fuchsia.sys",
"//sdk/lib/sys/cpp/testing:unit",
"//sdk/lib/syslog/cpp",
"//src/chromium/web_engine/meta/shards:web_engine_feature_network",
"//src/lib/fxl",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gtest",
"//zircon/public/lib/fit",
]
data_deps = [ "//src/fonts:downstream_test_deps($default_toolchain)" ]
}
executable("web_runner_pixel_tests_bin") {
testonly = true
sources = [ "web_runner_pixel_tests.cc" ]
deps = [
":mock_server",
":web_context",
"//garnet/public/lib/gtest",
"//sdk/fidl/fuchsia.sys",
"//sdk/fidl/fuchsia.ui.app",
"//sdk/fidl/fuchsia.ui.policy",
"//sdk/fidl/fuchsia.ui.scenic",
"//sdk/fidl/fuchsia.ui.views",
"//sdk/lib/sys/cpp",
"//sdk/lib/syslog/cpp",
"//sdk/lib/ui/scenic/cpp",
"//src/chromium/web_engine/meta/shards:web_engine_feature_hardware_video_decoder",
"//src/chromium/web_engine/meta/shards:web_engine_feature_network",
"//src/chromium/web_engine/meta/shards:web_engine_view",
"//src/lib/fsl",
"//src/lib/fxl",
"//src/lib/fxl/test:gtest_main",
"//src/lib/ui/base_view",
"//src/ui/testing/views",
"//third_party/googletest:gtest",
"//zircon/public/lib/fit",
]
data_deps = [ "//src/fonts:downstream_test_deps($default_toolchain)" ]
}
fuchsia_component("web_runner_integration_tests") {
testonly = true
deps = [ ":web_runner_integration_tests_bin" ]
manifest = "meta/web_runner_integration_tests.cmx"
}
fuchsia_component("web_runner_pixel_tests") {
testonly = true
deps = [ ":web_runner_pixel_tests_bin" ]
manifest = "meta/web_runner_pixel_tests.cmx"
}
resource("resources") {
sources = [
"//garnet/test_data/media/third_party/chromium_media_test_data/blackwhite_yuv420p.webm",
"data/dynamic.html",
"data/static.html",
"data/video.html",
]
outputs = [ "data/{{source_file_part}}" ]
}
fuchsia_test_package("web_runner_tests") {
test_components = [
":web_runner_integration_tests",
":web_runner_pixel_tests",
]
deps = [
":resources",
# Provides a fake implementation for `fuchsia.intl.ProfileProvider`. This
# just declares that the binary needs to be compiled, but doesn't actually
# add the package. That happens below in the "tests" group.
"//garnet/examples/intl/manager:intl_property_manager",
]
test_specs = {
environments = with_display_envs
}
}
group("tests") {
testonly = true
deps = [
":web_runner_tests",
"//src/chromium:web_engine",
"//src/chromium:web_runner",
# The deps below are necessary on minimal product configs.
"//src/graphics/bin/vulkan_loader",
# TODO(fxbug.dev/24643): Remove keyboard dispatch from Scenic
"//src/ui/bin/ime:ime_service",
"//src/ui/bin/root_presenter",
"//src/ui/scenic",
# This dependency is used to provide a fake `fuchsia.intl.PropertyProvider`.
"//garnet/examples/intl/manager:intl_property_manager",
]
}