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

Side by Side Diff: chrome/test/data/webui/print_preview/native_layer_stub.js

Issue 2961773003: Print Preview: Update test to check parameters sent to print() (Closed)
Patch Set: Address comments Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/test/data/webui/print_preview/print_preview_tests.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('print_preview', function() { 5 cr.define('print_preview', function() {
6 /** 6 /**
7 * Test version of the native layer. 7 * Test version of the native layer.
8 * @constructor 8 * @constructor
9 * @extends {TestBrowserProxy} 9 * @extends {TestBrowserProxy}
10 */ 10 */
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 return Promise.resolve(true); 91 return Promise.resolve(true);
92 }, 92 },
93 93
94 /** @override */ 94 /** @override */
95 getPrinterCapabilities: function(printerId) { 95 getPrinterCapabilities: function(printerId) {
96 this.methodCalled('getPrinterCapabilities', printerId); 96 this.methodCalled('getPrinterCapabilities', printerId);
97 return this.localDestinationCapabilities_.get(printerId); 97 return this.localDestinationCapabilities_.get(printerId);
98 }, 98 },
99 99
100 /** @override */ 100 /** @override */
101 print: function() { 101 print: function(
102 this.methodCalled('print'); 102 destination, printTicketStore, cloudPrintInterface, documentInfo) {
103 this.methodCalled('print', {
104 destination: destination,
105 printTicketStore: printTicketStore,
106 cloudPrintInterface: cloudPrintInterface,
107 documentInfo: documentInfo,
108 });
103 return Promise.resolve(); 109 return Promise.resolve();
104 }, 110 },
105 111
106 /** @override */ 112 /** @override */
107 setupPrinter: function(printerId) { 113 setupPrinter: function(printerId) {
108 this.methodCalled('setupPrinter', printerId); 114 this.methodCalled('setupPrinter', printerId);
109 return this.shouldRejectPrinterSetup_ ? 115 return this.shouldRejectPrinterSetup_ ?
110 Promise.reject(this.setupPrinterResponse_) : 116 Promise.reject(this.setupPrinterResponse_) :
111 Promise.resolve(this.setupPrinterResponse_); 117 Promise.resolve(this.setupPrinterResponse_);
112 }, 118 },
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 setSetupPrinterResponse: function(reject, response) { 173 setSetupPrinterResponse: function(reject, response) {
168 this.shouldRejectPrinterSetup_ = reject; 174 this.shouldRejectPrinterSetup_ = reject;
169 this.setupPrinterResponse_ = response; 175 this.setupPrinterResponse_ = response;
170 }, 176 },
171 }; 177 };
172 178
173 return { 179 return {
174 NativeLayerStub: NativeLayerStub, 180 NativeLayerStub: NativeLayerStub,
175 }; 181 };
176 }); 182 });
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/webui/print_preview/print_preview_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698