chromium/components/offline_pages/task/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.

if (is_android) {
  import("//build/config/android/rules.gni")
}

static_library("task") {
  sources = [
    "closure_task.cc",
    "closure_task.h",
    "sql_callback_task.cc",
    "sql_callback_task.h",
    "sql_store_base.cc",
    "sql_store_base.h",
    "task.cc",
    "task.h",
    "task_queue.cc",
    "task_queue.h",
  ]

  deps = [
    "//base",
    "//sql",
  ]
}

static_library("test_support") {
  testonly = true
  sources = [
    "task_test_base.cc",
    "task_test_base.h",
    "test_task.cc",
    "test_task.h",
    "test_task_runner.cc",
    "test_task_runner.h",
  ]

  deps = [
    ":task",
    "//base",
    "//base/test:test_support",
    "//testing/gmock",
    "//testing/gtest",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "task_queue_unittest.cc",
    "task_unittest.cc",
  ]

  deps = [
    ":task",
    ":test_support",
    "//base",
    "//base/test:test_support",
    "//testing/gtest",
  ]
}