| 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("//build/config/ui.gni") | 
| 5 import("//services/catalog/public/tools/catalog.gni") | 6 import("//services/catalog/public/tools/catalog.gni") | 
| 6 import("//services/service_manager/public/tools/test/service_test.gni") | 7 import("//services/service_manager/public/tools/test/service_test.gni") | 
| 7 import("//testing/test.gni") | 8 import("//testing/test.gni") | 
| 8 | 9 | 
| 9 # One Big Target for services to register their unit test sources. This exists | 10 # One Big Target for services to register their unit test sources. This exists | 
| 10 # to avoid having to maintain a separate test binary for every service. | 11 # to avoid having to maintain a separate test binary for every service. | 
| 11 # | 12 # | 
| 12 # To add tests for a new service, please define a "tests" source_set in the | 13 # To add tests for a new service, please define a "tests" source_set in the | 
| 13 # service subdirectory and add it as a dependency here. If your unit tests | 14 # service subdirectory and add it as a dependency here. If your unit tests | 
| 14 # use the ServiceTest framework, you must also include corresponding catalog | 15 # use the ServiceTest framework, you must also include corresponding catalog | 
| 15 # entries in the "service_unittests_catalog" target below. | 16 # entries in the "service_unittests_catalog" target below. | 
| 16 service_test("service_unittests") { | 17 service_test("service_unittests") { | 
| 17   deps = [ | 18   deps = [ | 
| 18     "//services/data_decoder:tests", | 19     "//services/data_decoder:tests", | 
| 19     "//services/device:tests", | 20     "//services/device:tests", | 
| 20     "//services/identity:tests", | 21     "//services/identity:tests", | 
| 21     "//services/preferences:tests", | 22     "//services/preferences:tests", | 
| 22     "//services/resource_coordinator:tests", | 23     "//services/resource_coordinator:tests", | 
| 23     "//services/shape_detection:tests", | 24     "//services/shape_detection:tests", | 
| 24   ] | 25   ] | 
| 25 | 26 | 
|  | 27   if (use_aura) { | 
|  | 28     deps += [ "//services/ui/clipboard:tests" ] | 
|  | 29   } | 
|  | 30 | 
| 26   if (is_android) { | 31   if (is_android) { | 
| 27     deps += [ | 32     deps += [ | 
| 28       "//services/device:java", | 33       "//services/device:java", | 
| 29 | 34 | 
| 30       # Some tests need to initialize V8. | 35       # Some tests need to initialize V8. | 
| 31       "//v8:v8_external_startup_data_assets", | 36       "//v8:v8_external_startup_data_assets", | 
| 32     ] | 37     ] | 
| 33   } else { | 38   } else { | 
| 34     # NOTE: We do not currently support standalone service binaries on Android, | 39     # NOTE: We do not currently support standalone service binaries on Android, | 
| 35     # so any tests which use the ServiceTest framework to connect to standalone | 40     # so any tests which use the ServiceTest framework to connect to standalone | 
| 36     # services must be added here. | 41     # services must be added here. | 
| 37     deps += [ "//services/video_capture:tests" ] | 42     deps += [ "//services/video_capture:tests" ] | 
| 38   } | 43   } | 
| 39 | 44 | 
| 40   catalog = ":service_unittests_catalog" | 45   catalog = ":service_unittests_catalog" | 
| 41 } | 46 } | 
| 42 | 47 | 
| 43 catalog("service_unittests_catalog") { | 48 catalog("service_unittests_catalog") { | 
| 44   testonly = true | 49   testonly = true | 
| 45   catalog_deps = [ | 50   catalog_deps = [ | 
| 46     "//services/device:tests_catalog", | 51     "//services/device:tests_catalog", | 
| 47     "//services/identity:tests_catalog", | 52     "//services/identity:tests_catalog", | 
| 48     "//services/preferences:tests_catalog", | 53     "//services/preferences:tests_catalog", | 
| 49     "//services/video_capture:tests_catalog", | 54     "//services/video_capture:tests_catalog", | 
| 50   ] | 55   ] | 
|  | 56 | 
|  | 57   if (use_aura) { | 
|  | 58     catalog_deps += [ "//services/ui/clipboard:tests_catalog" ] | 
|  | 59   } | 
| 51 } | 60 } | 
| 52 | 61 | 
| 53 if (is_android) { | 62 if (is_android) { | 
| 54   junit_binary("service_junit_tests") { | 63   junit_binary("service_junit_tests") { | 
| 55     java_files = [ "device/generic_sensor/android/junit/src/org/chromium/device/
    sensors/PlatformSensorAndProviderTest.java" ] | 64     java_files = [ "device/generic_sensor/android/junit/src/org/chromium/device/
    sensors/PlatformSensorAndProviderTest.java" ] | 
| 56     deps = [ | 65     deps = [ | 
| 57       "//base:base_java", | 66       "//base:base_java", | 
| 58       "//base:base_java_test_support", | 67       "//base:base_java_test_support", | 
| 59       "//device/generic_sensor:java", | 68       "//device/generic_sensor:java", | 
| 60       "//device/generic_sensor/public/interfaces:interfaces_java", | 69       "//device/generic_sensor/public/interfaces:interfaces_java", | 
| 61       "//mojo/public/java:bindings_java", | 70       "//mojo/public/java:bindings_java", | 
| 62       "//third_party/android_tools:android_support_annotations_java", | 71       "//third_party/android_tools:android_support_annotations_java", | 
| 63     ] | 72     ] | 
| 64   } | 73   } | 
| 65 } | 74 } | 
| OLD | NEW | 
|---|