dyaroshev | bd75dc34 | 2016-10-24 11:10:58 | [diff] [blame] | 1 | # 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 Violet | 318a55f | 2018-03-30 19:08:19 | [diff] [blame] | 5 | import("//printing/buildflags/buildflags.gni") |
Wei Li | 4e2d1cb | 2017-11-07 21:23:00 | [diff] [blame] | 6 | import("//services/catalog/public/tools/catalog.gni") |
| 7 | import("//services/service_manager/public/service_manifest.gni") |
| 8 | |
dyaroshev | bd75dc34 | 2016-10-24 11:10:58 | [diff] [blame] | 9 | source_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 Rockot | ec287c8 | 2018-03-15 23:05:49 | [diff] [blame] | 21 | "//mojo/edk", |
dyaroshev | bd75dc34 | 2016-10-24 11:10:58 | [diff] [blame] | 22 | "//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", |
dyaroshev | bd75dc34 | 2016-10-24 11:10:58 | [diff] [blame] | 36 | "//ui/gl:test_support", |
| 37 | ] |
| 38 | |
| 39 | public_deps += [ "//content/test:test_support" ] |
| 40 | } |
| 41 | } |
danakj | 8d87b63 | 2017-06-27 20:34:35 | [diff] [blame] | 42 | |
| 43 | # Defines a main() function that uses components_test_suite.h |
| 44 | source_set("run_all_unittests") { |
| 45 | testonly = true |
| 46 | |
| 47 | sources = [ |
| 48 | "run_all_unittests.cc", |
| 49 | ] |
| 50 | |
| 51 | deps = [ |
| 52 | ":test_support", |
| 53 | ] |
Wei Li | 4e2d1cb | 2017-11-07 21:23:00 | [diff] [blame] | 54 | |
Lei Zhang | 48a4a526 | 2018-04-17 20:18:44 | [diff] [blame] | 55 | if (enable_basic_printing) { |
Wei Li | 4e2d1cb | 2017-11-07 21:23:00 | [diff] [blame] | 56 | defines = [ "HAS_SERVICE_IN_UNIT_TEST" ] |
| 57 | deps += [ |
| 58 | ":components_unittests_catalog_source", |
| 59 | "//services/catalog:lib", |
| 60 | ] |
| 61 | } |
| 62 | } |
| 63 | |
Lei Zhang | 48a4a526 | 2018-04-17 20:18:44 | [diff] [blame] | 64 | if (enable_basic_printing) { |
Wei Li | 4e2d1cb | 2017-11-07 21:23:00 | [diff] [blame] | 65 | # 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 Rockot | ec287c8 | 2018-03-15 23:05:49 | [diff] [blame] | 68 | embedded_services = [ |
| 69 | "//components/printing/service:pdf_compositor_service_unittest_manifest", |
| 70 | ] |
Wei Li | 4e2d1cb | 2017-11-07 21:23:00 | [diff] [blame] | 71 | } |
| 72 | |
| 73 | catalog_cpp_source("components_unittests_catalog_source") { |
| 74 | testonly = true |
| 75 | catalog = ":components_unittests_catalog" |
| 76 | generated_function_name = "components::CreateUnittestsCatalog" |
| 77 | } |
danakj | 8d87b63 | 2017-06-27 20:34:35 | [diff] [blame] | 78 | } |