| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 cr.define('settings', function() { |
| 6 /** |
| 7 * A test version of LifetimeBrowserProxy. |
| 8 * |
| 9 * @constructor |
| 10 * @implements {settings.LifetimeBrowserProxy} |
| 11 * @extends {settings.TestBrowserProxy} |
| 12 */ |
| 13 var TestLifetimeBrowserProxy = function() { |
| 14 var methodNames = ['restart', 'relaunch']; |
| 15 if (cr.isChromeOS) |
| 16 methodNames.push('logOutAndRestart', 'factoryReset'); |
| 17 |
| 18 settings.TestBrowserProxy.call(this, methodNames); |
| 19 }; |
| 20 |
| 21 TestLifetimeBrowserProxy.prototype = { |
| 22 __proto__: settings.TestBrowserProxy.prototype, |
| 23 |
| 24 /** @override */ |
| 25 restart: function() { |
| 26 this.methodCalled('restart'); |
| 27 }, |
| 28 |
| 29 /** @override */ |
| 30 relaunch: function() { |
| 31 this.methodCalled('relaunch'); |
| 32 }, |
| 33 }; |
| 34 |
| 35 if (cr.isChromeOS) { |
| 36 /** @override */ |
| 37 TestLifetimeBrowserProxy.prototype.logOutAndRestart = function() { |
| 38 this.methodCalled('logOutAndRestart'); |
| 39 }; |
| 40 |
| 41 /** @override */ |
| 42 TestLifetimeBrowserProxy.prototype.factoryReset = function() { |
| 43 this.methodCalled('factoryReset'); |
| 44 }; |
| 45 } |
| 46 |
| 47 return { |
| 48 TestLifetimeBrowserProxy: TestLifetimeBrowserProxy, |
| 49 }; |
| 50 }); |
| OLD | NEW |