# 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("chromium_context") {
  testonly = true

  sources = [
    "chromium_context.cc",
    "chromium_context.h",
  ]

  deps = [
    "//src/lib/fxl",
    "//third_party/googletest:gtest",
    "//zircon/public/lib/fdio",
  ]

  public_deps = [
    "//garnet/public/lib/component/cpp",
    "//topaz/runtime/chromium:chromium.web",
  ]
}

source_set("test_server") {
  testonly = true

  sources = [
    "test_server.cc",
    "test_server.h",
  ]

  deps = [
    "//src/lib/fxl",
    "//zircon/public/lib/fit",
  ]
}

executable("web_runner_integration_tests") {
  testonly = true

  sources = [
    "web_runner_integration_tests.cc",
  ]

  deps = [
    ":chromium_context",
    ":test_server",
    "//garnet/public/lib/component/cpp/testing",
    "//src/lib/fxl",
    "//garnet/public/lib/gtest",
    "//sdk/fidl/fuchsia.sys",
    "//third_party/googletest:gtest_main",
    "//zircon/public/lib/fit",
  ]
}

executable("web_runner_pixel_tests") {
  testonly = true

  sources = [
    "web_runner_pixel_tests.cc",
  ]

  deps = [
    ":chromium_context",
    ":test_server",
    "//garnet/public/lib/component/cpp",
    "//garnet/public/lib/fsl",
    "//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/ui/scenic/cpp",
    "//third_party/googletest:gtest_main",
    "//zircon/public/lib/fit",
  ]
}

#    {
#      name = "web_runner_integration_tests"
#      # FLK-148
#      # environments = basic_envs
#      # This does not seem to flake on NUCs.
#      environments = [
#        {
#          dimensions = {
#            device_type = "Intel NUC Kit NUC7i5DNHE"
#          }
#        },
#      ]
#    },

package("web_runner_tests") {
  testonly = true

  deps = [
    ":web_runner_integration_tests",
    ":web_runner_pixel_tests",
  ]

  tests = [
    {
      name = "web_runner_pixel_tests"
      environments = [
        {
          dimensions = {
            device_type = "Intel NUC Kit NUC7i5DNHE"
          }
        },
      ]
    },
  ]

  meta = [
    {
      path = rebase_path("meta/web_runner_integration_tests.cmx")
      dest = "web_runner_integration_tests.cmx"
    },
    {
      path = rebase_path("meta/web_runner_pixel_tests.cmx")
      dest = "web_runner_pixel_tests.cmx"
    },
  ]

  resources = [
    {
      path = rebase_path("data/dynamic.html")
      dest = "dynamic.html"
    },
    {
      path = rebase_path("data/static.html")
      dest = "static.html"
    },
  ]
}
