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

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: 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
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 var args = {"destination": destination,
dpapad 2017/06/27 18:49:00 Nit1: Prefer single quotes instead of double quote
rbpotter 2017/06/28 01:14:57 Done.
104 "printTicketStore": printTicketStore,
105 "cloudPrintInterface": cloudPrintInterface,
106 "documentInfo": documentInfo };
107 this.methodCalled('print', args);
103 return Promise.resolve(); 108 return Promise.resolve();
104 }, 109 },
105 110
106 /** @override */ 111 /** @override */
107 setupPrinter: function(printerId) { 112 setupPrinter: function(printerId) {
108 this.methodCalled('setupPrinter', printerId); 113 this.methodCalled('setupPrinter', printerId);
109 return this.shouldRejectPrinterSetup_ ? 114 return this.shouldRejectPrinterSetup_ ?
110 Promise.reject(this.setupPrinterResponse_) : 115 Promise.reject(this.setupPrinterResponse_) :
111 Promise.resolve(this.setupPrinterResponse_); 116 Promise.resolve(this.setupPrinterResponse_);
112 }, 117 },
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 setSetupPrinterResponse: function(reject, response) { 172 setSetupPrinterResponse: function(reject, response) {
168 this.shouldRejectPrinterSetup_ = reject; 173 this.shouldRejectPrinterSetup_ = reject;
169 this.setupPrinterResponse_ = response; 174 this.setupPrinterResponse_ = response;
170 }, 175 },
171 }; 176 };
172 177
173 return { 178 return {
174 NativeLayerStub: NativeLayerStub, 179 NativeLayerStub: NativeLayerStub,
175 }; 180 };
176 }); 181 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698