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

Side by Side Diff: chrome/test/data/webui/settings/test_lifetime_browser_proxy.js

Issue 2927653002: WebUI: Move test_browser_proxy.js one level up. (Closed)
Patch Set: Remove namespace 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 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 cr.define('settings', function() { 5 cr.define('settings', function() {
6 /** 6 /**
7 * A test version of LifetimeBrowserProxy. 7 * A test version of LifetimeBrowserProxy.
8 * 8 *
9 * @constructor 9 * @constructor
10 * @implements {settings.LifetimeBrowserProxy} 10 * @implements {settings.LifetimeBrowserProxy}
11 * @extends {settings.TestBrowserProxy} 11 * @extends {TestBrowserProxy}
12 */ 12 */
13 var TestLifetimeBrowserProxy = function() { 13 var TestLifetimeBrowserProxy = function() {
14 var methodNames = ['restart', 'relaunch']; 14 var methodNames = ['restart', 'relaunch'];
15 if (cr.isChromeOS) 15 if (cr.isChromeOS)
16 methodNames.push('signOutAndRestart', 'factoryReset'); 16 methodNames.push('signOutAndRestart', 'factoryReset');
17 17
18 settings.TestBrowserProxy.call(this, methodNames); 18 TestBrowserProxy.call(this, methodNames);
19 }; 19 };
20 20
21 TestLifetimeBrowserProxy.prototype = { 21 TestLifetimeBrowserProxy.prototype = {
22 __proto__: settings.TestBrowserProxy.prototype, 22 __proto__: TestBrowserProxy.prototype,
23 23
24 /** @override */ 24 /** @override */
25 restart: function() { 25 restart: function() {
26 this.methodCalled('restart'); 26 this.methodCalled('restart');
27 }, 27 },
28 28
29 /** @override */ 29 /** @override */
30 relaunch: function() { 30 relaunch: function() {
31 this.methodCalled('relaunch'); 31 this.methodCalled('relaunch');
32 }, 32 },
33 }; 33 };
34 34
35 if (cr.isChromeOS) { 35 if (cr.isChromeOS) {
36 /** @override */ 36 /** @override */
37 TestLifetimeBrowserProxy.prototype.signOutAndRestart = function() { 37 TestLifetimeBrowserProxy.prototype.signOutAndRestart = function() {
38 this.methodCalled('signOutAndRestart'); 38 this.methodCalled('signOutAndRestart');
39 }; 39 };
40 40
41 /** @override */ 41 /** @override */
42 TestLifetimeBrowserProxy.prototype.factoryReset = function() { 42 TestLifetimeBrowserProxy.prototype.factoryReset = function() {
43 this.methodCalled('factoryReset'); 43 this.methodCalled('factoryReset');
44 }; 44 };
45 } 45 }
46 46
47 return { 47 return {
48 TestLifetimeBrowserProxy: TestLifetimeBrowserProxy, 48 TestLifetimeBrowserProxy: TestLifetimeBrowserProxy,
49 }; 49 };
50 }); 50 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698