cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / chrome / browser / resources / chromeos / login / saml_confirm_password.js
blob5acc6252beb76e70f24eee17b7f9c951ff5fbd7f
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 Polymer({
6 is: 'saml-confirm-password',
8 properties: {
9 email: String,
11 disabled: {
12 type: Boolean,
13 value: false,
14 observer: 'disabledChanged_'
18 ready: function() {
19 /**
20 * Workaround for
21 * https://github.com/PolymerElements/neon-animation/issues/32
22 * TODO(dzhioev): Remove when fixed in Polymer.
24 var pages = this.$.animatedPages;
25 delete pages._squelchNextFinishEvent;
26 Object.defineProperty(pages, '_squelchNextFinishEvent',
27 { get: function() { return false; } });
30 reset: function() {
31 this.$.cancelConfirmDlg.close();
32 this.disabled = false;
33 this.$.closeButton.hidden = false;
34 if (this.$.animatedPages.selected != 0)
35 this.$.animatedPages.selected = 0;
36 this.$.passwordInput.value = '';
39 invalidate: function() {
40 this.$.passwordInput.isInvalid = true;
43 focus: function() {
44 if (this.$.animatedPages.selected == 0)
45 this.$.passwordInput.focus();
48 onClose_: function() {
49 this.disabled = true;
50 this.$.cancelConfirmDlg.fitInto = this;
51 this.$.cancelConfirmDlg.open();
54 onConfirmCancel_: function() {
55 this.fire('cancel');
58 onPasswordSubmitted_: function() {
59 if (!this.$.passwordInput.checkValidity())
60 return;
61 this.$.animatedPages.selected = 1;
62 this.$.closeButton.hidden = true;
63 this.fire('passwordEnter', {password: this.$.passwordInput.value});
66 onDialogOverlayClosed_: function() {
67 this.disabled = false;
70 disabledChanged_: function(disabled) {
71 this.$.confirmPasswordCard.classList.toggle('full-disabled', disabled);
74 onAnimationFinish_: function() {
75 if (this.$.animatedPages.selected == 1)
76 this.$.passwordInput.value = '';
78 });