| # Copyright 2014 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/config/features.gni") |
| import("//build/config/ui.gni") |
| import("//build/module_args/v8.gni") |
| import("//testing/test.gni") |
| |
| # This target exists to reference other test executables to bring these files |
| # into the build. |
| group("test") { |
| testonly = true |
| deps = [ |
| "//chrome/test/perf", |
| ] |
| } |
| |
| # GYP version: chrome/chrome_tests_unit.gypi:test_support_common |
| source_set("test_support") { |
| defines = [] |
| testonly = true |
| |
| sources = [ |
| "base/chrome_process_util.cc", |
| "base/chrome_process_util.h", |
| "base/chrome_process_util_mac.cc", |
| "base/chrome_render_view_host_test_harness.cc", |
| "base/chrome_render_view_host_test_harness.h", |
| "base/chrome_test_launcher.cc", |
| "base/chrome_test_launcher.h", |
| "base/chrome_test_suite.cc", |
| "base/chrome_test_suite.h", |
| "base/chrome_unit_test_suite.cc", |
| "base/chrome_unit_test_suite.h", |
| "base/find_in_page_observer.cc", |
| "base/find_in_page_observer.h", |
| "base/history_index_restore_observer.cc", |
| "base/history_index_restore_observer.h", |
| "base/in_process_browser_test.cc", |
| "base/in_process_browser_test.h", |
| "base/profile_mock.cc", |
| "base/profile_mock.h", |
| "base/scoped_browser_locale.cc", |
| "base/scoped_browser_locale.h", |
| "base/scoped_testing_local_state.cc", |
| "base/scoped_testing_local_state.h", |
| "base/test_browser_window.cc", |
| "base/test_browser_window.h", |
| "base/test_launcher_utils.cc", |
| "base/test_launcher_utils.h", |
| "base/test_switches.cc", |
| "base/test_switches.h", |
| "base/testing_browser_process.cc", |
| "base/testing_browser_process.h", |
| "base/testing_browser_process_platform_part.h", |
| "base/testing_browser_process_platform_part.cc", |
| "base/testing_io_thread_state.cc", |
| "base/testing_io_thread_state.h", |
| "base/testing_pref_service_syncable.cc", |
| "base/testing_pref_service_syncable.h", |
| "base/testing_profile.cc", |
| "base/testing_profile.h", |
| "base/testing_profile_manager.cc", |
| "base/testing_profile_manager.h", |
| "base/tracing.cc", |
| "base/tracing.h", |
| "base/ui_test_utils.cc", |
| "base/ui_test_utils.h", |
| "logging/win/file_logger.cc", |
| "logging/win/file_logger.h", |
| "logging/win/log_file_printer.cc", |
| "logging/win/log_file_printer.h", |
| "logging/win/log_file_reader.cc", |
| "logging/win/log_file_reader.h", |
| "logging/win/mof_data_parser.cc", |
| "logging/win/mof_data_parser.h", |
| "logging/win/test_log_collector.cc", |
| "logging/win/test_log_collector.h", |
| ] |
| |
| # New deps should go in the non-iOS section below. |
| public_deps = [ |
| "//content/test:test_support", |
| ] |
| deps = [ |
| "//base:prefs_test_support", |
| "//base/test:test_support", |
| "//chrome:resources", |
| "//chrome:strings", |
| "//chrome/app:test_support", |
| |
| #"//chrome/app/theme:theme_resources", |
| "//chrome/browser:test_support", |
| "//chrome/common:test_support", |
| "//chrome/renderer:test_support", |
| "//components/bookmarks/test", |
| "//components/component_updater:test_support", |
| "//components/gcm_driver:test_support", |
| "//components/history/core/test:test", |
| "//components/metrics:test_support", |
| "//components/omnibox:test_support", |
| "//components/ownership", |
| "//components/password_manager/core/browser:test_support", |
| "//components/pref_registry:test_support", |
| "//components/search_engines:test_support", |
| "//components/signin/core/browser:test_support", |
| "//components/sync_driver:test_support", |
| "//content/public/app:both", |
| "//ui/gfx:test_support", |
| "//net", |
| "//net:test_support", |
| "//skia", |
| "//sql", |
| "//sql:test_support", |
| "//sync", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//third_party/zlib", |
| "//ui/message_center:test_support", |
| ] |
| |
| if (!is_ios) { |
| deps += [ |
| "//chrome/plugin", |
| "//chrome/renderer", |
| "//chrome/utility", |
| "//content/public/child", |
| "//content/public/common", |
| "//content/public/plugin", |
| "//content/public/renderer", |
| "//content/public/utility", |
| "//components/autofill/core/browser:test_support", |
| "//components/captive_portal:test_support", |
| "//components/infobars/core", |
| "//components/sessions:test_support", |
| "//google_apis:test_support", |
| "//ipc:test_support", |
| "//media:test_support", |
| "//ppapi:ppapi_shared", |
| "//sql:test_support", |
| "//third_party/leveldatabase", |
| "//ui/base", |
| "//ui/events:events_base", |
| "//ui/gl", |
| ] |
| } |
| |
| if (enable_extensions) { |
| deps += [ |
| "//chrome/common/extensions/api", |
| "//extensions:test_support", |
| ] |
| } |
| |
| if (is_linux) { |
| deps += [ "//crypto:platform" ] |
| } |
| if (is_win) { |
| deps += [ |
| "//third_party/wtl", |
| ] |
| if (use_aura) { |
| deps += [ |
| "//win8:test_registrar_constants", |
| "//win8:test_support_win8", |
| ] |
| } |
| } |
| |
| if (enable_plugins) { |
| sources += [ |
| "ppapi/ppapi_test.cc", |
| "ppapi/ppapi_test.h", |
| ] |
| } |
| |
| if (use_ash) { |
| deps += [ "//ash:test_support" ] |
| } |
| if (toolkit_views) { |
| deps += [ "//ui/views:test_support" ] |
| } |
| |
| if (enable_background) { |
| defines += [ "ENABLE_BACKGROUND=1" ] |
| } |
| |
| if (enable_extensions) { |
| deps += [ |
| "//chrome/common/extensions/api", |
| "//extensions:test_support", |
| ] |
| } |
| } |
| |
| source_set("test_support_unit") { |
| testonly = true |
| sources = [ |
| "../browser/sync/glue/session_sync_test_helper.cc", |
| "../browser/sync/glue/session_sync_test_helper.h", |
| "base/run_all_unittests.cc", |
| ] |
| |
| deps = [ |
| ":test_support", |
| "//base", |
| "//chrome:resources", |
| "//chrome:strings", |
| "//chrome/browser", |
| "//chrome/common", |
| "//mojo/environment:chromium", |
| "//third_party/mojo/src/mojo/edk/system", |
| ] |
| } |
| |
| if (!is_android) { |
| gypi_values = exec_script("//build/gypi_to_gn.py", |
| [ rebase_path("../chrome_tests.gypi") ], |
| "scope", |
| [ "../chrome_tests.gypi" ]) |
| |
| test("interactive_ui_tests") { |
| sources = rebase_path(gypi_values.chrome_interactive_ui_test_sources, |
| ".", |
| "//chrome") |
| |
| defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] |
| ldflags = [] |
| |
| deps = [ |
| "//base/allocator", |
| "//chrome/browser", |
| "//chrome/browser/devtools", |
| "//chrome/renderer", |
| "//chrome/test:test_support", |
| "//chrome:resources", |
| "//chrome:strings", |
| "//chrome:packed_extra_resources", |
| "//chrome:packed_resources", |
| "//content/app/resources", |
| "//crypto:platform", |
| "//google_apis:test_support", |
| "//net", |
| "//net:net_resources", |
| "//net:test_support", |
| "//pdf", |
| |
| #"//ppapi:ppapi_tests", # TODO(GYP) this doesn't exist yet. |
| "//skia", |
| "//sync", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//third_party/hunspell", |
| "//third_party/icu", |
| "//third_party/libpng", |
| "//third_party/npapi", |
| "//third_party/zlib", |
| "//ui/base:test_support", |
| "//ui/web_dialogs:test_support", |
| ] |
| |
| # Runtime dependencies |
| datadeps = [ |
| "//third_party/mesa:osmesa", |
| ] |
| |
| if (toolkit_views) { |
| sources += |
| rebase_path(gypi_values.chrome_interactive_ui_test_views_sources, |
| ".", |
| "//chrome") |
| deps += [ |
| "//ui/views", |
| "//ui/views:test_support", |
| "//ui/views/controls/webview:test_support", |
| ] |
| if (!is_mac) { |
| sources += rebase_path( |
| gypi_values.chrome_interactive_ui_test_views_non_mac_sources, |
| ".", |
| "//chrome") |
| } |
| if (is_linux) { |
| # TODO(gbillock): aura linux does not support the automation for |
| # SendMouseMoveNotifyWhenDone |
| sources -= [ "../browser/ui/views/toolbar/toolbar_button_test.cc" ] |
| } |
| if (is_chromeos) { |
| sources -= [ |
| "../../ui/views/widget/desktop_aura/desktop_window_tree_host_x11_interactive_uitest.cc", |
| "../../ui/views/widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc", |
| ] |
| } |
| } |
| |
| if (is_linux && !is_chromeos) { |
| # Desktop linux. |
| sources -= [ |
| # TODO(port): This times out. Attempts have been made to fix the |
| # individual failures, but each time I disable a test from these |
| # suites, it seems like one or another starts timing out too. |
| "../browser/ui/views/keyboard_access_browsertest.cc", |
| ] |
| } else { |
| # Everything but desktop Linux. |
| sources += rebase_path( |
| gypi_values.chrome_interactive_ui_test_non_desktop_linux_sources, |
| ".", |
| "//chrome") |
| } |
| |
| if (is_chromeos) { |
| sources += |
| rebase_path(gypi_values.chrome_interactive_ui_test_chromeos_sources, |
| ".", |
| "//chrome") |
| sources += [ "../browser/notifications/login_state_notification_blocker_chromeos_browsertest.cc" ] |
| sources -= [ |
| # Use only the _chromeos version on ChromeOS. |
| "base/view_event_test_platform_part_ash.cc", |
| ] |
| |
| deps += [ |
| "//ash/resources", |
| "//chromeos", |
| ] |
| |
| if (enable_nacl) { |
| # TODO(GYP) this is also under a disable_nacl_untrusted==0 condition. |
| deps += [ |
| # '../native_client/src/trusted/service_runtime/linux/nacl_bootstrap.gyp:nacl_helper_bootstrap', TODO(GYP) |
| # '../components/nacl.gyp:nacl_helper', TODO(GYP) |
| # '../components/nacl_nonsfi.gyp:nacl_helper_nonsfi', TODO(GYP) |
| ] |
| } |
| |
| if (is_chrome_branded) { |
| sources -= [ |
| # These tests are failing on official cros bots. crbug.com/431450. |
| "../browser/ui/views/bookmarks/bookmark_bar_view_test.cc", |
| ] |
| } |
| } else { |
| # ChromeOS doesn't use panels, everybody else does. |
| sources += |
| rebase_path(gypi_values.chrome_interactive_ui_test_panels_sources, |
| ".", |
| "//chrome") |
| |
| # TODO(tapted): Include on mac when views panels are ported. |
| if (toolkit_views && !is_mac) { |
| sources += rebase_path( |
| gypi_values.chrome_interactive_ui_test_panels_views_sources, |
| ".", |
| "//chrome") |
| } |
| } |
| |
| if (!is_linux) { |
| # Non-Linux platforms (Linux includes ChromeOS here). |
| sources += rebase_path( |
| gypi_values.chrome_interactive_ui_test_non_linux_and_chromeos_sources, |
| ".", |
| "//chrome") |
| } |
| |
| if (is_win) { |
| sources += rebase_path(gypi_values.chrome_interactive_ui_test_win_sources, |
| ".", |
| "//chrome") |
| sources += [ |
| # TODO: It would be nice to have these pulled in automatically from |
| # direct_dependent_settings in their various targets |
| # (net.gyp:net_resources, etc.), but that causes errors in other |
| # targets when resulting .res files get referenced multiple times. |
| #"$root_gen_dir/chrome_version/other_version.rc", TODO(GYP) what generates this? |
| "$root_gen_dir/ui/resources/ui_unscaled_resources.rc", |
| ] |
| deps += [ |
| "//third_party/isimpledom", |
| "//third_party/wtl", |
| "//ui/resources", |
| |
| # 'chrome.gyp:chrome_version_resources' TODO(GYP) |
| ] |
| } |
| |
| if (is_mac) { |
| datadeps = [ |
| "//chrome", |
| ] |
| |
| # TODO(mark): We really want this for all non-static library targets, but |
| # when we tried to pull it up to the common.gypi level, it broke other |
| # things like the ui and startup tests. *shrug* |
| ldflags += [ "-Wl,-ObjC" ] |
| } |
| |
| if (cld_version == 0 || cld_version == 2) { |
| # Interactive tests should use whatever CLD2 data access mode that the |
| # application embedder is using. |
| deps += [ "//third_party/cld_2:cld2_platform_impl" ] |
| } |
| |
| if (use_x11) { |
| configs += [ "//build/config/linux:xtst" ] |
| datadeps += [ "//tools/xdisplaycheck" ] |
| } |
| |
| if (enable_app_list) { |
| sources += |
| rebase_path(gypi_values.chrome_interactive_ui_test_app_list_sources, |
| ".", |
| "//chrome") |
| } |
| |
| if (use_ash) { |
| sources += rebase_path(gypi_values.chrome_interactive_ui_test_ash_sources, |
| ".", |
| "//chrome") |
| deps += [ "//ash:test_support" ] |
| } |
| |
| if (enable_notifications) { |
| sources += rebase_path( |
| gypi_values.chrome_interactive_ui_test_notifications_sources, |
| ".", |
| "//chrome") |
| |
| # Non-ChromeOS notifications tests (ChromeOS does not use cross-platform |
| # panels). |
| if (!is_chromeos) { |
| sources += [ |
| "../browser/notifications/notification_browsertest.cc", |
| "../browser/notifications/platform_notification_service_browsertest.cc", |
| ] |
| } |
| |
| if (is_android) { |
| sources -= [ |
| # Android does not use the message center-based Notification system. |
| "../browser/notifications/message_center_notifications_browsertest.cc", |
| |
| # TODO(peter): Enable the Notification browser tests. |
| "../browser/notifications/notification_browsertest.cc", |
| "../browser/notifications/platform_notification_service_browsertest.cc", |
| ] |
| } |
| } # enable_notifications |
| |
| if (use_aura || is_chromeos) { |
| sources -= |
| [ "../../ui/views/corewm/desktop_capture_controller_unittest.cc" ] |
| } |
| } |
| |
| source_set("sync_integration_test_support") { |
| testonly = true |
| sources = rebase_path(gypi_values.test_support_sync_integration_sources, |
| ".", |
| "//chrome") |
| public_deps = [ |
| "//chrome/browser", |
| ] |
| deps = [ |
| ":test_support", |
| "//base", |
| "//chrome", |
| "//components/invalidation", |
| "//components/invalidation:test_support", |
| "//net", |
| "//skia", |
| "//sync", |
| "//sync:test_support_sync_testserver", |
| "//sync:test_support_sync_fake_server", |
| "//ui/app_list:test_support", |
| ] |
| |
| if (is_mac) { |
| sources -= [ |
| "../browser/sync/test/integration/dictionary_helper.cc", |
| "../browser/sync/test/integration/dictionary_helper.h", |
| "../browser/sync/test/integration/dictionary_load_observer.cc", |
| "../browser/sync/test/integration/dictionary_load_observer.h", |
| ] |
| } |
| if (!enable_app_list) { |
| sources -= [ |
| "../browser/sync/test/integration/sync_app_list_helper.cc", |
| "../browser/sync/test/integration/sync_app_list_helper.h", |
| ] |
| } |
| if (!is_chromeos) { |
| sources -= [ |
| "../browser/sync/test/integration/wifi_credentials_helper.cc", |
| "../browser/sync/test/integration/wifi_credentials_helper.h", |
| ] |
| } |
| } |
| |
| # TODO(GYP) when v8's GN build supports "//v8:d8" then enable the code |
| # controlled by this flag (and the flg itself can be deleted). |
| has_d8_definition = false |
| |
| if (has_d8_definition) { |
| template("js2webui") { |
| action_name = target_name + "_action" |
| source_set_name = target_name |
| |
| action_foreach(action_name) { |
| testonly = true |
| visibility = [ ":$source_set_name" ] |
| script = "//tools/gypv8sh.py" |
| |
| sources = invoker.sources |
| |
| d8_path = |
| get_label_info("//v8:d8($host_toolchain)", "root_out_dir") + "/d8" |
| if (is_win) { |
| d8_path += ".exe" |
| } |
| |
| input_js = [ |
| "//chrome/third_party/mock4js/mock4js.js", |
| "//chrome/test/data/webui/test_api.js", |
| "//chrome/test/base/js2gtest.js", |
| ] |
| inputs = [ d8_path ] + input_js |
| |
| outputs = [ |
| "$target_gen_dir/{{source_name_part}}-gen.cc", |
| "$root_out_dir/test_data/chrome/{{source_root_relative_dir}}/{{source_file_part}}", |
| ] |
| |
| args = [ |
| # Need "./" for script to find binary (cur dir is not on path). |
| "./" + rebase_path(d8_path, root_build_dir), |
| ] |
| args += rebase_path(input_js, root_build_dir) + [ "webui" ] |
| if (v8_use_external_startup_data) { |
| args += [ "--external=y" ] |
| } else { |
| args += [ "--external=n" ] |
| } |
| args += [ |
| "{{source}}", |
| "{{source_root_relative_dir}}/{{source_file_part}}", |
| ] |
| args += rebase_path(outputs, root_build_dir) |
| |
| deps = [ |
| "//v8:d8($host_toolchain)", |
| ] |
| } |
| |
| source_set(source_set_name) { |
| testonly = true |
| if (defined(invoker.visibility)) { |
| visibility = invoker.visibility |
| } |
| sources = get_target_outputs(":$action_name") |
| defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] |
| deps = [ |
| ":$action_name", |
| |
| # The generator implicitly makes includes from these targets. |
| "//testing/gmock", |
| "//testing/gtest", |
| "//url", |
| ] |
| if (defined(invoker.deps)) { |
| deps += invoker.deps |
| } |
| } |
| } |
| |
| js2webui("browser_tests_js_webui") { |
| sources = rebase_path(gypi_values.chrome_browser_tests_webui_js_sources, |
| ".", |
| "//chrome") |
| if (is_chrome_branded) { |
| # crbug.com/230471 |
| sources -= [ "data/webui/accessibility_audit_browsertest.js" ] |
| } |
| if (!is_chromeos) { |
| sources -= [ "data/webui/certificate_viewer_dialog_test.js" ] |
| } |
| if (!enable_app_list) { |
| sources -= [ "../browser/ui/webui/app_list/start_page_browsertest.js" ] |
| } |
| if (!enable_supervised_users) { |
| sources -= |
| [ "../browser/ui/webui/downloads_ui_supervised_browsertest.js" ] |
| } |
| deps = [ |
| "//skia", |
| ] |
| } |
| } |
| |
| test("browser_tests") { |
| sources = [ |
| "base/browser_tests_main.cc", |
| ] |
| sources += |
| rebase_path(gypi_values.chrome_browser_tests_sources, ".", "//chrome") |
| sources += |
| rebase_path(gypi_values.chrome_browser_extensions_test_support_sources, |
| ".", |
| "//chrome") |
| |
| deps = [ |
| ":sync_integration_test_support", |
| ":test_support", |
| "//base", |
| "//base:i18n", |
| "//base/allocator", |
| "//base/test:test_support", |
| "//chrome:browser_tests_pak", |
| "//chrome:packed_extra_resources", |
| "//chrome:packed_resources", |
| "//chrome:resources", |
| "//chrome:strings", |
| "//chrome/browser", |
| "//chrome/common/extensions/api", |
| "//chrome/renderer", |
| "//chrome/test/perf", |
| "//components/autofill/content/browser:risk_proto", |
| "//components/autofill/content/browser:test_support", |
| "//components/captive_portal:test_support", |
| "//components/dom_distiller/content", |
| "//components/dom_distiller/core:test_support", |
| "//components/resources", |
| "//components/strings", |
| "//components/translate/core/common", |
| "//crypto:platform", |
| "//crypto:test_support", |
| "//device/bluetooth:mocks", |
| "//device/serial:test_support", |
| "//extensions/common/api", |
| "//google_apis:test_support", |
| "//media", |
| "//media/base:test_support", |
| "//media/cast:test_support", |
| "//net", |
| "//net:test_support", |
| "//sdch", |
| "//skia", |
| "//sync", |
| "//sync:test_support_sync_api", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//testing/perf", |
| "//third_party/cacheinvalidation", |
| "//third_party/icu", |
| "//third_party/leveldatabase", |
| "//third_party/libaddressinput", |
| "//third_party/libjingle", |
| "//third_party/safe_browsing:test_support", |
| "//third_party/widevine/cdm:version_h", |
| "//ui/accessibility:test_support", |
| "//ui/compositor:test_support", |
| "//ui/resources", |
| "//ui/web_dialogs:test_support", |
| "//v8", |
| ] |
| if (has_d8_definition) { |
| deps += [ ":browser_tests_js_webui" ] |
| } |
| |
| # Runtime dependencies |
| data_deps = [ |
| #"//ppapi:ppapi_tests", # TODO(GYP) this doesn't exist yet. |
| #'../remoting/remoting.gyp:remoting_browser_test_resources', TODO(GYP) |
| #'../remoting/remoting.gyp:remoting_webapp_unittest', TODO(GYP) |
| "//third_party/mesa:osmesa", |
| "//third_party/widevine/cdm:widevine_test_license_server", |
| ] |
| |
| defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] |
| |
| # TODO(GYP) if (is_win) { |
| # ['incremental_chrome_dll==1', { |
| # 'UseLibraryDependencyInputs': "true", |
| # } |
| |
| if (cld_version == 0 || cld_version == 2) { |
| # Because the browser_tests use translate, they need CLD data. |
| deps += [ "//third_party/cld_2:cld2_platform_impl" ] |
| } |
| |
| if (!enable_one_click_signin) { |
| sources -= [ "../browser/ui/sync/one_click_signin_bubble_links_delegate_browsertest.cc" ] |
| } |
| if (enable_nacl) { |
| sources += [ |
| "../browser/extensions/extension_nacl_browsertest.cc", |
| "../browser/nacl_host/test/gdb_debug_stub_browsertest.cc", |
| ] |
| deps += [ "//ppapi/native_client/src/trusted/plugin:nacl_trusted_plugin" ] |
| |
| if (enable_nacl_untrusted) { |
| sources += [ |
| "nacl/nacl_browsertest.cc", |
| "nacl/nacl_browsertest_uma.cc", |
| "nacl/nacl_browsertest_util.cc", |
| "nacl/nacl_browsertest_util.h", |
| "nacl/pnacl_header_test.cc", |
| "nacl/pnacl_header_test.h", |
| ] |
| deps += [ |
| #'test/data/nacl/nacl_test_data.gyp:*', # TODO(GYP) |
| #'../ppapi/native_client/native_client.gyp:nacl_irt', # TODO(GYP) |
| #'../ppapi/ppapi_nacl.gyp:ppapi_nacl_tests', # TODO(GYP) |
| #'../ppapi/tests/extensions/extensions.gyp:ppapi_tests_extensions_background_keepalive', # TODO(GYP) |
| #'../ppapi/tests/extensions/extensions.gyp:ppapi_tests_extensions_media_galleries', # TODO(GYP) |
| #'../ppapi/tests/extensions/extensions.gyp:ppapi_tests_extensions_packaged_app', # TODO(GYP) #'../ppapi/ppapi_tests_mojo.gyp:ppapi_tests_mojo', # TODO(GYP) |
| #'../ppapi/ppapi_tests_mojo.gyp:ppapi_tests_mojo', # TODO(GYP) |
| ] |
| if (is_chromeos) { |
| sources += [ "//third_party/liblouis/nacl_wrapper/liblouis_wrapper_browsertest.cc" ] |
| } |
| deps += [ |
| #'browser_chromeos', TODO(GYP) |
| #'../third_party/liblouis/liblouis_nacl.gyp:liblouis_test_data', TODO(GYP) |
| ] |
| } |
| if (is_win || is_linux) { |
| sources += [ "../browser/nacl_host/test/nacl_gdb_browsertest.cc" ] |
| deps += [ |
| #'browser/nacl_host/test/mock_nacl_gdb.gyp:mock_nacl_gdb', TODO(GYP) |
| ] |
| } |
| if (is_win) { |
| # TODO(halyavin) NaCl on Windows can't open debug stub socket in |
| # browser process as needed by this test. See http://crbug.com/157312. |
| sources -= [ "../browser/nacl_host/test/gdb_debug_stub_browsertest.cc" ] |
| deps += [ |
| #'chrome.gyp:chrome_nacl_win64', TODO(GYP) |
| ] |
| } |
| is(is_linux) { |
| deps += [ |
| #'../native_client/src/trusted/service_runtime/linux/nacl_bootstrap.gyp:nacl_helper_bootstrap', TODO(GYP) |
| #'../components/nacl.gyp:nacl_helper', TODO(GYP) |
| #'../components/nacl_nonsfi.gyp:nacl_helper_nonsfi', TODO(GYP) |
| ] |
| } |
| if (!is_chromeos) { |
| sources -= [ "test/data/chromeos/oobe_webui_browsertest.js" ] |
| } |
| } |
| if (debug_devtools) { |
| defines += [ "DEBUG_DEVTOOLS=1" ] |
| } |
| if (use_ash) { |
| deps += [ "//ash:test_support" ] |
| } |
| if (use_aura || toolkit_views) { |
| deps += [ "//ui/events:test_support" ] |
| } |
| if (toolkit_views) { |
| sources += rebase_path(gypi_values.chrome_browser_tests_views_sources, |
| ".", |
| "//chrome") |
| deps += [ "//ui/views" ] |
| if (!is_mac) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_tests_views_non_mac_sources, |
| ".", |
| "//chrome") |
| } |
| } |
| if (is_chromeos) { |
| sources += rebase_path(gypi_values.chrome_browser_tests_chromeos_sources, |
| ".", |
| "//chrome") |
| sources -= [ |
| "../../apps/load_and_launch_browsertest.cc", |
| "../browser/printing/cloud_print/test/cloud_print_policy_browsertest.cc", |
| "../browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc", |
| |
| # chromeos does not support profile list avatar menu |
| "../browser/profiles/profile_list_desktop_browsertest.cc", |
| "../browser/service_process/service_process_control_browsertest.cc", |
| "../browser/signin/signin_browsertest.cc", |
| |
| # chromeos does not use cross-platform panels |
| "../browser/ui/panels/panel_extension_browsertest.cc", |
| |
| # chromeos does not use the desktop user manager |
| "../browser/ui/webui/signin/user_manager_ui_browsertest.cc", |
| ] |
| deps += [ |
| "//dbus", |
| "//dbus:test_support", |
| |
| #"//ui/login:resources", TODO(GYP) |
| ] |
| } else { |
| sources -= [ |
| "../browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_apitest_nss.cc", |
| "../browser/extensions/api/terminal/terminal_private_apitest.cc", |
| "../browser/invalidation/profile_invalidation_provider_factory_browsertest.cc", |
| "../browser/net/nss_context_chromeos_browsertest.cc", |
| "../browser/ui/ash/keyboard_controller_browsertest.cc", |
| "data/webui/certificate_viewer_ui_test-inl.h", |
| ] |
| if (toolkit_views) { |
| sources -= [ "../browser/ui/views/select_file_dialog_extension_browsertest.cc" ] |
| } |
| } |
| if (enable_configuration_policy) { |
| sources += rebase_path(gypi_values.chrome_browser_tests_policy_sources, |
| ".", |
| "//chrome") |
| } |
| if (enable_web_speech) { |
| sources += rebase_path(gypi_values.chrome_browser_tests_speech_sources, |
| ".", |
| "//chrome") |
| } |
| if (safe_browsing_mode == 1) { |
| sources += rebase_path( |
| gypi_values.chrome_browser_tests_full_safe_browsing_sources, |
| ".", |
| "//chrome") |
| defines += [ "FULL_SAFE_BROWSING" ] |
| } |
| if (enable_captive_portal_detection) { |
| sources += [ "../browser/captive_portal/captive_portal_browsertest.cc" ] |
| } |
| if (!enable_webrtc) { |
| sources -= [ |
| "../browser/extensions/api/webrtc_audio_private/webrtc_audio_private_browsertest.cc", |
| "../browser/extensions/api/webrtc_logging_private/webrtc_logging_private_apitest.cc", |
| "../browser/media/chrome_webrtc_browsertest.cc", |
| "../browser/media/chrome_webrtc_disable_encryption_flag_browsertest.cc", |
| "../browser/media/chrome_webrtc_getmediadevices_browsertest.cc", |
| ] |
| } |
| if (is_win) { |
| sources += [ |
| #'<(SHARED_INTERMEDIATE_DIR)/chrome_version/other_version.rc', TODO(GYP) |
| "$root_gen_dir/ui/resources/ui_unscaled_resources.rc", |
| ] |
| deps += [ |
| #'chrome_version_resources', TODO(GYP) |
| "//third_party/wtl", |
| "//ui/resources", |
| ] |
| } else { |
| sources -= [ |
| "../app/chrome_command_ids.h", |
| "../app/chrome_dll_resource.h", |
| "../app/chrome_version.rc.version", |
| "../browser/media_galleries/fileapi/iapps_finder_impl_win_browsertest.cc", |
| ] |
| } |
| if (!is_chromeos && use_aura) { |
| sources -= [ |
| # On Windows and Linux, we currently don't support enough of the |
| # ash environment to run these unit tests. |
| # |
| # TODO: enable these on windows and linux. |
| "../browser/ui/ash/accelerator_commands_browsertest.cc", |
| "../browser/ui/ash/accelerator_controller_browsertest.cc", |
| "../browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc", |
| "../browser/ui/ash/launcher/launcher_favicon_loader_browsertest.cc", |
| "../browser/ui/ash/shelf_browsertest.cc", |
| "../browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc", |
| ] |
| } |
| if (is_mac) { |
| # TODO(mark): We really want this for all non-static library |
| # targets, but when we tried to pull it up to the common.gypi |
| # level, it broke other things like the ui and startup tests. *shrug* |
| ldflags = [ "-Wl,-ObjC" ] |
| |
| # Other platforms only need |
| # chrome_resources.gyp:{packed_extra_resources,packed_resources}, |
| # and can build this target standalone much faster. |
| deps += [ |
| #'app_mode_app_support', TODO(GYP) |
| "//chrome", |
| #'../components/components.gyp:breakpad_stubs', TODO(GYP) |
| #'../third_party/ocmock/ocmock.gyp:ocmock', TODO(GYP) |
| ] |
| sources += [ |
| "../browser/media_galleries/fileapi/iphoto_data_provider_browsertest.cc", |
| "../browser/renderer_host/chrome_render_widget_host_view_mac_delegate_browsertest.cc", |
| "../browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper_browsertest.mm", |
| "../browser/spellchecker/spellcheck_message_filter_mac_browsertest.cc", |
| ] |
| sources -= [ |
| # TODO(groby): This test depends on hunspell and we cannot run it on |
| # Mac, which does not use hunspell by default. |
| "../browser/spellchecker/spellcheck_service_browsertest.cc", |
| |
| # TODO(rouslan): This test depends on the custom dictionary UI, |
| # which is disabled on Mac. |
| "../browser/ui/webui/options/edit_dictionary_browsertest.js", |
| |
| # TODO(rouslan): This test depends on hunspell and we cannot run it |
| # on Mac, which does use hunspell by default. |
| "../browser/ui/webui/options/language_options_dictionary_download_browsertest.js", |
| |
| # ProcessSingletonMac doesn"t do anything. |
| "../browser/process_singleton_browsertest.cc", |
| |
| # This test depends on GetCommandLineForRelaunch, which is not |
| # available on Mac. |
| "../browser/printing/cloud_print/test/cloud_print_policy_browsertest.cc", |
| |
| # single-process mode hangs on Mac sometimes because of multiple UI |
| # message loops. See 306348 |
| "../renderer/safe_browsing/phishing_classifier_browsertest.cc", |
| "../renderer/safe_browsing/phishing_classifier_delegate_browsertest.cc", |
| "../renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc", |
| ] |
| } |
| if (is_mac || is_win) { |
| sources += [ |
| "../browser/extensions/api/networking_private/networking_private_apitest.cc", |
| "../browser/extensions/api/networking_private/networking_private_service_client_apitest.cc", |
| "../browser/media_galleries/fileapi/itunes_data_provider_browsertest.cc", |
| "../browser/media_galleries/fileapi/picasa_data_provider_browsertest.cc", |
| ] |
| deps += [ "//components/wifi:test_support" ] |
| } |
| if (!is_posix || is_chromeos) { |
| sources -= [ "../common/time_format_browsertest.cc" ] |
| } |
| if (is_android) { |
| sources -= [ |
| "../browser/policy/cloud/component_cloud_policy_browsertest.cc", |
| "../browser/prefs/pref_hash_browsertest.cc", |
| ] |
| } |
| if (is_chromeos) { |
| sources += [ |
| "../browser/extensions/api/networking_private/networking_private_apitest.cc", |
| "../browser/extensions/api/networking_private/networking_private_chromeos_apitest.cc", |
| ] |
| } |
| if (!is_android && !is_ios) { |
| sources += |
| [ "../browser/copresence/chrome_whispernet_client_browsertest.cc" ] |
| deps += [ "//components/copresence" ] |
| } |
| if (!is_android && !is_ios && !is_linux) { |
| # NPAPI test plugin only works on some platforms. |
| data_deps += [ |
| #'../content/content_shell_and_tests.gyp:copy_npapi_test_plugin', TODO(GYP) |
| ] |
| } |
| if (enable_app_list) { |
| sources += rebase_path(gypi_values.chrome_browser_tests_app_list_sources, |
| ".", |
| "//chrome") |
| } |
| if (enable_supervised_users) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_tests_supervised_user_sources, |
| ".", |
| "//chrome") |
| } |
| if (enable_pepper_cdms) { |
| # Runtime dependencies. |
| data_deps += [ |
| "//media/cdm/ppapi:clearkeycdmadapter", |
| #'../third_party/widevine/cdm/widevine_cdm.gyp:widevinecdmadapter', TODO(GYP) |
| ] |
| } |
| if (!enable_print_preview) { |
| sources -= [ |
| "../browser/extensions/api/cloud_print_private/cloud_print_private_apitest.cc", |
| "../browser/printing/cloud_print/test/cloud_print_policy_browsertest.cc", |
| "../browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc", |
| "../browser/printing/print_preview_dialog_controller_browsertest.cc", |
| "../browser/printing/print_preview_pdf_generated_browsertest.cc", |
| "../browser/service_process/service_process_control_browsertest.cc", |
| "../browser/ui/webui/print_preview/print_preview_ui_browsertest.cc", |
| "data/webui/print_preview.cc", |
| "data/webui/print_preview.h", |
| "data/webui/print_preview.js", |
| ] |
| } |
| if (!enable_basic_printing && !enable_print_preview) { |
| sources -= [ "../renderer/printing/print_web_view_helper_browsertest.cc" ] |
| } |
| if (enable_mdns) { |
| sources += [ "../browser/ui/webui/local_discovery/local_discovery_ui_browsertest.cc" ] |
| } |
| if (use_brlapi) { |
| deps += [ "//build/config/linux:libbrlapi" ] |
| } else { |
| sources -= [ "../browser/extensions/api/braille_display_private/braille_display_private_apitest.cc" ] |
| } |
| if (is_chrome_branded) { |
| sources -= [ |
| # These tests depend on single process mode, which is disabled in |
| # official builds. |
| "../renderer/safe_browsing/phishing_classifier_browsertest.cc", |
| "../renderer/safe_browsing/phishing_classifier_delegate_browsertest.cc", |
| "../renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc", |
| ] |
| } |
| if (!enable_autofill_dialog || is_android || is_ios) { |
| deps -= [ "//third_party/libaddressinput" ] |
| } |
| if (use_ozone) { |
| sources -= [ |
| # crbug.com/362698 |
| "../browser/chromeos/input_method/input_method_engine_browsertests.cc", |
| "../browser/extensions/api/input_ime/input_ime_apitest_chromeos.cc", |
| ] |
| } |
| if (enable_remoting) { |
| sources += rebase_path(gypi_values.chrome_browser_tests_remoting_sources, |
| ".", |
| "//chrome") |
| #deps += [ "//remoting:remoting_webapp" ] TODO(GYP) |
| } |
| if (use_x11) { |
| deps += [ "//tools/xdisplaycheck" ] |
| } |
| } |
| |
| test("sync_integration_tests") { |
| sources = |
| rebase_path(gypi_values.sync_integration_tests_sources, ".", "//chrome") |
| |
| # TODO(phajdan.jr): Only temporary, to make transition easier. |
| defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] |
| |
| deps = [ |
| ":sync_integration_test_support", |
| ":test_support", |
| "//base/allocator", |
| "//chrome:packed_extra_resources", |
| "//chrome:packed_resources", |
| "//chrome:resources", |
| "//chrome:strings", |
| "//chrome/common", |
| "//chrome/renderer", |
| "//crypto:platform", |
| "//sync", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//third_party/icu", |
| "//third_party/leveldatabase", |
| "//third_party/npapi", |
| "//third_party/WebKit/public:blink", |
| ] |
| |
| if (cld_version == 0 || cld_version == 2) { |
| # Language detection is irrelevant to sync, so it can depend on any |
| # implementation for CLD2. Dynamic is smaller, so go with dynamic. |
| deps += [ "//third_party/cld_2:cld2_dynamic" ] |
| } |
| if (is_mac) { |
| # Dictionary sync is disabled on Mac. |
| sources -= [ |
| "../browser/sync/test/integration/multiple_client_dictionary_sync_test.cc", |
| "../browser/sync/test/integration/single_client_dictionary_sync_test.cc", |
| "../browser/sync/test/integration/two_client_dictionary_sync_test.cc", |
| ] |
| |
| # The sync_integration_tests do not run on mac without this flag. |
| # Search for comments about "xcode_settings" elsewhere in this file. |
| ldflags = [ "-Wl,-ObjC" ] |
| } |
| if (is_win) { |
| sources += [ |
| #'<(SHARED_INTERMEDIATE_DIR)/chrome_version/other_version.rc', TODO(GYP) |
| "$root_gen_dir/ui/resources/ui_unscaled_resources.rc", |
| ] |
| deps += [ |
| "//third_party/wtl", |
| "//ui/resources", |
| |
| #'chrome_version_resources', TODO(GYP) |
| ] |
| } else { |
| sources -= [ "../app/chrome_version.rc.version" ] |
| } |
| if (!is_chromeos) { |
| sources -= [ |
| "../browser/sync/test/integration/single_client_wifi_credentials_sync_test.cc", |
| "../browser/sync/test/integration/two_client_wifi_credentials_sync_test.cc", |
| ] |
| } |
| |
| if (toolkit_views) { |
| deps += [ "//ui/views" ] |
| } |
| if (enable_basic_printing || enable_print_preview) { |
| deps += [ "//printing" ] |
| } |
| if (!enable_app_list) { |
| sources -= [ |
| "../browser/sync/test/integration/single_client_app_list_sync_test.cc", |
| "../browser/sync/test/integration/two_client_app_list_sync_test.cc", |
| ] |
| } |
| if (!enable_supervised_users) { |
| sources -= [ "../browser/sync/test/integration/single_client_supervised_user_settings_sync_test.cc" ] |
| } |
| } |
| |
| test("sync_performance_tests") { |
| sources = |
| rebase_path(gypi_values.sync_performance_tests_sources, ".", "//chrome") |
| |
| defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] |
| |
| deps = [ |
| ":sync_integration_test_support", |
| "//base/allocator", |
| "//crypto:platform", |
| "//sync", |
| "//testing/gmock", |
| "//testing/gtest", |
| ] |
| |
| if (cld_version == 0 || cld_version == 2) { |
| # Language detection is irrelevant to sync, so it can depend on any |
| # implementation for CLD2. Dynamic is smaller, so go with dynamic. |
| deps += [ "//third_party/cld_2:cld2_dynamic" ] |
| } |
| |
| if (is_mac) { |
| # Dictionary sync is disabled on Mac. |
| sources -= [ "../browser/sync/test/integration/performance/dictionary_sync_perf_test.cc" ] |
| |
| # The sync_performance_tests do not run on mac without this flag. |
| # Search for comments about "xcode_settings" elsewhere in this file. |
| ldflags = [ "-Wl,-ObjC" ] |
| } |
| if (is_win) { |
| sources += [ |
| #'<(SHARED_INTERMEDIATE_DIR)/chrome_version/other_version.rc', TODO(GYP) |
| "$root_gen_dir/ui/resources/ui_unscaled_resources.rc", |
| ] |
| deps += [ |
| "//third_party/wtl", |
| "//ui/resources", |
| |
| #'chrome_version_resources', TODO(GYP) |
| ] |
| } else { |
| sources -= [ "../app/chrome_version.rc.version" ] |
| } |
| |
| if (toolkit_views) { |
| deps += [ "//ui/views" ] |
| } |
| } |
| |
| # Executable to measure time to load libraries. |
| test("load_library_perf_tests") { |
| sources = [ |
| "../browser/load_library_perf_test.cc", |
| ] |
| |
| deps = [ |
| "//base/test:test_support_perf", |
| "//testing/gtest", |
| "//testing/perf", |
| "//third_party/widevine/cdm:version_h", |
| ] |
| |
| # TODO(GYP) CDM adapter stuff. |
| #if (enable_pepper_cdms) { |
| # deps += [ |
| # "//media/cdm/ppapi:clearkeycdmadapter", |
| # "//ppapi:ppapi_cpp", |
| # "//third_party/widevine/cdm:adapter", |
| # ] |
| #} |
| } |
| } |