# 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("//chrome/browser/resources/ash/settings/os_settings.gni")
import("//chrome/test/data/webui/build_webui_tests.gni")
import("//mojo/public/tools/bindings/mojom.gni")
mojom("test_api_mojom") {
testonly = true
sources = [
"os_people_page/password_settings_api.test-mojom",
"os_people_page/pin_settings_api.test-mojom",
"os_people_page/set_local_password_input_api.test-mojom",
"test_api.test-mojom",
]
webui_module_path = "chrome://webui-test/chromeos/settings"
}
build_webui_tests("build") {
files = [
"fake_canvas_context.ts",
"fake_input_method_private.ts",
"fake_language_settings_private.ts",
"fake_media_devices.ts",
"fake_metrics_private.ts",
"fake_personalization_search_handler.ts",
"fake_quick_unlock_private.ts",
"fake_receive_manager.ts",
"fake_settings_search_handler.ts",
"fake_system_display.ts",
"fake_user_action_recorder.ts",
"fake_users_private.ts",
"lacros_extension_controlled_indicator_test.ts",
"lock_screen_subpage_test.ts",
"onc_mojo_test.ts",
"os_page_availability_test.ts",
"os_settings_routes_test.ts",
"router_test.ts",
"test_api.ts",
"test_extension_control_browser_proxy.ts",
"test_lacros_extension_control_browser_proxy.ts",
"test_os_lifetime_browser_proxy.ts",
"test_os_sync_browser_proxy.ts",
"utils.ts",
# Subfolder files.
"app_management/fake_page_handler.ts",
"app_management/file_handling_item_test.ts",
"app_management/managed_apps_test.ts",
"app_management/test_store.ts",
"app_management/test_util.ts",
"app_management/toggle_row_test.ts",
"common/app_language_selection_dialog/app_language_selection_dialog_test.ts",
"common/app_language_selection_dialog/app_language_selection_item_test.ts",
"controls/controlled_button_test.ts",
"controls/controlled_radio_button_test.ts",
"controls/extension_controlled_indicator_test.ts",
"controls/dropdown_menu_test.ts",
"controls/settings_slider_test.ts",
"controls/settings_toggle_button_test.ts",
"controls/v2/base_row_mixin_test.ts",
"controls/v2/pref_control_mixin_internal_test.ts",
"controls/v2/settings_dropdown_row_test.ts",
"controls/v2/settings_dropdown_v2_test.ts",
"controls/v2/settings_row_test.ts",
"controls/v2/settings_slider_row_test.ts",
"controls/v2/settings_slider_v2_test.ts",
"controls/v2/settings_toggle_v2_test.ts",
"crostini_page/bruschetta_subpage_test.ts",
"crostini_page/crostini_arc_adb_test.ts",
"crostini_page/crostini_export_import_test.ts",
"crostini_page/crostini_extra_containers_subpage_test.ts",
"crostini_page/crostini_page_test.ts",
"crostini_page/crostini_port_forwarding_test.ts",
"crostini_page/crostini_settings_card_test.ts",
"crostini_page/crostini_shared_usb_devices_test.ts",
"crostini_page/crostini_subpage_test.ts",
"crostini_page/test_crostini_browser_proxy.ts",
"date_time_page/date_time_settings_card_test.ts",
"date_time_page/date_time_page_test.ts",
"date_time_page/test_date_time_browser_proxy.ts",
"date_time_page/timezone_selector_test.ts",
"date_time_page/timezone_subpage_test.ts",
"device_page/audio_page_test.ts",
"device_page/customize_button_dropdown_item_test.ts",
"device_page/customize_button_row_test.ts",
"device_page/customize_button_select_test.ts",
"device_page/customize_buttons_subsection_test.ts",
"device_page/customize_mouse_buttons_subpage_test.ts",
"device_page/customize_tablet_buttons_subpage_test.ts",
"device_page/customize_pen_buttons_subpage_test.ts",
"device_page/drag_and_drop_manager_test.ts",
"device_page/device_page_input_settings_test.ts",
"device_page/device_page_test.ts",
"device_page/device_page_test_util.ts",
"device_page/display_page_test.ts",
"device_page/display_settings_mojo_interface_provider_test.ts",
"device_page/fake_cros_audio_config_test.ts",
"device_page/fake_display_settings_provider.ts",
"device_page/fake_input_device_settings_provider_test.ts",
"device_page/fkey_row_test.ts",
"device_page/graphics_tablet_subpage_test.ts",
"device_page/input_device_mojo_interface_provider_test.ts",
"device_page/key_combination_input_dialog_test.ts",
"device_page/keyboard_six_pack_key_row_test.ts",
"device_page/keyboard_test.ts",
"device_page/per_device_app_installed_row_test.ts",
"device_page/per_device_install_row_test.ts",
"device_page/per_device_keyboard_remap_keys_test.ts",
"device_page/per_device_keyboard_subsection_test.ts",
"device_page/per_device_keyboard_test.ts",
"device_page/per_device_mouse_subsection_test.ts",
"device_page/per_device_mouse_test.ts",
"device_page/per_device_pointing_stick_subsection_test.ts",
"device_page/per_device_pointing_stick_test.ts",
"device_page/per_device_subsection_header_test.ts",
"device_page/per_device_touchpad_subsection_test.ts",
"device_page/per_device_touchpad_test.ts",
"device_page/pointers_test.ts",
"device_page/power_test.ts",
"device_page/storage_test.ts",
"device_page/stylus_test.ts",
"device_page/test_audio_and_captions_page_browser_proxy.ts",
"device_page/test_device_page_browser_proxy.ts",
"guest_os/guest_os_shared_paths_test.ts",
"guest_os/guest_os_shared_usb_devices_test.ts",
"guest_os/test_guest_os_browser_proxy.ts",
"internet_page/apn_detail_dialog_test.ts",
"internet_page/apn_subpage_test.ts",
"internet_page/cellular_networks_list_test.ts",
"internet_page/cellular_roaming_toggle_button_test.ts",
"internet_page/cellular_setup_dialog_test.ts",
"internet_page/esim_install_error_dialog_test.ts",
"internet_page/esim_remove_profile_dialog_test.ts",
"internet_page/esim_rename_dialog_test.ts",
"internet_page/hotspot_config_dialog_test.ts",
"internet_page/hotspot_subpage_test.ts",
"internet_page/hotspot_summary_item_test.ts",
"internet_page/internet_config_test.ts",
"internet_page/internet_detail_menu_test.ts",
"internet_page/internet_detail_subpage_test.ts",
"internet_page/internet_known_networks_subpage_test.ts",
"internet_page/internet_page_test.ts",
"internet_page/internet_subpage_menu_test.ts",
"internet_page/internet_subpage_test.ts",
"internet_page/network_always_on_vpn_test.ts",
"internet_page/network_device_info_dialog_test.ts",
"internet_page/network_proxy_section_test.ts",
"internet_page/network_summary_item_test.ts",
"internet_page/network_summary_test.ts",
"internet_page/passpoint_subpage_test.ts",
"internet_page/passpoint_remove_dialog_test.ts",
"internet_page/settings_traffic_counters_test.ts",
"internet_page/test_internet_page_browser_proxy.ts",
"internet_page/tether_connection_dialog_test.ts",
"kerberos_page/kerberos_accounts_subpage_test.ts",
"kerberos_page/kerberos_add_account_dialog_test.ts",
"kerberos_page/kerberos_page_test.ts",
"kerberos_page/test_kerberos_accounts_browser_proxy.ts",
"keyboard_shortcut_banner/keyboard_shortcut_banner_test.ts",
"main_page_container/main_page_container_test.ts",
"main_page_container/page_displayer_test.ts",
"main_page_container/route_navigation_test.ts",
"multidevice_page/multidevice_combined_setup_item_test.ts",
"multidevice_page/multidevice_feature_item_test.ts",
"multidevice_page/multidevice_feature_toggle_test.ts",
"multidevice_page/multidevice_notification_access_setup_dialog_test.ts",
"multidevice_page/multidevice_page_test.ts",
"multidevice_page/multidevice_permissions_setup_dialog_test.ts",
"multidevice_page/multidevice_smartlock_item_test.ts",
"multidevice_page/multidevice_subpage_test.ts",
"multidevice_page/multidevice_task_continuation_disabled_link_test.ts",
"multidevice_page/multidevice_task_continuation_item_test.ts",
"multidevice_page/multidevice_wifi_sync_disabled_link_test.ts",
"multidevice_page/multidevice_wifi_sync_item_test.ts",
"multidevice_page/test_multidevice_browser_proxy.ts",
"nearby_share_page/nearby_share_confirm_page_test.ts",
"nearby_share_page/nearby_share_high_visibility_page_test.ts",
"nearby_share_page/nearby_share_receive_dialog_test.ts",
"nearby_share_page/nearby_share_subpage_test.ts",
"nearby_share_page/test_nearby_account_manager_browser_proxy.ts",
"os_a11y_page/audio_and_captions_page_test.ts",
"os_a11y_page/ax_annotations_section_test.ts",
"os_a11y_page/change_dictation_locale_dialog_test.ts",
"os_a11y_page/chromevox_subpage_test.ts",
"os_a11y_page/cursor_and_touchpad_page_test.ts",
"os_a11y_page/facegaze_cursor_card_test.ts",
"os_a11y_page/facegaze_actions_card_test.ts",
"os_a11y_page/facegaze_actions_add_dialog_test.ts",
"os_a11y_page/facegaze_subpage_test.ts",
"os_a11y_page/display_and_magnification_subpage_test.ts",
"os_a11y_page/keyboard_and_text_input_page_test.ts",
"os_a11y_page/live_caption_section_test.ts",
"os_a11y_page/live_translate_section_test.ts",
"os_a11y_page/os_a11y_page_test.ts",
"os_a11y_page/os_a11y_page_kiosk_mode_test.ts",
"os_a11y_page/select_to_speak_subpage_test.ts",
"os_a11y_page/switch_access_action_assignment_dialog_test.ts",
"os_a11y_page/switch_access_setup_guide_dialog_test.ts",
"os_a11y_page/switch_access_subpage_test.ts",
"os_a11y_page/test_captions_browser_proxy.ts",
"os_a11y_page/test_chromevox_subpage_browser_proxy.ts",
"os_a11y_page/test_facegaze_subpage_browser_proxy.ts",
"os_a11y_page/test_os_a11y_page_browser_proxy.ts",
"os_a11y_page/test_select_to_speak_subpage_browser_proxy.ts",
"os_a11y_page/test_switch_access_subpage_browser_proxy.ts",
"os_a11y_page/text_to_speech_subpage_test.ts",
"os_a11y_page/tts_voice_subpage_test.ts",
"os_about_page/channel_switcher_dialog_test.ts",
"os_about_page/consumer_auto_update_toggle_dialog_test.ts",
"os_about_page/detailed_build_info_subpage_test.ts",
"os_about_page/edit_hostname_dialog_test.ts",
"os_about_page/os_about_page_test.ts",
"os_about_page/test_about_page_browser_proxy.ts",
"os_about_page/test_device_name_browser_proxy.ts",
"os_apps_page/app_management_page/app_detail_view_test.ts",
"os_apps_page/app_management_page/app_details_item_test.ts",
"os_apps_page/app_management_page/app_item_test.ts",
"os_apps_page/app_management_page/app_language_item_test.ts",
"os_apps_page/app_management_page/app_management_page_test.ts",
"os_apps_page/app_management_page/arc_detail_view_test.ts",
"os_apps_page/app_management_page/borealis_detail_view_test.ts",
"os_apps_page/app_management_page/chrome_app_detail_view_test.ts",
"os_apps_page/app_management_page/dom_switch_test.ts",
"os_apps_page/app_management_page/main_view_test.ts",
"os_apps_page/app_management_page/pin_to_shelf_item_test.ts",
"os_apps_page/app_management_page/plugin_vm_detail_view_test.ts",
"os_apps_page/app_management_page/pwa_detail_view_test.ts",
"os_apps_page/app_management_page/reducers_test.ts",
"os_apps_page/app_management_page/resize_lock_item_test.ts",
"os_apps_page/app_management_page/supported_links_item_test.ts",
"os_apps_page/app_management_page/test_plugin_vm_browser_proxy.ts",
"os_apps_page/app_management_page/file_handling_item_test.ts",
"os_apps_page/app_management_page/permission_item_test.ts",
"os_apps_page/app_management_page/uninstall_button_test.ts",
"os_apps_page/app_notifications_page/app_notification_row_test.ts",
"os_apps_page/app_notifications_page/app_notifications_manager_subpage_test.ts",
"os_apps_page/app_notifications_page/app_notifications_subpage_test.ts",
"os_apps_page/app_notifications_page/fake_app_notification_handler.ts",
"os_apps_page/app_parental_controls_page/app_parental_controls_subpage_test.ts",
"os_apps_page/app_parental_controls_page/app_setup_pin_dialog_test.ts",
"os_apps_page/app_parental_controls_page/app_verify_pin_dialog_test.ts",
"os_apps_page/app_parental_controls_page/block_app_item_test.ts",
"os_apps_page/app_parental_controls_page/fake_app_parental_controls_handler.ts",
"os_apps_page/app_parental_controls_page/test_utils.ts",
"os_apps_page/manage_isolated_web_apps_page/manage_isolated_web_apps_subpage_test.ts",
"os_apps_page/os_apps_page_test.ts",
"os_apps_page/test_android_apps_browser_proxy.ts",
"os_bluetooth_page/os_bluetooth_change_device_name_dialog_test.ts",
"os_bluetooth_page/os_bluetooth_device_detail_subpage_test.ts",
"os_bluetooth_page/os_bluetooth_devices_subpage_test.ts",
"os_bluetooth_page/os_bluetooth_page_test.ts",
"os_bluetooth_page/os_bluetooth_pairing_dialog_test.ts",
"os_bluetooth_page/os_bluetooth_saved_devices_subpage_test.ts",
"os_bluetooth_page/os_bluetooth_summary_test.ts",
"os_bluetooth_page/os_bluetooth_true_wireless_images_test.ts",
"os_bluetooth_page/os_paired_bluetooth_list_test.ts",
"os_bluetooth_page/os_paired_bluetooth_list_item_test.ts",
"os_bluetooth_page/os_saved_devices_list_test.ts",
"os_bluetooth_page/test_os_bluetooth_subpage_browser_proxy.ts",
"os_files_page/files_settings_card_test.ts",
"os_files_page/google_drive_page_test.ts",
"os_files_page/office_page_test.ts",
"os_files_page/one_drive_page_test.ts",
"os_files_page/one_drive_test_browser_proxy.ts",
"os_files_page/os_files_page_test.ts",
"os_files_page/smb_shares_page_test.ts",
"os_files_page/test_smb_browser_proxy.ts",
"os_languages_page/app_languages_page_test.ts",
"os_languages_page/fake_language_helper.ts",
"os_languages_page/input_method_options_page_test.ts",
"os_languages_page/input_page_test.ts",
"os_languages_page/language_settings_card_test.ts",
"os_languages_page/os_clear_personalization_data_page_test.ts",
"os_languages_page/os_edit_dictionary_page_test.ts",
"os_languages_page/os_languages_page_v2_test.ts",
"os_languages_page/test_os_languages_browser_proxy.ts",
"os_languages_page/test_os_languages_metrics_proxy.ts",
"os_people_page/account_manager_settings_card_test.ts",
"os_people_page/account_manager_subpage_test.ts",
"os_people_page/add_user_dialog_test.ts",
"os_people_page/additional_accounts_settings_card_test.ts",
"os_people_page/fingerprint_list_subpage_test.ts",
"os_people_page/os_people_page_test.ts",
"os_people_page/os_sync_controls_subpage_test.ts",
"os_people_page/personalization_options_test.ts",
"os_people_page/password_dialog_api.ts",
"os_people_page/pin_dialog_api.ts",
"os_people_page/pin_settings_api.ts",
"os_people_page/set_local_password_input_api.ts",
"os_people_page/password_settings_api.ts",
"os_people_page/test_account_manager_browser_proxy.ts",
"os_people_page/test_fingerprint_browser_proxy.ts",
"os_people_page/test_os_sync_browser_proxy.ts",
"os_people_page/test_parental_controls_browser_proxy.ts",
"os_people_page/test_profile_info_browser_proxy.ts",
"os_printing_page/cups_print_server_test.ts",
"os_printing_page/cups_printer_dialog_test.ts",
"os_printing_page/cups_printer_landing_page_test.ts",
"os_printing_page/cups_printer_page_test.ts",
"os_printing_page/cups_printer_test_utils.ts",
"os_printing_page/cups_printers_entry_test.ts",
"os_printing_page/os_printing_page_test.ts",
"os_printing_page/printer_status_test.ts",
"os_printing_page/printing_settings_card_test.ts",
"os_printing_page/test_cups_printers_browser_proxy.ts",
"os_privacy_page/fake_app_permission_handler.ts",
"os_privacy_page/manage_users_subpage_test.ts",
"os_privacy_page/os_privacy_page_test.ts",
"os_privacy_page/privacy_hub_app_permission_row_test.ts",
"os_privacy_page/privacy_hub_app_permission_test_util.ts",
"os_privacy_page/privacy_hub_camera_subpage_test.ts",
"os_privacy_page/privacy_hub_microphone_subpage_test.ts",
"os_privacy_page/privacy_hub_geolocation_advanced_subpage_test.ts",
"os_privacy_page/privacy_hub_geolocation_subpage_test.ts",
"os_privacy_page/privacy_hub_subpage_test.ts",
"os_privacy_page/secure_dns_test.ts",
"os_privacy_page/secure_dns_interactive_test.ts",
"os_privacy_page/test_privacy_page_browser_proxy.ts",
"os_privacy_page/smart_privacy_subpage_test.ts",
"os_privacy_page/test_metrics_consent_browser_proxy.ts",
"os_privacy_page/test_peripheral_data_access_browser_proxy.ts",
"os_privacy_page/test_privacy_hub_browser_proxy.ts",
"os_reset_page/os_reset_page_test.ts",
"os_reset_page/reset_settings_card_test.ts",
"os_reset_page/test_os_reset_browser_proxy.ts",
"os_search_page/google_assistant_subpage_test.ts",
"os_search_page/os_search_page_test.ts",
"os_search_page/search_and_assistant_settings_card_test.ts",
"os_search_page/search_engine_test.ts",
"os_search_page/search_subpage_test.ts",
"os_search_page/test_search_engines_browser_proxy.ts",
"os_settings_main/managed_footnote_test.ts",
"os_settings_main/os_settings_main_test.ts",
"os_settings_menu/menu_item_test.ts",
"os_settings_menu/os_settings_menu_test.ts",
"os_settings_menu/os_settings_menu_revamp_test.ts",
"os_settings_search_box/os_settings_search_box_test.ts",
"os_settings_search_box/test_open_window_proxy.ts",
"os_settings_search_box/test_os_settings_search_box_browser_proxy.ts",
"os_settings_ui/os_settings_ui_about_page_test.ts",
"os_settings_ui/os_settings_ui_hats_test.ts",
"os_settings_ui/os_settings_ui_menu_test.ts",
"os_settings_ui/os_settings_ui_page_availability_test.ts",
"os_settings_ui/os_settings_ui_page_visibility_revamp_test.ts",
"os_settings_ui/os_settings_ui_pref_sync_test.ts",
"os_settings_ui/os_settings_ui_test.ts",
"os_settings_ui/os_settings_ui_toolbar_test.ts",
"os_settings_ui/page_availability_test_helpers.ts",
"os_settings_ui/scroll_restoration_test.ts",
"os_settings_ui/test_os_settings_hats_browser_proxy.ts",
"os_settings_ui/user_action_recorder_test.ts",
"parental_controls_page/parental_controls_page_test.ts",
"parental_controls_page/parental_controls_settings_card_test.ts",
"parental_controls_page/test_parental_controls_browser_proxy.ts",
"personalization_page/personalization_page_with_personalization_hub_test.ts",
"personalization_page/test_personalization_hub_browser_proxy.ts",
"settings_scheduler_slider/settings_scheduler_slider_test.ts",
"system_preferences_page/multitasking_settings_card_test.ts",
"system_preferences_page/startup_settings_card_test.ts",
"system_preferences_page/storage_and_power_settings_card_test.ts",
"system_preferences_page/system_preferences_page_test.ts",
]
mojo_files = [
"$root_gen_dir/chrome/test/data/webui/chromeos/settings/test_api.test-mojom-webui.ts",
"$root_gen_dir/chrome/test/data/webui/chromeos/settings/os_people_page/password_settings_api.test-mojom-webui.ts",
"$root_gen_dir/chrome/test/data/webui/chromeos/settings/os_people_page/pin_settings_api.test-mojom-webui.ts",
"$root_gen_dir/chrome/test/data/webui/chromeos/settings/os_people_page/set_local_password_input_api.test-mojom-webui.ts",
]
mojo_files_deps = [ ":test_api_mojom_ts__generator" ]
ts_tsconfig_base = "tsconfig_base.json"
ts_deps = [
"//ash/webui/common/resources:build_ts",
"//ash/webui/common/resources/cr_elements:build_ts",
"//chrome/browser/resources/ash/settings:build_ts",
"//chrome/test/data/webui/chromeos:build_ts",
"//chrome/test/data/webui/cr_components/chromeos:build_ts",
"//chrome/test/data/webui/nearby_share:build_ts",
"//third_party/polymer/v3_0:library",
"//ui/webui/resources/cr_components/app_management:build_ts",
"//ui/webui/resources/js:build_ts",
"//ui/webui/resources/mojo:build_ts",
]
ts_path_mappings = [
# CrOS Settings browser tests should only import from one of the paths
# below, so that tests work both in optimize_webui=true/false modes.
"chrome://os-settings/os_settings.js|" + rebase_path(
"$root_gen_dir/chrome/browser/resources/ash/settings/tsc/os_settings.d.ts",
target_gen_dir),
"chrome://os-settings/lazy_load.js|" + rebase_path(
"$root_gen_dir/chrome/browser/resources/ash/settings/tsc/lazy_load.d.ts",
target_gen_dir),
"chrome://webui-test/chromeos/*|" +
rebase_path("$root_gen_dir/chrome/test/data/webui/chromeos/tsc/*",
target_gen_dir),
"chrome://webui-test/cr_components/chromeos/*|" +
rebase_path(
"$root_gen_dir/chrome/test/data/webui/cr_components/chromeos/tsc/*",
target_gen_dir),
"chrome://webui-test/nearby_share/*|" +
rebase_path("$root_gen_dir/chrome/test/data/webui/nearby_share/tsc/*",
target_gen_dir),
]
ts_definitions = ts_definition_files
}