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