| # 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/components.gni") |
| import("//build/testing/cc_test_executable.gni") |
| import("//build/testing/environments.gni") |
| import("//src/chromium/web_runner_tests/generate_web_runner_tests.gni") |
| |
| source_set("test_server") { |
| testonly = true |
| |
| sources = [ |
| "test_server.cc", |
| "test_server.h", |
| ] |
| |
| deps = [ |
| "//sdk/lib/fit", |
| "//src/lib/fxl", |
| ] |
| } |
| |
| 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", |
| ] |
| } |
| |
| cc_test_executable("web_runner_integration_tests_bin") { |
| testonly = true |
| |
| sources = [ "web_runner_integration_tests.cc" ] |
| |
| deps = [ |
| ":test_server", |
| "//sdk/fidl/fuchsia.web:fuchsia.web_hlcpp", |
| "//sdk/lib/fit", |
| "//sdk/lib/sys/component/cpp/testing:cpp", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/sys/cpp/testing:unit", |
| "//sdk/lib/syslog/cpp", |
| "//src/lib/fxl", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| "//third_party/googletest:gtest", |
| ] |
| |
| data_deps = [ "//src/fonts:downstream_test_deps($default_toolchain)" ] |
| } |
| |
| fuchsia_test_component("web_runner_integration_tests") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| deps = [ ":web_runner_integration_tests_bin" ] |
| manifest = "meta/web_runner_integration_tests.cml" |
| test_type = "chromium" |
| } |
| |
| fuchsia_test_package("web_runner_tests") { |
| test_components = [ ":web_runner_integration_tests" ] |
| |
| subpackages = [ "//src/ui/testing/test_ui_stack:test-ui-stack" ] |
| |
| deps = [ |
| # TODO(https://fxbug.dev/42070261): These should be provided by the Product |
| # configurations on which these tests run rather than as deps. |
| "//src/chromium:web_context_provider_for_test", |
| "//src/connectivity/network/netstack:component-debug", |
| "//src/developer/build_info/testing:fake-build-info-component", |
| "//src/media/testing/mock_profile_provider", |
| "//src/sys/stash:stash_secure_v2", |
| |
| # 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. |
| "//src/testing/fidl/intl_property_manager", |
| ] |
| |
| test_specs = { |
| environments = with_display_envs |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| if (is_debug) { |
| timeout_secs = 500 |
| } |
| } |
| } |
| |
| generate_web_runner_tests("tests") { |
| chromium_dir = "//src/chromium" |
| } |