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

[CrOS Cellular] Migrate cellular_setup/esim_flow_ui.js to Polymer3

Bug: 1111477
Change-Id: Iec69b45225066affea3f95baa2248bc3f50505d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2376573
Commit-Queue: Nnamdi Theodore Johnson-kanu <tjohnsonkanu@google.com>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#802009}
parent e2431d75
......@@ -244,6 +244,7 @@ if (include_js_tests) {
data += [
"$root_gen_dir/chrome/test/data/webui/cr_components/chromeos/cellular_setup/base_page_test.m.js",
"$root_gen_dir/chrome/test/data/webui/cr_components/chromeos/cellular_setup/button_bar_test.m.js",
"$root_gen_dir/chrome/test/data/webui/cr_components/chromeos/cellular_setup/esim_flow_ui_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/psim_flow_ui_test.m.js",
......
......@@ -9,6 +9,7 @@ js_modulizer("modulize") {
input_files = [
"base_page_test.js",
"button_bar_test.js",
"esim_flow_ui_test.js",
"final_page_test.js",
"provisioning_page_test.js",
"psim_flow_ui_test.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/strings.m.js';
// #import 'chrome://resources/cr_components/chromeos/cellular_setup/esim_flow_ui.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('CrComponentsEsimFlowUiTest', function() {
let eSimPage;
setup(function() {
eSimPage = document.createElement('esim-flow-ui');
document.body.appendChild(eSimPage);
Polymer.dom.flush();
});
test('Base test', function() {
const p = eSimPage.$$('p');
assertTrue(!!p);
});
});
......@@ -44,6 +44,7 @@ GEN('#include "content/public/test/browser_test.h"');
[
['BasePage', 'cellular_setup/base_page_test.js', []],
['ButtonBar', 'cellular_setup/button_bar_test.js',[]],
['EsimFlowUi', 'cellular_setup/esim_flow_ui_test.js',[]],
['FinalPage', 'cellular_setup/final_page_test.js', []],
['ProvisioningPage', 'cellular_setup/provisioning_page_test.js',[]],
['PsimFlowUi', 'cellular_setup/psim_flow_ui_test.js',[]],
......
......@@ -24,6 +24,7 @@ GEN('#include "chromeos/constants/chromeos_features.h"');
[['BasePage', 'cellular_setup/base_page_test.m.js'],
['ButtonBar', 'cellular_setup/button_bar_test.m.js'],
['EsimFlowUi', 'cellular_setup/esim_flow_ui_test.m.js'],
['FinalPage', 'cellular_setup/final_page_test.m.js'],
['ProvisioningPage', 'cellular_setup/provisioning_page_test.m.js'],
['PsimFlowUi', 'cellular_setup/psim_flow_ui_test.m.js'],
......
......@@ -130,7 +130,7 @@ js_type_check("closure_compile_module") {
":cellular_types.m",
# ":cellular_setup.m",
# ":esim_flow_ui.m",
":esim_flow_ui.m",
":final_page.m",
":mojo_interface_provider.m",
":provisioning_page.m",
......@@ -241,10 +241,21 @@ js_library("psim_flow_ui.m") {
extra_deps = [ ":psim_flow_ui_module" ]
}
js_library("esim_flow_ui.m") {
sources = [ "$root_gen_dir/ui/webui/resources/cr_components/chromeos/cellular_setup/esim_flow_ui.m.js" ]
deps = [
":cellular_types.m",
":subflow_behavior.m",
"//ui/webui/resources/js:i18n_behavior.m",
]
extra_deps = [ ":esim_flow_ui_module" ]
}
group("polymer3_elements") {
public_deps = [
":base_page_module",
":button_bar_module",
":esim_flow_ui_module",
":final_page_module",
":modulize",
":provisioning_page_module",
......@@ -301,6 +312,14 @@ polymer_modulizer("psim_flow_ui") {
auto_imports = cr_components_chromeos_auto_imports
}
polymer_modulizer("esim_flow_ui") {
js_file = "esim_flow_ui.js"
html_file = "esim_flow_ui.html"
html_type = "dom-module"
namespace_rewrites = cr_components_chromeos_namespace_rewrites
auto_imports = cr_components_chromeos_auto_imports
}
js_modulizer("modulize") {
input_files = [
"cellular_types.js",
......
<link rel="import" href="../../../html/polymer.html">
<link rel="import" href="../../../html/i18n_behavior.html">
<link rel="import" href="subflow_behavior.html">
<link rel="import" href="cellular_types.html">
<dom-module id="esim-flow-ui">
<template>
......@@ -14,6 +15,5 @@
<!-- TODO(crbug.com/1093185): Add eSIM UI-->
<p>TODO(eSIM flow)</p>
</template>
<script src="esim_flow_ui.js">
</script>
<script src="esim_flow_ui.js"></script>
</dom-module>
\ No newline at end of file
......@@ -160,10 +160,14 @@
file="${root_gen_dir}/ui/webui/resources/cr_components/chromeos/cellular_setup/subflow_behavior.m.js"
use_base_dir="false"
type="BINDATA" />
<include name="IDR_WEBUI_CHROMEOS_CELLULAR_SETUP_PSIM_FLOW_UI_M_JS"
<include name="IDR_WEBUI_CHROMEOS_CELLULAR_SETUP_PSIM_FLOW_UI_M_JS"
file="${root_gen_dir}/ui/webui/resources/cr_components/chromeos/cellular_setup/psim_flow_ui.m.js"
use_base_dir="false"
type="BINDATA" />
<include name="IDR_WEBUI_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"
type="BINDATA" />
</if>
<if expr="use_nss_certs">
<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