chromium/media/learning/mojo/BUILD.gn

# Copyright 2018 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//testing/test.gni")

component("impl") {
  output_name = "media_learning_mojo_impl"
  sources = [
    "mojo_learning_task_controller_service.cc",
    "mojo_learning_task_controller_service.h",
  ]

  defines = [ "IS_MEDIA_LEARNING_MOJO_IMPL" ]

  deps = [
    "//base",
    "//media/learning/common",

    # Since the mojom target generates a source set by default, make sure that
    # everybody depends on it themselves.
    "//media/learning/mojo/public/mojom",
    "//mojo/public/cpp/bindings",
  ]

  public_deps = [ "//media/learning/mojo/public/cpp" ]

  configs += [ "//build/config/compiler:wexit_time_destructors" ]
}

# Unit Tests

source_set("unit_tests") {
  testonly = true

  sources = [ "mojo_learning_task_controller_service_unittest.cc" ]

  deps = [
    ":impl",
    "//base",
    "//base/test:test_support",
    "//media/learning/common",
    "//media/learning/mojo/public/cpp:unit_tests",
    "//media/learning/mojo/public/mojom",
    "//testing/gmock",
    "//testing/gtest",
  ]
}

test("media_learning_mojo_unittests") {
  deps = [
    ":unit_tests",
    "//mojo/core/test:run_all_unittests",
  ]
}