Commit 43fa6fc7 authored by rbpotter's avatar rbpotter Committed by Commit Bot

Fingerprint Progress Arc: Port to Polymer 3

Autogenerate Polymer 3 versions of CrFingerprintProgressArc and its
tests. This will be used by chrome://settings in future.

Bug: 1042558
Change-Id: I5a628f2e2dd96bc91b607a453b862022555a04c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2013630Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734131}
parent e7d399da
......@@ -182,6 +182,7 @@ js2gtest("browser_tests_js_webui") {
"$root_gen_dir/chrome/test/data/webui/cr_elements/cr_dialog_test.m.js",
"$root_gen_dir/chrome/test/data/webui/cr_elements/cr_drawer_tests.m.js",
"$root_gen_dir/chrome/test/data/webui/cr_elements/cr_expand_button_tests.m.js",
"$root_gen_dir/chrome/test/data/webui/cr_elements/cr_fingerprint_progress_arc_tests.m.js",
"$root_gen_dir/chrome/test/data/webui/cr_elements/cr_icon_button_tests.m.js",
"$root_gen_dir/chrome/test/data/webui/cr_elements/cr_lazy_render_tests.m.js",
"$root_gen_dir/chrome/test/data/webui/cr_elements/cr_link_row_tests.m.js",
......
......@@ -14,6 +14,7 @@ js_modulizer("modulize") {
"cr_drawer_tests.js",
"cr_expand_button_tests.js",
"cr_expand_button_focus_tests.js",
"cr_fingerprint_progress_arc_tests.js",
"cr_icon_button_tests.js",
"cr_icon_button_focus_tests.js",
"cr_input_test.js",
......
......@@ -98,6 +98,32 @@ TEST_F('CrElementsExpandButtonV3Test', 'All', function() {
mocha.run();
});
// eslint-disable-next-line no-var
var CrElementsFingerprintProgressArcV3Test =
class extends CrElementsV3BrowserTest {
/** @override */
get browsePreload() {
return 'chrome://test?module=cr_elements/cr_fingerprint_progress_arc_tests.m.js';
}
/** @override */
get commandLineSwitches() {
return [{switchName: 'enable-pixel-output-in-tests'}];
}
};
// https://crbug.com/1044390 - maybe flaky on Mac?
GEN('#if defined(OS_MACOSX)');
GEN('#define MAYBE_Fingerprint DISABLED_Fingerprint');
GEN('#else');
GEN('#define MAYBE_Fingerprint Fingerprint');
GEN('#endif');
TEST_F(
'CrElementsFingerprintProgressArcV3Test', 'MAYBE_Fingerprint', function() {
mocha.run();
});
// eslint-disable-next-line no-var
var CrElementsIconButtonV3Test = class extends CrElementsV3BrowserTest {
/** @override */
......
......@@ -2,8 +2,13 @@
// 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://resources/cr_elements/cr_fingerprint/cr_fingerprint_progress_arc.m.js';
// #import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
// clang-format on
/** @fileoverview Suite of tests for cr-fingerprint-progress-arc. */
cr.define('cr_fingerprint_progress_arc_test', function() {
suite('cr_fingerprint_progress_arc_test', function() {
/**
* An object descrbing a 2d point.
* @typedef {{
......
......@@ -39,6 +39,7 @@ group("closure_compile") {
"cr_dialog:closure_compile_module",
"cr_drawer:closure_compile_module",
"cr_expand_button:closure_compile_module",
"cr_fingerprint:closure_compile_module",
"cr_icon_button:closure_compile_module",
"cr_input:closure_compile_module",
"cr_lazy_render:closure_compile_module",
......@@ -161,6 +162,7 @@ group("polymer3_elements") {
"cr_dialog:cr_dialog_module",
"cr_drawer:cr_drawer_module",
"cr_expand_button:cr_expand_button_module",
"cr_fingerprint:cr_fingerprint_progress_arc_module",
"cr_icon_button:cr_icon_button_module",
"cr_input:cr_input_module",
"cr_input:cr_input_style_css_module",
......
......@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//third_party/closure_compiler/compile_js.gni")
import("//tools/polymer/polymer.gni")
js_type_check("closure_compile") {
deps = [ ":cr_fingerprint_progress_arc" ]
......@@ -10,3 +11,22 @@ js_type_check("closure_compile") {
js_library("cr_fingerprint_progress_arc") {
}
polymer_modulizer("cr_fingerprint_progress_arc") {
js_file = "cr_fingerprint_progress_arc.js"
html_file = "cr_fingerprint_progress_arc.html"
html_type = "dom-module"
}
js_type_check("closure_compile_module") {
is_polymer3 = true
deps = [ ":cr_fingerprint_progress_arc.m" ]
}
js_library("cr_fingerprint_progress_arc.m") {
sources = [ "$root_gen_dir/ui/webui/resources/cr_elements/cr_fingerprint/cr_fingerprint_progress_arc.m.js" ]
deps = [
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
]
extra_deps = [ ":cr_fingerprint_progress_arc_module" ]
}
......@@ -294,9 +294,12 @@ Polymer({
* @private
*/
updateImages_() {
this.resizeAndCenterIcon_(this.$.scanningAnimation);
this.resizeAndCenterIcon_(this.$.enrollmentDone);
this.resizeCheckMark_(this.$.checkmarkAnimation);
this.resizeAndCenterIcon_(
/** @type {!HTMLElement} */ (this.$.scanningAnimation));
this.resizeAndCenterIcon_(
/** @type {!HTMLElement} */ (this.$.enrollmentDone));
this.resizeCheckMark_(
/** @type {!HTMLElement} */ (this.$.checkmarkAnimation));
},
/**
......
......@@ -36,6 +36,11 @@
use_base_dir="false"
type="BINDATA"
compress="gzip" />
<include name="IDR_CR_ELEMENTS_CR_FINGERPRINT_PROGRESS_ARC_M_JS"
file="${root_gen_dir}/ui/webui/resources/cr_elements/cr_fingerprint/cr_fingerprint_progress_arc.m.js"
use_base_dir="false"
type="BINDATA"
compress="gzip" />
<include name="IDR_CR_ELEMENTS_CR_EXPAND_BUTTON_M_JS"
file="${root_gen_dir}/ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.m.js"
use_base_dir="false"
......
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