| # 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/test/test_package.gni") |
| import("//build/testing/environments.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") { |
| 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/lib/fxl", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gtest", |
| "//zircon/public/lib/fit", |
| ] |
| |
| data_deps = [ "//src/fonts:downstream_test_deps" ] |
| } |
| |
| executable("web_runner_pixel_tests") { |
| 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/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" ] |
| } |
| |
| test_package("web_runner_tests") { |
| deps = [ |
| ":web_runner_integration_tests", |
| ":web_runner_pixel_tests", |
| |
| # 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", |
| ] |
| |
| tests = [ |
| { |
| name = "web_runner_integration_tests" |
| manifest = rebase_path("meta/web_runner_integration_tests.cmx") |
| |
| # fxbug.dev/33778 |
| # environments = basic_envs |
| # This does not seem to flake on NUCs. |
| environments = [ nuc_env ] |
| }, |
| { |
| name = "web_runner_pixel_tests" |
| manifest = rebase_path("meta/web_runner_pixel_tests.cmx") |
| environments = [ nuc_env ] |
| }, |
| ] |
| |
| resources = [ |
| { |
| path = rebase_path("data/dynamic.html") |
| dest = "dynamic.html" |
| }, |
| { |
| path = rebase_path("data/static.html") |
| dest = "static.html" |
| }, |
| { |
| path = rebase_path("data/video.html") |
| dest = "video.html" |
| }, |
| { |
| path = rebase_path( |
| "//garnet/test_data/media/third_party/chromium_media_test_data/blackwhite_yuv420p.webm") |
| dest = "blackwhite_yuv420p.webm" |
| }, |
| ] |
| } |
| |
| 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", |
| ] |
| } |