Commit b453b00f authored by rbpotter's avatar rbpotter Committed by Commit Bot

Settings: Migrate chooser_exception_list_entry and test to Polymer 3

Bug: 1026426
Change-Id: Ib3b12943d0186861a4b2dfc74981626bdec19d2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2111766Reviewed-by: default avatardpapad <dpapad@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#752066}
parent 2d86e24f
...@@ -62,6 +62,7 @@ import './incompatible_applications_page/incompatible_applications_page.m.js'; ...@@ -62,6 +62,7 @@ import './incompatible_applications_page/incompatible_applications_page.m.js';
import './search_engines_page/omnibox_extension_entry.m.js'; import './search_engines_page/omnibox_extension_entry.m.js';
import './search_engines_page/search_engine_dialog.m.js'; import './search_engines_page/search_engine_dialog.m.js';
import './search_engines_page/search_engine_entry.m.js'; import './search_engines_page/search_engine_entry.m.js';
import './site_settings/chooser_exception_list_entry.m.js';
import './site_settings/site_list_entry.m.js'; import './site_settings/site_list_entry.m.js';
import './site_settings/site_list.m.js'; import './site_settings/site_list.m.js';
......
...@@ -552,6 +552,10 @@ ...@@ -552,6 +552,10 @@
use_base_dir="false" use_base_dir="false"
type="BINDATA" /> type="BINDATA" />
</if> </if>
<include name="IDR_SETTINGS_SITE_SETTINGS_CHOOSER_EXCEPTION_LIST_ENTRY_M_JS"
file="${root_gen_dir}/chrome/browser/resources/settings/site_settings/chooser_exception_list_entry.m.js"
use_base_dir="false"
type="BINDATA" />
<include name="IDR_SETTINGS_SITE_SETTINGS_CONSTANTS_M_JS" <include name="IDR_SETTINGS_SITE_SETTINGS_CONSTANTS_M_JS"
file="${root_gen_dir}/chrome/browser/resources/settings/site_settings/constants.m.js" file="${root_gen_dir}/chrome/browser/resources/settings/site_settings/constants.m.js"
use_base_dir="false" use_base_dir="false"
......
...@@ -307,7 +307,7 @@ js_type_check("closure_compile_module") { ...@@ -307,7 +307,7 @@ js_type_check("closure_compile_module") {
# ":category_default_setting.m", # ":category_default_setting.m",
# ":category_setting_exceptions.m", # ":category_setting_exceptions.m",
# ":chooser_exception_list.m", # ":chooser_exception_list.m",
# ":chooser_exception_list_entry.m", ":chooser_exception_list_entry.m",
":constants.m", ":constants.m",
":cookie_info.m", ":cookie_info.m",
":edit_exception_dialog.m", ":edit_exception_dialog.m",
...@@ -395,8 +395,11 @@ js_library("chooser_exception_list.m") { ...@@ -395,8 +395,11 @@ js_library("chooser_exception_list.m") {
js_library("chooser_exception_list_entry.m") { js_library("chooser_exception_list_entry.m") {
sources = [ "$root_gen_dir/chrome/browser/resources/settings/site_settings/chooser_exception_list_entry.m.js" ] sources = [ "$root_gen_dir/chrome/browser/resources/settings/site_settings/chooser_exception_list_entry.m.js" ]
deps = [ deps = [
# TODO: Fill those in. ":site_list_entry.m",
":site_settings_behavior.m",
":site_settings_prefs_browser_proxy.m",
] ]
externs_list = [ "$externs_path/settings_private.js" ]
extra_deps = [ ":chooser_exception_list_entry_module" ] extra_deps = [ ":chooser_exception_list_entry_module" ]
} }
...@@ -653,6 +656,7 @@ polymer_modulizer("chooser_exception_list_entry") { ...@@ -653,6 +656,7 @@ polymer_modulizer("chooser_exception_list_entry") {
js_file = "chooser_exception_list_entry.js" js_file = "chooser_exception_list_entry.js"
html_file = "chooser_exception_list_entry.html" html_file = "chooser_exception_list_entry.html"
html_type = "dom-module" html_type = "dom-module"
auto_imports = settings_auto_imports + [ "chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.html|ChooserException" ]
} }
polymer_modulizer("clear_storage_dialog_css") { polymer_modulizer("clear_storage_dialog_css") {
......
...@@ -119,7 +119,7 @@ let RawChooserException; ...@@ -119,7 +119,7 @@ let RawChooserException;
* object: Object, * object: Object,
* sites: Array<!SiteException>}} * sites: Array<!SiteException>}}
*/ */
let ChooserException; /* #export */ let ChooserException;
/** /**
* @typedef {{setting: !settings.ContentSetting, * @typedef {{setting: !settings.ContentSetting,
......
...@@ -217,6 +217,7 @@ js2gtest("browser_tests_js_webui") { ...@@ -217,6 +217,7 @@ js2gtest("browser_tests_js_webui") {
"$root_gen_dir/chrome/test/data/webui/settings/autofill_section_test.m.js", "$root_gen_dir/chrome/test/data/webui/settings/autofill_section_test.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/basic_page_test.m.js", "$root_gen_dir/chrome/test/data/webui/settings/basic_page_test.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/checkbox_tests.m.js", "$root_gen_dir/chrome/test/data/webui/settings/checkbox_tests.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/chooser_exception_list_entry_tests.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/clear_browsing_data_test.m.js", "$root_gen_dir/chrome/test/data/webui/settings/clear_browsing_data_test.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/controlled_button_tests.m.js", "$root_gen_dir/chrome/test/data/webui/settings/controlled_button_tests.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/controlled_radio_button_tests.m.js", "$root_gen_dir/chrome/test/data/webui/settings/controlled_radio_button_tests.m.js",
......
...@@ -15,6 +15,7 @@ js_modulizer("modulize") { ...@@ -15,6 +15,7 @@ js_modulizer("modulize") {
"autofill_section_test.js", "autofill_section_test.js",
"basic_page_test.js", "basic_page_test.js",
"checkbox_tests.js", "checkbox_tests.js",
"chooser_exception_list_entry_tests.js",
"clear_browsing_data_test.js", "clear_browsing_data_test.js",
"controlled_button_tests.js", "controlled_button_tests.js",
"controlled_radio_button_tests.js", "controlled_radio_button_tests.js",
......
...@@ -2,6 +2,14 @@ ...@@ -2,6 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// clang-format off
// #import 'chrome://test/cr_elements/cr_policy_strings.js';
// #import {ChooserType,ContentSetting,SiteSettingsPrefsBrowserProxyImpl} from 'chrome://settings/lazy_load.js';
// #import {eventToPromise} from 'chrome://test/test_util.m.js';
// #import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
// #import {TestSiteSettingsPrefsBrowserProxy} from 'chrome://test/settings/test_site_settings_prefs_browser_proxy.m.js';
// clang-format on
/** /**
* @fileoverview Suite of tests for chooser-exception-list-entry. * @fileoverview Suite of tests for chooser-exception-list-entry.
*/ */
......
...@@ -701,3 +701,16 @@ TEST_F( ...@@ -701,3 +701,16 @@ TEST_F(
mocha.run(); mocha.run();
}); });
GEN('#endif // defined(OS_CHROMEOS)'); GEN('#endif // defined(OS_CHROMEOS)');
// eslint-disable-next-line no-var
var CrSettingsChooserExceptionListEntryV3Test =
class extends CrSettingsV3BrowserTest {
/** @override */
get browsePreload() {
return 'chrome://settings/test_loader.html?module=settings/chooser_exception_list_entry_tests.m.js';
}
};
TEST_F('CrSettingsChooserExceptionListEntryV3Test', 'All', function() {
mocha.run();
});
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