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

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

Issue 294923005: Add media size capability to PDF printer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a comment to the new query stopping code. Created 6 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 362aad7bc6016e50647788f22c24c95a562ff06a..3a51956c780355b014d265537e7fdcaf0dc2a9b7 100644
--- a/chrome/test/data/webui/print_preview.js
+++ b/chrome/test/data/webui/print_preview.js
@@ -265,34 +265,46 @@ TEST_F('PrintPreviewWebUITest',
// Add PDF printer.
this.initialSettings_.isDocumentModifiable_ = false;
this.initialSettings_.systemDefaultDestinationId_ = 'Save as PDF';
- this.localDestinationInfos_.push(
- {printerName: 'Save as PDF', deviceName: 'Save as PDF'});
var initialSettingsSetEvent =
new Event(print_preview.NativeLayer.EventType.INITIAL_SETTINGS_SET);
initialSettingsSetEvent.initialSettings = this.initialSettings_;
this.nativeLayer_.dispatchEvent(initialSettingsSetEvent);
- var localDestsSetEvent =
- new Event(print_preview.NativeLayer.EventType.LOCAL_DESTINATIONS_SET);
- localDestsSetEvent.destinationInfos = this.localDestinationInfos_;
- this.nativeLayer_.dispatchEvent(localDestsSetEvent);
-
var capsSetEvent =
new Event(print_preview.NativeLayer.EventType.CAPABILITIES_SET);
capsSetEvent.settingsInfo = {
- 'printerId': 'FooDevice',
- 'disableColorOption': false,
- 'setColorAsDefault': true,
- 'disableCopiesOption': true,
- 'disableLandscapeOption': true,
- 'printerDefaultDuplexValue': 0
+ printerId: 'Save as PDF',
+ capabilities: {
+ version: '1.0',
+ printer: {
+ page_orientation: {
+ option: [
+ {type: 'AUTO', is_default: true},
+ {type: 'PORTRAIT'},
+ {type: 'LANDSCAPE'}
+ ]
+ },
+ color: {
+ option: [
+ {type: 'STANDARD_COLOR', is_default: true}
+ ]
+ },
+ media_size: {
+ option: [
+ { name: 'NA_LETTER',
+ width_microns: 0,
+ height_microns: 0,
+ is_default: true
+ }
+ ]
+ }
+ }
+ }
};
this.nativeLayer_.dispatchEvent(capsSetEvent);
- checkElementDisplayed(
- $('other-options-settings').querySelector('.fit-to-page-container'),
- false);
+ checkSectionVisible($('other-options-settings'), false);
});
// When the source is 'HTML', we always hide the fit to page option.

Powered by Google App Engine
This is Rietveld 408576698