blob: 2660761e898c7ddb688c8dd42f270268195a7fb2 [file] [log] [blame]
dyaroshevbd75dc342016-10-24 11:10:581# Copyright 2016 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
Scott Violet318a55f2018-03-30 19:08:195import("//printing/buildflags/buildflags.gni")
Wei Li4e2d1cb2017-11-07 21:23:006import("//services/catalog/public/tools/catalog.gni")
7import("//services/service_manager/public/service_manifest.gni")
8
dyaroshevbd75dc342016-10-24 11:10:589source_set("test_support") {
10 testonly = true
11
12 sources = [
13 "components_test_suite.cc",
14 "components_test_suite.h",
15 ]
16
17 deps = [
18 "//components/content_settings/core/common",
19 "//components/gcm_driver:gcm_driver",
20 "//components/signin/core/browser",
Ken Rockotec287c82018-03-15 23:05:4921 "//mojo/edk",
dyaroshevbd75dc342016-10-24 11:10:5822 "//net",
23 "//testing/gtest",
24 "//ui/base",
25 "//ui/resources:ui_test_pak",
26 ]
27
28 public_deps = [
29 "//base/test:test_support",
30 ]
31
32 if (!is_ios) {
33 deps += [
34 "//components/invalidation/impl",
35 "//components/policy/core/browser",
dyaroshevbd75dc342016-10-24 11:10:5836 "//ui/gl:test_support",
37 ]
38
39 public_deps += [ "//content/test:test_support" ]
40 }
41}
danakj8d87b632017-06-27 20:34:3542
43# Defines a main() function that uses components_test_suite.h
44source_set("run_all_unittests") {
45 testonly = true
46
47 sources = [
48 "run_all_unittests.cc",
49 ]
50
51 deps = [
52 ":test_support",
53 ]
Wei Li4e2d1cb2017-11-07 21:23:0054
Lei Zhang48a4a5262018-04-17 20:18:4455 if (enable_basic_printing) {
Wei Li4e2d1cb2017-11-07 21:23:0056 defines = [ "HAS_SERVICE_IN_UNIT_TEST" ]
57 deps += [
58 ":components_unittests_catalog_source",
59 "//services/catalog:lib",
60 ]
61 }
62}
63
Lei Zhang48a4a5262018-04-17 20:18:4464if (enable_basic_printing) {
Wei Li4e2d1cb2017-11-07 21:23:0065 # There is only one service in catalog, which depends on printing feature.
66 # When more services are added, the condition can be moved inside of catalog.
67 catalog("components_unittests_catalog") {
Ken Rockotec287c82018-03-15 23:05:4968 embedded_services = [
69 "//components/printing/service:pdf_compositor_service_unittest_manifest",
70 ]
Wei Li4e2d1cb2017-11-07 21:23:0071 }
72
73 catalog_cpp_source("components_unittests_catalog_source") {
74 testonly = true
75 catalog = ":components_unittests_catalog"
76 generated_function_name = "components::CreateUnittestsCatalog"
77 }
danakj8d87b632017-06-27 20:34:3578}