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")
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
25 # GYP version: chrome/chrome_tests_unit.gypi:test_support_common
26 source_set("test_support") {
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",
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",
91 configs += [ "//build/config:precompiled_headers" ]
93 # New deps should go in the non-iOS section below.
95 "//content/test:test_support",
98 "//base:prefs_test_support",
99 "//base/test:test_support",
100 "//chrome:resources",
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",
125 "//net:test_support",
128 "//sql:test_support",
132 "//third_party/zlib",
133 "//ui/message_center:test_support",
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",
161 "//ui/events:events_base",
166 if (enable_extensions) {
168 "//chrome/common/extensions/api",
169 "//extensions:test_support",
174 deps += [ "//crypto:platform" ]
177 # deps += [ '../third_party/ocmock/ocmock.gyp:ocmock' ] TODO(GYP)
180 deps += [ "//third_party/wtl" ]
183 "//win8:test_registrar_constants",
184 "//win8:test_support_win8",
189 deps += [ "//components/ownership" ]
194 "base/test_browser_window_aura.cc",
195 "base/test_browser_window_aura.h",
199 if (enable_plugins) {
201 "ppapi/ppapi_test.cc",
202 "ppapi/ppapi_test.h",
208 deps += [ "//ash:test_support" ]
211 deps += [ "//ui/views:test_support" ]
214 if (enable_extensions) {
216 "//chrome/common/extensions/api",
217 "//extensions:test_support",
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") {
228 "../common/safe_browsing/ipc_protobuf_message_test.proto",
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") {
237 ":interactive_ui_tests",
241 test("interactive_ui_tests") {
243 rebase_path(chrome_tests_gypi_values.chrome_interactive_ui_test_sources,
247 configs += [ "//build/config:precompiled_headers" ]
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",
266 if (is_linux || is_win) {
268 "$root_out_dir/chrome_100_percent.pak",
269 "$root_out_dir/locales/en-US.pak",
270 "$root_out_dir/locales/fr.pak",
274 data += [ "$root_out_dir/libppapi_tests.so" ]
277 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
283 "//chrome/browser/devtools",
285 "//chrome/test:test_support",
286 "//chrome:resources",
288 "//chrome:packed_extra_resources",
289 "//chrome:packed_resources",
290 "//components/resources",
291 "//content/app/resources",
293 "//crypto:test_support",
294 "//google_apis:test_support",
296 "//net:net_resources",
297 "//net:test_support",
302 "//third_party/hunspell",
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",
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
318 "//ppapi:ppapi_tests",
319 "//third_party/mesa:osmesa",
323 sources += rebase_path(
324 chrome_tests_gypi_values.chrome_interactive_ui_test_views_sources,
329 "//ui/views:test_support",
330 "//ui/views/controls/webview:test_support",
333 sources += rebase_path(
334 chrome_tests_gypi_values.chrome_interactive_ui_test_views_non_mac_sources,
339 # TODO(gbillock): aura linux does not support the automation for
340 # SendMouseMoveNotifyWhenDone
341 sources -= [ "../browser/ui/views/toolbar/toolbar_button_test.cc" ]
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",
353 if (is_chromeos || !use_x11) {
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",
360 deps += [ "//ui/touch_selection" ]
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,
373 sources += rebase_path(
374 chrome_tests_gypi_values.chrome_interactive_ui_test_chromeos_sources,
377 sources += [ "../browser/notifications/login_state_notification_blocker_chromeos_browsertest.cc" ]
379 # Use only the _chromeos version on ChromeOS.
380 "base/view_event_test_platform_part_ash.cc",
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)
397 if (is_chrome_branded) {
399 # These tests are failing on official cros bots. crbug.com/431450.
400 "../browser/ui/views/bookmarks/bookmark_bar_view_test.cc",
404 # ChromeOS doesn't use panels, everybody else does.
405 sources += rebase_path(
406 chrome_tests_gypi_values.chrome_interactive_ui_test_panels_sources,
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,
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,
428 sources += rebase_path(
429 chrome_tests_gypi_values.chrome_interactive_ui_test_win_sources,
433 "//chrome:other_version",
434 "//third_party/isimpledom",
439 configs -= [ "//build/config/win:default_incremental_linking" ]
441 [ "//build/config/win:default_large_module_incremental_linking" ]
443 libs = [ "oleacc.lib" ]
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" ]
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" ]
462 configs += [ "//build/config/linux:xtst" ]
463 data_deps += [ "//tools/xdisplaycheck" ]
466 if (enable_app_list) {
467 sources += rebase_path(
468 chrome_tests_gypi_values.chrome_interactive_ui_test_app_list_sources,
474 sources += rebase_path(
475 chrome_tests_gypi_values.chrome_interactive_ui_test_ash_sources,
478 deps += [ "//ash:interactive_ui_test_support" ]
481 if (enable_notifications) {
482 sources += rebase_path(
483 chrome_tests_gypi_values.chrome_interactive_ui_test_notifications_sources,
487 # Non-ChromeOS notifications tests (ChromeOS does not use cross-platform
491 "../browser/notifications/notification_browsertest.cc",
492 "../browser/notifications/platform_notification_service_browsertest.cc",
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",
506 } # enable_notifications
508 if (!use_aura || is_chromeos) {
510 [ "../../ui/views/corewm/desktop_capture_controller_unittest.cc" ]
514 source_set("sync_integration_test_support") {
516 sources = rebase_path(
517 chrome_tests_gypi_values.test_support_sync_integration_sources,
527 "//components/invalidation/impl",
528 "//components/invalidation/impl:test_support",
532 "//sync:test_support_sync_testserver",
533 "//sync:test_support_sync_fake_server",
534 "//ui/app_list:test_support",
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",
545 if (!enable_app_list) {
547 "../browser/sync/test/integration/sync_app_list_helper.cc",
548 "../browser/sync/test/integration/sync_app_list_helper.h",
553 "../browser/sync/test/integration/wifi_credentials_helper.cc",
554 "../browser/sync/test/integration/wifi_credentials_helper.h",
559 js2gtest("browser_tests_js_webui") {
561 sources = rebase_path(
562 chrome_tests_gypi_values.chrome_browser_tests_webui_js_sources,
565 if (is_chrome_branded) {
567 sources -= [ "data/webui/accessibility_audit_browsertest.js" ]
570 sources -= [ "data/webui/certificate_viewer_dialog_test.js" ]
572 if (!enable_app_list) {
573 sources -= [ "../browser/ui/webui/app_list/start_page_browsertest.js" ]
575 if (!enable_supervised_users) {
577 [ "../browser/ui/webui/downloads_ui_supervised_browsertest.js" ]
579 if (!enable_print_preview) {
580 sources -= [ "data/webui/print_preview.js" ]
582 if (enable_media_router) {
584 [ "data/webui/media_router/media_router_elements_browsertest.js" ]
587 "//chrome/browser/ui",
590 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
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") {
598 ":telemetry_gpu_test",
602 group("telemetry_gpu_test") {
605 "//tools/telemetry:bitmaptools",
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/",
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/",
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) {
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",
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") {
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") {
660 data_deps = [ ":browser_tests" ]
663 test("browser_tests") {
665 "base/browser_tests_main.cc",
668 rebase_path(chrome_tests_gypi_values.chrome_browser_tests_sources,
671 sources += rebase_path(
672 chrome_tests_gypi_values.chrome_browser_extensions_test_support_sources,
676 configs += [ "//build/config:precompiled_headers" ]
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/",
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/",
718 ":browser_tests_js_webui",
719 ":sync_integration_test_support",
724 "//base/test:test_support",
725 "//chrome:browser_tests_pak",
726 "//chrome:packed_extra_resources",
727 "//chrome:packed_resources",
728 "//chrome:resources",
731 "//chrome/browser/resources:extension_resource_demo",
732 "//chrome/common/extensions/api",
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",
746 "//crypto:test_support",
747 "//device/bluetooth:mocks",
748 "//device/serial:test_support",
749 "//extensions/common/api",
750 "//google_apis:test_support",
752 "//media/base:test_support",
753 "//media/cast:test_support",
755 "//net:test_support",
759 "//sync:test_support_sync_api",
763 "//third_party/cacheinvalidation",
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",
775 "//ui/web_dialogs:test_support",
779 # TODO(rockot) bug 505926: The chrome_extensions_browsertests target should
780 # be deleted and this line removed. See the chrome_extensions_browsertests
782 deps += [ "//extensions:chrome_extensions_browsertests" ]
784 # Runtime dependencies
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",
794 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
796 if (!enable_nacl_browsertests) {
797 defines += [ "DISABLE_NACL_BROWSERTESTS" ]
800 # TODO(GYP) if (is_win) {
801 # ['incremental_chrome_dll==1', {
802 # 'UseLibraryDependencyInputs': "true",
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" ]
810 if (!enable_one_click_signin) {
811 sources -= [ "../browser/ui/sync/one_click_signin_bubble_links_delegate_browsertest.cc" ]
813 if (!enable_nacl_browsertests) {
814 sources -= [ "../browser/extensions/api/hotword_private/hotword_private_apitest.cc" ]
815 } else if (enable_nacl) {
817 "../browser/extensions/extension_nacl_browsertest.cc",
818 "../browser/nacl_host/test/gdb_debug_stub_browsertest.cc",
820 deps += [ "//components/nacl/renderer/plugin:nacl_trusted_plugin" ]
822 if (enable_nacl_untrusted) {
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",
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")
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
848 sources += [ "//third_party/liblouis/nacl_wrapper/liblouis_wrapper_browsertest.cc" ]
850 "//chrome/browser/chromeos",
851 #'../third_party/liblouis/liblouis_nacl.gyp:liblouis_test_data', TODO(GYP) bug 512906
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" ]
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" ]
864 #'chrome.gyp:chrome_nacl_win64', TODO(GYP) bug 512869
866 configs -= [ "//build/config/win:default_incremental_linking" ]
868 [ "//build/config/win:default_large_module_incremental_linking" ]
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.
879 if (debug_devtools) {
880 defines += [ "DEBUG_DEVTOOLS=1" ]
883 deps += [ "//ash:test_support" ]
885 if (use_aura || toolkit_views) {
886 deps += [ "//ui/events:test_support" ]
889 sources += rebase_path(
890 chrome_tests_gypi_values.chrome_browser_tests_views_sources,
893 deps += [ "//ui/views" ]
895 sources += rebase_path(
896 chrome_tests_gypi_values.chrome_browser_tests_views_non_mac_sources,
902 sources += rebase_path(
903 chrome_tests_gypi_values.chrome_browser_tests_chromeos_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",
923 "//dbus:test_support",
924 "//ui/login:resources",
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",
938 sources -= [ "../browser/ui/views/select_file_dialog_extension_browsertest.cc" ]
941 if (enable_configuration_policy) {
942 sources += rebase_path(
943 chrome_tests_gypi_values.chrome_browser_tests_policy_sources,
947 if (enable_web_speech) {
948 sources += rebase_path(
949 chrome_tests_gypi_values.chrome_browser_tests_speech_sources,
953 if (safe_browsing_mode == 1) {
954 sources += rebase_path(
955 chrome_tests_gypi_values.chrome_browser_tests_full_safe_browsing_sources,
959 if (enable_captive_portal_detection) {
960 sources += [ "../browser/captive_portal/captive_portal_browsertest.cc" ]
962 if (!enable_webrtc) {
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",
971 if (enable_media_router) {
972 sources += rebase_path(
973 chrome_tests_gypi_values.chrome_browser_tests_media_router_sources,
976 deps += [ "//chrome/browser/media/router:test_support" ]
980 "//chrome:other_version",
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",
992 if (!is_chromeos && use_aura) {
994 # On Windows and Linux, we currently don't support enough of the
995 # ash environment to run these unit tests.
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",
1005 if (toolkit_views) {
1006 sources -= [ "../browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc" ]
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.
1019 #'app_mode_app_support', TODO(GYP)
1022 #'../components/components.gyp:breakpad_stubs', TODO(GYP)
1023 "//third_party/ocmock",
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",
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
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",
1059 if (is_mac || is_win) {
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",
1066 deps += [ "//components/wifi:test_support" ]
1068 if (!is_posix || is_chromeos) {
1069 sources -= [ "../common/time_format_browsertest.cc" ]
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",
1081 "../browser/extensions/api/networking_private/networking_private_apitest.cc",
1082 "../browser/extensions/api/networking_private/networking_private_chromeos_apitest.cc",
1085 if (!is_android && !is_ios && enable_nacl_browsertests) {
1087 [ "../browser/copresence/chrome_whispernet_client_browsertest.cc" ]
1088 deps += [ "//components/copresence" ]
1090 if (enable_app_list) {
1091 sources += rebase_path(
1092 chrome_tests_gypi_values.chrome_browser_tests_app_list_sources,
1096 if (enable_supervised_users) {
1097 sources += rebase_path(
1098 chrome_tests_gypi_values.chrome_browser_tests_supervised_user_sources,
1102 if (enable_pepper_cdms) {
1103 # Runtime dependencies.
1105 "//media/cdm/ppapi:clearkeycdmadapter",
1106 "//third_party/widevine/cdm:widevinecdmadapter",
1109 if (!enable_print_preview) {
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",
1123 sources += [ "../browser/ui/webui/local_discovery/local_discovery_ui_browsertest.cc" ]
1126 deps += [ "//build/linux:libbrlapi" ]
1128 sources -= [ "../browser/extensions/api/braille_display_private/braille_display_private_apitest.cc" ]
1130 if (is_chrome_branded) {
1132 # These tests depend on single process mode, which is disabled in
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",
1139 if (!enable_autofill_dialog || is_android || is_ios) {
1140 deps -= [ "//third_party/libaddressinput" ]
1142 if (enable_remoting) {
1143 sources += rebase_path(
1144 chrome_tests_gypi_values.chrome_browser_tests_remoting_sources,
1147 #deps += [ "//remoting:remoting_webapp" ] TODO(GYP)
1150 deps += [ "//tools/xdisplaycheck" ]
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") {
1159 ":sync_integration_tests",
1163 test("sync_integration_tests") {
1165 rebase_path(chrome_tests_gypi_values.sync_integration_tests_sources,
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",
1180 if (is_linux || is_win) {
1182 "$root_out_dir/chrome_100_percent.pak",
1183 "$root_out_dir/locales/en-US.pak",
1187 # TODO(phajdan.jr): Only temporary, to make transition easier.
1188 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
1191 ":sync_integration_test_support",
1194 "//chrome:packed_extra_resources",
1195 "//chrome:packed_resources",
1196 "//chrome:resources",
1199 "//chrome/renderer",
1200 "//crypto:platform",
1204 "//third_party/icu",
1205 "//third_party/leveldatabase",
1206 "//third_party/WebKit/public:blink",
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" ]
1217 # Dictionary sync is disabled on Mac.
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",
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" ]
1230 "//chrome:other_version",
1231 "//third_party/wtl",
1235 configs -= [ "//build/config/win:default_incremental_linking" ]
1237 [ "//build/config/win:default_large_module_incremental_linking" ]
1239 sources -= [ "../app/chrome_version.rc.version" ]
1243 "../browser/sync/test/integration/single_client_wifi_credentials_sync_test.cc",
1244 "../browser/sync/test/integration/two_client_wifi_credentials_sync_test.cc",
1248 if (toolkit_views) {
1249 deps += [ "//ui/views" ]
1251 if (enable_basic_printing || enable_print_preview) {
1252 deps += [ "//printing" ]
1254 if (!enable_app_list) {
1256 "../browser/sync/test/integration/single_client_app_list_sync_test.cc",
1257 "../browser/sync/test/integration/two_client_app_list_sync_test.cc",
1260 if (!enable_supervised_users) {
1261 sources -= [ "../browser/sync/test/integration/single_client_supervised_user_settings_sync_test.cc" ]
1265 test("sync_performance_tests") {
1267 rebase_path(chrome_tests_gypi_values.sync_performance_tests_sources,
1271 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
1274 ":sync_integration_test_support",
1276 "//crypto:platform",
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" ]
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" ]
1298 "//chrome:other_version",
1299 "//chrome/installer/util:strings",
1300 "//third_party/wtl",
1303 configs -= [ "//build/config/win:default_incremental_linking" ]
1305 [ "//build/config/win:default_large_module_incremental_linking" ]
1307 sources -= [ "../app/chrome_version.rc.version" ]
1310 if (toolkit_views) {
1311 deps += [ "//ui/views" ]
1315 # Executable to measure time to load libraries.
1316 test("load_library_perf_tests") {
1318 "../browser/load_library_perf_test.cc",
1322 "//base/test:test_support_perf",
1325 "//third_party/widevine/cdm:version_h",
1328 if (enable_pepper_cdms) {
1330 "//media/cdm/ppapi:clearkeycdmadapter",
1331 "//third_party/widevine/cdm:widevinecdmadapter",
1336 js2gtest("unit_tests_js") {
1338 sources = rebase_path(
1339 chrome_tests_unit_gypi_values.chrome_unit_tests_gtestjs_sources,
1343 rebase_path(chrome_tests_unit_gypi_values.chrome_unit_tests_js_sources,
1347 sources += rebase_path(
1348 chrome_tests_unit_gypi_values.chrome_unit_tests_chromeos_gtestjs_sources,
1351 extra_js_files += rebase_path(
1352 chrome_tests_unit_gypi_values.chrome_unit_tests_chromeos_js_sources,
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") {
1367 test("unit_tests") {
1369 rebase_path(chrome_tests_unit_gypi_values.chrome_unit_tests_sources,
1373 configs += [ "//build/config:precompiled_headers" ]
1377 "//base/test/data/",
1378 "//chrome/third_party/mock4js/",
1379 "//components/test/data/",
1380 "//extensions/test/data/",
1381 "//google_apis/test/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",
1398 if (is_android || is_linux || is_win) {
1400 "$root_out_dir/chrome_100_percent.pak",
1401 "$root_out_dir/locales/en-US.pak",
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",
1426 "//net:test_support",
1427 "//sync:test_support_sync_api",
1428 "//sync:test_support_sync_core",
1429 "//sync:test_support_sync_internal_api",
1433 # 3) anything tests directly depend on
1435 "//chrome:resources",
1437 "//courgette:courgette_lib",
1440 "//third_party/cacheinvalidation",
1441 "//third_party/icu",
1442 "//third_party/libxml",
1443 "//ui/base:test_support",
1444 "//ui/gfx:test_support",
1449 # TODO(GYP) Windows stuff
1450 # ['incremental_chrome_dll==1', {
1451 # 'UseLibraryDependencyInputs': "true",
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",
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"
1491 sources += rebase_path(
1492 chrome_tests_unit_gypi_values.chrome_unit_tests_non_android_sources,
1495 sources -= [ "../browser/download/download_request_infobar_delegate_unittest.cc" ]
1497 if (is_ios || is_chromeos) {
1499 [ "../browser/metrics/signin_status_metrics_provider_unittest.cc" ]
1501 if (enable_background) {
1502 sources += rebase_path(
1503 chrome_tests_unit_gypi_values.chrome_unit_tests_background_sources,
1507 if (enable_spellcheck) {
1508 sources += rebase_path(
1509 chrome_tests_unit_gypi_values.chrome_unit_tests_spellchecker_sources,
1512 if (is_mac && !is_ios) {
1513 deps += [ "//third_party/hunspell" ]
1517 if (enable_one_click_signin) {
1519 "../browser/ui/sync/one_click_signin_sync_observer_unittest.cc",
1520 "../browser/ui/sync/one_click_signin_sync_starter_unittest.cc",
1524 if (enable_extensions) {
1525 sources += rebase_path(
1526 chrome_tests_unit_gypi_values.chrome_unit_tests_extensions_sources,
1530 "//chrome/common/extensions/api",
1531 "//device/usb:mocks",
1532 "//extensions:extensions_resources",
1533 "//extensions/strings",
1535 if (enable_configuration_policy) {
1536 sources += rebase_path(
1537 chrome_tests_unit_gypi_values.chrome_unit_tests_extensions_policy_sources,
1542 sources += rebase_path(
1543 chrome_tests_unit_gypi_values.chrome_unit_tests_extensions_non_chromeos_sources,
1548 if (toolkit_views) {
1550 "//components/web_modal:test_support",
1552 "//ui/views:test_support",
1554 sources += rebase_path(
1555 chrome_tests_unit_gypi_values.chrome_unit_tests_views_sources,
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,
1565 sources += rebase_path(
1566 chrome_tests_unit_gypi_values.chrome_unit_tests_views_non_mac_sources,
1572 sources += rebase_path(
1573 chrome_tests_unit_gypi_values.chrome_unit_tests_ash_sources,
1577 "//ash:test_support",
1582 # We eventually want to compile both in Win Aura builds, see
1583 # http://crbug.com/155545.
1585 sources -= [ "../browser/ui/window_sizer/window_sizer_unittest.cc" ]
1589 sources += [ "//ui/views/controls/webview/webview_unittest.cc" ]
1592 "//ui/aura:test_support",
1593 "//ui/views:test_support",
1596 if (!is_chromeos && is_linux) {
1597 sources += rebase_path(
1598 chrome_tests_unit_gypi_values.chrome_unit_tests_desktop_linux_sources,
1602 if (!is_chromeos && !use_ozone && is_linux) {
1604 "//chrome/browser/ui/libgtk2ui",
1605 "//build/linux:gio",
1609 if (enable_task_manager) {
1610 sources += rebase_path(
1611 chrome_tests_unit_gypi_values.chrome_unit_tests_task_manager_sources,
1616 sources += rebase_path(
1617 chrome_tests_unit_gypi_values.chrome_unit_tests_mdns_sources,
1621 if (enable_service_discovery) {
1622 sources += rebase_path(
1623 chrome_tests_unit_gypi_values.chrome_unit_tests_service_discovery_sources,
1627 if (enable_configuration_policy) {
1628 sources += rebase_path(
1629 chrome_tests_unit_gypi_values.chrome_unit_tests_configuration_policy_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" ]
1638 if (!is_android && !is_ios && !is_chromeos) {
1640 [ "../browser/net/disk_cache_dir_policy_handler_unittest.cc" ]
1642 if (!is_android && !is_ios) {
1644 [ "../browser/download/download_dir_policy_handler_unittest.cc" ]
1646 deps += [ "//components/bubble:test_support" ]
1649 if (enable_web_speech) {
1650 sources += rebase_path(
1651 chrome_tests_unit_gypi_values.chrome_unit_tests_speech_sources,
1655 if (enable_notifications) {
1656 sources += rebase_path(
1657 chrome_tests_unit_gypi_values.chrome_unit_tests_notifications_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",
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,
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,
1681 if (enable_autofill_dialog && !is_android) {
1682 sources += rebase_path(
1683 chrome_tests_unit_gypi_values.chrome_unit_tests_autofill_dialog_sources,
1687 if (enable_plugins) {
1688 sources += rebase_path(
1689 chrome_tests_unit_gypi_values.chrome_unit_tests_plugins_sources,
1693 if (enable_print_preview) {
1694 sources += rebase_path(
1695 chrome_tests_unit_gypi_values.chrome_unit_tests_print_preview_sources,
1699 if (enable_captive_portal_detection) {
1700 sources += rebase_path(
1701 chrome_tests_unit_gypi_values.chrome_unit_tests_captive_portal_sources,
1705 if (enable_session_service) {
1706 sources += rebase_path(
1707 chrome_tests_unit_gypi_values.chrome_unit_tests_session_service_sources,
1711 if (enable_media_router) {
1712 sources += rebase_path(
1713 chrome_tests_unit_gypi_values.chrome_unit_tests_media_router_sources,
1716 deps += [ "//chrome/browser/media/router:test_support" ]
1718 sources += rebase_path(
1719 chrome_tests_unit_gypi_values.chrome_unit_tests_media_router_non_android_sources,
1724 if (enable_webrtc) {
1725 sources += rebase_path(
1726 chrome_tests_unit_gypi_values.chrome_unit_tests_webrtc_sources,
1731 deps += [ "//chrome/browser/chromeos:unit_tests" ]
1732 sources -= [ "../browser/signin/signin_manager_unittest.cc" ]
1735 deps += [ "//ui/events/devices" ]
1736 data_deps += [ "//tools/xdisplaycheck" ]
1738 sources -= [ "../browser/password_manager/password_store_x_unittest.cc" ]
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" ]
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.
1749 [ "../browser/password_manager/native_backend_gnome_x_unittest.cc" ]
1751 "//chrome/browser:gnome_keyring",
1752 "//chrome/browser:gnome_keyring_direct",
1755 if (is_linux && !is_chromeos) {
1757 [ "../browser/password_manager/native_backend_libsecret_unittest.cc" ]
1759 if (is_linux && use_aura) {
1762 "//dbus:test_support",
1763 "//ui/aura:test_support",
1766 if (is_linux && is_chrome_branded && current_cpu == "x86") {
1767 ldflags = [ "-Wl,--strip-debug" ]
1770 sources += rebase_path(
1771 chrome_tests_unit_gypi_values.chrome_unit_tests_mac_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",
1780 # The test fetches resources which means Mac need the app bundle to exist
1781 # on disk so it can pull from it.
1783 "//third_party/google_toolbox_for_mac",
1784 "//third_party/ocmock",
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" ]
1792 if (is_mac || is_android) {
1793 sources += rebase_path(
1794 chrome_tests_unit_gypi_values.chrome_unit_tests_mac_android_sources,
1798 if (!is_mac && !is_ios) {
1800 "//chrome/tools/convert_dict:lib",
1801 "//chrome:packed_extra_resources",
1802 "//chrome:packed_resources",
1803 "//third_party/hunspell",
1806 if (is_win || is_mac) {
1807 sources += rebase_path(
1808 chrome_tests_unit_gypi_values.chrome_unit_tests_win_mac_sources,
1812 if (is_win || is_mac || is_chromeos) {
1813 sources += [ "../common/extensions/api/networking_private/networking_private_crypto_unittest.cc" ]
1815 if (enable_rlz_support) {
1816 sources += [ "../browser/rlz/chrome_rlz_tracker_delegate_unittest.cc" ]
1818 "//chrome/browser:rlz",
1820 "//rlz:test_support",
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,
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",
1851 if (!is_chrome_branded) {
1852 sources -= [ "../browser/google/google_update_win_unittest.cc" ]
1855 if (is_android || is_ios) {
1857 "../browser/devtools/device/webrtc/devtools_bridge_instances_request_unittest.cc",
1858 "../browser/ui/sync/sync_promo_ui_unittest.cc",
1861 deps += [ "//chrome/tools/profile_reset:jtl_compiler_lib" ]
1863 if (!is_android && !is_chromeos) {
1864 sources += rebase_path(
1865 chrome_tests_unit_gypi_values.chrome_unit_tests_non_android_or_chromeos_sources,
1869 if (enable_themes) {
1870 sources += rebase_path(
1871 chrome_tests_unit_gypi_values.chrome_unit_tests_themes_sources,
1875 if (!is_android && (use_nss_certs || use_openssl_certs)) {
1876 sources += [ "../common/net/x509_certificate_model_unittest.cc" ]
1878 if (enable_supervised_users) {
1879 sources += rebase_path(
1880 chrome_tests_unit_gypi_values.chrome_unit_tests_supervised_user_sources,
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,
1890 if (safe_browsing_mode == 1 && enable_extensions) {
1891 sources += [ "../browser/extensions/blacklist_unittest.cc" ]
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" ]
1898 if (enable_app_list) {
1899 sources += rebase_path(
1900 chrome_tests_unit_gypi_values.chrome_unit_tests_app_list_sources,
1903 deps += [ "//ui/app_list:test_support" ]
1905 if (enable_app_list && is_chromeos) {
1906 sources += rebase_path(
1907 chrome_tests_unit_gypi_values.chrome_unit_tests_app_list_chromeos_sources,
1911 if (enable_plugins && !enable_plugin_installation) {
1912 sources -= [ "../browser/plugins/plugin_installer_unittest.cc" ]
1916 if (is_win || (is_linux && !is_chromeos)) {
1917 # TODO(GYP): Figure out which of these work and are needed on other
1919 test("chrome_app_unittests") {
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",
1937 "//breakpad:client",
1940 "//components/crash_keys",
1941 "//base/test:run_all_unittests",
1942 "//base/test:test_support",
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" ]
1951 test("performance_browser_tests") {
1952 sources = rebase_path(
1953 chrome_tests_gypi_values.performance_browser_tests_sources,
1957 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
1963 "//base/test:test_support",
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",
1976 configs -= [ "//build/config/win:default_incremental_linking" ]
1978 [ "//build/config/win:default_large_module_incremental_linking" ]
1981 "../app/chrome_command_ids.h",
1983 #"../app/chrome_dll.rc",
1984 #"../app/chrome_dll_resource.h",
1985 "../app/chrome_version.rc.version",
1989 sources -= [ "perf/mach_ports_performancetest.cc" ]
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" ]
2001 source_set("test_support_unit") {
2004 "../browser/sync/glue/session_sync_test_helper.cc",
2005 "../browser/sync/glue/session_sync_test_helper.h",
2006 "base/run_all_unittests.cc",
2012 "//chrome:resources",
2016 "//mojo/environment:chromium",
2017 "//third_party/mojo/src/mojo/edk/system",
2020 if (!is_android && use_ash) {
2021 sources += rebase_path(
2022 chrome_tests_unit_gypi_values.chrome_test_support_unit_ash_sources,