Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / chrome / test / BUILD.gn
blob43804e4efc2ea4f54cd9153235dfbf70be68bfc4
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
3 # found in the LICENSE file.
5 import("//build/config/chrome_build.gni")
6 import("//build/config/crypto.gni")
7 import("//build/config/features.gni")
8 import("//build/config/ui.gni")
9 import("//chrome/chrome_tests.gni")
10 import("//chrome/test/base/js2gtest.gni")
11 import("//testing/test.gni")
13 declare_args() {
14   # TODO(GYP) http://crbug.com/462791
15   enable_nacl_browsertests = false
18 # This target exists to reference other test executables to bring these files
19 # into the build.
20 group("test") {
21   testonly = true
24 # GYP version: chrome/chrome_tests_unit.gypi:test_support_common
25 source_set("test_support") {
26   defines = []
27   testonly = true
29   sources = [
30     "base/chrome_process_util.cc",
31     "base/chrome_process_util.h",
32     "base/chrome_process_util_mac.cc",
33     "base/chrome_render_view_host_test_harness.cc",
34     "base/chrome_render_view_host_test_harness.h",
35     "base/chrome_test_launcher.cc",
36     "base/chrome_test_launcher.h",
37     "base/chrome_test_suite.cc",
38     "base/chrome_test_suite.h",
39     "base/chrome_unit_test_suite.cc",
40     "base/chrome_unit_test_suite.h",
41     "base/dialog_test_browser_window.cc",
42     "base/dialog_test_browser_window.h",
43     "base/find_in_page_observer.cc",
44     "base/find_in_page_observer.h",
45     "base/history_index_restore_observer.cc",
46     "base/history_index_restore_observer.h",
47     "base/in_process_browser_test.cc",
48     "base/in_process_browser_test.h",
49     "base/in_process_browser_test_mac.cc",
50     "base/profile_mock.cc",
51     "base/profile_mock.h",
52     "base/scoped_browser_locale.cc",
53     "base/scoped_browser_locale.h",
54     "base/scoped_bundle_swizzler_mac.h",
55     "base/scoped_bundle_swizzler_mac.mm",
56     "base/scoped_testing_local_state.cc",
57     "base/scoped_testing_local_state.h",
58     "base/test_browser_window.cc",
59     "base/test_browser_window.h",
60     "base/test_launcher_utils.cc",
61     "base/test_launcher_utils.h",
62     "base/test_switches.cc",
63     "base/test_switches.h",
64     "base/testing_browser_process.cc",
65     "base/testing_browser_process.h",
66     "base/testing_browser_process_platform_part.cc",
67     "base/testing_browser_process_platform_part.h",
68     "base/testing_io_thread_state.cc",
69     "base/testing_io_thread_state.h",
70     "base/testing_pref_service_syncable.cc",
71     "base/testing_pref_service_syncable.h",
72     "base/testing_profile.cc",
73     "base/testing_profile.h",
74     "base/testing_profile_manager.cc",
75     "base/testing_profile_manager.h",
76     "base/tracing.cc",
77     "base/tracing.h",
78     "base/ui_test_utils.cc",
79     "base/ui_test_utils.h",
80     "logging/win/file_logger.cc",
81     "logging/win/file_logger.h",
82     "logging/win/log_file_printer.cc",
83     "logging/win/log_file_printer.h",
84     "logging/win/log_file_reader.cc",
85     "logging/win/log_file_reader.h",
86     "logging/win/mof_data_parser.cc",
87     "logging/win/mof_data_parser.h",
88     "logging/win/test_log_collector.cc",
89     "logging/win/test_log_collector.h",
90   ]
92   configs += [ "//build/config:precompiled_headers" ]
94   # New deps should go in the non-iOS section below.
95   public_deps = [
96     "//content/test:test_support",
97   ]
98   deps = [
99     "//base:prefs_test_support",
100     "//base/test:test_support",
101     "//chrome:resources",
102     "//chrome:strings",
103     "//chrome/app:test_support",
105     #"//chrome/app/theme:theme_resources",
106     "//chrome/browser:test_support",
107     "//chrome/common:test_support",
108     "//chrome/renderer:test_support",
109     "//components/bookmarks/test",
110     "//components/gcm_driver:test_support",
111     "//components/gcm_driver/instance_id:test_support",
112     "//components/history/core/test:test",
113     "//components/metrics:test_support",
114     "//components/omnibox/browser:test_support",
115     "//components/password_manager/core/browser:test_support",
116     "//components/pref_registry:test_support",
117     "//components/rappor:test_support",
118     "//components/search_engines:test_support",
119     "//components/signin/core/browser:test_support",
120     "//components/sync_driver:test_support",
121     "//components/update_client:test_support",
122     "//content/public/app:both",
123     "//ui/gfx:test_support",
124     "//net",
125     "//net:test_support",
126     "//skia",
127     "//sql",
128     "//sql:test_support",
129     "//sync",
130     "//testing/gmock",
131     "//testing/gtest",
132     "//third_party/zlib",
133     "//ui/message_center:test_support",
134   ]
136   if (!is_ios) {
137     deps += [
138       "//chrome/child",
139       "//chrome/plugin",
140       "//chrome/renderer",
141       "//chrome/utility",
142       "//content/public/child",
143       "//content/public/common",
144       "//content/public/plugin",
145       "//content/public/renderer",
146       "//content/public/utility",
147       "//components/autofill/core/browser:test_support",
148       "//components/captive_portal:test_support",
149       "//components/guest_view/browser:test_support",
150       "//components/infobars/core",
151       "//components/sessions:test_support",
152       "//components/user_manager:test_support",
153       "//components/web_resource:test_support",
154       "//google_apis:test_support",
155       "//ipc:test_support",
156       "//media:test_support",
157       "//ppapi/shared_impl",
158       "//sql:test_support",
159       "//third_party/leveldatabase",
160       "//ui/base",
161       "//ui/events:events_base",
162       "//ui/gl",
163     ]
164   }
166   if (enable_extensions) {
167     deps += [
168       "//chrome/common/extensions/api",
169       "//extensions:test_support",
170     ]
171   }
173   if (is_linux) {
174     deps += [ "//crypto:platform" ]
175   }
176   if (is_mac) {
177     # deps += [ '../third_party/ocmock/ocmock.gyp:ocmock' ] TODO(GYP)
178   }
179   if (is_win) {
180     deps += [ "//third_party/wtl" ]
181     if (use_aura) {
182       deps += [
183         "//win8:test_registrar_constants",
184         "//win8:test_support_win8",
185       ]
186     }
187   }
188   if (is_chromeos) {
189     deps += [ "//components/ownership" ]
190   }
192   if (use_aura) {
193     sources += [
194       "base/test_browser_window_aura.cc",
195       "base/test_browser_window_aura.h",
196     ]
197   }
199   if (enable_plugins) {
200     sources += [
201       "ppapi/ppapi_test.cc",
202       "ppapi/ppapi_test.h",
203     ]
204     deps += [ "//pdf" ]
205   }
207   if (use_ash) {
208     deps += [ "//ash:test_support" ]
209   }
210   if (toolkit_views) {
211     deps += [ "//ui/views:test_support" ]
212   }
214   if (enable_extensions) {
215     deps += [
216       "//chrome/common/extensions/api",
217       "//extensions:test_support",
218     ]
219   }
222 if (!is_android) {
223   import("//third_party/protobuf/proto_library.gni")
225   # GYP version: chrome/chrome_tests_unit.gypi:ipc_protobuf_message_test_proto
226   proto_library("test_proto") {
227     sources = [
228       "../common/safe_browsing/ipc_protobuf_message_test.proto",
229     ]
230   }
232   # TODO(GYP): Delete this after we've converted everything to GN.
233   # The _run targets exist only for compatibility w/ GYP.
234   group("interactive_ui_tests_run") {
235     testonly = true
236     deps = [
237       ":interactive_ui_tests",
238     ]
239   }
241   test("interactive_ui_tests") {
242     sources =
243         rebase_path(chrome_tests_gypi_values.chrome_interactive_ui_test_sources,
244                     ".",
245                     "//chrome")
247     configs += [ "//build/config:precompiled_headers" ]
249     data = [
250       "data/",
251       "//net/data/ssl/certificates/",
252       "//net/tools/testserver/",
253       "//ppapi/tests/test_case.html",
254       "//ppapi/tests/test_case.html.mock-http-headers",
255       "//ppapi/tests/test_page.css",
256       "//ppapi/tests/test_page.css.mock-http-headers",
257       "//third_party/pyftpdlib/",
258       "//third_party/pywebsocket/",
259       "//third_party/tlslite/",
260       "//third_party/zlib/google/test/data/",
261       "//tools/metrics/histograms/histograms.xml",
262       "$root_out_dir/pyproto/google/",
263       "$root_out_dir/resources.pak",
264       "$root_out_dir/ui_test.pak",
265     ]
266     if (is_linux || is_win) {
267       data += [
268         "$root_out_dir/chrome_100_percent.pak",
269         "$root_out_dir/locales/en-US.pak",
270         "$root_out_dir/locales/fr.pak",
271       ]
272     }
273     if (is_linux) {
274       data += [ "$root_out_dir/libppapi_tests.so" ]
275     }
277     defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
278     ldflags = []
280     deps = [
281       "//base/allocator",
282       "//chrome/browser",
283       "//chrome/browser/devtools",
284       "//chrome/renderer",
285       "//chrome/test:test_support",
286       "//chrome:resources",
287       "//chrome:strings",
288       "//chrome:packed_extra_resources",
289       "//chrome:packed_resources",
290       "//components/resources",
291       "//content/app/resources",
292       "//crypto:platform",
293       "//crypto:test_support",
294       "//google_apis:test_support",
295       "//net",
296       "//net:net_resources",
297       "//net:test_support",
298       "//skia",
299       "//sync",
300       "//testing/gmock",
301       "//testing/gtest",
302       "//third_party/hunspell",
303       "//third_party/icu",
304       "//third_party/libpng",
305       "//third_party/zlib",
306       "//ui/base:test_support",
307       "//ui/resources:ui_test_pak",
308       "//ui/web_dialogs:test_support",
309     ]
311     # TODO(rockot) bug 505926: The chrome_extensions_interactive_uitests target
312     # should be deleted and this line removed. See the
313     # chrome_extensions_interactive_uitests target for more.
314     deps += [ "//extensions:chrome_extensions_interactive_uitests" ]
316     # Runtime dependencies
317     data_deps = [
318       "//ppapi:ppapi_tests",
319       "//third_party/mesa:osmesa",
320     ]
322     if (toolkit_views) {
323       sources += rebase_path(
324               chrome_tests_gypi_values.chrome_interactive_ui_test_views_sources,
325               ".",
326               "//chrome")
327       deps += [
328         "//ui/views",
329         "//ui/views:test_support",
330         "//ui/views/controls/webview:test_support",
331       ]
332       if (!is_mac) {
333         sources += rebase_path(
334                 chrome_tests_gypi_values.chrome_interactive_ui_test_views_non_mac_sources,
335                 ".",
336                 "//chrome")
337       }
338       if (is_linux) {
339         # TODO(gbillock): aura linux does not support the automation for
340         # SendMouseMoveNotifyWhenDone
341         sources -= [ "../browser/ui/views/toolbar/toolbar_button_test.cc" ]
342       }
343       if (is_chromeos || !use_x11) {
344         sources -= [
345           "../../ui/views/widget/desktop_aura/desktop_window_tree_host_x11_interactive_uitest.cc",
346           "../../ui/views/widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc",
347         ]
348       }
349       if (use_aura) {
350         deps += [ "//ui/touch_selection" ]
351       }
352     }
354     if (is_linux && !is_chromeos) {
355       # Desktop linux.
356       sources -= [
357         # TODO(port): This times out. Attempts have been made to fix the
358         # individual failures, but each time I disable a test from these
359         # suites, it seems like one or another starts timing out too.
360         "../browser/ui/views/keyboard_access_browsertest.cc",
361       ]
362     } else {
363       # Everything but desktop Linux.
364       sources += rebase_path(
365               chrome_tests_gypi_values.chrome_interactive_ui_test_non_desktop_linux_sources,
366               ".",
367               "//chrome")
368     }
370     if (is_chromeos) {
371       sources += rebase_path(
372               chrome_tests_gypi_values.chrome_interactive_ui_test_chromeos_sources,
373               ".",
374               "//chrome")
375       sources += [ "../browser/notifications/login_state_notification_blocker_chromeos_browsertest.cc" ]
376       sources -= [
377         # Use only the _chromeos version on ChromeOS.
378         "base/view_event_test_platform_part_ash.cc",
379       ]
381       deps += [
382         "//ash/resources",
383         "//chromeos",
384       ]
386       if (enable_nacl) {
387         deps += [
388           "//native_client/src/trusted/service_runtime/linux:munge_nacl_helper_bootstrap",
389           "//components/nacl:nacl_helper",
391           # '../components/nacl_nonsfi.gyp:nacl_helper_nonsfi',  TODO(GYP)
392         ]
393       }
395       if (is_chrome_branded) {
396         sources -= [
397           # These tests are failing on official cros bots. crbug.com/431450.
398           "../browser/ui/views/bookmarks/bookmark_bar_view_test.cc",
399         ]
400       }
401     } else {
402       # ChromeOS doesn't use panels, everybody else does.
403       sources += rebase_path(
404               chrome_tests_gypi_values.chrome_interactive_ui_test_panels_sources,
405               ".",
406               "//chrome")
408       # TODO(tapted): Include on mac when views panels are ported.
409       if (toolkit_views && !is_mac) {
410         sources += rebase_path(
411                 chrome_tests_gypi_values.chrome_interactive_ui_test_panels_views_sources,
412                 ".",
413                 "//chrome")
414       }
415     }
417     if (!is_linux) {
418       # Non-Linux platforms (Linux includes ChromeOS here).
419       sources += rebase_path(
420               chrome_tests_gypi_values.chrome_interactive_ui_test_non_linux_and_chromeos_sources,
421               ".",
422               "//chrome")
423     }
425     if (is_win) {
426       sources += rebase_path(
427               chrome_tests_gypi_values.chrome_interactive_ui_test_win_sources,
428               ".",
429               "//chrome")
430       deps += [
431         "//chrome:other_version",
432         "//third_party/isimpledom",
433         "//third_party/wtl",
434         "//ui/resources",
435       ]
437       configs -= [ "//build/config/win:default_incremental_linking" ]
438       configs +=
439           [ "//build/config/win:default_large_module_incremental_linking" ]
441       libs = [ "oleacc.lib" ]
442     }
444     if (is_mac) {
445       data_deps += [ "//chrome" ]
447       # TODO(mark): We really want this for all non-static library targets, but
448       # when we tried to pull it up to the common.gypi level, it broke other
449       # things like the ui and startup tests. *shrug*
450       ldflags += [ "-Wl,-ObjC" ]
451     }
453     if (cld_version == 2) {
454       # Interactive tests should use whatever CLD2 data access mode that the
455       # application embedder is using.
456       deps += [ "//third_party/cld_2:cld2_platform_impl" ]
457     }
459     if (use_x11) {
460       configs += [ "//build/config/linux:xtst" ]
461       data_deps += [ "//tools/xdisplaycheck" ]
462     }
464     if (enable_app_list) {
465       sources += rebase_path(
466               chrome_tests_gypi_values.chrome_interactive_ui_test_app_list_sources,
467               ".",
468               "//chrome")
469     }
471     if (use_ash) {
472       sources += rebase_path(
473               chrome_tests_gypi_values.chrome_interactive_ui_test_ash_sources,
474               ".",
475               "//chrome")
476       deps += [ "//ash:interactive_ui_test_support" ]
477     }
479     if (enable_notifications) {
480       sources += rebase_path(
481               chrome_tests_gypi_values.chrome_interactive_ui_test_notifications_sources,
482               ".",
483               "//chrome")
485       # Non-ChromeOS notifications tests (ChromeOS does not use cross-platform
486       # panels).
487       if (!is_chromeos) {
488         sources += [
489           "../browser/notifications/notification_browsertest.cc",
490           "../browser/notifications/platform_notification_service_browsertest.cc",
491         ]
492       }
494       if (is_android) {
495         sources -= [
496           # Android does not use the message center-based Notification system.
497           "../browser/notifications/message_center_notifications_browsertest.cc",
499           # TODO(peter): Enable the Notification browser tests.
500           "../browser/notifications/notification_browsertest.cc",
501           "../browser/notifications/platform_notification_service_browsertest.cc",
502         ]
503       }
504     }  # enable_notifications
506     if (!use_aura || is_chromeos) {
507       sources -=
508           [ "../../ui/views/corewm/desktop_capture_controller_unittest.cc" ]
509     }
510   }
512   source_set("sync_integration_test_support") {
513     testonly = true
514     sources = rebase_path(
515             chrome_tests_gypi_values.test_support_sync_integration_sources,
516             ".",
517             "//chrome")
518     public_deps = [
519       "//chrome/browser",
520     ]
521     deps = [
522       ":test_support",
523       "//base",
524       "//chrome",
525       "//components/invalidation/impl",
526       "//components/invalidation/impl:test_support",
527       "//net",
528       "//skia",
529       "//sync",
530       "//sync:test_support_sync_testserver",
531       "//sync:test_support_sync_fake_server",
532       "//ui/app_list:test_support",
533     ]
535     if (is_mac) {
536       sources -= [
537         "../browser/sync/test/integration/dictionary_helper.cc",
538         "../browser/sync/test/integration/dictionary_helper.h",
539         "../browser/sync/test/integration/dictionary_load_observer.cc",
540         "../browser/sync/test/integration/dictionary_load_observer.h",
541       ]
542     }
543     if (!enable_app_list) {
544       sources -= [
545         "../browser/sync/test/integration/sync_app_list_helper.cc",
546         "../browser/sync/test/integration/sync_app_list_helper.h",
547       ]
548     }
549     if (!is_chromeos) {
550       sources -= [
551         "../browser/sync/test/integration/wifi_credentials_helper.cc",
552         "../browser/sync/test/integration/wifi_credentials_helper.h",
553       ]
554     }
555   }
557   js2gtest("browser_tests_js_webui") {
558     test_type = "webui"
559     sources = rebase_path(
560             chrome_tests_gypi_values.chrome_browser_tests_webui_js_sources,
561             ".",
562             "//chrome")
563     if (is_chrome_branded) {
564       # crbug.com/230471
565       sources -= [ "data/webui/accessibility_audit_browsertest.js" ]
566     }
567     if (!is_chromeos) {
568       sources -= [ "data/webui/certificate_viewer_dialog_test.js" ]
569     }
570     if (!enable_app_list) {
571       sources -= [ "../browser/ui/webui/app_list/start_page_browsertest.js" ]
572     }
573     if (!enable_supervised_users) {
574       sources -=
575           [ "../browser/ui/webui/downloads_ui_supervised_browsertest.js" ]
576     }
577     if (!enable_print_preview) {
578       sources -= [ "data/webui/print_preview.js" ]
579     }
580     if (enable_media_router) {
581       sources +=
582           [ "data/webui/media_router/media_router_elements_browsertest.js" ]
583     }
584     deps = [
585       "//chrome/browser/ui",
586       "//skia",
587     ]
588     defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
589   }
591   # TODO(GYP): Delete this after we've converted everything to GN.
592   # The _run targets exist only for compatibility w/ GYP.
593   group("telemetry_gpu_test_run") {
594     testonly = true
595     deps = [
596       ":telemetry_gpu_test",
597     ]
598   }
600   group("telemetry_gpu_test") {
601     data_deps = [
602       "//chrome",
603       "//tools/telemetry:bitmaptools",
604     ]
606     data = [
607       "//content/test/gpu/",
608       "//content/test/data/gpu/",
610       # For GpuProcess.video
611       "//content/test/data/media/bear.ogv",
612       "//third_party/catapult/",
614       # For webgl_conformance
615       "//third_party/webgl/",
616       "//content/test/gpu/run_gpu_test.py",
618       # Generic telemetry deps
619       # TODO(GYP): These should probably be specified somewhere else
620       # and pulled in via a deps entry.
621       "//build/android/devil/",
622       "//build/android/pylib/",
623       "//build/util/",
624       "//third_party/WebKit/PerformanceTests/resources/jquery.tablesorter.min.js",
625       "//third_party/WebKit/PerformanceTests/resources/statistics.js",
626       "//third_party/flot/jquery.flot.min.js",
627       "//third_party/webpagereplay/",
628       "//tools/telemetry/",
629     ]
631     if (is_win && (symbol_level == 1 || symbol_level == 2)) {
632       # TODO(GYP): These should be provided automatically through data_deps.
633       data += [ "$root_out_dir/chrome.exe.pdb" ]
634       if (is_component_build) {
635         data += [
636           "$root_out_dir/base.dll.pdb",
637           "$root_out_dir/blink_platform.dll.pdb",
638           "$root_out_dir/blink_web.dll.pdb",
639           "$root_out_dir/content.dll.pdb",
640         ]
641       }
642     }
643   }
645   # TODO(GYP): Delete this after we've converted everything to GN.
646   # The _run targets exist only for compatibility w/ GYP.
647   group("tab_capture_end2end_tests_run") {
648     testonly = true
649     deps = [
650       ":browser_tests",
651     ]
652   }
654   # TODO(GYP): Delete this after we've converted everything to GN.
655   # The _run targets exist only for compatibility w/ GYP.
656   group("browser_tests_run") {
657     testonly = true
658     data_deps = [ ":browser_tests" ]
659   }
661   test("browser_tests") {
662     sources = [
663       "base/browser_tests_main.cc",
664     ]
665     sources +=
666         rebase_path(chrome_tests_gypi_values.chrome_browser_tests_sources,
667                     ".",
668                     "//chrome")
669     sources += rebase_path(
670             chrome_tests_gypi_values.chrome_browser_extensions_test_support_sources,
671             ".",
672             "//chrome")
674     configs += [ "//build/config:precompiled_headers" ]
676     data = [
677       "data/",
678       "//chrome/browser/policy/test/asn1der.py",
679       "//chrome/browser/policy/test/policy_testserver.py",
680       "//chrome/common/extensions/docs/examples/apps/calculator/",
681       "//chrome/third_party/mock4js/",
682       "//content/test/data/",
683       "//google_apis/test/",
684       "//media/test/data/",
685       "//net/data/",
686       "//net/tools/testserver/",
687       "//ppapi/tests/test_case.html",
688       "//ppapi/tests/test_case.html.mock-http-headers",
689       "//ppapi/tests/test_page.css",
690       "//ppapi/tests/test_page.css.mock-http-headers",
691       "//testing/test_env.py",
692       "//third_party/accessibility-audit/axs_testing.js",
693       "//third_party/mocha/mocha.js",
694       "//third_party/pyftpdlib/",
695       "//third_party/pywebsocket/",
696       "//third_party/safe_browsing/",
697       "//third_party/simplejson/",
698       "//third_party/tlslite/",
699       "//ui/webui/resources/js/",
700       "$root_out_dir/pyproto/",
701       "$root_out_dir/browser_tests.pak",
702       "$root_out_dir/chrome_100_percent.pak",
703       "$root_out_dir/locales/",
704       "$root_out_dir/remoting/unittests/",
705       "$root_out_dir/resources.pak",
706       "$root_out_dir/resources/extension/",
707       "$root_out_dir/test_case.html",
708       "$root_out_dir/test_case.html.mock-http-headers",
709       "$root_out_dir/test_data/",
710       "$root_out_dir/test_page.css",
711       "$root_out_dir/test_page.css.mock-http-headers",
712       "$root_out_dir/test_url_loader_data/",
713     ]
715     deps = [
716       ":browser_tests_js_webui",
717       ":sync_integration_test_support",
718       ":test_support",
719       "//base",
720       "//base:i18n",
721       "//base/allocator",
722       "//base/test:test_support",
723       "//chrome:browser_tests_pak",
724       "//chrome:packed_extra_resources",
725       "//chrome:packed_resources",
726       "//chrome:resources",
727       "//chrome:strings",
728       "//chrome/browser",
729       "//chrome/browser/resources:extension_resource_demo",
730       "//chrome/common/extensions/api",
731       "//chrome/renderer",
732       "//components/autofill/content/browser:risk_proto",
733       "//components/autofill/content/browser/wallet:test_support",
734       "//components/autofill/content/renderer:test_support",
735       "//components/captive_portal:test_support",
736       "//components/dom_distiller/content:content_browser",
737       "//components/dom_distiller/core:test_support",
738       "//components/guest_view/browser:test_support",
739       "//components/resources",
740       "//components/strings",
741       "//components/translate/core/common",
742       "//components/user_manager:test_support",
743       "//crypto:platform",
744       "//crypto:test_support",
745       "//device/bluetooth:mocks",
746       "//device/serial:test_support",
747       "//extensions/common/api",
748       "//google_apis:test_support",
749       "//media",
750       "//media/base:test_support",
751       "//media/cast:test_support",
752       "//net",
753       "//net:test_support",
754       "//sdch",
755       "//skia",
756       "//sync",
757       "//sync:test_support_sync_api",
758       "//testing/gmock",
759       "//testing/gtest",
760       "//testing/perf",
761       "//third_party/cacheinvalidation",
762       "//third_party/icu",
763       "//third_party/leveldatabase",
764       "//third_party/libaddressinput",
765       "//third_party/libjingle",
766       "//third_party/safe_browsing:test_support",
767       "//third_party/webrtc/modules/desktop_capture",
768       "//third_party/widevine/cdm:version_h",
769       "//ui/accessibility:test_support",
770       "//ui/base:test_support",
771       "//ui/compositor:test_support",
772       "//ui/resources",
773       "//ui/web_dialogs:test_support",
774       "//v8",
775     ]
777     # TODO(rockot) bug 505926: The chrome_extensions_browsertests target should
778     # be deleted and this line removed. See the chrome_extensions_browsertests
779     # target for more.
780     deps += [ "//extensions:chrome_extensions_browsertests" ]
782     # Runtime dependencies
783     data_deps = [
784       "//ppapi:ppapi_tests",
785       "//ppapi:power_saver_test_plugin",
786       "//remoting/webapp:browser_test_resources",
787       "//remoting/webapp:unit_tests",
788       "//third_party/mesa:osmesa",
789       "//third_party/widevine/cdm:widevine_test_license_server",
790     ]
792     defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
794     if (!enable_nacl_browsertests) {
795       defines += [ "DISABLE_NACL_BROWSERTESTS" ]
796     }
798     # TODO(GYP) if (is_win) {
799     #       ['incremental_chrome_dll==1', {
800     #         'UseLibraryDependencyInputs': "true",
801     # }
803     if (cld_version == 2) {
804       # Because the browser_tests use translate, they need CLD data.
805       deps += [ "//third_party/cld_2:cld2_platform_impl" ]
806     }
808     if (!enable_one_click_signin) {
809       sources -= [ "../browser/ui/sync/one_click_signin_bubble_links_delegate_browsertest.cc" ]
810     }
811     if (!enable_nacl_browsertests) {
812       sources -= [ "../browser/extensions/api/hotword_private/hotword_private_apitest.cc" ]
813     } else if (enable_nacl) {
814       sources += [
815         "../browser/extensions/extension_nacl_browsertest.cc",
816         "../browser/nacl_host/test/gdb_debug_stub_browsertest.cc",
817       ]
818       deps += [ "//components/nacl/renderer/plugin:nacl_trusted_plugin" ]
820       if (enable_nacl_untrusted) {
821         sources += [
822           "nacl/nacl_browsertest.cc",
823           "nacl/nacl_browsertest_uma.cc",
824           "nacl/nacl_browsertest_util.cc",
825           "nacl/nacl_browsertest_util.h",
826           "nacl/pnacl_header_test.cc",
827           "nacl/pnacl_header_test.h",
828         ]
830         # TODO(GYP): Make NaCl work in other configs and update the irt
831         # dependency as appropriate. We should probably push this
832         # dependency into ppapi/native_client so that clients don't need
833         # to know all of the different toolchain options.
834         assert(current_cpu == "x64")
835         data_deps += [
836           # "test/data/nacl:shared_test_files",  # TODO(GYP) bug 512902
837           "//ppapi/native_client:irt",
838           "//ppapi:ppapi_nacl_tests",
840           # "../ppapi/ppapi_nacl.gyp:ppapi_nacl_tests",  # TODO(GYP) bug 512901
841           # "../ppapi/tests/extensions/extensions.gyp:ppapi_tests_extensions_background_keepalive",  # TODO(GYP) bug 512900
842           # "../ppapi/tests/extensions/extensions.gyp:ppapi_tests_extensions_media_galleries",  # TODO(GYP) bug 512900
843           # "../ppapi/tests/extensions/extensions.gyp:ppapi_tests_extensions_packaged_app",  # TODO(GYP) bug 512900
844         ]
845         if (is_chromeos) {
846           sources += [ "//third_party/liblouis/nacl_wrapper/liblouis_wrapper_browsertest.cc" ]
847           deps += [
848             "//chrome/browser/chromeos",
849             #'../third_party/liblouis/liblouis_nacl.gyp:liblouis_test_data',  TODO(GYP) bug 512906
850           ]
851         }
852       }
853       if (is_win || is_linux) {
854         sources += [ "../browser/nacl_host/test/nacl_gdb_browsertest.cc" ]
855         deps += [ "//chrome/browser/nacl_host/test:mock_nacl_gdb" ]
856       }
857       if (is_win) {
858         # TODO(halyavin) NaCl on Windows can't open debug stub socket in
859         # browser process as needed by this test. See http://crbug.com/157312.
860         sources -= [ "../browser/nacl_host/test/gdb_debug_stub_browsertest.cc" ]
861         deps += [
862           #'chrome.gyp:chrome_nacl_win64',  TODO(GYP) bug 512869
863         ]
864         configs -= [ "//build/config/win:default_incremental_linking" ]
865         configs +=
866             [ "//build/config/win:default_large_module_incremental_linking" ]
867       }
868       if (is_linux) {
869         deps += [
870           "//native_client/src/trusted/service_runtime/linux:munge_nacl_helper_bootstrap",
871           "//components/nacl:nacl_helper",
873           # "//components/nacl_nonsfi.gyp:nacl_helper_nonsfi",  # TODO(GYP) bug 512912.
874         ]
875       }
876     }
877     if (debug_devtools) {
878       defines += [ "DEBUG_DEVTOOLS=1" ]
879     }
880     if (use_ash) {
881       deps += [ "//ash:test_support" ]
882     }
883     if (use_aura || toolkit_views) {
884       deps += [ "//ui/events:test_support" ]
885     }
886     if (toolkit_views) {
887       sources += rebase_path(
888               chrome_tests_gypi_values.chrome_browser_tests_views_sources,
889               ".",
890               "//chrome")
891       deps += [ "//ui/views" ]
892       if (!is_mac) {
893         sources += rebase_path(
894                 chrome_tests_gypi_values.chrome_browser_tests_views_non_mac_sources,
895                 ".",
896                 "//chrome")
897       }
898     }
899     if (is_chromeos) {
900       sources += rebase_path(
901               chrome_tests_gypi_values.chrome_browser_tests_chromeos_sources,
902               ".",
903               "//chrome")
904       sources -= [
905         "../../apps/load_and_launch_browsertest.cc",
906         "../browser/printing/cloud_print/test/cloud_print_policy_browsertest.cc",
907         "../browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc",
909         # chromeos does not support profile list avatar menu
910         "../browser/profiles/profile_list_desktop_browsertest.cc",
911         "../browser/service_process/service_process_control_browsertest.cc",
913         # chromeos does not use cross-platform panels
914         "../browser/ui/panels/panel_extension_browsertest.cc",
916         # chromeos does not use the desktop user manager
917         "../browser/ui/webui/signin/user_manager_ui_browsertest.cc",
918       ]
919       deps += [
920         "//dbus",
921         "//dbus:test_support",
922         "//ui/login:resources",
923       ]
924     } else {
925       sources -= [
926         "../browser/extensions/api/enterprise_device_attributes/enterprise_device_attributes_apitest.cc",
927         "../browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_apitest_nss.cc",
928         "../browser/extensions/api/platform_keys/platform_keys_apitest_nss.cc",
929         "../browser/extensions/api/terminal/terminal_private_apitest.cc",
930         "../browser/invalidation/profile_invalidation_provider_factory_browsertest.cc",
931         "../browser/net/nss_context_chromeos_browsertest.cc",
932         "../browser/ui/ash/keyboard_controller_browsertest.cc",
933         "data/webui/certificate_viewer_ui_test-inl.h",
934       ]
935       if (toolkit_views) {
936         sources -= [ "../browser/ui/views/select_file_dialog_extension_browsertest.cc" ]
937       }
938     }
939     if (enable_configuration_policy) {
940       sources += rebase_path(
941               chrome_tests_gypi_values.chrome_browser_tests_policy_sources,
942               ".",
943               "//chrome")
944     }
945     if (enable_web_speech) {
946       sources += rebase_path(
947               chrome_tests_gypi_values.chrome_browser_tests_speech_sources,
948               ".",
949               "//chrome")
950     }
951     if (safe_browsing_mode == 1) {
952       sources += rebase_path(
953               chrome_tests_gypi_values.chrome_browser_tests_full_safe_browsing_sources,
954               ".",
955               "//chrome")
956     }
957     if (enable_captive_portal_detection) {
958       sources += [ "../browser/captive_portal/captive_portal_browsertest.cc" ]
959     }
960     if (!enable_webrtc) {
961       sources -= [
962         "../browser/extensions/api/webrtc_audio_private/webrtc_audio_private_browsertest.cc",
963         "../browser/extensions/api/webrtc_logging_private/webrtc_logging_private_apitest.cc",
964         "../browser/media/chrome_webrtc_browsertest.cc",
965         "../browser/media/chrome_webrtc_disable_encryption_flag_browsertest.cc",
966         "../browser/media/chrome_webrtc_getmediadevices_browsertest.cc",
967       ]
968     }
969     if (enable_media_router) {
970       sources += rebase_path(
971               chrome_tests_gypi_values.chrome_browser_tests_media_router_sources,
972               ".",
973               "//chrome")
974       deps += [ "//chrome/browser/media/router:test_support" ]
975     }
976     if (is_win) {
977       deps += [
978         "//chrome:other_version",
979         "//third_party/wtl",
980         "//ui/resources",
981       ]
982     } else {
983       sources -= [
984         "../app/chrome_command_ids.h",
985         "../app/chrome_dll_resource.h",
986         "../app/chrome_version.rc.version",
987         "../browser/media_galleries/fileapi/iapps_finder_impl_win_browsertest.cc",
988       ]
989     }
990     if (!is_chromeos && use_aura) {
991       sources -= [
992         # On Windows and Linux, we currently don't support enough of the
993         # ash environment to run these unit tests.
994         #
995         # TODO: enable these on windows and linux.
996         "../browser/ui/ash/accelerator_commands_browsertest.cc",
997         "../browser/ui/ash/accelerator_controller_browsertest.cc",
998         "../browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc",
999         "../browser/ui/ash/launcher/launcher_favicon_loader_browsertest.cc",
1000         "../browser/ui/ash/shelf_browsertest.cc",
1001         "../browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc",
1002       ]
1003     }
1004     if (is_mac) {
1005       # TODO(mark): We really want this for all non-static library
1006       # targets, but when we tried to pull it up to the common.gypi
1007       # level, it broke other things like the ui and startup tests. *shrug*
1008       ldflags = [ "-Wl,-ObjC" ]
1010       # Other platforms only need
1011       # chrome_resources.gyp:{packed_extra_resources,packed_resources},
1012       # and can build this target standalone much faster.
1013       deps += [
1014         #'app_mode_app_support',  TODO(GYP)
1015         "//chrome",
1017         #'../components/components.gyp:breakpad_stubs',  TODO(GYP)
1018         "//third_party/ocmock",
1019       ]
1020       sources += [
1021         "../browser/media_galleries/fileapi/iphoto_data_provider_browsertest.cc",
1022         "../browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper_browsertest.mm",
1023         "../browser/spellchecker/spellcheck_message_filter_platform_mac_browsertest.cc",
1024       ]
1025       sources -= [
1026         # TODO(groby): This test depends on hunspell and we cannot run it on
1027         # Mac, which does not use hunspell by default.
1028         "../browser/spellchecker/spellcheck_service_browsertest.cc",
1030         # TODO(rouslan): This test depends on the custom dictionary UI,
1031         # which is disabled on Mac.
1032         # TODO(GYP): This should be added somewhere first ...
1033         # "../browser/ui/webui/options/edit_dictionary_browsertest.js",
1035         # TODO(rouslan): This test depends on hunspell and we cannot run it
1036         # on Mac, which does use hunspell by default.
1037         # TODO(GYP): This should be added somewhere first ...
1038         # "../browser/ui/webui/options/language_options_dictionary_download_browsertest.js",
1040         # ProcessSingletonMac doesn"t do anything.
1041         "../browser/process_singleton_browsertest.cc",
1043         # This test depends on GetCommandLineForRelaunch, which is not
1044         # available on Mac.
1045         "../browser/printing/cloud_print/test/cloud_print_policy_browsertest.cc",
1047         # single-process mode hangs on Mac sometimes because of multiple UI
1048         # message loops. See 306348
1049         "../renderer/safe_browsing/phishing_classifier_browsertest.cc",
1050         "../renderer/safe_browsing/phishing_classifier_delegate_browsertest.cc",
1051         "../renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc",
1052       ]
1053     }
1054     if (is_mac || is_win) {
1055       sources += [
1056         "../browser/extensions/api/networking_private/networking_private_apitest.cc",
1057         "../browser/extensions/api/networking_private/networking_private_service_client_apitest.cc",
1058         "../browser/media_galleries/fileapi/itunes_data_provider_browsertest.cc",
1059         "../browser/media_galleries/fileapi/picasa_data_provider_browsertest.cc",
1060       ]
1061       deps += [ "//components/wifi:test_support" ]
1062     }
1063     if (!is_posix || is_chromeos) {
1064       sources -= [ "../common/time_format_browsertest.cc" ]
1065     }
1066     if (is_android) {
1067       sources -= [
1068         "../browser/policy/cloud/component_cloud_policy_browsertest.cc",
1069         "../browser/prefs/pref_hash_browsertest.cc",
1070         "../renderer/spellchecker/spellcheck_provider_hunspell_unittest.cc",
1071         "../renderer/spellchecker/spellcheck_unittest.cc",
1072       ]
1073     }
1074     if (is_chromeos) {
1075       sources += [
1076         "../browser/extensions/api/networking_private/networking_private_apitest.cc",
1077         "../browser/extensions/api/networking_private/networking_private_chromeos_apitest.cc",
1078       ]
1079     }
1080     if (!is_android && !is_ios && enable_nacl_browsertests) {
1081       sources +=
1082           [ "../browser/copresence/chrome_whispernet_client_browsertest.cc" ]
1083       deps += [ "//components/copresence" ]
1084     }
1085     if (enable_app_list) {
1086       sources += rebase_path(
1087               chrome_tests_gypi_values.chrome_browser_tests_app_list_sources,
1088               ".",
1089               "//chrome")
1090     }
1091     if (enable_supervised_users) {
1092       sources += rebase_path(
1093               chrome_tests_gypi_values.chrome_browser_tests_supervised_user_sources,
1094               ".",
1095               "//chrome")
1096     }
1097     if (enable_pepper_cdms) {
1098       # Runtime dependencies.
1099       data_deps += [
1100         "//media/cdm/ppapi:clearkeycdmadapter",
1101         "//third_party/widevine/cdm:widevinecdmadapter",
1102       ]
1103     }
1104     if (!enable_print_preview) {
1105       sources -= [
1106         "../browser/extensions/api/cloud_print_private/cloud_print_private_apitest.cc",
1107         "../browser/printing/cloud_print/test/cloud_print_policy_browsertest.cc",
1108         "../browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc",
1109         "../browser/printing/print_preview_dialog_controller_browsertest.cc",
1110         "../browser/printing/print_preview_pdf_generated_browsertest.cc",
1111         "../browser/service_process/service_process_control_browsertest.cc",
1112         "../browser/ui/webui/print_preview/print_preview_ui_browsertest.cc",
1113         "data/webui/print_preview.cc",
1114         "data/webui/print_preview.h",
1115       ]
1116     }
1117     if (enable_mdns) {
1118       sources += [ "../browser/ui/webui/local_discovery/local_discovery_ui_browsertest.cc" ]
1119     }
1120     if (use_brlapi) {
1121       deps += [ "//build/linux:libbrlapi" ]
1122     } else {
1123       sources -= [ "../browser/extensions/api/braille_display_private/braille_display_private_apitest.cc" ]
1124     }
1125     if (is_chrome_branded) {
1126       sources -= [
1127         # These tests depend on single process mode, which is disabled in
1128         # official builds.
1129         "../renderer/safe_browsing/phishing_classifier_browsertest.cc",
1130         "../renderer/safe_browsing/phishing_classifier_delegate_browsertest.cc",
1131         "../renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc",
1132       ]
1133     }
1134     if (!enable_autofill_dialog || is_android || is_ios) {
1135       deps -= [ "//third_party/libaddressinput" ]
1136     }
1137     if (enable_remoting) {
1138       sources += rebase_path(
1139               chrome_tests_gypi_values.chrome_browser_tests_remoting_sources,
1140               ".",
1141               "//chrome")
1142       #deps += [ "//remoting:remoting_webapp" ]  TODO(GYP)
1143     }
1144     if (use_x11) {
1145       deps += [ "//tools/xdisplaycheck" ]
1146     }
1147   }
1149   # TODO(GYP): Delete this after we've converted everything to GN.
1150   # The _run targets exist only for compatibility w/ GYP.
1151   group("sync_integration_tests_run") {
1152     testonly = true
1153     deps = [
1154       ":sync_integration_tests",
1155     ]
1156   }
1158   test("sync_integration_tests") {
1159     sources =
1160         rebase_path(chrome_tests_gypi_values.sync_integration_tests_sources,
1161                     ".",
1162                     "//chrome")
1164     data = [
1165       "//chrome/test/data/sync/",
1166       "//net/tools/testserver/",
1167       "//sync/tools/testserver/",
1168       "//third_party/pyftpdlib/",
1169       "//third_party/pywebsocket/",
1170       "//third_party/tlslite/",
1171       "$root_out_dir/pyproto/",
1172       "$root_out_dir/resources.pak",
1173     ]
1175     if (is_linux || is_win) {
1176       data += [
1177         "$root_out_dir/chrome_100_percent.pak",
1178         "$root_out_dir/locales/en-US.pak",
1179       ]
1180     }
1182     # TODO(phajdan.jr): Only temporary, to make transition easier.
1183     defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
1185     deps = [
1186       ":sync_integration_test_support",
1187       ":test_support",
1188       "//base/allocator",
1189       "//chrome:packed_extra_resources",
1190       "//chrome:packed_resources",
1191       "//chrome:resources",
1192       "//chrome:strings",
1193       "//chrome/common",
1194       "//chrome/renderer",
1195       "//crypto:platform",
1196       "//sync",
1197       "//testing/gmock",
1198       "//testing/gtest",
1199       "//third_party/icu",
1200       "//third_party/leveldatabase",
1201       "//third_party/WebKit/public:blink",
1202     ]
1204     data_deps = [ "//third_party/mesa:osmesa" ]
1206     if (cld_version == 2) {
1207       # Language detection is irrelevant to sync, so it can depend on any
1208       # implementation for CLD2. Dynamic is smaller, so go with dynamic.
1209       deps += [ "//third_party/cld_2:cld2_dynamic" ]
1210     }
1211     if (is_mac) {
1212       # Dictionary sync is disabled on Mac.
1213       sources -= [
1214         "../browser/sync/test/integration/multiple_client_dictionary_sync_test.cc",
1215         "../browser/sync/test/integration/single_client_dictionary_sync_test.cc",
1216         "../browser/sync/test/integration/two_client_dictionary_sync_test.cc",
1217       ]
1219       # The sync_integration_tests do not run on mac without this flag.
1220       # Search for comments about "xcode_settings" elsewhere in this file.
1221       ldflags = [ "-Wl,-ObjC" ]
1222     }
1223     if (is_win) {
1224       deps += [
1225         "//chrome:other_version",
1226         "//third_party/wtl",
1227         "//ui/resources",
1228       ]
1230       configs -= [ "//build/config/win:default_incremental_linking" ]
1231       configs +=
1232           [ "//build/config/win:default_large_module_incremental_linking" ]
1233     } else {
1234       sources -= [ "../app/chrome_version.rc.version" ]
1235     }
1236     if (!is_chromeos) {
1237       sources -= [
1238         "../browser/sync/test/integration/single_client_wifi_credentials_sync_test.cc",
1239         "../browser/sync/test/integration/two_client_wifi_credentials_sync_test.cc",
1240       ]
1241     }
1243     if (toolkit_views) {
1244       deps += [ "//ui/views" ]
1245     }
1246     if (enable_basic_printing || enable_print_preview) {
1247       deps += [ "//printing" ]
1248     }
1249     if (!enable_app_list) {
1250       sources -= [
1251         "../browser/sync/test/integration/single_client_app_list_sync_test.cc",
1252         "../browser/sync/test/integration/two_client_app_list_sync_test.cc",
1253       ]
1254     }
1255     if (!enable_supervised_users) {
1256       sources -= [ "../browser/sync/test/integration/single_client_supervised_user_settings_sync_test.cc" ]
1257     }
1258   }
1260   test("sync_performance_tests") {
1261     sources =
1262         rebase_path(chrome_tests_gypi_values.sync_performance_tests_sources,
1263                     ".",
1264                     "//chrome")
1266     defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
1268     deps = [
1269       ":sync_integration_test_support",
1270       "//base/allocator",
1271       "//crypto:platform",
1272       "//sync",
1273       "//testing/gmock",
1274       "//testing/gtest",
1275     ]
1277     if (cld_version == 2) {
1278       # Language detection is irrelevant to sync, so it can depend on any
1279       # implementation for CLD2. Dynamic is smaller, so go with dynamic.
1280       deps += [ "//third_party/cld_2:cld2_dynamic" ]
1281     }
1283     if (is_mac) {
1284       # Dictionary sync is disabled on Mac.
1285       sources -= [ "../browser/sync/test/integration/performance/dictionary_sync_perf_test.cc" ]
1287       # The sync_performance_tests do not run on mac without this flag.
1288       # Search for comments about "xcode_settings" elsewhere in this file.
1289       ldflags = [ "-Wl,-ObjC" ]
1290     }
1291     if (is_win) {
1292       deps += [
1293         "//chrome:other_version",
1294         "//chrome/installer/util:strings",
1295         "//third_party/wtl",
1296         "//ui/resources",
1297       ]
1298       configs -= [ "//build/config/win:default_incremental_linking" ]
1299       configs +=
1300           [ "//build/config/win:default_large_module_incremental_linking" ]
1301     } else {
1302       sources -= [ "../app/chrome_version.rc.version" ]
1303     }
1305     if (toolkit_views) {
1306       deps += [ "//ui/views" ]
1307     }
1308   }
1310   # Executable to measure time to load libraries.
1311   test("load_library_perf_tests") {
1312     sources = [
1313       "../browser/load_library_perf_test.cc",
1314     ]
1316     deps = [
1317       "//base/test:test_support_perf",
1318       "//testing/gtest",
1319       "//testing/perf",
1320       "//third_party/widevine/cdm:version_h",
1321     ]
1323     if (enable_pepper_cdms) {
1324       data_deps = [
1325         "//media/cdm/ppapi:clearkeycdmadapter",
1326         "//third_party/widevine/cdm:widevinecdmadapter",
1327       ]
1328     }
1329   }
1331   js2gtest("unit_tests_js") {
1332     test_type = "unit"
1333     sources = rebase_path(
1334             chrome_tests_unit_gypi_values.chrome_unit_tests_gtestjs_sources,
1335             ".",
1336             "//chrome")
1337     extra_js_files =
1338         rebase_path(chrome_tests_unit_gypi_values.chrome_unit_tests_js_sources,
1339                     ".",
1340                     "//chrome")
1341     if (is_chromeos) {
1342       sources += rebase_path(
1343               chrome_tests_unit_gypi_values.chrome_unit_tests_chromeos_gtestjs_sources,
1344               ".",
1345               "//chrome")
1346       extra_js_files += rebase_path(
1347               chrome_tests_unit_gypi_values.chrome_unit_tests_chromeos_js_sources,
1348               ".",
1349               "//chrome")
1350     }
1351   }
1353   # TODO(GYP): Delete this after we've converted everything to GN.
1354   # The _run targets exist only for compatibility w/ GYP.
1355   group("unit_tests_run") {
1356     testonly = true
1357     deps = [
1358       ":unit_tests",
1359     ]
1360   }
1362   test("unit_tests") {
1363     sources =
1364         rebase_path(chrome_tests_unit_gypi_values.chrome_unit_tests_sources,
1365                     ".",
1366                     "//chrome")
1368     configs += [ "//build/config:precompiled_headers" ]
1370     data = [
1371       "data/",
1372       "//base/test/data/",
1373       "//chrome/third_party/mock4js/",
1374       "//components/test/data/",
1375       "//extensions/test/data/",
1376       "//google_apis/test/data/",
1377       "//net/data/",
1378       "//net/tools/testserver/",
1379       "//third_party/accessibility-audit/axs_testing.js",
1380       "//third_party/hunspell_dictionaries/",
1381       "//third_party/pyftpdlib/",
1382       "//third_party/pywebsocket/",
1383       "//third_party/tlslite/",
1384       "//third_party/zlib/google/test/data/",
1385       "//tools/metrics/histograms/histograms.xml",
1386       "$root_out_dir/pyproto/google/",
1387       "$root_out_dir/test_data/chrome/browser/resources/google_now/",
1388       "$root_out_dir/test_data/chrome/browser/resources/print_preview/",
1389       "$root_out_dir/test_data/chrome/renderer/resources/extensions/",
1390       "$root_out_dir/test_data/ui/webui/",
1391       "$root_out_dir/resources.pak",
1392     ]
1393     if (is_android || is_linux || is_win) {
1394       data += [
1395         "$root_out_dir/chrome_100_percent.pak",
1396         "$root_out_dir/locales/en-US.pak",
1397       ]
1398     }
1400     defines = []
1402     deps = [
1403       # NOTE: New depndencies should generally be added in the OS!="ios"
1404       # dependencies block below, rather than here.
1405       # Unit tests should only depend on:
1406       # 1) everything that the chrome binaries depend on:
1407       "//chrome:browser_dependencies",
1408       "//chrome:child_dependencies",
1410       # 2) test-specific support libraries:
1411       ":test_support_unit",
1412       "//base/test:test_support",
1413       "//chrome/test:test_support",
1414       "//components/resources",
1415       "//components/content_settings/core/test:test_support",
1416       "//content/test:test_support",
1417       "//content/public/app:both",
1418       "//crypto:platform",
1419       "//crypto:test_support",
1420       "//net",
1421       "//net:test_support",
1422       "//sync:test_support_sync_api",
1423       "//sync:test_support_sync_core",
1424       "//sync:test_support_sync_internal_api",
1425       "//testing/gmock",
1426       "//testing/gtest",
1428       # 3) anything tests directly depend on
1429       "//base/allocator",
1430       "//chrome:resources",
1431       "//chrome:strings",
1432       "//courgette:courgette_lib",
1433       "//google_apis",
1434       "//skia",
1435       "//third_party/cacheinvalidation",
1436       "//third_party/icu",
1437       "//third_party/libxml",
1438       "//ui/base:test_support",
1439       "//ui/gfx:test_support",
1440       "//ui/resources",
1441     ]
1442     data_deps = []
1444     # TODO(GYP) Windows stuff
1445     # ['incremental_chrome_dll==1', {
1446     #   'UseLibraryDependencyInputs': "true",
1448     if (!is_ios) {
1449       deps += [
1450         ":unit_tests_js",
1451         "//components/audio_modem:test_support",
1452         "//components/autofill/content/browser/wallet:test_support",
1453         "//components/autofill/content/renderer:test_support",
1454         "//components/metrics/proto",
1455         "//components/data_reduction_proxy/core/browser:test_support",
1456         "//components/safe_json:test_support",
1457         "//components/webdata_services:test_support",
1458         "//components/strings",
1459         "//device/bluetooth:mocks",
1460         "//content/app/resources",
1461         "//gpu:test_support",
1462         "//media:test_support",
1464         #'../ppapi/ppapi_internal.gyp:ppapi_unittest_shared',  TODO(GYP)
1465         "//third_party/leveldatabase",
1466         "//third_party/libaddressinput",
1467         "//third_party/libjingle",
1468         "//third_party/libphonenumber",
1469         "//third_party/webrtc/modules/desktop_capture",
1470         "//tools/json_schema_compiler/test",
1471         "//ui/gl",
1472         "//v8",
1473       ]
1474     }
1476     if (is_android) {
1477       deps -= [ "//third_party/libaddressinput" ]
1479       # Some android targets still depend on --gc-sections to link.
1480       # TODO: remove --gc-sections for Debug builds (crbug.com/159847).
1481       ldflags = [ "-Wl,--gc-sections" ]
1482       deps += [ "//testing/android/native_test:native_test_native_code" ]
1483       isolate_file = "../unit_tests.isolate"
1484     } else {
1485       sources += rebase_path(
1486               chrome_tests_unit_gypi_values.chrome_unit_tests_non_android_sources,
1487               ".",
1488               "//chrome")
1489       sources -= [ "../browser/download/download_request_infobar_delegate_unittest.cc" ]
1490     }
1491     if (is_ios || is_chromeos) {
1492       sources -=
1493           [ "../browser/metrics/signin_status_metrics_provider_unittest.cc" ]
1494     }
1495     if (enable_background) {
1496       sources += rebase_path(
1497               chrome_tests_unit_gypi_values.chrome_unit_tests_background_sources,
1498               ".",
1499               "//chrome")
1500     }
1501     if (enable_spellcheck) {
1502       sources += rebase_path(
1503               chrome_tests_unit_gypi_values.chrome_unit_tests_spellchecker_sources,
1504               ".",
1505               "//chrome")
1506       if (is_mac && !is_ios) {
1507         deps += [ "//third_party/hunspell" ]
1508       }
1509     }
1511     if (enable_one_click_signin) {
1512       sources += [
1513         "../browser/ui/sync/one_click_signin_sync_observer_unittest.cc",
1514         "../browser/ui/sync/one_click_signin_sync_starter_unittest.cc",
1515       ]
1516     }
1518     if (enable_extensions) {
1519       sources += rebase_path(
1520               chrome_tests_unit_gypi_values.chrome_unit_tests_extensions_sources,
1521               ".",
1522               "//chrome")
1523       deps += [
1524         "//chrome/common/extensions/api",
1525         "//device/usb:mocks",
1526         "//extensions:extensions_resources",
1527         "//extensions/strings",
1528       ]
1529       if (enable_configuration_policy) {
1530         sources += rebase_path(
1531                 chrome_tests_unit_gypi_values.chrome_unit_tests_extensions_policy_sources,
1532                 ".",
1533                 "//chrome")
1534       }
1535       if (!is_chromeos) {
1536         sources += rebase_path(
1537                 chrome_tests_unit_gypi_values.chrome_unit_tests_extensions_non_chromeos_sources,
1538                 ".",
1539                 "//chrome")
1540       }
1541     }
1542     if (toolkit_views) {
1543       deps += [
1544         "//components/web_modal:test_support",
1545         "//ui/views",
1546         "//ui/views:test_support",
1547       ]
1548       sources += rebase_path(
1549               chrome_tests_unit_gypi_values.chrome_unit_tests_views_sources,
1550               ".",
1551               "//chrome")
1552       if (!is_chromeos && (!is_mac || mac_views_browser)) {
1553         sources += rebase_path(
1554                 chrome_tests_unit_gypi_values.chrome_unit_tests_views_non_chromeos_sources,
1555                 ".",
1556                 "//chrome")
1557       }
1558       if (!is_mac) {
1559         sources += rebase_path(
1560                 chrome_tests_unit_gypi_values.chrome_unit_tests_views_non_mac_sources,
1561                 ".",
1562                 "//chrome")
1563       }
1564     }
1565     if (use_ash) {
1566       sources += rebase_path(
1567               chrome_tests_unit_gypi_values.chrome_unit_tests_ash_sources,
1568               ".",
1569               "//chrome")
1570       deps += [
1571         "//ash:test_support",
1572         "//ash/resources",
1573         "//ash/strings",
1574       ]
1576       # We eventually want to compile both in Win Aura builds, see
1577       # http://crbug.com/155545.
1578       if (!is_win) {
1579         sources -= [ "../browser/ui/window_sizer/window_sizer_unittest.cc" ]
1580       }
1581     }
1582     if (use_aura) {
1583       sources += [ "//ui/views/controls/webview/webview_unittest.cc" ]
1584       deps += [
1585         "//ui/wm",
1586         "//ui/aura:test_support",
1587         "//ui/views:test_support",
1588       ]
1589     }
1590     if (!is_chromeos && is_linux) {
1591       sources += rebase_path(
1592               chrome_tests_unit_gypi_values.chrome_unit_tests_desktop_linux_sources,
1593               ".",
1594               "//chrome")
1595     }
1596     if (!is_chromeos && !use_ozone && is_linux) {
1597       deps += [
1598         "//chrome/browser/ui/libgtk2ui",
1599         "//build/linux:gio",
1600       ]
1601     }
1603     if (enable_task_manager) {
1604       sources += rebase_path(
1605               chrome_tests_unit_gypi_values.chrome_unit_tests_task_manager_sources,
1606               ".",
1607               "//chrome")
1608     }
1609     if (enable_mdns) {
1610       sources += rebase_path(
1611               chrome_tests_unit_gypi_values.chrome_unit_tests_mdns_sources,
1612               ".",
1613               "//chrome")
1614     }
1615     if (enable_service_discovery) {
1616       sources += rebase_path(
1617               chrome_tests_unit_gypi_values.chrome_unit_tests_service_discovery_sources,
1618               ".",
1619               "//chrome")
1620     }
1621     if (enable_configuration_policy) {
1622       sources += rebase_path(
1623               chrome_tests_unit_gypi_values.chrome_unit_tests_configuration_policy_sources,
1624               ".",
1625               "//chrome")
1626       if (is_chromeos) {
1627         sources -=
1628             [ "../browser/policy/cloud/user_policy_signin_service_unittest.cc" ]
1629       } else if (is_android) {
1630         sources -= [ "../browser/policy/policy_path_parser_unittest.cc" ]
1631       }
1632       if (!is_android && !is_ios && !is_chromeos) {
1633         sources +=
1634             [ "../browser/net/disk_cache_dir_policy_handler_unittest.cc" ]
1635       }
1636       if (!is_android && !is_ios) {
1637         sources +=
1638             [ "../browser/download/download_dir_policy_handler_unittest.cc" ]
1639       }
1640     }
1641     if (enable_web_speech) {
1642       sources += rebase_path(
1643               chrome_tests_unit_gypi_values.chrome_unit_tests_speech_sources,
1644               ".",
1645               "//chrome")
1646     }
1647     if (enable_notifications) {
1648       sources += rebase_path(
1649               chrome_tests_unit_gypi_values.chrome_unit_tests_notifications_sources,
1650               ".",
1651               "//chrome")
1652       if (is_android) {
1653         sources -= [
1654           # Android does not use the Message Center notification system.
1655           "../browser/notifications/message_center_notifications_unittest.cc",
1656           "../browser/notifications/message_center_settings_controller_unittest.cc",
1657         ]
1658       }
1659     }
1660     if (safe_browsing_mode == 1) {
1661       # TODO(sgurun): enable tests for safe_browsing==2.
1662       sources += rebase_path(
1663               chrome_tests_unit_gypi_values.chrome_unit_tests_full_safe_browsing_sources + chrome_tests_unit_gypi_values.chrome_unit_tests_shared_safe_browsing_sources,
1664               ".",
1665               "//chrome")
1666       deps += [ ":test_proto" ]
1667     } else if (safe_browsing_mode == 3) {
1668       sources += rebase_path(
1669               chrome_tests_unit_gypi_values.chrome_unit_tests_mobile_extended_safe_browsing_sources + chrome_tests_unit_gypi_values.chrome_unit_tests_shared_safe_browsing_sources,
1670               ".",
1671               "//chrome")
1672     }
1673     if (enable_autofill_dialog && !is_android) {
1674       sources += rebase_path(
1675               chrome_tests_unit_gypi_values.chrome_unit_tests_autofill_dialog_sources,
1676               ".",
1677               "//chrome")
1678     }
1679     if (enable_plugins) {
1680       sources += rebase_path(
1681               chrome_tests_unit_gypi_values.chrome_unit_tests_plugins_sources,
1682               ".",
1683               "//chrome")
1684     }
1685     if (enable_print_preview) {
1686       sources += rebase_path(
1687               chrome_tests_unit_gypi_values.chrome_unit_tests_print_preview_sources,
1688               ".",
1689               "//chrome")
1690     }
1691     if (enable_captive_portal_detection) {
1692       sources += rebase_path(
1693               chrome_tests_unit_gypi_values.chrome_unit_tests_captive_portal_sources,
1694               ".",
1695               "//chrome")
1696     }
1697     if (enable_session_service) {
1698       sources += rebase_path(
1699               chrome_tests_unit_gypi_values.chrome_unit_tests_session_service_sources,
1700               ".",
1701               "//chrome")
1702     }
1703     if (enable_media_router) {
1704       sources += rebase_path(
1705               chrome_tests_unit_gypi_values.chrome_unit_tests_media_router_sources,
1706               ".",
1707               "//chrome")
1708       deps += [ "//chrome/browser/media/router:test_support" ]
1709       if (!is_android) {
1710         sources += rebase_path(
1711                 chrome_tests_unit_gypi_values.chrome_unit_tests_media_router_non_android_sources,
1712                 ".",
1713                 "//chrome")
1714       }
1715       if (!toolkit_views) {
1716         sources -= [ "../browser/ui/views/media_router/media_router_ui_browsertest.cc" ]
1717       }
1718     }
1719     if (enable_webrtc) {
1720       sources += rebase_path(
1721               chrome_tests_unit_gypi_values.chrome_unit_tests_webrtc_sources,
1722               ".",
1723               "//chrome")
1724     }
1725     if (is_chromeos) {
1726       deps += [ "//chrome/browser/chromeos:unit_tests" ]
1727       sources -= [
1728         "../browser/signin/signin_global_error_unittest.cc",
1729         "../browser/signin/signin_manager_unittest.cc",
1730       ]
1731     }
1732     if (use_x11) {
1733       deps += [ "//ui/events/devices" ]
1734       data_deps += [ "//tools/xdisplaycheck" ]
1735     } else {
1736       sources -= [ "../browser/password_manager/password_store_x_unittest.cc" ]
1737     }
1738     if (cld_version == 2) {
1739       # Unit tests should be independent of the CLD2 access mechanism, just use
1740       # static for simplicity.
1741       deps += [ "//third_party/cld_2:cld2_static" ]
1742     }
1743     if (is_desktop_linux && current_cpu == "x64") {
1744       # Only add this test for 64 bit builds because otherwise we need the 32
1745       # bit library on 64 bit systems when running this test.
1746       sources +=
1747           [ "../browser/password_manager/native_backend_gnome_x_unittest.cc" ]
1748       configs += [
1749         "//chrome/browser:gnome_keyring",
1750         "//chrome/browser:gnome_keyring_direct",
1751       ]
1752     }
1753     if (is_linux && !is_chromeos) {
1754       sources +=
1755           [ "../browser/password_manager/native_backend_libsecret_unittest.cc" ]
1756     }
1757     if (is_linux && use_aura) {
1758       deps += [
1759         "//dbus",
1760         "//dbus:test_support",
1761         "//ui/aura:test_support",
1762       ]
1763     }
1764     if (is_linux && is_chrome_branded && current_cpu == "x86") {
1765       ldflags = [ "-Wl,--strip-debug" ]
1766     }
1767     if (is_mac) {
1768       sources += rebase_path(
1769               chrome_tests_unit_gypi_values.chrome_unit_tests_mac_sources,
1770               ".",
1771               "//chrome")
1772       sources -= [
1773         "../browser/ui/tests/ui_gfx_image_unittest.cc",
1774         "../renderer/spellchecker/spellcheck_provider_hunspell_unittest.cc",
1775         "../tools/convert_dict/convert_dict_unittest.cc",
1776       ]
1778       # The test fetches resources which means Mac need the app bundle to exist
1779       # on disk so it can pull from it.
1780       deps += [
1781         "//third_party/google_toolbox_for_mac",
1782         "//third_party/ocmock",
1783       ]
1785       # TODO(mark): We really want this for all non-static library targets,
1786       # but when we tried to pull it up to the common.gypi level, it broke
1787       # other things like the ui and startup tests. *shrug*
1788       ldflags = [ "-Wl,-ObjC" ]
1789     }
1790     if (!is_mac && !is_ios) {
1791       deps += [
1792         "//chrome/tools/convert_dict:lib",
1793         "//chrome:packed_extra_resources",
1794         "//chrome:packed_resources",
1795         "//third_party/hunspell",
1796       ]
1797     }
1798     if (is_win || is_mac) {
1799       sources += rebase_path(
1800               chrome_tests_unit_gypi_values.chrome_unit_tests_win_mac_sources,
1801               ".",
1802               "//chrome")
1803     }
1804     if (is_win || is_mac || is_chromeos) {
1805       sources += [ "../common/extensions/api/networking_private/networking_private_crypto_unittest.cc" ]
1806     }
1807     if (enable_rlz_support) {
1808       sources += [ "../browser/rlz/chrome_rlz_tracker_delegate_unittest.cc" ]
1809       deps += [
1810         "//chrome/browser:rlz",
1811         "//components/rlz",
1812         "//rlz:test_support",
1813       ]
1814     }
1815     if (is_win) {
1816       # The PDB gets too large for incremental linking.
1817       configs -= [ "//build/config/win:default_incremental_linking" ]
1818       configs += [ "//build/config/win:no_incremental_linking" ]
1820       sources += rebase_path(
1821               chrome_tests_unit_gypi_values.chrome_unit_tests_win_sources,
1822               ".",
1823               "//chrome")
1824       deps += [
1825         #'browser/safe_browsing/incident_reporting/verifier_test/verifier_unittest.gyp:verifier_test_dll_1',  TODO(GYP) bug 512919
1826         #'browser/safe_browsing/incident_reporting/verifier_test/verifier_unittest.gyp:verifier_test_dll_2',  TODO(GYP) bug 512919
1827         "//chrome:other_version",
1828         "//chrome_elf:blacklist_test_dll_1",
1829         "//chrome/installer/util:strings",
1830         "//third_party/iaccessible2",
1831         "//third_party/isimpledom",
1832         "//third_party/wtl",
1833         "//ui/resources",
1834       ]
1836       libs = [
1837         "comsupp.lib",
1838         "oleacc.lib",
1839         "rpcrt4.lib",
1840         "urlmon.lib",
1841         "winmm.lib",
1842       ]
1843       if (!is_chrome_branded) {
1844         sources -= [ "../browser/google/google_update_win_unittest.cc" ]
1845       }
1846     }
1847     if (is_android || is_ios) {
1848       sources -= [
1849         "../browser/devtools/device/webrtc/devtools_bridge_instances_request_unittest.cc",
1850         "../browser/ui/sync/sync_promo_ui_unittest.cc",
1851       ]
1852     } else {
1853       deps += [ "//chrome/tools/profile_reset:jtl_compiler_lib" ]
1854     }
1855     if (!is_android && !is_chromeos) {
1856       sources += rebase_path(
1857               chrome_tests_unit_gypi_values.chrome_unit_tests_non_android_or_chromeos_sources,
1858               ".",
1859               "//chrome")
1860     }
1861     if (enable_themes) {
1862       sources += rebase_path(
1863               chrome_tests_unit_gypi_values.chrome_unit_tests_themes_sources,
1864               ".",
1865               "//chrome")
1866     }
1867     if (!is_android && (use_nss_certs || use_openssl_certs)) {
1868       sources += [ "../common/net/x509_certificate_model_unittest.cc" ]
1869     }
1870     if (enable_supervised_users) {
1871       sources += rebase_path(
1872               chrome_tests_unit_gypi_values.chrome_unit_tests_supervised_user_sources,
1873               ".",
1874               "//chrome")
1875     }
1876     if (enable_supervised_users && !is_android && !is_ios) {
1877       sources += rebase_path(
1878               chrome_tests_unit_gypi_values.chrome_unit_tests_supervised_user_legacy_sources,
1879               ".",
1880               "//chrome")
1881     }
1882     if (safe_browsing_mode == 1 && enable_extensions) {
1883       sources += [ "../browser/extensions/blacklist_unittest.cc" ]
1884     }
1885     if (cld_version == 1) {
1886       sources += [ "//third_party/cld/encodings/compact_lang_det/compact_lang_det_unittest_small.cc" ]
1887       defines += [ "CLD_WINDOWS" ]
1888       deps += [ "//third_party/cld" ]
1889     }
1890     if (enable_app_list) {
1891       sources += rebase_path(
1892               chrome_tests_unit_gypi_values.chrome_unit_tests_app_list_sources,
1893               ".",
1894               "//chrome")
1895       deps += [ "//ui/app_list:test_support" ]
1896     }
1897     if (enable_app_list && is_chromeos) {
1898       sources += rebase_path(
1899               chrome_tests_unit_gypi_values.chrome_unit_tests_app_list_chromeos_sources,
1900               ".",
1901               "//chrome")
1902     }
1903     if (enable_plugins && !enable_plugin_installation) {
1904       sources -= [ "../browser/plugins/plugin_installer_unittest.cc" ]
1905     }
1906   }
1908   if (is_win || (is_linux && !is_chromeos)) {
1909     # TODO(GYP): Figure out which of these work and are needed on other
1910     # platforms.
1911     test("chrome_app_unittests") {
1912       sources = [
1913         "../app/chrome_watcher_client_unittest_win.cc",
1914         "../app/chrome_watcher_client_win.cc",
1915         "../app/chrome_watcher_command_line_unittest_win.cc",
1916         "../app/chrome_watcher_command_line_win.cc",
1917         "../app/delay_load_hook_unittest_win.cc",
1918         "../app/delay_load_hook_win.cc",
1919         "../app/delay_load_hook_win.h",
1920         "../app/signature_validator_win.cc",
1921         "../app/signature_validator_win.h",
1922         "../app/signature_validator_win_unittest.cc",
1923         "../common/crash_keys.cc",
1924         "../common/crash_keys.h",
1925       ]
1927       deps = [
1928         ":test_support",
1929         "//breakpad:client",
1930         "//chrome/browser",
1931         "//chrome/child",
1932         "//components/crash_keys",
1933         "//base/test:run_all_unittests",
1934         "//base/test:test_support",
1935       ]
1936       if (cld_version == 2) {
1937         # Use whatever CLD2 data access mode that the
1938         # application embedder is using.
1939         deps += [ "//third_party/cld_2:cld2_platform_impl" ]
1940       }
1941     }
1943     test("performance_browser_tests") {
1944       sources = rebase_path(
1945               chrome_tests_gypi_values.performance_browser_tests_sources,
1946               ".",
1947               "//chrome")
1949       defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
1951       deps = [
1952         ":test_support",
1953         "//base",
1954         "//base:i18n",
1955         "//base/test:test_support",
1956         "//chrome/browser",
1957         "//chrome/renderer",
1958         "//components/about_handler",
1959         "//components/autofill/content/browser/wallet:test_support",
1960         "//components/autofill/content/renderer:test_support",
1961         "//media/cast:test_support",
1962         "//testing/gmock",
1963         "//testing/gtest",
1964         "//testing/perf",
1965       ]
1967       if (is_win) {
1968         configs -= [ "//build/config/win:default_incremental_linking" ]
1969         configs +=
1970             [ "//build/config/win:default_large_module_incremental_linking" ]
1971       } else {
1972         sources -= [
1973           "../app/chrome_command_ids.h",
1975           #"../app/chrome_dll.rc",
1976           #"../app/chrome_dll_resource.h",
1977           "../app/chrome_version.rc.version",
1978         ]
1979       }
1980       if (!is_mac) {
1981         sources -= [ "perf/mach_ports_performancetest.cc" ]
1982       }
1984       if (cld_version == 2) {
1985         # Use whatever CLD2 data access mode that the
1986         # application embedder is using.
1987         deps += [ "//third_party/cld_2:cld2_platform_impl" ]
1988       }
1989     }
1990   }
1993 source_set("test_support_unit") {
1994   testonly = true
1995   sources = [
1996     "../browser/sync/glue/session_sync_test_helper.cc",
1997     "../browser/sync/glue/session_sync_test_helper.h",
1998     "base/run_all_unittests.cc",
1999   ]
2001   deps = [
2002     ":test_support",
2003     "//base",
2004     "//chrome:resources",
2005     "//chrome:strings",
2006     "//chrome/browser",
2007     "//chrome/common",
2008     "//mojo/environment:chromium",
2009     "//third_party/mojo/src/mojo/edk/system",
2010   ]
2012   if (!is_android && use_ash) {
2013     sources += rebase_path(
2014             chrome_tests_unit_gypi_values.chrome_test_support_unit_ash_sources,
2015             ".",
2016             "//chrome")
2017   }