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

Unified Diff: chrome/test/data/webui/print_preview.js

Issue 2865633004: Fix all remaining print preview closure compiler errors (Closed)
Patch Set: Address comments Created 3 years, 7 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
Index: chrome/test/data/webui/print_preview.js
diff --git a/chrome/test/data/webui/print_preview.js b/chrome/test/data/webui/print_preview.js
index d01c54386aa7e1136bc30143b09c7c7f751aa252..3f24bb3e9d49ac32afa8c88205e10012bba71fd9 100644
--- a/chrome/test/data/webui/print_preview.js
+++ b/chrome/test/data/webui/print_preview.js
@@ -18,6 +18,11 @@ function PrintPreviewWebUITest() {
this.previewArea_ = null;
}
+/**
+ * Instance of PrintPreview for the test.
+ */
+var printPreview;
+
/**
* Index of the "Save as PDF" printer.
* @type {number}
@@ -81,6 +86,7 @@ PrintPreviewWebUITest.prototype = {
*/
preLoad: function() {
window.addEventListener('DOMContentLoaded', function() {
+ print_preview.IsWebUITest = true;
dpapad 2017/05/08 23:39:48 We are adding a DOMContentLoaded handler here, and
rbpotter 2017/05/09 00:08:52 Done.
function NativeLayerStub() {
cr.EventTarget.call(this);
this.printStarted_ = false;
@@ -119,6 +125,9 @@ PrintPreviewWebUITest.prototype = {
function() {
return false;
};
+ printPreview = new print_preview.PrintPreview();
+ printPreview.initialize();
+
}.bind(this));
},
@@ -626,7 +635,6 @@ TEST_F('PrintPreviewWebUITest', 'SourceIsHTMLCapabilities', function() {
checkElementDisplayed(rasterize, false);
checkSectionVisible(mediaSize, false);
checkSectionVisible(scalingSettings, false);
-
this.expandMoreSettings();
checkElementDisplayed(fitToPage, false);
@@ -634,7 +642,6 @@ TEST_F('PrintPreviewWebUITest', 'SourceIsHTMLCapabilities', function() {
checkElementDisplayed(rasterize, false);
checkSectionVisible(mediaSize, true);
checkSectionVisible(scalingSettings, true);
-
this.waitForAnimationToEnd('more-settings');
});

Powered by Google App Engine
This is Rietveld 408576698