OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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/features.gni") | 5 import("//build/config/features.gni") |
6 import("//build/config/ui.gni") | 6 import("//build/config/ui.gni") |
7 import("//testing/test.gni") | 7 import("//testing/test.gni") |
8 import("//tools/grit/repack.gni") | 8 import("//tools/grit/repack.gni") |
9 | 9 |
10 # Collection of all components. You wouldn't link to this, but this is rather | 10 # Collection of all components. You wouldn't link to this, but this is rather |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 | 214 |
215 if (toolkit_views) { | 215 if (toolkit_views) { |
216 deps += [ "//components/constrained_window" ] | 216 deps += [ "//components/constrained_window" ] |
217 } | 217 } |
218 } | 218 } |
219 | 219 |
220 # To add a unit test to this target, make a "unit_test" source_set in your | 220 # To add a unit test to this target, make a "unit_test" source_set in your |
221 # component (it's important to use a source_set instead of a static library or | 221 # component (it's important to use a source_set instead of a static library or |
222 # no tests will run) and add a reference here. You can add more than one unit | 222 # no tests will run) and add a reference here. You can add more than one unit |
223 # test target if convenient. | 223 # test target if convenient. |
224 if (!is_win || link_chrome_on_windows) { | 224 test("components_unittests") { |
225 test("components_unittests") { | 225 sources = [ |
226 sources = [ | 226 "test/run_all_unittests.cc", |
227 "test/run_all_unittests.cc", | 227 ] |
228 ] | |
229 | 228 |
230 # Add only ":unit_tests" dependencies here. If your tests have dependencies | 229 # Add only ":unit_tests" dependencies here. If your tests have dependencies |
231 # (this would at least include the component itself), they should be on the | 230 # (this would at least include the component itself), they should be on the |
232 # test source set and not here. | 231 # test source set and not here. |
233 deps = [ | 232 deps = [ |
234 "//components/auto_login_parser:unit_tests", | 233 "//components/auto_login_parser:unit_tests", |
235 "//components/autofill/content/browser:unit_tests", | 234 "//components/autofill/content/browser:unit_tests", |
236 "//components/autofill/core/browser:unit_tests", | 235 "//components/autofill/core/browser:unit_tests", |
237 "//components/autofill/core/common:unit_tests", | 236 "//components/autofill/core/common:unit_tests", |
238 "//components/bookmarks/browser:unit_tests", | 237 "//components/bookmarks/browser:unit_tests", |
239 "//components/captive_portal:unit_tests", | 238 "//components/captive_portal:unit_tests", |
240 "//components/cloud_devices/common:unit_tests", | 239 "//components/cloud_devices/common:unit_tests", |
241 "//components/content_settings/core/browser:unit_tests", | 240 "//components/content_settings/core/browser:unit_tests", |
242 "//components/content_settings/core/common:unit_tests", | 241 "//components/content_settings/core/common:unit_tests", |
243 "//components/crx_file:unit_tests", | 242 "//components/crx_file:unit_tests", |
244 "//components/data_reduction_proxy/core/browser:unit_tests", | 243 "//components/data_reduction_proxy/core/browser:unit_tests", |
245 "//components/data_reduction_proxy/core/common:unit_tests", | 244 "//components/data_reduction_proxy/core/common:unit_tests", |
246 "//components/device_event_log:unit_tests", | 245 "//components/device_event_log:unit_tests", |
247 "//components/dom_distiller/core:unit_tests", | 246 "//components/dom_distiller/core:unit_tests", |
248 "//components/domain_reliability:unit_tests", | 247 "//components/domain_reliability:unit_tests", |
249 "//components/favicon_base:unit_tests", | 248 "//components/favicon_base:unit_tests", |
250 "//components/google/core/browser:unit_tests", | 249 "//components/google/core/browser:unit_tests", |
251 "//components/invalidation:unittests", | 250 "//components/invalidation:unittests", |
252 "//components/login:unit_tests", | 251 "//components/login:unit_tests", |
253 "//components/metrics:unit_tests", | 252 "//components/metrics:unit_tests", |
254 "//components/omnibox:unit_tests", | 253 "//components/omnibox:unit_tests", |
255 "//components/ownership:unit_tests", | 254 "//components/ownership:unit_tests", |
256 "//components/packed_ct_ev_whitelist:unit_tests", | 255 "//components/packed_ct_ev_whitelist:unit_tests", |
257 "//components/proximity_auth:unit_tests", | 256 "//components/proximity_auth:unit_tests", |
258 "//components/update_client:unit_tests", | 257 "//components/update_client:unit_tests", |
259 "//components/variations:unit_tests", | 258 "//components/variations:unit_tests", |
260 "//components/web_resource:unit_tests", | 259 "//components/web_resource:unit_tests", |
261 "//components/webdata/common:unit_tests", | 260 "//components/webdata/common:unit_tests", |
262 | 261 |
263 # These are the deps required by the code in this target. | 262 # These are the deps required by the code in this target. |
264 "//base", | 263 "//base", |
265 "//base/test:test_support", | 264 "//base/test:test_support", |
266 "//content/test:test_support", | 265 "//content/test:test_support", |
267 "//ui/base", | 266 "//ui/base", |
268 ] | 267 ] |
269 data_deps = [ ":components_tests_pak" ] | 268 data_deps = [ ":components_tests_pak" ] |
270 | 269 |
271 if (is_android) { | 270 if (is_android) { |
272 deps += [ "//components/data_reduction_proxy/content/browser:unit_tests" ] | 271 deps += [ "//components/data_reduction_proxy/content/browser:unit_tests" ] |
273 } | |
274 | |
275 # TODO(GYP) need this target. | |
276 #'breakpad/app/crash_keys_win_unittest.cc', | |
277 | |
278 # Precache tests need these defines. | |
279 #configs += [ "//components/precache/core:precache_config" ] | |
280 | |
281 if (toolkit_views) { | |
282 # TODO(GYP) enable this as above. | |
283 #deps += [ "//components/constrained_window:unit_tests" ] | |
284 } | |
285 if (is_win) { | |
286 deps += [ "//components/browser_watcher:unit_tests" ] | |
287 } | |
288 } | 272 } |
289 | 273 |
290 repack("components_tests_pak") { | 274 # TODO(GYP) need this target. |
291 sources = [ | 275 #'breakpad/app/crash_keys_win_unittest.cc', |
292 "$root_gen_dir/components/components_resources.pak", | |
293 "$root_gen_dir/components/strings/components_strings_en-US.pak", | |
294 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak", | |
295 "$root_gen_dir/ui/resources/webui_resources.pak", | |
296 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak", | |
297 "$root_gen_dir/ui/strings/ui_strings_en-US.pak", | |
298 ] | |
299 | 276 |
300 output = "$root_out_dir/components_tests_resources.pak" | 277 # Precache tests need these defines. |
| 278 #configs += [ "//components/precache/core:precache_config" ] |
301 | 279 |
302 deps = [ | 280 if (toolkit_views) { |
303 "//components/resources", | 281 # TODO(GYP) enable this as above. |
304 "//components/strings", | 282 #deps += [ "//components/constrained_window:unit_tests" ] |
305 "//ui/resources", | 283 } |
306 "//ui/strings", | 284 if (is_win) { |
307 ] | 285 deps += [ "//components/browser_watcher:unit_tests" ] |
308 } | 286 } |
309 } | 287 } |
| 288 |
| 289 repack("components_tests_pak") { |
| 290 sources = [ |
| 291 "$root_gen_dir/components/components_resources.pak", |
| 292 "$root_gen_dir/components/strings/components_strings_en-US.pak", |
| 293 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak", |
| 294 "$root_gen_dir/ui/resources/webui_resources.pak", |
| 295 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak", |
| 296 "$root_gen_dir/ui/strings/ui_strings_en-US.pak", |
| 297 ] |
| 298 |
| 299 output = "$root_out_dir/components_tests_resources.pak" |
| 300 |
| 301 deps = [ |
| 302 "//components/resources", |
| 303 "//components/strings", |
| 304 "//ui/resources", |
| 305 "//ui/strings", |
| 306 ] |
| 307 } |
OLD | NEW |