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

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

Issue 1368013004: Define Print Preview default printer selection policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add tags to DefaultPrinterSelection policy. Created 5 years, 2 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/test/data/policy/policy_test_cases.json ('k') | components/policy/resources/policy_templates.json » ('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
diff --git a/chrome/test/data/webui/print_preview.js b/chrome/test/data/webui/print_preview.js
index b4f8dacae15e839810f5130c51c7e381d55c7201..2ef9260e87b7a131424bbc96a07c50e7e737dd15 100644
--- a/chrome/test/data/webui/print_preview.js
+++ b/chrome/test/data/webui/print_preview.js
@@ -70,6 +70,7 @@ PrintPreviewWebUITest.prototype = {
startGetInitialSettings: function() {},
startGetLocalDestinations: function() {},
startGetPrivetDestinations: function() {},
+ startGetExtensionDestinations: function() {},
startGetLocalDestinationCapabilities: function(destinationId) {}
};
var oldNativeLayerEventType = print_preview.NativeLayer.EventType;
@@ -180,7 +181,7 @@ PrintPreviewWebUITest.prototype = {
false /*selectionOnly*/,
'FooDevice' /*systemDefaultDestinationId*/,
null /*serializedAppStateStr*/,
- false /*documentHasSelection*/);
+ null /*serializedDefaultDestinationSelectionRulesStr*/);
this.localDestinationInfos_ = [
{ printerName: 'FooName', deviceName: 'FooDevice' },
{ printerName: 'BarName', deviceName: 'BarDevice' }
@@ -338,6 +339,20 @@ TEST_F('PrintPreviewWebUITest', 'TestPrintPreviewRestoreLocalDestination',
testDone();
});
+TEST_F('PrintPreviewWebUITest',
+ 'TestPrintPreviewDefaultDestinationSelectionRules', function() {
+ // It also makes sure these rules do override system default destination.
+ this.initialSettings_.serializedDefaultDestinationSelectionRulesStr_ =
+ '{"namePattern":".*Bar.*"}';
+ this.setInitialSettings();
+ this.setLocalDestinations();
+
+ assertEquals(
+ 'BarDevice', printPreview.destinationStore_.selectedDestination.id);
+
+ testDone();
+});
+
TEST_F('PrintPreviewWebUITest', 'TestSystemDialogLinkIsHiddenInAppKioskMode',
function() {
if (cr.isChromeOS) {
« no previous file with comments | « chrome/test/data/policy/policy_test_cases.json ('k') | components/policy/resources/policy_templates.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698