Commit d59785a3 authored by Steven Bennetts's avatar Steven Bennetts Committed by Commit Bot

Fix CONSOLE errors in reset_browsertest.cc

This eliminates some console logging that should not be in production,
and fixes a potential bug in the reset screen that generates a
CONSOLE error in ResetTest but does not cause the test to fail.

Bug: 647411
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I54e8d9d6c93a3e6aeed42381f8658d182bd1c965
Reviewed-on: https://chromium-review.googlesource.com/1087210Reviewed-by: default avatarAchuith Bhandarkar <achuith@chromium.org>
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565402}
parent 38abd98d
......@@ -14,12 +14,14 @@ Polymer({
isPowerwashView_: Boolean,
},
showModal: function() {
this.$.dialog.showModal();
open: function() {
if (!this.$.dialog.open)
this.$.dialog.showModal();
},
close: function() {
this.$.dialog.close();
if (this.$.dialog.open)
this.$.dialog.close();
},
/**
......
......@@ -105,18 +105,16 @@ login.createScreen('ResetScreen', 'reset', function() {
this.context.addObserver(
CONTEXT_KEY_IS_CONFIRMATIONAL_VIEW, function(is_confirmational) {
if (is_confirmational) {
console.log(self.context.get(CONTEXT_KEY_SCREEN_STATE, 0));
if (self.context.get(CONTEXT_KEY_SCREEN_STATE, 0) !=
self.RESET_SCREEN_STATE.POWERWASH_PROPOSAL)
self.RESET_SCREEN_STATE.POWERWASH_PROPOSAL) {
return;
console.log(self);
}
reset.ConfirmResetOverlay.getInstance().initializePage();
if (!$('reset-confirm-overlay-md').hidden)
$('reset-confirm-overlay-md').showModal();
$('reset-confirm-overlay-md').open();
} else {
$('overlay-reset').setAttribute('hidden', true);
if ($('reset-confirm-overlay-md').open)
$('reset-confirm-overlay-md').close();
$('reset-confirm-overlay-md').close();
}
});
......
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