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

Unified Diff: chrome/test/data/webui/settings/test_site_settings_prefs_browser_proxy.js

Issue 2500513003: Make setting's protocol handler use cr-action-menu instead of paper-item. (Closed)
Patch Set: fix return type of boolean function Created 4 years, 1 month 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_site_settings_prefs_browser_proxy.js
diff --git a/chrome/test/data/webui/settings/test_site_settings_prefs_browser_proxy.js b/chrome/test/data/webui/settings/test_site_settings_prefs_browser_proxy.js
index 4d564d6727c15d2710a8342a9131f1b1f5d8add2..cfc0827726b6be925bdd0c3770d39ac643f2581d 100644
--- a/chrome/test/data/webui/settings/test_site_settings_prefs_browser_proxy.js
+++ b/chrome/test/data/webui/settings/test_site_settings_prefs_browser_proxy.js
@@ -54,11 +54,14 @@ var TestSiteSettingsPrefsBrowserProxy = function() {
'fetchZoomLevels',
'getDefaultValueForContentType',
'getExceptionList',
+ 'initializeProtocolHandlerList',
+ 'removeProtocolHandler',
'removeUsbDevice',
'removeZoomLevel',
'resetCategoryPermissionForOrigin',
'setCategoryPermissionForOrigin',
'setDefaultValueForContentType',
+ 'setProtocolDefault'
]);
/** @private {!SiteSettingsPref} */
@@ -67,8 +70,11 @@ var TestSiteSettingsPrefsBrowserProxy = function() {
/** @private {!Array<ZoomLevelEntry>} */
this.zoomList_ = [];
- /** @private {!Array<UsbDeviceEntry>} */
+ /** @private {!Array<!UsbDeviceEntry>} */
this.usbDevices_ = [];
+
+ /** @private {!Array<!ProtocolEntry>} */
+ this.protocolHandlers_ = [];
};
TestSiteSettingsPrefsBrowserProxy.prototype = {
@@ -107,6 +113,15 @@ TestSiteSettingsPrefsBrowserProxy.prototype = {
this.usbDevices_ = list.slice();
},
+ /**
+ * Sets the prefs to use when testing.
+ * @param {!Array<ProtocolEntry>} list The protocol handlers list to set.
+ */
+ setProtocolHandlers: function(list) {
+ // Shallow copy of the passed-in array so mutation won't impact the source
+ this.protocolHandlers_ = list.slice();
+ },
+
/** @override */
setDefaultValueForContentType: function(contentType, defaultValue) {
this.methodCalled(
@@ -235,5 +250,22 @@ TestSiteSettingsPrefsBrowserProxy.prototype = {
/** @override */
removeUsbDevice: function() {
this.methodCalled('removeUsbDevice', arguments);
+ },
+
+ /** @override */
+ initializeProtocolHandlerList: function() {
+ cr.webUIListenerCallback('setHandlersEnabled', true);
+ cr.webUIListenerCallback('setProtocolHandlers', this.protocolHandlers_);
+ this.methodCalled('initializeProtocolHandlerList');
+ },
+
+ /** @override */
+ setProtocolDefault: function() {
+ this.methodCalled('setProtocolDefault', arguments);
+ },
+
+ /** @override */
+ removeProtocolHandler: function() {
+ this.methodCalled('removeProtocolHandler', arguments);
}
};
« no previous file with comments | « chrome/test/data/webui/settings/protocol_handlers_tests.js ('k') | chrome/test/data/webui/settings/usb_devices_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698