Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(799)

Unified Diff: chrome/browser/resources/print_preview/print_preview.js

Issue 2849733002: Fix Print Preview failure state and add test (Closed)
Patch Set: Fix nits Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/data/webui/print_preview.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/print_preview/print_preview.js
diff --git a/chrome/browser/resources/print_preview/print_preview.js b/chrome/browser/resources/print_preview/print_preview.js
index 2218ae5d366869f3cd5adbebbd4eeecbd80f8a2e..329114029664091c40b417ce21fbd5985fe3f6e0 100644
--- a/chrome/browser/resources/print_preview/print_preview.js
+++ b/chrome/browser/resources/print_preview/print_preview.js
@@ -934,7 +934,6 @@ cr.define('print_preview', function() {
this.uiState_ = PrintPreview.UiState_.ERROR;
this.isPreviewGenerationInProgress_ = false;
this.printHeader_.isPrintButtonEnabled = false;
- console.error('Invalid settings error reported from native layer');
this.previewArea_.cancelTimeout();
this.previewArea_.showCustomMessage(
loadTimeData.getString('invalidPrinterSettings'));
@@ -1200,6 +1199,10 @@ cr.define('print_preview', function() {
setIsVisible($('system-dialog-link'),
this.shouldShowSystemDialogLink_());
}
+ // Reset if we had a bad settings fetch since the user selected a new
+ // printer.
+ if (this.uiState_ == PrintPreview.UiState_.ERROR)
+ this.uiState_ = PrintPreview.UiState_.READY;
if (this.destinationStore_.selectedDestination &&
this.isInKioskAutoPrintMode_) {
this.onPrintButtonClick_();
« no previous file with comments | « no previous file | chrome/test/data/webui/print_preview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698