| 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 4fed7233b3d3adc57b0506c60087dfc8ceffa63b..1e343156c0dcddb5c4485ef824feac32d92b3f9b 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) {
|
|
|