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

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

Issue 7828106: Revert 100233 - PrintPreview: Added code to identify the printer default duplex value. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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 | « chrome/browser/ui/webui/print_preview_handler.cc ('k') | printing/print_job_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/print_preview.js
===================================================================
--- chrome/test/data/webui/print_preview.js (revision 100233)
+++ chrome/test/data/webui/print_preview.js (working copy)
@@ -68,7 +68,6 @@
disableColorOption: true,
setColorAsDefault: true,
disableCopiesOption: true,
- printerDefaultDuplexValue: copiesSettings.SIMPLEX,
});
}));
var savedArgs = new SaveMockArguments();
@@ -299,7 +298,6 @@
setColorAsDefault: true,
disableCopiesOption: true,
disableLandscapeOption: true,
- printerDefaultDuplexValue: copiesSettings.SIMPLEX,
});
}));
@@ -319,7 +317,6 @@
setColorAsDefault: true,
disableCopiesOption: false,
disableLandscapeOption: false,
- printerDefaultDuplexValue: copiesSettings.SIMPLEX,
});
}));
@@ -334,7 +331,6 @@
setColorAsDefault: false,
disableCopiesOption: false,
disableLandscapeOption: false,
- printerDefaultDuplexValue: copiesSettings.SIMPLEX,
});
}));
@@ -343,56 +339,6 @@
expectTrue(colorSettings.bwRadioButton.checked);
});
-// Test to verify that duplex settings are set according to the printer
-// capabilities.
-TEST_F('PrintPreviewWebUITest', 'TestDuplexSettings', function() {
- this.mockHandler.expects(once()).getPrinterCapabilities('FooDevice').
- will(callFunction(function() {
- updateWithPrinterCapabilities({
- disableColorOption: false,
- setColorAsDefault: false,
- disableCopiesOption: false,
- disableLandscapeOption: false,
- printerDefaultDuplexValue: copiesSettings.SIMPLEX,
- });
- }));
- updateControlsWithSelectedPrinterCapabilities();
- expectEquals(copiesSettings.duplexMode, copiesSettings.SIMPLEX);
- expectEquals(copiesSettings.twoSidedOption_.hidden, false);
-
- // If the printer default duplex value is UNKNOWN_DUPLEX_MODE, hide the
- // two sided option.
- this.mockHandler.expects(once()).getPrinterCapabilities('FooDevice').
- will(callFunction(function() {
- updateWithPrinterCapabilities({
- disableColorOption: false,
- setColorAsDefault: false,
- disableCopiesOption: false,
- disableLandscapeOption: false,
- printerDefaultDuplexValue: copiesSettings.UNKNOWN_DUPLEX_MODE,
- });
- }));
- updateControlsWithSelectedPrinterCapabilities();
- expectEquals(copiesSettings.duplexMode, copiesSettings.UNKNOWN_DUPLEX_MODE);
- expectEquals(copiesSettings.twoSidedOption_.hidden, true);
-
- this.mockHandler.expects(once()).getPrinterCapabilities('FooDevice').
- will(callFunction(function() {
- updateWithPrinterCapabilities({
- disableColorOption: false,
- setColorAsDefault: false,
- disableCopiesOption: false,
- disableLandscapeOption: false,
- printerDefaultDuplexValue: copiesSettings.SIMPLEX,
- });
- }));
- updateControlsWithSelectedPrinterCapabilities();
- expectEquals(copiesSettings.twoSidedOption_.hidden, false);
- expectEquals(copiesSettings.duplexMode, copiesSettings.SIMPLEX);
- copiesSettings.twoSidedCheckbox.checked = true;
- expectEquals(copiesSettings.duplexMode, copiesSettings.LONG_EDGE);
-});
-
// Test that changing the selected printer updates the preview.
TEST_F('PrintPreviewWebUITest', 'TestPrinterChangeUpdatesPreview', function() {
var savedArgs = new SaveMockArguments();
« no previous file with comments | « chrome/browser/ui/webui/print_preview_handler.cc ('k') | printing/print_job_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698