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

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

Issue 2323693002: Site Settings Desktop: Implement Zoom Levels category. (Closed)
Patch Set: Fix test Created 4 years, 3 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_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]);
+ },
};

Powered by Google App Engine
This is Rietveld 408576698