chromium/chrome/test/data/webui/settings/BUILD.gn

# Copyright 2020 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("../build_webui_tests.gni")

build_webui_tests("build") {
  files = [
    "about_page_test.ts",
    "advanced_page_test.ts",
    "ai_page_test.ts",
    "all_sites_test.ts",
    "anti_abuse_page_test.ts",
    "appearance_fonts_page_test.ts",
    "appearance_page_test.ts",
    "autofill_page_test.ts",
    "autofill_section_address_validation_test.ts",
    "autofill_section_test_utils.ts",
    "autofill_section_test.ts",
    "basic_page_test.ts",
    "battery_page_test.ts",
    "category_setting_exceptions_test.ts",
    "checkbox_test.ts",
    "checkbox_list_entry_test.ts",
    "chooser_exception_list_entry_test.ts",
    "chooser_exception_list_test.ts",
    "clear_browsing_data_test.ts",
    "collapse_radio_button_test.ts",
    "controlled_button_test.ts",
    "controlled_radio_button_test.ts",
    "cookies_page_test.ts",
    "cr_policy_pref_indicator_test.ts",
    "do_not_track_toggle_test.ts",
    "downloads_page_test.ts",
    "dropdown_menu_test.ts",
    "extension_controlled_indicator_test.ts",
    "file_system_site_details_test.ts",
    "file_system_site_entry_test.ts",
    "file_system_site_entry_item_test.ts",
    "file_system_site_list_test.ts",
    "fingerprint_progress_arc_test.ts",
    "help_page_test.ts",
    "idle_load_test.ts",
    "memory_page_test.ts",
    "offer_writing_help_page_test.ts",
    "on_startup_page_test.ts",
    "autofill_fake_data.ts",
    "payments_section_card_rows_test.ts",
    "payments_section_card_dialogs_test.ts",
    "payments_section_focus_test.ts",
    "payments_section_iban_test.ts",
    "payments_section_interactive_test.ts",
    "payments_section_test.ts",
    "payments_section_utils.ts",
    "people_page_sync_controls_test.ts",
    "people_page_sync_page_interactive_test.ts",
    "people_page_sync_page_test.ts",
    "people_page_test.ts",
    "performance_page_test.ts",
    "personalization_options_test.ts",
    "privacy_guide_ad_topics_fragment_test.ts",
    "privacy_guide_completion_fragment_test.ts",
    "privacy_guide_fragments_test.ts",
    "privacy_guide_integration_test.ts",
    "privacy_guide_page_test.ts",
    "privacy_guide_test_util.ts",
    "privacy_page_test.ts",
    "privacy_sandbox_page_test.ts",
    "protocol_handlers_test.ts",
    "recent_site_permissions_test.ts",
    "reset_page_test.ts",
    "reset_profile_banner_test.ts",
    "review_notification_permissions_interactive_ui_test.ts",
    "review_notification_permissions_test.ts",
    "route_test.ts",
    "safety_check_page_test.ts",
    "safety_check_permissions_test.ts",
    "safety_check_test_utils.ts",
    "safety_hub_card_test.ts",
    "safety_hub_entry_point_test.ts",
    "safety_hub_module_test.ts",
    "safety_hub_notification_permissions_module_test.ts",
    "safety_hub_extensions_module_test.ts",
    "safety_hub_page_test.ts",
    "safety_hub_unused_site_permissions_module_test.ts",
    "scrollable_mixin_test.ts",
    "search_engine_entry_test.ts",
    "search_engines_page_test.ts",
    "search_page_test.ts",
    "search_settings_test.ts",
    "secure_dns_interactive_test.ts",
    "secure_dns_test.ts",
    "security_keys_bio_enrollment_test.ts",
    "security_keys_credential_management_test.ts",
    "security_keys_reset_dialog_test.ts",
    "security_keys_set_pin_dialog_test.ts",
    "security_keys_test_util.ts",
    "security_keys_phones_subpage_test.ts",
    "security_page_test.ts",
    "settings_animated_pages_test.ts",
    "settings_category_default_radio_group_test.ts",
    "settings_main_test.ts",
    "settings_menu_interactive_ui_test.ts",
    "settings_menu_test.ts",
    "settings_page_test_util.ts",
    "settings_performance_menu_test.ts",
    "settings_prefs_test_cases.ts",
    "settings_prefs_test.ts",
    "settings_pref_util_test.ts",
    "settings_section_test.ts",
    "settings_slider_test.ts",
    "settings_subpage_test.ts",
    "settings_toggle_button_test.ts",
    "settings_ui_test.ts",
    "simple_confirmation_dialog_test.ts",
    "site_data_test.ts",
    "site_details_permission_test.ts",
    "site_details_permission_device_entry_test.ts",
    "site_details_test.ts",
    "site_entry_test.ts",
    "site_favicon_test.ts",
    "site_list_entry_test.ts",
    "site_list_test.ts",
    "site_settings_page_test.ts",
    "speed_page_test.ts",
    "startup_urls_page_test.ts",
    "storage_access_static_site_list_entry_test.ts",
    "storage_access_site_list_entry_test.ts",
    "storage_access_site_list_test.ts",
    "sync_test_util.ts",
    "tab_discard_exception_dialog_test.ts",
    "test_about_page_browser_proxy.ts",
    "test_clear_browsing_data_browser_proxy.ts",
    "test_extension_control_browser_proxy.ts",
    "test_hats_browser_proxy.ts",
    "test_extensions_browser_proxy.ts",
    "test_lifetime_browser_proxy.ts",
    "test_metrics_browser_proxy.ts",
    "test_password_manager_proxy.ts",
    "test_performance_browser_proxy.ts",
    "test_performance_metrics_proxy.ts",
    "test_privacy_guide_browser_proxy.ts",
    "test_privacy_page_browser_proxy.ts",
    "test_privacy_sandbox_browser_proxy.ts",
    "test_profile_info_browser_proxy.ts",
    "test_reset_browser_proxy.ts",
    "test_search_engines_browser_proxy.ts",
    "test_security_keys_browser_proxy.ts",
    "test_safety_hub_browser_proxy.ts",
    "test_site_settings_prefs_browser_proxy.ts",
    "test_sync_browser_proxy.ts",
    "test_util.ts",
    "unused_site_permissions_test.ts",
    "unused_site_permissions_interactive_ui_test.ts",
    "zoom_levels_test.ts",
  ]

  if (is_chromeos_ash) {
    files += [ "people_page_test_cros.ts" ]
  } else {
    files += [
      "fake_language_settings_private.ts",
      "languages_page_metrics_test_browser.ts",
      "languages_page_test.ts",
      "languages_test.ts",
      "metrics_reporting_test.ts",
      "people_page_manage_profile_test.ts",
      "relaunch_confirmation_dialog_test.ts",
      "spell_check_page_metrics_test_browser.ts",
      "spell_check_page_test.ts",
      "sync_account_control_test.ts",
      "test_languages_browser_proxy.ts",
      "test_languages_settings_metrics_proxy.ts",
      "translate_page_metrics_test_browser.ts",
      "translate_page_test.ts",
    ]
  }

  if (!is_chromeos) {
    files += [
      "live_caption_section_test.ts",
      "live_translate_section_test.ts",
      "test_captions_browser_proxy.ts",
      "default_browser_test.ts",
      "import_data_dialog_test.ts",
      "system_page_test.ts",
    ]
  }

  if (is_mac) {
    files += [ "passkey_edit_dialog_test.ts" ]
  }

  if (!is_mac && !is_chromeos_ash) {
    files += [ "edit_dictionary_page_test.ts" ]
  }

  if (is_win || is_mac) {
    files += [ "passkeys_subpage_test.ts" ]
  }

  if (is_win || is_mac || is_linux) {
    files += [
      "a11y_page_test.ts",
      "ax_annotations_section_test.ts",
    ]
  }

  if (is_win && is_chrome_branded) {
    files += [ "incompatible_applications_page_test.ts" ]
  }

  if (is_chrome_branded) {
    files += [ "get_most_chrome_page_test.ts" ]
  }

  ts_path_mappings = [
    # Settings tests should only be importing from one of the URLs below, so
    # that tests work both in optimize_webui=true/false modes.
    "chrome://settings/privacy_sandbox/*|" + rebase_path(
            "$root_gen_dir/chrome/browser/resources/settings/tsc/privacy_sandbox/*",
            target_gen_dir),
    "chrome://settings/settings.js|" +
        rebase_path(
            "$root_gen_dir/chrome/browser/resources/settings/tsc/settings.d.ts",
            target_gen_dir),
    "chrome://settings/lazy_load.js|" + rebase_path(
            "$root_gen_dir/chrome/browser/resources/settings/tsc/lazy_load.d.ts",
            target_gen_dir),
    "chrome://webui-test/cr_elements/cr_policy_strings.js|" + rebase_path(
            "$root_gen_dir/chrome/test/data/webui/cr_elements/tsc/cr_policy_strings.d.ts",
            target_gen_dir),
  ]

  ts_definitions = [
    "//tools/typescript/definitions/autofill_private.d.ts",
    "//tools/typescript/definitions/chrome_event.d.ts",
    "//tools/typescript/definitions/chrome_send.d.ts",
    "//tools/typescript/definitions/language_settings_private.d.ts",
    "//tools/typescript/definitions/management.d.ts",
    "//tools/typescript/definitions/passwords_private.d.ts",
    "//tools/typescript/definitions/pending.d.ts",
    "//tools/typescript/definitions/settings_private.d.ts",
  ]
  if (is_chromeos) {
    ts_definitions +=
        [ "//tools/typescript/definitions/quick_unlock_private.d.ts" ]
  }

  ts_deps = [
    "//chrome/browser/resources/settings:build_ts",
    "//chrome/test/data/webui/cr_elements:build_ts",
    "//third_party/polymer/v3_0:library",
    "//ui/webui/resources/js:build_ts",
  ]
}