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

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

Issue 2915743002: MD Settings: Include settings for displaying Images in Site Details. (Closed)
Patch Set: Fixup Created 3 years, 6 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
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-details. */ 5 /** @fileoverview Suite of tests for site-details. */
6 suite('SiteDetails', function() { 6 suite('SiteDetails', function() {
7 /** 7 /**
8 * A site list element created before each test. 8 * A site list element created before each test.
9 * @type {SiteDetails} 9 * @type {SiteDetails}
10 */ 10 */
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 }, 48 },
49 ], 49 ],
50 geolocation: [ 50 geolocation: [
51 { 51 {
52 embeddingOrigin: 'https://foo-allow.com:443', 52 embeddingOrigin: 'https://foo-allow.com:443',
53 origin: 'https://foo-allow.com:443', 53 origin: 'https://foo-allow.com:443',
54 setting: 'allow', 54 setting: 'allow',
55 source: 'preference', 55 source: 'preference',
56 }, 56 },
57 ], 57 ],
58 images: [
59 {
60 embeddingOrigin: 'https://foo-allow.com:443',
61 origin: 'https://foo-allow.com:443',
62 setting: 'allow',
63 source: 'preference',
64 },
65 ],
58 javascript: [ 66 javascript: [
59 { 67 {
60 embeddingOrigin: 'https://foo-allow.com:443', 68 embeddingOrigin: 'https://foo-allow.com:443',
61 origin: 'https://foo-allow.com:443', 69 origin: 'https://foo-allow.com:443',
62 setting: 'allow', 70 setting: 'allow',
63 source: 'preference', 71 source: 'preference',
64 }, 72 },
65 ], 73 ],
66 mic: [ 74 mic: [
67 { 75 {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 160
153 browserProxy.setPrefs(prefs); 161 browserProxy.setPrefs(prefs);
154 testElement.category = category; 162 testElement.category = category;
155 testElement.site = site; 163 testElement.site = site;
156 164
157 var msg = 'All categories should be showing'; 165 var msg = 'All categories should be showing';
158 assertFalse(testElement.$.camera.hidden, msg); 166 assertFalse(testElement.$.camera.hidden, msg);
159 assertFalse(testElement.$.cookies.hidden, msg); 167 assertFalse(testElement.$.cookies.hidden, msg);
160 assertFalse(testElement.$.geolocation.hidden, msg); 168 assertFalse(testElement.$.geolocation.hidden, msg);
161 assertFalse(testElement.$.javascript.hidden, msg); 169 assertFalse(testElement.$.javascript.hidden, msg);
162 assertFalse(testElement.$.mic.hidden, msg); 170 assertFalse(testElement.$.mic.hidden, msg);
tsergeant 2017/06/01 04:02:24 Should images be added to these test cases?
Patti Lor 2017/06/01 04:22:24 Oops, yes. calamity@ said in a separate CL (that s
tsergeant 2017/06/01 04:26:21 Fair enough
163 assertFalse(testElement.$.notification.hidden, msg); 171 assertFalse(testElement.$.notification.hidden, msg);
164 assertFalse(testElement.$.popups.hidden, msg); 172 assertFalse(testElement.$.popups.hidden, msg);
165 }); 173 });
166 174
167 test('usage heading shows on storage available', function() { 175 test('usage heading shows on storage available', function() {
168 // Remove the current website-usage-private-api element. 176 // Remove the current website-usage-private-api element.
169 var parent = testElement.$.usageApi.parentNode; 177 var parent = testElement.$.usageApi.parentNode;
170 testElement.$.usageApi.remove(); 178 testElement.$.usageApi.remove();
171 179
172 // Replace it with a mock version. 180 // Replace it with a mock version.
(...skipping 14 matching lines...) Expand all
187 displayName: 'https://foo-allow.com:443', 195 displayName: 'https://foo-allow.com:443',
188 embeddingOrigin: '', 196 embeddingOrigin: '',
189 }; 197 };
190 198
191 Polymer.dom.flush(); 199 Polymer.dom.flush();
192 200
193 // expect usage to be rendered 201 // expect usage to be rendered
194 assertTrue(!!testElement.$$('#usage')); 202 assertTrue(!!testElement.$$('#usage'));
195 }); 203 });
196 }); 204 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698