Commit cf2d8c16 authored by Nnamdi Theodore Johnson-Kanu's avatar Nnamdi Theodore Johnson-Kanu Committed by Commit Bot

[CrOS cellular] Migrate setup_selection_flow.js to Polymer3

Bug: 1111477
Change-Id: I15c70e99c644e5a74b06868673fe091679daa8c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2376575
Commit-Queue: Nnamdi Theodore Johnson-kanu <tjohnsonkanu@google.com>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#802018}
parent 550491db
...@@ -248,6 +248,7 @@ if (include_js_tests) { ...@@ -248,6 +248,7 @@ if (include_js_tests) {
"$root_gen_dir/chrome/test/data/webui/cr_components/chromeos/cellular_setup/final_page_test.m.js", "$root_gen_dir/chrome/test/data/webui/cr_components/chromeos/cellular_setup/final_page_test.m.js",
"$root_gen_dir/chrome/test/data/webui/cr_components/chromeos/cellular_setup/provisioning_page_test.m.js", "$root_gen_dir/chrome/test/data/webui/cr_components/chromeos/cellular_setup/provisioning_page_test.m.js",
"$root_gen_dir/chrome/test/data/webui/cr_components/chromeos/cellular_setup/psim_flow_ui_test.m.js", "$root_gen_dir/chrome/test/data/webui/cr_components/chromeos/cellular_setup/psim_flow_ui_test.m.js",
"$root_gen_dir/chrome/test/data/webui/cr_components/chromeos/cellular_setup/setup_selection_flow_test.m.js",
"$root_gen_dir/chrome/test/data/webui/cr_components/chromeos/cellular_setup/sim_detect_page_test.m.js", "$root_gen_dir/chrome/test/data/webui/cr_components/chromeos/cellular_setup/sim_detect_page_test.m.js",
"$root_gen_dir/chrome/test/data/webui/cr_components/chromeos/network/cr_policy_network_behavior_mojo_tests.m.js", "$root_gen_dir/chrome/test/data/webui/cr_components/chromeos/network/cr_policy_network_behavior_mojo_tests.m.js",
"$root_gen_dir/chrome/test/data/webui/cr_components/chromeos/network/cr_policy_network_indicator_mojo_tests.m.js", "$root_gen_dir/chrome/test/data/webui/cr_components/chromeos/network/cr_policy_network_indicator_mojo_tests.m.js",
......
...@@ -13,6 +13,7 @@ js_modulizer("modulize") { ...@@ -13,6 +13,7 @@ js_modulizer("modulize") {
"final_page_test.js", "final_page_test.js",
"provisioning_page_test.js", "provisioning_page_test.js",
"psim_flow_ui_test.js", "psim_flow_ui_test.js",
"setup_selection_flow_test.js",
"sim_detect_page_test.js", "sim_detect_page_test.js",
] ]
namespace_rewrites = cr_components_chromeos_namespace_rewrites namespace_rewrites = cr_components_chromeos_namespace_rewrites
......
// 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/strings.m.js';
// #import 'chrome://resources/cr_components/chromeos/cellular_setup/setup_selection_flow.m.js';
// #import {flush, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
// #import {assertTrue} from '../../../chai_assert.js';
// clang-format on
suite('CrComponentsSetupSelectionFlowTest', function() {
let setupSelectionFlow;
setup(function() {
setupSelectionFlow = document.createElement('setup-selection-flow');
document.body.appendChild(setupSelectionFlow);
Polymer.dom.flush();
});
test('Base test', function() {
const crRadio = setupSelectionFlow.$$('cr-radio-group');
assertTrue(!!crRadio);
});
});
...@@ -48,6 +48,7 @@ GEN('#include "content/public/test/browser_test.h"'); ...@@ -48,6 +48,7 @@ GEN('#include "content/public/test/browser_test.h"');
['FinalPage', 'cellular_setup/final_page_test.js', []], ['FinalPage', 'cellular_setup/final_page_test.js', []],
['ProvisioningPage', 'cellular_setup/provisioning_page_test.js',[]], ['ProvisioningPage', 'cellular_setup/provisioning_page_test.js',[]],
['PsimFlowUi', 'cellular_setup/psim_flow_ui_test.js',[]], ['PsimFlowUi', 'cellular_setup/psim_flow_ui_test.js',[]],
['SetupSelectionFlow', 'cellular_setup/setup_selection_flow_test.js',[]],
['SimDetectPage', 'cellular_setup/sim_detect_page_test.js', []], ['SimDetectPage', 'cellular_setup/sim_detect_page_test.js', []],
].forEach(test => registerTest('CellularSetup', 'cellular-setup', ...test)); ].forEach(test => registerTest('CellularSetup', 'cellular-setup', ...test));
// clang-format on // clang-format on
......
...@@ -28,6 +28,7 @@ GEN('#include "chromeos/constants/chromeos_features.h"'); ...@@ -28,6 +28,7 @@ GEN('#include "chromeos/constants/chromeos_features.h"');
['FinalPage', 'cellular_setup/final_page_test.m.js'], ['FinalPage', 'cellular_setup/final_page_test.m.js'],
['ProvisioningPage', 'cellular_setup/provisioning_page_test.m.js'], ['ProvisioningPage', 'cellular_setup/provisioning_page_test.m.js'],
['PsimFlowUi', 'cellular_setup/psim_flow_ui_test.m.js'], ['PsimFlowUi', 'cellular_setup/psim_flow_ui_test.m.js'],
['SetupSelectionFlow', 'cellular_setup/setup_selection_flow_test.m.js'],
['SimDetectPage', 'cellular_setup/sim_detect_page_test.m.js'], ['SimDetectPage', 'cellular_setup/sim_detect_page_test.m.js'],
].forEach(test => registerTest('CellularSetup', ...test)); ].forEach(test => registerTest('CellularSetup', ...test));
// clang-format on // clang-format on
......
...@@ -138,7 +138,7 @@ js_type_check("closure_compile_module") { ...@@ -138,7 +138,7 @@ js_type_check("closure_compile_module") {
":sim_detect_page.m", ":sim_detect_page.m",
":subflow_behavior.m", ":subflow_behavior.m",
# ":setup_selection_flow.m", ":setup_selection_flow.m",
":webview_post_util.m", ":webview_post_util.m",
] ]
} }
...@@ -251,6 +251,17 @@ js_library("esim_flow_ui.m") { ...@@ -251,6 +251,17 @@ js_library("esim_flow_ui.m") {
extra_deps = [ ":esim_flow_ui_module" ] extra_deps = [ ":esim_flow_ui_module" ]
} }
js_library("setup_selection_flow.m") {
sources = [ "$root_gen_dir/ui/webui/resources/cr_components/chromeos/cellular_setup/setup_selection_flow.m.js" ]
deps = [
":cellular_types.m",
":subflow_behavior.m",
"//ui/webui/resources/js:i18n_behavior.m",
]
extra_deps = [ ":setup_selection_flow_module" ]
}
group("polymer3_elements") { group("polymer3_elements") {
public_deps = [ public_deps = [
":base_page_module", ":base_page_module",
...@@ -260,6 +271,7 @@ group("polymer3_elements") { ...@@ -260,6 +271,7 @@ group("polymer3_elements") {
":modulize", ":modulize",
":provisioning_page_module", ":provisioning_page_module",
":psim_flow_ui_module", ":psim_flow_ui_module",
":setup_selection_flow_module",
":sim_detect_page_module", ":sim_detect_page_module",
] ]
} }
...@@ -320,6 +332,14 @@ polymer_modulizer("esim_flow_ui") { ...@@ -320,6 +332,14 @@ polymer_modulizer("esim_flow_ui") {
auto_imports = cr_components_chromeos_auto_imports auto_imports = cr_components_chromeos_auto_imports
} }
polymer_modulizer("setup_selection_flow") {
js_file = "setup_selection_flow.js"
html_file = "setup_selection_flow.html"
html_type = "dom-module"
namespace_rewrites = cr_components_chromeos_namespace_rewrites
auto_imports = cr_components_chromeos_auto_imports
}
js_modulizer("modulize") { js_modulizer("modulize") {
input_files = [ input_files = [
"cellular_types.js", "cellular_types.js",
......
...@@ -28,6 +28,5 @@ ...@@ -28,6 +28,5 @@
</cr-card-radio-button> </cr-card-radio-button>
</cr-radio-group> </cr-radio-group>
</template> </template>
<script src="setup_selection_flow.js"> <script src="setup_selection_flow.js"></script>
</script>
</dom-module> </dom-module>
\ No newline at end of file
...@@ -168,6 +168,10 @@ ...@@ -168,6 +168,10 @@
file="${root_gen_dir}/ui/webui/resources/cr_components/chromeos/cellular_setup/esim_flow_ui.m.js" file="${root_gen_dir}/ui/webui/resources/cr_components/chromeos/cellular_setup/esim_flow_ui.m.js"
use_base_dir="false" use_base_dir="false"
type="BINDATA" /> type="BINDATA" />
<include name="IDR_WEBUI_CHROMEOS_CELLULAR_SETUP_SETUP_SELECTION_FLOW_M_JS"
file="${root_gen_dir}/ui/webui/resources/cr_components/chromeos/cellular_setup/setup_selection_flow.m.js"
use_base_dir="false"
type="BINDATA" />
</if> </if>
<if expr="use_nss_certs"> <if expr="use_nss_certs">
<include name="IDR_WEBUI_CA_TRUST_EDIT_DIALOG_JS" <include name="IDR_WEBUI_CA_TRUST_EDIT_DIALOG_JS"
......
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