OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
| 5 import("//services/catalog/public/tools/catalog.gni") |
5 import("//services/service_manager/public/service_manifest.gni") | 6 import("//services/service_manager/public/service_manifest.gni") |
6 import("//testing/test.gni") | 7 import("//testing/test.gni") |
7 | 8 |
8 group("tests") { | |
9 testonly = true | |
10 deps = [ | |
11 ":preferences_unittests", | |
12 ] | |
13 } | |
14 | |
15 service_manifest("manifest") { | 9 service_manifest("manifest") { |
16 name = "preferences2" | 10 name = "preferences2" |
17 source = "manifest.json" | 11 source = "manifest.json" |
18 } | 12 } |
19 | 13 |
20 source_set("preferences") { | 14 source_set("preferences") { |
21 public_deps = [ | 15 public_deps = [ |
22 "//services/preferences/public/interfaces", | 16 "//services/preferences/public/interfaces", |
23 ] | 17 ] |
24 deps = [ | 18 deps = [ |
25 "//components/prefs", | 19 "//components/prefs", |
26 ] | 20 ] |
27 sources = [ | 21 sources = [ |
28 "persistent_pref_store_factory.cc", | 22 "persistent_pref_store_factory.cc", |
29 "persistent_pref_store_factory.h", | 23 "persistent_pref_store_factory.h", |
30 "persistent_pref_store_impl.cc", | 24 "persistent_pref_store_impl.cc", |
31 "persistent_pref_store_impl.h", | 25 "persistent_pref_store_impl.h", |
32 ] | 26 ] |
33 } | 27 } |
34 | 28 |
35 test("preferences_unittests") { | 29 source_set("tests") { |
| 30 testonly = true |
36 deps = [ | 31 deps = [ |
37 ":preferences", | 32 ":preferences", |
38 "//base", | 33 "//base", |
39 "//base/test:test_support", | 34 "//base/test:test_support", |
40 "//components/prefs:test_support", | 35 "//components/prefs:test_support", |
41 "//mojo/edk/test:run_all_unittests", | |
42 "//mojo/public/cpp/bindings:bindings", | 36 "//mojo/public/cpp/bindings:bindings", |
43 "//services/preferences/public/cpp", | 37 "//services/preferences/public/cpp", |
44 "//services/preferences/public/cpp/tests", | 38 "//services/preferences/public/cpp/tests", |
45 "//services/preferences/public/interfaces", | 39 "//services/preferences/public/interfaces", |
| 40 "//services/service_manager/public/cpp", |
46 "//testing/gmock", | 41 "//testing/gmock", |
47 "//testing/gtest", | 42 "//testing/gtest", |
48 ] | 43 ] |
49 sources = [ | 44 sources = [ |
50 "persistent_pref_store_impl_unittest.cc", | 45 "persistent_pref_store_impl_unittest.cc", |
51 ] | 46 ] |
| 47 if (!is_ios) { |
| 48 sources += [ "pref_service_factory_unittest.cc" ] |
| 49 deps += [ "//services/service_manager/public/cpp:service_test_support" ] |
| 50 } |
52 } | 51 } |
| 52 |
| 53 service_manifest("unittest_manifest") { |
| 54 name = "prefs_unittests" |
| 55 source = "unittest_manifest.json" |
| 56 packaged_services = [ ":manifest" ] |
| 57 } |
| 58 |
| 59 catalog("tests_catalog") { |
| 60 testonly = true |
| 61 embedded_services = [ ":unittest_manifest" ] |
| 62 } |
OLD | NEW |