Commit 34e6c6af authored by Scott Chen's avatar Scott Chen Committed by Commit Bot

WebUI[MD-refresh]: replace paper-input with cr-input in cert-manager elements.

Bug: 832177
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Iac35742ffba55c0645a67f6a84813643076bd0e7
Reviewed-on: https://chromium-review.googlesource.com/1090003
Commit-Queue: Scott Chen <scottchen@chromium.org>
Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565760}
parent ea90e377
...@@ -358,7 +358,7 @@ cr.define('certificate_manager', function() { ...@@ -358,7 +358,7 @@ cr.define('certificate_manager', function() {
test('EncryptSuccess', function() { test('EncryptSuccess', function() {
const passwordInputElements = const passwordInputElements =
Polymer.dom(dialog.$.dialog).querySelectorAll('paper-input'); Polymer.dom(dialog.$.dialog).querySelectorAll('cr-input');
const passwordInputElement = passwordInputElements[0]; const passwordInputElement = passwordInputElements[0];
const confirmPasswordInputElement = passwordInputElements[1]; const confirmPasswordInputElement = passwordInputElements[1];
...@@ -393,7 +393,7 @@ cr.define('certificate_manager', function() { ...@@ -393,7 +393,7 @@ cr.define('certificate_manager', function() {
browserProxy.forceCertificatesError(); browserProxy.forceCertificatesError();
const passwordInputElements = const passwordInputElements =
Polymer.dom(dialog.$.dialog).querySelectorAll('paper-input'); Polymer.dom(dialog.$.dialog).querySelectorAll('cr-input');
const passwordInputElement = passwordInputElements[0]; const passwordInputElement = passwordInputElements[0];
passwordInputElement.value = 'foopassword'; passwordInputElement.value = 'foopassword';
const confirmPasswordInputElement = passwordInputElements[1]; const confirmPasswordInputElement = passwordInputElements[1];
...@@ -434,7 +434,7 @@ cr.define('certificate_manager', function() { ...@@ -434,7 +434,7 @@ cr.define('certificate_manager', function() {
test('DecryptSuccess', function() { test('DecryptSuccess', function() {
const passwordInputElement = const passwordInputElement =
Polymer.dom(dialog.$.dialog).querySelector('paper-input'); Polymer.dom(dialog.$.dialog).querySelector('cr-input');
assertTrue(dialog.$.dialog.open); assertTrue(dialog.$.dialog.open);
// Test that the 'OK' button is enabled even when the password field is // Test that the 'OK' button is enabled even when the password field is
...@@ -459,7 +459,7 @@ cr.define('certificate_manager', function() { ...@@ -459,7 +459,7 @@ cr.define('certificate_manager', function() {
browserProxy.forceCertificatesError(); browserProxy.forceCertificatesError();
// Simulate entering some password. // Simulate entering some password.
const passwordInputElement = const passwordInputElement =
Polymer.dom(dialog.$.dialog).querySelector('paper-input'); Polymer.dom(dialog.$.dialog).querySelector('cr-input');
passwordInputElement.value = 'foopassword'; passwordInputElement.value = 'foopassword';
triggerInputEvent(passwordInputElement); triggerInputEvent(passwordInputElement);
......
<link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html"> <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html">
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/html/i18n_behavior.html"> <link rel="import" href="chrome://resources/html/i18n_behavior.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html">
<link rel="import" href="certificate_shared_css.html"> <link rel="import" href="certificate_shared_css.html">
<link rel="import" href="certificates_browser_proxy.html"> <link rel="import" href="certificates_browser_proxy.html">
<dom-module id="certificate-password-decryption-dialog"> <dom-module id="certificate-password-decryption-dialog">
<template> <template>
<style include="certificate-shared"></style> <style include="certificate-shared">
cr-input {
--cr-input-error-display: none;
}
</style>
<cr-dialog id="dialog" close-text="[[i18n('close')]]"> <cr-dialog id="dialog" close-text="[[i18n('close')]]">
<div slot="title"> <div slot="title">
[[i18n('certificateManagerDecryptPasswordTitle')]] [[i18n('certificateManagerDecryptPasswordTitle')]]
</div> </div>
<div slot="body"> <div slot="body">
<paper-input type="password" id="password" <cr-input type="password" id="password"
label="[[i18n('certificateManagerPassword')]]" label="[[i18n('certificateManagerPassword')]]"
value="{{password_}}"> value="{{password_}}">
</paper-input> </cr-input>
</div> </div>
<div slot="button-container"> <div slot="button-container">
<paper-button class="cancel-button" on-tap="onCancelTap_"> <paper-button class="cancel-button" on-tap="onCancelTap_">
......
<link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html"> <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html">
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
<link rel="import" href="chrome://resources/html/i18n_behavior.html"> <link rel="import" href="chrome://resources/html/i18n_behavior.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html">
<link rel="import" href="certificate_shared_css.html"> <link rel="import" href="certificate_shared_css.html">
<link rel="import" href="certificates_browser_proxy.html"> <link rel="import" href="certificates_browser_proxy.html">
<dom-module id="certificate-password-encryption-dialog"> <dom-module id="certificate-password-encryption-dialog">
<template> <template>
<style include="certificate-shared"> <style include="certificate-shared">
cr-input {
--cr-input-error-display: none;
margin-top: var(--cr-form-field-bottom-spacing);
}
.password-buttons { .password-buttons {
margin-bottom: 20px; margin-bottom: 20px;
} }
...@@ -21,13 +27,13 @@ ...@@ -21,13 +27,13 @@
<div slot="body"> <div slot="body">
<div>[[i18n('certificateManagerEncryptPasswordDescription')]]</div> <div>[[i18n('certificateManagerEncryptPasswordDescription')]]</div>
<div class="password-buttons"> <div class="password-buttons">
<paper-input type="password" value="{{password_}}" id="password" <cr-input type="password" value="{{password_}}" id="password"
label="[[i18n('certificateManagerPassword')]]" label="[[i18n('certificateManagerPassword')]]"
on-input="validate_"></paper-input> on-input="validate_"></cr-input>
<paper-input type="password" <cr-input type="password"
value="{{confirmPassword_}}" id="confirmPassword" value="{{confirmPassword_}}" id="confirmPassword"
label="[[i18n('certificateManagerConfirmPassword')]]" label="[[i18n('certificateManagerConfirmPassword')]]"
on-input="validate_"></paper-input> on-input="validate_"></cr-input>
</div> </div>
</div> </div>
<div slot="button-container"> <div slot="button-container">
......
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