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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/webui/settings/test_lifetime_browser_proxy.js
diff --git a/chrome/test/data/webui/settings/test_lifetime_browser_proxy.js b/chrome/test/data/webui/settings/test_lifetime_browser_proxy.js
new file mode 100644
index 0000000000000000000000000000000000000000..4aed7caff5f9e6bafa91147879c9c5afd143eff0
--- /dev/null
+++ b/chrome/test/data/webui/settings/test_lifetime_browser_proxy.js
@@ -0,0 +1,50 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+cr.define('settings', function() {
+ /**
+ * A test version of LifetimeBrowserProxy.
+ *
+ * @constructor
+ * @implements {settings.LifetimeBrowserProxy}
+ * @extends {settings.TestBrowserProxy}
+ */
+ var TestLifetimeBrowserProxy = function() {
+ var methodNames = ['restart', 'relaunch'];
+ if (cr.isChromeOS)
+ methodNames.push('logOutAndRestart', 'factoryReset');
+
+ settings.TestBrowserProxy.call(this, methodNames);
+ };
+
+ TestLifetimeBrowserProxy.prototype = {
+ __proto__: settings.TestBrowserProxy.prototype,
+
+ /** @override */
+ restart: function() {
+ this.methodCalled('restart');
+ },
+
+ /** @override */
+ relaunch: function() {
+ this.methodCalled('relaunch');
+ },
+ };
+
+ if (cr.isChromeOS) {
+ /** @override */
+ TestLifetimeBrowserProxy.prototype.logOutAndRestart = function() {
+ this.methodCalled('logOutAndRestart');
+ };
+
+ /** @override */
+ TestLifetimeBrowserProxy.prototype.factoryReset = function() {
+ this.methodCalled('factoryReset');
+ };
+ }
+
+ return {
+ TestLifetimeBrowserProxy: TestLifetimeBrowserProxy,
+ };
+});
« 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