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

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

Issue 1661533002: Implement deletion of storage per site. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits Created 4 years, 10 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.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 /** @fileoverview Suite of tests for site-list. */ 5 /** @fileoverview Suite of tests for site-list. */
6 cr.define('site_list', function() { 6 cr.define('site_list', function() {
7 function registerTests() { 7 function registerTests() {
8 suite('SiteList', function() { 8 suite('SiteList', function() {
9 /** 9 /**
10 * A site list element created before each test. 10 * A site list element created before each test.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 * Configures the test element as a location category. 132 * Configures the test element as a location category.
133 * @param {settings.PermissionValues} subtype Type of list to use: ALLOW 133 * @param {settings.PermissionValues} subtype Type of list to use: ALLOW
134 * or BLOCK. 134 * or BLOCK.
135 * @param {dictionary} prefs The prefs to use. 135 * @param {dictionary} prefs The prefs to use.
136 */ 136 */
137 function setupLocationCategory(subtype, prefs) { 137 function setupLocationCategory(subtype, prefs) {
138 testElement.category = settings.ContentSettingsTypes.GEOLOCATION; 138 testElement.category = settings.ContentSettingsTypes.GEOLOCATION;
139 testElement.categorySubtype = subtype; 139 testElement.categorySubtype = subtype;
140 testElement.categoryEnabled = true; 140 testElement.categoryEnabled = true;
141 testElement.prefs = prefs; 141 testElement.prefs = prefs;
142 testElement.currentRoute = {
143 page: 'dummy',
144 section: 'privacy',
145 subpage: ['site-settings', 'site-settings-category-location'],
146 };
142 } 147 }
143 148
144 test('Empty list', function() { 149 test('Empty list', function() {
145 setupLocationCategory(settings.PermissionValues.ALLOW, prefsEmpty); 150 setupLocationCategory(settings.PermissionValues.ALLOW, prefsEmpty);
146 return CrSettingsPrefs.initialized.then(function() { 151 return CrSettingsPrefs.initialized.then(function() {
147 assertEquals(0, testElement.sites_.length); 152 assertEquals(0, testElement.sites_.length);
148 153
149 assertTrue(testElement.isAllowList_()); 154 assertTrue(testElement.isAllowList_());
150 assertFalse(testElement.showSiteList_(testElement.sites_, true)); 155 assertFalse(testElement.showSiteList_(testElement.sites_, true));
151 assertFalse(testElement.showSiteList_(testElement.sites_, false)); 156 assertFalse(testElement.showSiteList_(testElement.sites_, false));
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 return CrSettingsPrefs.initialized.then(function() { 270 return CrSettingsPrefs.initialized.then(function() {
266 assertTrue(testElement.$.category.hidden); 271 assertTrue(testElement.$.category.hidden);
267 }.bind(this)); 272 }.bind(this));
268 }); 273 });
269 }); 274 });
270 } 275 }
271 return { 276 return {
272 registerTests: registerTests, 277 registerTests: registerTests,
273 }; 278 };
274 }); 279 });
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/site_settings_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698