| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @implements {settings.CupsPrintersBrowserProxy} | 7 * @implements {settings.CupsPrintersBrowserProxy} |
| 8 * @extends {settings.TestBrowserProxy} | 8 * @extends {test.TestBrowserProxy} |
| 9 */ | 9 */ |
| 10 var TestCupsPrintersBrowserProxy = function() { | 10 var TestCupsPrintersBrowserProxy = function() { |
| 11 settings.TestBrowserProxy.call(this, [ | 11 test.TestBrowserProxy.call(this, [ |
| 12 'getCupsPrintersList', | 12 'getCupsPrintersList', |
| 13 'getCupsPrinterManufacturersList', | 13 'getCupsPrinterManufacturersList', |
| 14 'getCupsPrinterModelsList', | 14 'getCupsPrinterModelsList', |
| 15 'startDiscoveringPrinters', | 15 'startDiscoveringPrinters', |
| 16 'stopDiscoveringPrinters', | 16 'stopDiscoveringPrinters', |
| 17 ]); | 17 ]); |
| 18 }; | 18 }; |
| 19 | 19 |
| 20 TestCupsPrintersBrowserProxy.prototype = { | 20 TestCupsPrintersBrowserProxy.prototype = { |
| 21 __proto__: settings.TestBrowserProxy.prototype, | 21 __proto__: test.TestBrowserProxy.prototype, |
| 22 | 22 |
| 23 printerList: [], | 23 printerList: [], |
| 24 manufacturers: [], | 24 manufacturers: [], |
| 25 models: [], | 25 models: [], |
| 26 | 26 |
| 27 /** @override */ | 27 /** @override */ |
| 28 getCupsPrintersList: function() { | 28 getCupsPrintersList: function() { |
| 29 this.methodCalled('getCupsPrintersList'); | 29 this.methodCalled('getCupsPrintersList'); |
| 30 return Promise.resolve(this.printerList); | 30 return Promise.resolve(this.printerList); |
| 31 }, | 31 }, |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 MockInteractions.tap(addDialog.$$('.action-button')); | 149 MockInteractions.tap(addDialog.$$('.action-button')); |
| 150 Polymer.dom.flush(); | 150 Polymer.dom.flush(); |
| 151 | 151 |
| 152 var modelDialog = dialog.$$('add-printer-manufacturer-model-dialog'); | 152 var modelDialog = dialog.$$('add-printer-manufacturer-model-dialog'); |
| 153 assertTrue(!!modelDialog); | 153 assertTrue(!!modelDialog); |
| 154 | 154 |
| 155 return cupsPrintersBrowserProxy.whenCalled( | 155 return cupsPrintersBrowserProxy.whenCalled( |
| 156 'getCupsPrinterManufacturersList'); | 156 'getCupsPrinterManufacturersList'); |
| 157 }); | 157 }); |
| 158 }); | 158 }); |
| OLD | NEW |