| 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 eff2a1aa2cb55aa47f161789b059e3c4c8805b2c..2f4f8eb157c351b0773431c78d08d02d9614d173 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
|
| @@ -50,8 +50,10 @@ var prefsEmpty = {
|
| */
|
| var TestSiteSettingsPrefsBrowserProxy = function() {
|
| settings.TestBrowserProxy.call(this, [
|
| + 'fetchZoomLevels',
|
| 'getDefaultValueForContentType',
|
| 'getExceptionList',
|
| + 'removeZoomLevel',
|
| 'resetCategoryPermissionForOrigin',
|
| 'setCategoryPermissionForOrigin',
|
| 'setDefaultValueForContentType',
|
| @@ -59,10 +61,11 @@ var TestSiteSettingsPrefsBrowserProxy = function() {
|
|
|
| /** @private {!SiteSettingsPref} */
|
| this.prefs_ = prefsEmpty;
|
| +
|
| + /** @private {!Array<ZoomLevelEntry>} */
|
| + this.zoomList_ = [];
|
| };
|
|
|
| -// TODO(finnur): Modify the tests so that most of the code this class implements
|
| -// can be ripped out.
|
| TestSiteSettingsPrefsBrowserProxy.prototype = {
|
| __proto__: settings.TestBrowserProxy.prototype,
|
|
|
| @@ -82,6 +85,14 @@ TestSiteSettingsPrefsBrowserProxy.prototype = {
|
| }
|
| },
|
|
|
| + /**
|
| + * Sets the prefs to use when testing.
|
| + * @param !Array<ZoomLevelEntry> list The zoom list to set.
|
| + */
|
| + setZoomList: function(list) {
|
| + this.zoomList_ = list;
|
| + },
|
| +
|
| /** @override */
|
| setDefaultValueForContentType: function(contentType, defaultValue) {
|
| this.methodCalled(
|
| @@ -185,4 +196,15 @@ TestSiteSettingsPrefsBrowserProxy.prototype = {
|
| [primaryPattern, secondaryPattern, contentType, value]);
|
| return Promise.resolve();
|
| },
|
| +
|
| + /** @override */
|
| + fetchZoomLevels: function() {
|
| + cr.webUIListenerCallback('onZoomLevelsChanged', this.zoomList_);
|
| + this.methodCalled('fetchZoomLevels');
|
| + },
|
| +
|
| + /** @override */
|
| + removeZoomLevel: function(host) {
|
| + this.methodCalled('removeZoomLevel', [host]);
|
| + },
|
| };
|
|
|