Revert "[M120 Migration]Fix for crash during chrome exit"
[platform/framework/web/chromium-efl.git] / services / BUILD.gn
1 # Copyright 2016 The Chromium Authors
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import("//build/config/features.gni")
6 import("//build/config/ui.gni")
7 import("//testing/test.gni")
8
9 # 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 #
12 # 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.
14 test("services_unittests") {
15   use_xvfb = use_xvfb_in_this_config
16
17   # The tracing unittests require this for testing unwinding. See
18   # stack_unwinder_android_unittest.cc.
19   if (is_android && can_unwind_with_cfi_table && is_official_build) {
20     add_unwind_tables_in_apk = true
21   }
22
23   # If your service does not run on iOS, its tests should go in the !iOS
24   # section below. If you are unsure, contact blundell@chromium.org.
25   deps = [
26     "//services/cert_verifier:tests",
27     "//services/cert_verifier/cert_net_url_loader:tests",
28     "//services/metrics/public/cpp:tests",
29     "//services/network:tests",
30     "//services/network/public/cpp:tests",
31     "//services/test:run_all_unittests",
32   ]
33
34   data_deps = [ "//testing/buildbot/filters:services_unittests_filters" ]
35
36   if (use_blink) {
37     deps += [
38       "//services/audio:tests",
39       "//services/data_decoder:tests",
40       "//services/device:tests",
41       "//services/image_annotation:tests",
42       "//services/image_annotation/public/cpp:tests",
43       "//services/media_session:tests",
44       "//services/media_session/public/cpp:tests",
45       "//services/on_device_model:tests",
46       "//services/preferences/tracked:unit_tests",
47       "//services/proxy_resolver:tests",
48       "//services/resource_coordinator:tests",
49       "//services/shape_detection:tests",
50       "//services/tracing:tests",
51       "//services/viz/privileged/mojom:unit_tests",
52       "//services/viz/public/cpp/compositing:tests",
53       "//services/viz/public/cpp/gpu:tests",
54       "//services/viz/public/cpp/hit_test:tests",
55       "//services/webnn:tests",
56     ]
57     if (is_ios) {
58       bundle_deps =
59           [ "//services/tracing:services_tracing_perfetto_bundle_data" ]
60     }
61   }
62
63   if (is_android && (current_cpu == "arm" || current_cpu == "arm64")) {
64     deps += [ "//base:base_profiler_test_support_library" ]
65   }
66
67   if (is_chromeos_ash || is_linux || is_fuchsia) {
68     deps += [ "//services/accessibility:tests" ]
69   }
70
71   if (is_win) {
72     deps += [ "//services/proxy_resolver_win:tests" ]
73   }
74
75   if (is_android) {
76     deps += [
77       "//components/signin/public/android:java",
78       "//services/data_decoder/public/cpp/android:safe_json_java",
79       "//services/device:java",
80       "//services/media_session/public/cpp/android:media_session_java",
81       "//services/tracing:tracing_test_helper_java",
82
83       # Some tests make network requests.
84       "//net/android:net_java",
85
86       # Some tests need to initialize V8.
87       "//gin:v8_snapshot_assets",
88     ]
89   }
90
91   if (!is_android && !is_ios) {
92     # NOTE: We do not currently support standalone service binaries on Android
93     # or iOS, so any tests which use the ServiceTest framework to connect to
94     # standalone services must be added here.
95     deps += [ "//services/video_capture:tests" ]
96   }
97
98   if (is_fuchsia) {
99     additional_manifest_fragments = [
100       "//build/config/fuchsia/test/mark_vmo_executable.shard.test-cml",
101       "//build/config/fuchsia/test/network.shard.test-cml",
102     ]
103   }
104 }
105
106 if (!is_ios) {
107   test("services_perftests") {
108     deps = [
109       "//services/device:perftests",
110       "//services/test:run_all_unittests",
111       "//services/viz/public/cpp/compositing:perftests",
112     ]
113   }
114 }
115
116 if (is_android) {
117   robolectric_binary("services_junit_tests") {
118     sources = [
119       "device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorAndProviderTest.java",
120       "device/geolocation/android/junit/src/org/chromium/device/geolocation/LocationProviderTest.java",
121       "device/nfc/android/junit/src/org/chromium/device/nfc/NFCTest.java",
122       "device/nfc/android/junit/src/org/chromium/device/nfc/NfcBlocklistTest.java",
123       "shape_detection/android/junit/src/org/chromium/shape_detection/BitmapUtilsTest.java",
124     ]
125     deps = [
126       "$google_play_services_package:google_play_services_base_java",
127       "$google_play_services_package:google_play_services_basement_java",
128       "$google_play_services_package:google_play_services_location_java",
129       "$google_play_services_package:google_play_services_vision_common_java",
130       "$google_play_services_package:google_play_services_vision_java",
131       "//base:base_java",
132       "//base:base_java_test_support",
133       "//base:base_junit_test_support",
134       "//mojo/public/java:base_java",
135       "//mojo/public/java:bindings_java",
136       "//mojo/public/java:system_java",
137       "//mojo/public/mojom/base:base_java",
138       "//services/device/generic_sensor:java",
139       "//services/device/geolocation:geolocation_java",
140       "//services/device/nfc/android:java",
141       "//services/device/public/java:device_feature_list_java",
142       "//services/device/public/java:geolocation_java_test_support",
143       "//services/device/public/java:nfc_java",
144       "//services/device/public/mojom:generic_sensor_java",
145       "//services/device/public/mojom:mojom_java",
146       "//services/shape_detection:shape_detection_java",
147       "//skia/public/mojom:mojom_java",
148     ]
149   }
150
151   android_library("services_javatests") {
152     testonly = true
153     sources = [
154       "shape_detection/android/javatests/src/org/chromium/shape_detection/BarcodeDetectionImplTest.java",
155       "shape_detection/android/javatests/src/org/chromium/shape_detection/FaceDetectionImplTest.java",
156       "shape_detection/android/javatests/src/org/chromium/shape_detection/TestUtils.java",
157       "shape_detection/android/javatests/src/org/chromium/shape_detection/TextDetectionImplTest.java",
158     ]
159     deps = [
160       "$google_play_services_package:google_play_services_base_java",
161       "$google_play_services_package:google_play_services_basement_java",
162       "$google_play_services_package:google_play_services_vision_common_java",
163       "$google_play_services_package:google_play_services_vision_java",
164       "//base:base_java",
165       "//base:base_java_test_support",
166       "//mojo/public/java:base_java",
167       "//mojo/public/java:bindings_java",
168       "//mojo/public/mojom/base:base_java",
169       "//services/shape_detection:shape_detection_java",
170       "//services/shape_detection/public/mojom:mojom_java",
171       "//skia/public/mojom:mojom_java",
172       "//third_party/android_deps:chromium_play_services_availability_java",
173       "//third_party/androidx:androidx_test_runner_java",
174       "//third_party/hamcrest:hamcrest_java",
175       "//third_party/hamcrest:hamcrest_library_java",
176       "//third_party/junit",
177       "//ui/gfx/geometry/mojom:mojom_java",
178     ]
179     data = [ "test/data/" ]
180   }
181 }