Commit 8c725753 authored by James Hawkins's avatar James Hawkins Committed by Commit Bot

OS Settings: Convert InternetKnownNetworksPage to Polymer 3.

R=khorimoto@chromium.org

Bug: 1045266
Test: OSSettingsInternetKnownNetworksPage*
Change-Id: I8b689fc1fa915f2dc2a2994515422d9d0e0db68a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2419583
Commit-Queue: James Hawkins <jhawkins@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809442}
parent 2e218078
......@@ -301,7 +301,7 @@ group("closure_compile_module") {
#"device_page:closure_compile_module",
#"google_assistant_page:closure_compile_module",
#"internet_page:closure_compile_module",
"internet_page:closure_compile_module",
"localized_link:closure_compile_module",
"multidevice_page:closure_compile_module",
"nearby_share_page:closure_compile_module",
......
......@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//chrome/browser/resources/settings/chromeos/os_settings.gni")
import("//third_party/closure_compiler/compile_js.gni")
js_type_check("closure_compile") {
......@@ -176,23 +177,23 @@ js_library("cellular_setup_dialog") {
}
# TODO: Uncomment as the Polymer3 migration makes progress.
#js_type_check("closure_compile_module") {
# is_polymer3 = true
# deps = [
js_type_check("closure_compile_module") {
is_polymer3 = true
deps = [
# ":cellular_setup_dialog.m"
# ":internet_config.m",
# ":internet_detail_page.m",
# ":internet_known_networks_page.m",
":internet_known_networks_page.m",
# ":internet_page.m",
# ":internet_page_browser_proxy.m",
# ":internet_shared_css.m",
":internet_shared_css.m",
# ":internet_subpage.m",
# ":network_proxy_section.m",
# ":network_summary.m",
# ":network_summary_item.m",
# ":tether_connection_dialog.m"
# ]
#}
]
}
js_library("internet_config.m") {
sources = [ "$root_gen_dir/chrome/browser/resources/settings/chromeos/internet_page/internet_config.m.js" ]
......@@ -213,7 +214,20 @@ js_library("internet_detail_page.m") {
js_library("internet_known_networks_page.m") {
sources = [ "$root_gen_dir/chrome/browser/resources/settings/chromeos/internet_page/internet_known_networks_page.m.js" ]
deps = [
# TODO: Fill those in.
":internet_shared_css.m",
"//chrome/browser/resources/settings/chromeos:deep_linking_behavior.m",
"//chrome/browser/resources/settings/chromeos:metrics_recorder.m",
"//chrome/browser/resources/settings/chromeos:os_route.m",
"//chrome/browser/resources/settings:router.m",
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
"//ui/webui/resources/cr_components/chromeos/network:cr_policy_network_behavior_mojo.m",
"//ui/webui/resources/cr_components/chromeos/network:mojo_interface_provider.m",
"//ui/webui/resources/cr_components/chromeos/network:network_listener_behavior.m",
"//ui/webui/resources/cr_components/chromeos/network:onc_mojo.m",
"//ui/webui/resources/cr_elements/cr_action_menu:cr_action_menu.m",
"//ui/webui/resources/cr_elements/cr_icon_button:cr_icon_button.m",
"//ui/webui/resources/cr_elements/cr_link_row:cr_link_row.m",
"//ui/webui/resources/js:assert.m",
]
extra_deps = [ ":internet_known_networks_page_module" ]
}
......@@ -236,9 +250,6 @@ js_library("internet_page_browser_proxy.m") {
js_library("internet_shared_css.m") {
sources = [ "$root_gen_dir/chrome/browser/resources/settings/chromeos/internet_page/internet_shared_css.m.js" ]
deps = [
# TODO: Fill those in.
]
extra_deps = [ ":internet_shared_css_module" ]
}
......@@ -325,6 +336,8 @@ polymer_modulizer("internet_known_networks_page") {
js_file = "internet_known_networks_page.js"
html_file = "internet_known_networks_page.html"
html_type = "dom-module"
auto_imports = os_settings_auto_imports
namespace_rewrites = os_settings_namespace_rewrites
}
polymer_modulizer("internet_page") {
......
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_components/chromeos/network/mojo_interface_provider.html">
<link rel="import" href="chrome://resources/cr_components/chromeos/network/cr_policy_network_behavior_mojo.html">
<link rel="import" href="chrome://resources/cr_components/chromeos/network/network_listener_behavior.html">
<link rel="import" href="chrome://resources/cr_components/chromeos/network/onc_mojo.html">
<link rel="import" href="chrome://resources/cr_elements/cr_action_menu/cr_action_menu.html">
<link rel="import" href="chrome://resources/cr_elements/cr_icon_button/cr_icon_button.html">
<link rel="import" href="chrome://resources/cr_elements/cr_link_row/cr_link_row.html">
<link rel="import" href="chrome://resources/cr_elements/icons.html">
<link rel="import" href="chrome://resources/html/assert.html">
<link rel="import" href="../../router.html">
<link rel="import" href="../../settings_shared_css.html">
<link rel="import" href="../deep_linking_behavior.html">
<link rel="import" href="../os_route.html">
<link rel="import" href="../../router.html">
<link rel="import" href="../metrics_recorder.html">
<link rel="import" href="../os_route.html">
<link rel="import" href="internet_shared_css.html">
<dom-module id="settings-internet-known-networks-page">
<template>
......
......@@ -7,6 +7,7 @@ import './localized_link/localized_link.m.js';
import './bluetooth_page/bluetooth_page.m.js';
import './bluetooth_page/bluetooth_subpage.m.js';
import './bluetooth_page/bluetooth_device_list_item.m.js';
import './internet_page/internet_known_networks_page.m.js';
import './nearby_share_page/nearby_share_receive_dialog.m.js';
import './nearby_share_page/nearby_share_subpage.m.js';
import './multidevice_page/multidevice_page.m.js';
......
......@@ -30,6 +30,16 @@
use_base_dir="false"
compress="false"
type="BINDATA" />
<include name="IDR_OS_SETTINGS_INTERNET_KNOWN_NETWORKS_PAGE_M_JS"
file="${root_gen_dir}/chrome/browser/resources/settings/chromeos/internet_page/internet_known_networks_page.m.js"
use_base_dir="false"
compress="false"
type="BINDATA" />
<include name="IDR_OS_SETTINGS_INTERNET_SHARED_CSS_M_JS"
file="${root_gen_dir}/chrome/browser/resources/settings/chromeos/internet_page/internet_shared_css.m.js"
use_base_dir="false"
compress="false"
type="BINDATA" />
<include name="IDR_OS_SETTINGS_PERSONALIZATION_PAGE_M_JS"
file="${root_gen_dir}/chrome/browser/resources/settings/chromeos/personalization_page/personalization_page.m.js"
use_base_dir="false"
......
......@@ -290,6 +290,7 @@ if (include_js_tests) {
"$root_gen_dir/chrome/test/data/webui/settings/chromeos/fake_quick_unlock_private.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/chromeos/input_method_options_page_test.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/chromeos/input_page_test.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/chromeos/internet_known_networks_page_tests.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/chromeos/localized_link_test.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/chromeos/multidevice_feature_item_tests.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/chromeos/multidevice_feature_toggle_tests.m.js",
......
......@@ -42,6 +42,7 @@ js_modulizer("modulize") {
"fake_user_action_recorder.js",
"input_method_options_page_test.js",
"input_page_test.js",
"internet_known_networks_page_tests.js",
"localized_link_test.js",
"multidevice_feature_item_tests.js",
"multidevice_feature_toggle_tests.js",
......
......@@ -2,6 +2,19 @@
// 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/os_settings.js';
// #import {FakeNetworkConfig} from 'chrome://test/chromeos/fake_network_config_mojom.m.js';
// #import {MojoInterfaceProviderImpl} from 'chrome://resources/cr_components/chromeos/network/mojo_interface_provider.m.js';
// #import {OncMojo} from 'chrome://resources/cr_components/chromeos/network/onc_mojo.m.js';
// #import {Router, routes} from 'chrome://os-settings/chromeos/os_settings.js';
// #import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
// #import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js';
// #import {getDeepActiveElement} from 'chrome://resources/js/util.m.js';
// #import {waitAfterNextRender} from 'chrome://test/test_util.m.js';
// clang-format on
suite('InternetKnownNetworksPage', function() {
/** @type {?SettingsInternetKnownNetworksPageElement} */
let internetKnownNetworksPage = null;
......@@ -87,7 +100,7 @@ suite('InternetKnownNetworksPage', function() {
assertEquals(preferredElems.length, 1);
const deepLinkElement = preferredElems[0].$$('#icon');
assert(!!deepLinkElement);
assertTrue(!!deepLinkElement);
await test_util.waitAfterNextRender();
assertEquals(
deepLinkElement, getDeepActiveElement(),
......
......@@ -94,6 +94,7 @@ TEST_F('OSSettingsNearbyShareSubPageV3Test', 'All', () => mocha.run());
['BluetoothPage', 'bluetooth_page_tests.m.js'],
['DateTimePage', 'date_time_page_tests.m.js'],
['InputMethodOptionPage', 'input_method_options_page_test.m.js'],
['InternetKnownNetworksPage', 'internet_known_networks_page_tests.m.js'],
['LocalizedLink', 'localized_link_test.m.js'],
['MultideviceFeatureItem', 'multidevice_feature_item_tests.m.js'],
['MultideviceFeatureToggle', 'multidevice_feature_toggle_tests.m.js'],
......
......@@ -2,4 +2,5 @@
<link rel="import" href="../../../cr_elements/policy/cr_policy_indicator_behavior.html">
<link rel="import" href="chrome://resources/mojo/mojo/public/js/mojo_bindings_lite.html">
<link rel="import" href="chrome://resources/mojo/chromeos/services/network_config/public/mojom/cros_network_config.mojom.html">
<link rel="import" href="onc_mojo.html">
<script src="cr_policy_network_behavior_mojo.js"></script>
......@@ -12,6 +12,7 @@
// #import 'chrome://resources/mojo/mojo/public/js/mojo_bindings_lite.js';
// #import 'chrome://resources/mojo/chromeos/services/network_config/public/mojom/network_types.mojom-lite.js';
// #import {CrPolicyIndicatorType} from 'chrome://resources/cr_elements/policy/cr_policy_indicator_behavior.m.js';
// #import {OncMojo} from './onc_mojo.m.js';
// clang-format on
/** @polymerBehavior */
......
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