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

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

Issue 2927653002: WebUI: Move test_browser_proxy.js one level up. (Closed)
Patch Set: Created 3 years, 6 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 {settings.TestBrowserProxy} 9 * @extends {test.TestBrowserProxy}
10 */ 10 */
11 function NativeLayerStub() { 11 function NativeLayerStub() {
12 settings.TestBrowserProxy.call(this, [ 12 test.TestBrowserProxy.call(this, [
13 'getInitialSettings', 'getPrinters', 'setupPrinter' ]); 13 'getInitialSettings', 'getPrinters', 'setupPrinter' ]);
14 14
15 /** 15 /**
16 * @private {!cr.EventTarget} The event target used for dispatching and 16 * @private {!cr.EventTarget} The event target used for dispatching and
17 * receiving events. 17 * receiving events.
18 */ 18 */
19 this.eventTarget_ = new cr.EventTarget(); 19 this.eventTarget_ = new cr.EventTarget();
20 20
21 /** @private {boolean} Whether the native layer has sent a print message. */ 21 /** @private {boolean} Whether the native layer has sent a print message. */
22 this.printStarted_ = false; 22 this.printStarted_ = false;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 this.destinationToWatch_ = ''; 58 this.destinationToWatch_ = '';
59 59
60 /** 60 /**
61 * @private {number} The number of calls to 61 * @private {number} The number of calls to
62 * |getLocalDestinationCapabilities| with id = |destinationToWatch_|. 62 * |getLocalDestinationCapabilities| with id = |destinationToWatch_|.
63 */ 63 */
64 this.getLocalDestinationCapabilitiesCallCount_ = 0; 64 this.getLocalDestinationCapabilitiesCallCount_ = 0;
65 } 65 }
66 66
67 NativeLayerStub.prototype = { 67 NativeLayerStub.prototype = {
68 __proto__: settings.TestBrowserProxy.prototype, 68 __proto__: test.TestBrowserProxy.prototype,
69 69
70 /** @override */ 70 /** @override */
71 getInitialSettings: function() { 71 getInitialSettings: function() {
72 this.methodCalled('getInitialSettings'); 72 this.methodCalled('getInitialSettings');
73 return Promise.resolve(this.initialSettings_); 73 return Promise.resolve(this.initialSettings_);
74 }, 74 },
75 75
76 /** @override */ 76 /** @override */
77 getPrinters: function() { 77 getPrinters: function() {
78 this.methodCalled('getPrinters'); 78 this.methodCalled('getPrinters');
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 setSetupPrinterResponse: function(reject, response) { 160 setSetupPrinterResponse: function(reject, response) {
161 this.shouldRejectPrinterSetup_ = reject; 161 this.shouldRejectPrinterSetup_ = reject;
162 this.setupPrinterResponse_ = response; 162 this.setupPrinterResponse_ = response;
163 }, 163 },
164 }; 164 };
165 165
166 return { 166 return {
167 NativeLayerStub: NativeLayerStub, 167 NativeLayerStub: NativeLayerStub,
168 }; 168 };
169 }); 169 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698