Commit cb689d02 authored by James Hawkins's avatar James Hawkins Committed by Chromium LUCI CQ

OS Settings: Convert SwitchAccessActionAssignmentDialog to poly3.

R=khorimoto@chromium.org

Bug: 1045266
Test: OSSettingsSwitchAccessActionAssignmentDialog*
Change-Id: Id346d80dba4eefd7cda822db567bbbc45304a43f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2587561
Commit-Queue: James Hawkins <jhawkins@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#837906}
parent 1aca7fb2
...@@ -356,6 +356,9 @@ preprocess_if_expr("preprocess_gen_v3") { ...@@ -356,6 +356,9 @@ preprocess_if_expr("preprocess_gen_v3") {
"chromeos/nearby_share_page/nearby_share_subpage.m.js", "chromeos/nearby_share_page/nearby_share_subpage.m.js",
"chromeos/nearby_share_page/types.m.js", "chromeos/nearby_share_page/types.m.js",
"chromeos/on_startup_page/on_startup_page.m.js", "chromeos/on_startup_page/on_startup_page.m.js",
"chromeos/os_a11y_page/switch_access_action_assignment_dialog.m.js",
"chromeos/os_a11y_page/switch_access_constants.m.js",
"chromeos/os_a11y_page/switch_access_subpage_browser_proxy.m.js",
"chromeos/os_a11y_page/tts_subpage.m.js", "chromeos/os_a11y_page/tts_subpage.m.js",
"chromeos/os_a11y_page/tts_subpage_browser_proxy.m.js", "chromeos/os_a11y_page/tts_subpage_browser_proxy.m.js",
"chromeos/os_about_page/channel_switcher_dialog.m.js", "chromeos/os_about_page/channel_switcher_dialog.m.js",
......
...@@ -7,6 +7,7 @@ import './date_time_page/date_time_page.m.js'; ...@@ -7,6 +7,7 @@ import './date_time_page/date_time_page.m.js';
import './date_time_page/timezone_selector.m.js'; import './date_time_page/timezone_selector.m.js';
// import './os_a11y_page/os_a11y_page.m.js'; // import './os_a11y_page/os_a11y_page.m.js';
import './on_startup_page/on_startup_page.m.js'; import './on_startup_page/on_startup_page.m.js';
import './os_a11y_page/switch_access_action_assignment_dialog.m.js';
import './os_files_page/os_files_page.m.js'; import './os_files_page/os_files_page.m.js';
import './os_languages_page/input_method_options_page.m.js'; import './os_languages_page/input_method_options_page.m.js';
import './os_languages_page/input_page.m.js'; import './os_languages_page/input_page.m.js';
......
...@@ -66,6 +66,7 @@ js_library("switch_access_action_assignment_dialog") { ...@@ -66,6 +66,7 @@ js_library("switch_access_action_assignment_dialog") {
"//ui/webui/resources/cr_elements/cr_button:cr_button", "//ui/webui/resources/cr_elements/cr_button:cr_button",
"//ui/webui/resources/cr_elements/cr_dialog:cr_dialog", "//ui/webui/resources/cr_elements/cr_dialog:cr_dialog",
"//ui/webui/resources/js:i18n_behavior", "//ui/webui/resources/js:i18n_behavior",
"//ui/webui/resources/js:load_time_data",
"//ui/webui/resources/js:web_ui_listener_behavior", "//ui/webui/resources/js:web_ui_listener_behavior",
] ]
} }
...@@ -129,7 +130,8 @@ js_type_check("closure_compile_module") { ...@@ -129,7 +130,8 @@ js_type_check("closure_compile_module") {
# ":os_a11y_page.m", # ":os_a11y_page.m",
":os_a11y_page_browser_proxy.m", ":os_a11y_page_browser_proxy.m",
#":switch_access_action_assignment_dialog.m", ":switch_access_action_assignment_dialog.m",
":switch_access_constants.m",
# ":switch_access_subpage.m", # ":switch_access_subpage.m",
":switch_access_subpage_browser_proxy.m", ":switch_access_subpage_browser_proxy.m",
":tts_subpage.m", ":tts_subpage.m",
...@@ -175,6 +177,29 @@ js_library("os_a11y_page_browser_proxy.m") { ...@@ -175,6 +177,29 @@ js_library("os_a11y_page_browser_proxy.m") {
extra_deps = [ ":modulize" ] extra_deps = [ ":modulize" ]
} }
js_library("switch_access_action_assignment_dialog.m") {
sources = [ "$root_gen_dir/chrome/browser/resources/settings/chromeos/os_a11y_page/switch_access_action_assignment_dialog.m.js" ]
deps = [
":switch_access_constants.m",
"//chrome/browser/resources/settings/prefs:prefs_behavior.m",
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
"//ui/webui/resources/cr_elements/cr_button:cr_button.m",
"//ui/webui/resources/cr_elements/cr_dialog:cr_dialog.m",
"//ui/webui/resources/js:i18n_behavior.m",
"//ui/webui/resources/js:load_time_data.m",
"//ui/webui/resources/js:web_ui_listener_behavior.m",
]
extra_deps = [ ":switch_access_action_assignment_dialog_module" ]
}
js_library("switch_access_constants.m") {
sources = [ "$root_gen_dir/chrome/browser/resources/settings/chromeos/os_a11y_page/switch_access_constants.m.js" ]
deps = [
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
]
extra_deps = [ ":modulize" ]
}
js_library("switch_access_subpage.m") { js_library("switch_access_subpage.m") {
sources = [ "$root_gen_dir/chrome/browser/resources/settings/chromeos/os_a11y_page/switch_access_subpage.m.js" ] sources = [ "$root_gen_dir/chrome/browser/resources/settings/chromeos/os_a11y_page/switch_access_subpage.m.js" ]
deps = [ deps = [
...@@ -224,6 +249,7 @@ group("polymer3_elements") { ...@@ -224,6 +249,7 @@ group("polymer3_elements") {
":manage_a11y_page_module", ":manage_a11y_page_module",
":modulize", ":modulize",
":os_a11y_page_module", ":os_a11y_page_module",
":switch_access_action_assignment_dialog_module",
":switch_access_subpage_module", ":switch_access_subpage_module",
":tts_subpage_module", ":tts_subpage_module",
] ]
...@@ -241,6 +267,14 @@ polymer_modulizer("os_a11y_page") { ...@@ -241,6 +267,14 @@ polymer_modulizer("os_a11y_page") {
html_type = "dom-module" html_type = "dom-module"
} }
polymer_modulizer("switch_access_action_assignment_dialog") {
js_file = "switch_access_action_assignment_dialog.js"
html_file = "switch_access_action_assignment_dialog.html"
html_type = "dom-module"
auto_imports = os_settings_auto_imports
namespace_rewrites = os_settings_namespace_rewrites
}
polymer_modulizer("switch_access_subpage") { polymer_modulizer("switch_access_subpage") {
js_file = "switch_access_subpage.js" js_file = "switch_access_subpage.js"
html_file = "switch_access_subpage.html" html_file = "switch_access_subpage.html"
...@@ -262,6 +296,7 @@ js_modulizer("modulize") { ...@@ -262,6 +296,7 @@ js_modulizer("modulize") {
"externs.js", "externs.js",
"manage_a11y_page_browser_proxy.js", "manage_a11y_page_browser_proxy.js",
"os_a11y_page_browser_proxy.js", "os_a11y_page_browser_proxy.js",
"switch_access_constants.js",
"switch_access_subpage_browser_proxy.js", "switch_access_subpage_browser_proxy.js",
"tts_subpage_browser_proxy.js", "tts_subpage_browser_proxy.js",
] ]
......
<link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/html/i18n_behavior.html">
<link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html">
<link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html"> <link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html">
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html"> <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html">
<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html"> <link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
<link rel="import" href="../../i18n_setup.html"> <link rel="import" href="chrome://resources/html/i18n_behavior.html">
<link rel="import" href="chrome://resources/html/load_time_data.html">
<link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html">
<link rel="import" href="../../prefs/prefs_behavior.html">
<link rel="import" href="../os_icons.html"> <link rel="import" href="../os_icons.html">
<link rel="import" href="switch_access_constants.html"> <link rel="import" href="switch_access_constants.html">
<link rel="import" href="switch_access_subpage_browser_proxy.html">
<dom-module id="settings-switch-access-action-assignment-dialog"> <dom-module id="settings-switch-access-action-assignment-dialog">
<template> <template>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Available commands. * Available commands.
* @enum {string} * @enum {string}
*/ */
const SwitchAccessCommand = { /* #export */ const SwitchAccessCommand = {
NEXT: 'next', NEXT: 'next',
PREVIOUS: 'previous', PREVIOUS: 'previous',
SELECT: 'select' SELECT: 'select'
......
...@@ -106,6 +106,8 @@ os_settings_auto_imports = settings_auto_imports + ...@@ -106,6 +106,8 @@ os_settings_auto_imports = settings_auto_imports +
"chrome/browser/resources/settings/chromeos/nearby_share_page/nearby_account_manager_browser_proxy.html|NearbyAccountManagerBrowserProxy,NearbyAccountManagerBrowserProxyImpl", "chrome/browser/resources/settings/chromeos/nearby_share_page/nearby_account_manager_browser_proxy.html|NearbyAccountManagerBrowserProxy,NearbyAccountManagerBrowserProxyImpl",
"chrome/browser/resources/settings/chromeos/nearby_share_page/nearby_share_receive_manager.html|setReceiveManagerForTesting,getReceiveManager,observeReceiveManager", "chrome/browser/resources/settings/chromeos/nearby_share_page/nearby_share_receive_manager.html|setReceiveManagerForTesting,getReceiveManager,observeReceiveManager",
"chrome/browser/resources/settings/chromeos/nearby_share_page/types.html|NearbyShareDataUsage,dataUsageStringToEnum", "chrome/browser/resources/settings/chromeos/nearby_share_page/types.html|NearbyShareDataUsage,dataUsageStringToEnum",
"chrome/browser/resources/settings/chromeos/os_a11y_page/switch_access_constants.html|SwitchAccessCommand",
"chrome/browser/resources/settings/chromeos/os_a11y_page/switch_access_subpage_browser_proxy.html|SwitchAccessSubpageBrowserProxy,SwitchAccessSubpageBrowserProxyImpl",
"chrome/browser/resources/settings/chromeos/os_a11y_page/tts_subpage_browser_proxy.html|TtsSubpageBrowserProxy,TtsSubpageBrowserProxyImpl", "chrome/browser/resources/settings/chromeos/os_a11y_page/tts_subpage_browser_proxy.html|TtsSubpageBrowserProxy,TtsSubpageBrowserProxyImpl",
"chrome/browser/resources/settings/chromeos/os_languages_page/input_method_util.html|generateOptions,getFirstPartyInputMethodEngineId,getOptionLabelName,getOptionMenuItems,getOptionUiType,getOptionUrl,hasOptionsPageInSettings,InputToolCode,isNumberValue,OPTION_DEFAULT,OptionType,UiType", "chrome/browser/resources/settings/chromeos/os_languages_page/input_method_util.html|generateOptions,getFirstPartyInputMethodEngineId,getOptionLabelName,getOptionMenuItems,getOptionUiType,getOptionUrl,hasOptionsPageInSettings,InputToolCode,isNumberValue,OPTION_DEFAULT,OptionType,UiType",
"chrome/browser/resources/settings/chromeos/os_languages_page/languages_metrics_proxy.html|LanguagesMetricsProxy, LanguagesMetricsProxyImpl, LanguagesPageInteraction", "chrome/browser/resources/settings/chromeos/os_languages_page/languages_metrics_proxy.html|LanguagesMetricsProxy, LanguagesMetricsProxyImpl, LanguagesPageInteraction",
...@@ -131,24 +133,24 @@ os_settings_auto_imports = settings_auto_imports + ...@@ -131,24 +133,24 @@ os_settings_auto_imports = settings_auto_imports +
"chrome/browser/resources/settings/route.html|routes", "chrome/browser/resources/settings/route.html|routes",
"chrome/browser/resources/settings/router.html|Router,Route,RouteObserverBehavior", "chrome/browser/resources/settings/router.html|Router,Route,RouteObserverBehavior",
"chrome/browser/resources/settings/search_engines_page/search_engines_browser_proxy.html|SearchEngine,SearchEnginesBrowserProxy,SearchEnginesBrowserProxyImpl", "chrome/browser/resources/settings/search_engines_page/search_engines_browser_proxy.html|SearchEngine,SearchEnginesBrowserProxy,SearchEnginesBrowserProxyImpl",
"ui/webui/resources/html/assert.html|assert,assertNotReached",
"ui/webui/resources/html/cr.html|sendWithPromise,removeWebUIListener,addWebUIListener,WebUIListener",
"ui/webui/resources/html/icon.html|getImage",
"ui/webui/resources/html/polymer.html|afterNextRender,Polymer,html,flush",
"ui/webui/resources/html/util.html|HTMLEscape",
"chrome/browser/resources/settings/chromeos/os_printing_page/cups_printers_browser_proxy.html|CupsPrintersBrowserProxy,CupsPrintersBrowserProxyImpl,CupsPrinterInfo,PrinterSetupResult,CupsPrintersList,PrinterPpdMakeModel,ManufacturersInfo,ModelsInfo,PrintServerResult,PrinterMakeModel", "chrome/browser/resources/settings/chromeos/os_printing_page/cups_printers_browser_proxy.html|CupsPrintersBrowserProxy,CupsPrintersBrowserProxyImpl,CupsPrinterInfo,PrinterSetupResult,CupsPrintersList,PrinterPpdMakeModel,ManufacturersInfo,ModelsInfo,PrintServerResult,PrinterMakeModel",
"chrome/browser/resources/settings/chromeos/os_printing_page/cups_printers_entry_list_behavior.html|CupsPrintersEntryListBehavior", "chrome/browser/resources/settings/chromeos/os_printing_page/cups_printers_entry_list_behavior.html|CupsPrintersEntryListBehavior",
"chrome/browser/resources/settings/chromeos/os_printing_page/cups_printers_entry_manager.html|CupsPrintersEntryManager", "chrome/browser/resources/settings/chromeos/os_printing_page/cups_printers_entry_manager.html|CupsPrintersEntryManager",
"chrome/browser/resources/settings/chromeos/os_printing_page/cups_printer_dialog_util.html|sortPrinters,matchesSearchTerm,getBaseName,getErrorText,isNetworkProtocol,isNameAndAddressValid,isPPDInfoValid,getPrintServerErrorText", "chrome/browser/resources/settings/chromeos/os_printing_page/cups_printer_dialog_util.html|sortPrinters,matchesSearchTerm,getBaseName,getErrorText,isNetworkProtocol,isNameAndAddressValid,isPPDInfoValid,getPrintServerErrorText",
"ui/webui/resources/html/list_property_update_behavior.html|ListPropertyUpdateBehavior",
"ui/webui/resources/html/web_ui_listener_behavior.html|WebUIListenerBehavior",
"ui/webui/resources/cr_components/chromeos/network/network_listener_behavior.html|NetworkListenerBehavior",
"chrome/browser/resources/settings/chromeos/os_printing_page/cups_printer_types.html|PrinterListEntry,PrinterType", "chrome/browser/resources/settings/chromeos/os_printing_page/cups_printer_types.html|PrinterListEntry,PrinterType",
"chrome/browser/resources/settings/about_page/about_page_browser_proxy.html|AboutPageBrowserProxyImpl,AboutPageUpdateInfo,AboutPageBrowserProxy,browserChannelToI18nId,VersionInfo,ChannelInfo,BrowserChannel,isTargetChannelMoreStable,UpdateStatus,UpdateStatusChangedEvent,RegulatoryInfo,TPMFirmwareUpdateStatusChangedEvent", "chrome/browser/resources/settings/about_page/about_page_browser_proxy.html|AboutPageBrowserProxyImpl,AboutPageUpdateInfo,AboutPageBrowserProxy,browserChannelToI18nId,VersionInfo,ChannelInfo,BrowserChannel,isTargetChannelMoreStable,UpdateStatus,UpdateStatusChangedEvent,RegulatoryInfo,TPMFirmwareUpdateStatusChangedEvent",
"chrome/browser/resources/settings/chromeos/os_about_page/device_name_browser_proxy.html|DeviceNameBrowserProxy,DeviceNameBrowserProxyImpl", "chrome/browser/resources/settings/chromeos/os_about_page/device_name_browser_proxy.html|DeviceNameBrowserProxy,DeviceNameBrowserProxyImpl",
"chrome/browser/resources/settings/chromeos/os_settings_page/main_page_behavior.html|MainPageBehavior", "chrome/browser/resources/settings/chromeos/os_settings_page/main_page_behavior.html|MainPageBehavior",
"ui/webui/resources/cr_components/chromeos/network/network_listener_behavior.html|NetworkListenerBehavior",
"ui/webui/resources/cr_elements/cr_slider/cr_slider.html|SliderTick", "ui/webui/resources/cr_elements/cr_slider/cr_slider.html|SliderTick",
"ui/webui/resources/html/assert.html|assert,assertNotReached",
"ui/webui/resources/html/cr.html|sendWithPromise,removeWebUIListener,addWebUIListener,WebUIListener",
"ui/webui/resources/html/icon.html|getImage",
"ui/webui/resources/html/list_property_update_behavior.html|ListPropertyUpdateBehavior",
"ui/webui/resources/html/parse_html_subset.html|parseHtmlSubset", "ui/webui/resources/html/parse_html_subset.html|parseHtmlSubset",
"ui/webui/resources/html/polymer.html|afterNextRender,Polymer,html,flush",
"ui/webui/resources/html/util.html|HTMLEscape",
"ui/webui/resources/html/web_ui_listener_behavior.html|WebUIListenerBehavior",
] ]
os_settings_migrated_imports = settings_migrated_imports os_settings_migrated_imports = settings_migrated_imports
...@@ -61,6 +61,7 @@ export {MultiDeviceFeature, MultiDeviceFeatureState, MultiDevicePageContentData, ...@@ -61,6 +61,7 @@ export {MultiDeviceFeature, MultiDeviceFeatureState, MultiDevicePageContentData,
export {Account, NearbyAccountManagerBrowserProxy, NearbyAccountManagerBrowserProxyImpl} from './nearby_share_page/nearby_account_manager_browser_proxy.m.js'; export {Account, NearbyAccountManagerBrowserProxy, NearbyAccountManagerBrowserProxyImpl} from './nearby_share_page/nearby_account_manager_browser_proxy.m.js';
export {getReceiveManager, observeReceiveManager, setReceiveManagerForTesting} from './nearby_share_page/nearby_share_receive_manager.m.js'; export {getReceiveManager, observeReceiveManager, setReceiveManagerForTesting} from './nearby_share_page/nearby_share_receive_manager.m.js';
export {dataUsageStringToEnum, NearbyShareDataUsage} from './nearby_share_page/types.m.js'; export {dataUsageStringToEnum, NearbyShareDataUsage} from './nearby_share_page/types.m.js';
export {SwitchAccessSubpageBrowserProxy, SwitchAccessSubpageBrowserProxyImpl} from './os_a11y_page/switch_access_subpage_browser_proxy.m.js';
export {TtsSubpageBrowserProxy, TtsSubpageBrowserProxyImpl} from './os_a11y_page/tts_subpage_browser_proxy.m.js'; export {TtsSubpageBrowserProxy, TtsSubpageBrowserProxyImpl} from './os_a11y_page/tts_subpage_browser_proxy.m.js';
export {DeviceNameBrowserProxy, DeviceNameBrowserProxyImpl} from './os_about_page/device_name_browser_proxy.m.js'; export {DeviceNameBrowserProxy, DeviceNameBrowserProxyImpl} from './os_about_page/device_name_browser_proxy.m.js';
export {KerberosAccountsBrowserProxyImpl, KerberosConfigErrorCode, KerberosErrorType} from './os_people_page/kerberos_accounts_browser_proxy.m.js'; export {KerberosAccountsBrowserProxyImpl, KerberosConfigErrorCode, KerberosErrorType} from './os_people_page/kerberos_accounts_browser_proxy.m.js';
......
...@@ -138,6 +138,7 @@ void SwitchAccessHandler::HandleRefreshAssignmentsFromPrefs( ...@@ -138,6 +138,7 @@ void SwitchAccessHandler::HandleRefreshAssignmentsFromPrefs(
void SwitchAccessHandler:: void SwitchAccessHandler::
HandleNotifySwitchAccessActionAssignmentDialogAttached( HandleNotifySwitchAccessActionAssignmentDialogAttached(
const base::ListValue* args) { const base::ListValue* args) {
AllowJavascript();
OnSwitchAccessAssignmentsUpdated(); OnSwitchAccessAssignmentsUpdated();
web_ui()->GetWebContents()->GetNativeView()->AddPreTargetHandler(this); web_ui()->GetWebContents()->GetNativeView()->AddPreTargetHandler(this);
ash::AccessibilityController::Get()->SuspendSwitchAccessKeyHandling(true); ash::AccessibilityController::Get()->SuspendSwitchAccessKeyHandling(true);
......
...@@ -368,6 +368,7 @@ if (include_js_tests) { ...@@ -368,6 +368,7 @@ if (include_js_tests) {
"$root_gen_dir/chrome/test/data/webui/settings/chromeos/personalization_page_test.m.js", "$root_gen_dir/chrome/test/data/webui/settings/chromeos/personalization_page_test.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/chromeos/smart_inputs_page_test.m.js", "$root_gen_dir/chrome/test/data/webui/settings/chromeos/smart_inputs_page_test.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/chromeos/smb_shares_page_tests.m.js", "$root_gen_dir/chrome/test/data/webui/settings/chromeos/smb_shares_page_tests.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/chromeos/switch_access_action_assignment_dialog_test.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/chromeos/test_about_page_browser_proxy_chromeos.m.js", "$root_gen_dir/chrome/test/data/webui/settings/chromeos/test_about_page_browser_proxy_chromeos.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/chromeos/test_cups_printers_browser_proxy.m.js", "$root_gen_dir/chrome/test/data/webui/settings/chromeos/test_cups_printers_browser_proxy.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/chromeos/test_multidevice_browser_proxy.m.js", "$root_gen_dir/chrome/test/data/webui/settings/chromeos/test_multidevice_browser_proxy.m.js",
......
...@@ -91,6 +91,7 @@ js_modulizer("modulize") { ...@@ -91,6 +91,7 @@ js_modulizer("modulize") {
"personalization_page_test.js", "personalization_page_test.js",
"smart_inputs_page_test.js", "smart_inputs_page_test.js",
"smb_shares_page_tests.js", "smb_shares_page_tests.js",
"switch_access_action_assignment_dialog_test.js",
"test_about_page_browser_proxy_chromeos.js", "test_about_page_browser_proxy_chromeos.js",
"test_cups_printers_browser_proxy.js", "test_cups_printers_browser_proxy.js",
"test_device_name_browser_proxy.js", "test_device_name_browser_proxy.js",
......
...@@ -2411,6 +2411,23 @@ TEST_F('OSSettingsSwitchAccessSubpageTest', 'AllJsTests', () => { ...@@ -2411,6 +2411,23 @@ TEST_F('OSSettingsSwitchAccessSubpageTest', 'AllJsTests', () => {
mocha.run(); mocha.run();
}); });
// Test fixture for the Switch Access Action Assignment dialog.
// eslint-disable-next-line no-var
var OSSettingsSwitchAccessActionAssignmentDialogTest = class extends OSSettingsBrowserTest {
/** @override */
get extraLibraries() {
return super.extraLibraries.concat([
BROWSER_SETTINGS_PATH + '../test_browser_proxy.js',
BROWSER_SETTINGS_PATH + '../test_util.js',
'switch_access_action_assignment_dialog_test.js',
]);
}
};
TEST_F('OSSettingsSwitchAccessActionAssignmentDialogTest', 'AllJsTests', () => {
mocha.run();
});
// Tests for the Date Time timezone selector // Tests for the Date Time timezone selector
// eslint-disable-next-line no-var // eslint-disable-next-line no-var
var OSSettingsTimezoneSelectorTest = class extends OSSettingsBrowserTest { var OSSettingsTimezoneSelectorTest = class extends OSSettingsBrowserTest {
......
...@@ -249,6 +249,7 @@ TEST_F( ...@@ -249,6 +249,7 @@ TEST_F(
['ResetPage', 'os_reset_page_test.m.js'], ['ResetPage', 'os_reset_page_test.m.js'],
['SmartInputsPage', 'smart_inputs_page_test.m.js'], ['SmartInputsPage', 'smart_inputs_page_test.m.js'],
['SmbPage', 'smb_shares_page_tests.m.js'], ['SmbPage', 'smb_shares_page_tests.m.js'],
['SwitchAccessActionAssignmentDialog', 'switch_access_action_assignment_dialog_test.m.js'],
['TetherConnectionDialog', 'tether_connection_dialog_test.m.js'], ['TetherConnectionDialog', 'tether_connection_dialog_test.m.js'],
['TimezoneSelector', 'timezone_selector_test.m.js'], ['TimezoneSelector', 'timezone_selector_test.m.js'],
['TimezoneSubpage', 'timezone_subpage_test.m.js'], ['TimezoneSubpage', 'timezone_subpage_test.m.js'],
......
// Copyright 2020 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.
// clang-format off
// #import 'chrome://os-settings/chromeos/lazy_load.js';
// #import {assertTrue, assertFalse} from '../../chai_assert.js';
// #import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
// clang-format on
suite('SwitchAccessActionAssignmentDialogTest', function() {
/** @type {!SettingsSwitchAccessActionAssignmentDialog} */
let dialog;
setup(function() {
dialog = document.createElement('settings-switch-access-action-assignment-dialog');
document.body.appendChild(dialog);
Polymer.dom.flush();
});
test('Exit button closes dialog', function() {
assertTrue(dialog.$.switchAccessActionAssignmentDialog.open);
const exitBtn = dialog.$.exit;
assertTrue(!!exitBtn);
exitBtn.click();
assertFalse(dialog.$.switchAccessActionAssignmentDialog.open);
});
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment