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

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

Issue 2282603002: [HBD] Update MD SiteSettingsHandler to support 3 modes. (Closed)
Patch Set: fix comment 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/webui/settings/site_settings_handler_unittest.cc ('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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } else if (contentType == settings.ContentSettingsTypes.PLUGINS) { 120 } else if (contentType == settings.ContentSettingsTypes.PLUGINS) {
121 pref = this.prefs_.defaults.plugins; 121 pref = this.prefs_.defaults.plugins;
122 } else if ( 122 } else if (
123 contentType == settings.ContentSettingsTypes.UNSANDBOXED_PLUGINS) { 123 contentType == settings.ContentSettingsTypes.UNSANDBOXED_PLUGINS) {
124 pref = this.prefs_.defaults.unsandboxed_plugins; 124 pref = this.prefs_.defaults.unsandboxed_plugins;
125 } else { 125 } else {
126 console.log('getDefault received unknown category: ' + contentType); 126 console.log('getDefault received unknown category: ' + contentType);
127 } 127 }
128 128
129 assert(pref != undefined, 'Pref is missing for ' + contentType); 129 assert(pref != undefined, 'Pref is missing for ' + contentType);
130 return Promise.resolve(pref != 'block'); 130 return Promise.resolve(pref);
131 }, 131 },
132 132
133 /** @override */ 133 /** @override */
134 getExceptionList: function(contentType) { 134 getExceptionList: function(contentType) {
135 this.methodCalled('getExceptionList', contentType); 135 this.methodCalled('getExceptionList', contentType);
136 136
137 var pref = undefined; 137 var pref = undefined;
138 if (contentType == settings.ContentSettingsTypes.AUTOMATIC_DOWNLOADS) 138 if (contentType == settings.ContentSettingsTypes.AUTOMATIC_DOWNLOADS)
139 pref = this.prefs_.exceptions.auto_downloads; 139 pref = this.prefs_.exceptions.auto_downloads;
140 else if (contentType == settings.ContentSettingsTypes.BACKGROUND_SYNC) 140 else if (contentType == settings.ContentSettingsTypes.BACKGROUND_SYNC)
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 }, 179 },
180 180
181 /** @override */ 181 /** @override */
182 setCategoryPermissionForOrigin: function( 182 setCategoryPermissionForOrigin: function(
183 primaryPattern, secondaryPattern, contentType, value) { 183 primaryPattern, secondaryPattern, contentType, value) {
184 this.methodCalled('setCategoryPermissionForOrigin', 184 this.methodCalled('setCategoryPermissionForOrigin',
185 [primaryPattern, secondaryPattern, contentType, value]); 185 [primaryPattern, secondaryPattern, contentType, value]);
186 return Promise.resolve(); 186 return Promise.resolve();
187 }, 187 },
188 }; 188 };
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/site_settings_handler_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698