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

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

Issue 2057593003: MD Settings: Add dedicated C++ handler for restart/relaunch/powerwash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit. Created 4 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
(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 });
OLDNEW
« chrome/browser/ui/webui/settings/md_settings_ui.cc ('K') | « chrome/chrome_browser_ui.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698