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'); |
}); |