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.ChromeCleanupProxy} | 7 * @implements {settings.ChromeCleanupProxy} |
8 * @extends {settings.TestBrowserProxy} | 8 * @extends {TestBrowserProxy} |
9 */ | 9 */ |
10 var TestChromeCleanupProxy = function() { | 10 var TestChromeCleanupProxy = function() { |
11 settings.TestBrowserProxy.call(this, [ | 11 TestBrowserProxy.call(this, [ |
12 'dismissCleanupPage', | 12 'dismissCleanupPage', |
13 'getChromeCleanupVisibility', | 13 'getChromeCleanupVisibility', |
14 'registerChromeCleanupObserver', | 14 'registerChromeCleanupObserver', |
15 'restartComputer', | 15 'restartComputer', |
16 'startCleanup', | 16 'startCleanup', |
17 ]); | 17 ]); |
18 }; | 18 }; |
19 | 19 |
20 TestChromeCleanupProxy.prototype = { | 20 TestChromeCleanupProxy.prototype = { |
21 __proto__: settings.TestBrowserProxy.prototype, | 21 __proto__: TestBrowserProxy.prototype, |
22 | 22 |
23 /** @override */ | 23 /** @override */ |
24 dismissCleanupPage: function() { | 24 dismissCleanupPage: function() { |
25 this.methodCalled('dismissCleanupPage'); | 25 this.methodCalled('dismissCleanupPage'); |
26 }, | 26 }, |
27 | 27 |
28 /** @override */ | 28 /** @override */ |
29 getChromeCleanupVisibility: function() { | 29 getChromeCleanupVisibility: function() { |
30 this.methodCalled('getChromeCleanupVisibility'); | 30 this.methodCalled('getChromeCleanupVisibility'); |
31 }, | 31 }, |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 'chrome-cleanup-on-idle', | 119 'chrome-cleanup-on-idle', |
120 settings.ChromeCleanupIdleReason.CLEANING_SUCCEEDED); | 120 settings.ChromeCleanupIdleReason.CLEANING_SUCCEEDED); |
121 Polymer.dom.flush(); | 121 Polymer.dom.flush(); |
122 | 122 |
123 var actionButton = chromeCleanupPage.$$('#action-button'); | 123 var actionButton = chromeCleanupPage.$$('#action-button'); |
124 assertTrue(!!actionButton); | 124 assertTrue(!!actionButton); |
125 MockInteractions.tap(actionButton); | 125 MockInteractions.tap(actionButton); |
126 return ChromeCleanupProxy.whenCalled('dismissCleanupPage'); | 126 return ChromeCleanupProxy.whenCalled('dismissCleanupPage'); |
127 }); | 127 }); |
128 }); | 128 }); |
OLD | NEW |