OLD | NEW |
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 /** | 5 /** |
6 * @constructor | 6 * @constructor |
7 * @implements {settings.DownloadsBrowserProxy} | 7 * @implements {settings.DownloadsBrowserProxy} |
8 * @extends {settings.TestBrowserProxy} | 8 * @extends {TestBrowserProxy} |
9 */ | 9 */ |
10 var TestDownloadsBrowserProxy = function() { | 10 var TestDownloadsBrowserProxy = function() { |
11 settings.TestBrowserProxy.call(this, [ | 11 TestBrowserProxy.call(this, [ |
12 'initializeDownloads', | 12 'initializeDownloads', |
13 'selectDownloadLocation', | 13 'selectDownloadLocation', |
14 'resetAutoOpenFileTypes', | 14 'resetAutoOpenFileTypes', |
15 ]); | 15 ]); |
16 }; | 16 }; |
17 | 17 |
18 TestDownloadsBrowserProxy.prototype = { | 18 TestDownloadsBrowserProxy.prototype = { |
19 __proto__: settings.TestBrowserProxy.prototype, | 19 __proto__: TestBrowserProxy.prototype, |
20 | 20 |
21 /** @override */ | 21 /** @override */ |
22 initializeDownloads: function() { | 22 initializeDownloads: function() { |
23 this.methodCalled('initializeDownloads'); | 23 this.methodCalled('initializeDownloads'); |
24 }, | 24 }, |
25 | 25 |
26 /** @override */ | 26 /** @override */ |
27 selectDownloadLocation: function() { | 27 selectDownloadLocation: function() { |
28 this.methodCalled('selectDownloadLocation'); | 28 this.methodCalled('selectDownloadLocation'); |
29 }, | 29 }, |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 MockInteractions.tap(button); | 77 MockInteractions.tap(button); |
78 return DownloadsBrowserProxy.whenCalled('resetAutoOpenFileTypes') | 78 return DownloadsBrowserProxy.whenCalled('resetAutoOpenFileTypes') |
79 .then(function() { | 79 .then(function() { |
80 cr.webUIListenerCallback('auto-open-downloads-changed', false); | 80 cr.webUIListenerCallback('auto-open-downloads-changed', false); |
81 Polymer.dom.flush(); | 81 Polymer.dom.flush(); |
82 var button = downloadsPage.$$('#resetAutoOpenFileTypes'); | 82 var button = downloadsPage.$$('#resetAutoOpenFileTypes'); |
83 assertTrue(!button); | 83 assertTrue(!button); |
84 }); | 84 }); |
85 }); | 85 }); |
86 }); | 86 }); |
OLD | NEW |