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

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

Issue 2598893002: [MD settings] lighter weight initializer for protocol handler enabled messages (Closed)
Patch Set: review changes Created 3 years, 12 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
« no previous file with comments | « chrome/test/data/webui/settings/protocol_handlers_tests.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** 5 /**
6 * An example empty pref. 6 * An example empty pref.
7 * @type {SiteSettingsPref} 7 * @type {SiteSettingsPref}
8 */ 8 */
9 var prefsEmpty = { 9 var prefsEmpty = {
10 defaults: { 10 defaults: {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 * @constructor 43 * @constructor
44 * @implements {settings.SiteSettingsPrefsBrowserProxy} 44 * @implements {settings.SiteSettingsPrefsBrowserProxy}
45 * @extends {settings.TestBrowserProxy} 45 * @extends {settings.TestBrowserProxy}
46 */ 46 */
47 var TestSiteSettingsPrefsBrowserProxy = function() { 47 var TestSiteSettingsPrefsBrowserProxy = function() {
48 settings.TestBrowserProxy.call(this, [ 48 settings.TestBrowserProxy.call(this, [
49 'fetchUsbDevices', 49 'fetchUsbDevices',
50 'fetchZoomLevels', 50 'fetchZoomLevels',
51 'getDefaultValueForContentType', 51 'getDefaultValueForContentType',
52 'getExceptionList', 52 'getExceptionList',
53 'initializeProtocolHandlerList', 53 'observeProtocolHandlers',
54 'observeProtocolHandlersEnabledState',
54 'removeProtocolHandler', 55 'removeProtocolHandler',
55 'removeUsbDevice', 56 'removeUsbDevice',
56 'removeZoomLevel', 57 'removeZoomLevel',
57 'resetCategoryPermissionForOrigin', 58 'resetCategoryPermissionForOrigin',
58 'setCategoryPermissionForOrigin', 59 'setCategoryPermissionForOrigin',
59 'setDefaultValueForContentType', 60 'setDefaultValueForContentType',
60 'setProtocolDefault' 61 'setProtocolDefault'
61 ]); 62 ]);
62 63
63 /** @private {!SiteSettingsPref} */ 64 /** @private {!SiteSettingsPref} */
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 this.methodCalled('fetchUsbDevices'); 235 this.methodCalled('fetchUsbDevices');
235 return Promise.resolve(this.usbDevices_); 236 return Promise.resolve(this.usbDevices_);
236 }, 237 },
237 238
238 /** @override */ 239 /** @override */
239 removeUsbDevice: function() { 240 removeUsbDevice: function() {
240 this.methodCalled('removeUsbDevice', arguments); 241 this.methodCalled('removeUsbDevice', arguments);
241 }, 242 },
242 243
243 /** @override */ 244 /** @override */
244 initializeProtocolHandlerList: function() { 245 observeProtocolHandlers: function() {
245 cr.webUIListenerCallback('setHandlersEnabled', true); 246 cr.webUIListenerCallback('setHandlersEnabled', true);
246 cr.webUIListenerCallback('setProtocolHandlers', this.protocolHandlers_); 247 cr.webUIListenerCallback('setProtocolHandlers', this.protocolHandlers_);
247 this.methodCalled('initializeProtocolHandlerList'); 248 this.methodCalled('observeProtocolHandlers');
248 }, 249 },
249 250
250 /** @override */ 251 /** @override */
252 observeProtocolHandlersEnabledState: function() {
253 cr.webUIListenerCallback('setHandlersEnabled', true);
254 this.methodCalled('observeProtocolHandlersEnabledState');
255 },
256
257 /** @override */
251 setProtocolDefault: function() { 258 setProtocolDefault: function() {
252 this.methodCalled('setProtocolDefault', arguments); 259 this.methodCalled('setProtocolDefault', arguments);
253 }, 260 },
254 261
255 /** @override */ 262 /** @override */
256 removeProtocolHandler: function() { 263 removeProtocolHandler: function() {
257 this.methodCalled('removeProtocolHandler', arguments); 264 this.methodCalled('removeProtocolHandler', arguments);
258 } 265 }
259 }; 266 };
OLDNEW
« no previous file with comments | « chrome/test/data/webui/settings/protocol_handlers_tests.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698