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

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

Issue 2512613003: remove unnecessary paper-item dependency from site_details. (Closed)
Patch Set: use dom-if instead of hidden, and fix tests to accomodate Created 4 years, 1 month 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/resources/settings/site_settings/site_details.html ('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-details. */ 5 /** @fileoverview Suite of tests for site-details. */
6 cr.define('site_details', function() { 6 cr.define('site_details', function() {
7 function registerTests() { 7 function registerTests() {
8 suite('SiteDetails', function() { 8 suite('SiteDetails', function() {
9 /** 9 /**
10 * A site list element created before each test. 10 * A site list element created before each test.
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 var category = settings.ContentSettingsTypes.NOTIFICATIONS; 136 var category = settings.ContentSettingsTypes.NOTIFICATIONS;
137 var site = { 137 var site = {
138 origin: 'http://www.google.com', 138 origin: 'http://www.google.com',
139 originForDisplay: 'http://www.google.com', 139 originForDisplay: 'http://www.google.com',
140 embeddingOrigin: '', 140 embeddingOrigin: '',
141 }; 141 };
142 browserProxy.setPrefs(prefsEmpty); 142 browserProxy.setPrefs(prefsEmpty);
143 testElement.category = category; 143 testElement.category = category;
144 testElement.site = site 144 testElement.site = site
145 145
146 assertTrue(testElement.$.usage.hidden); 146 //expect usage to not be rendered
Dan Beam 2016/11/18 16:48:07 I don't think this comment adds much
147 assertTrue(testElement.$.storage.hidden); 147 assertFalse(!!testElement.$$('#usage'));
148 148
149 // TODO(finnur): Check for the Permission heading hiding when no 149 // TODO(finnur): Check for the Permission heading hiding when no
150 // permissions are showing. 150 // permissions are showing.
151 151
152 var msg = 'No category should be showing, height'; 152 var msg = 'No category should be showing, height';
153 assertEquals(0, testElement.$.camera.offsetHeight, msg); 153 assertEquals(0, testElement.$.camera.offsetHeight, msg);
154 assertEquals(0, testElement.$.cookies.offsetHeight, msg); 154 assertEquals(0, testElement.$.cookies.offsetHeight, msg);
155 assertEquals(0, testElement.$.geolocation.offsetHeight, msg); 155 assertEquals(0, testElement.$.geolocation.offsetHeight, msg);
156 assertEquals(0, testElement.$.javascript.offsetHeight, msg); 156 assertEquals(0, testElement.$.javascript.offsetHeight, msg);
157 assertEquals(0, testElement.$.mic.offsetHeight, msg); 157 assertEquals(0, testElement.$.mic.offsetHeight, msg);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 testElement.$.usageApi = api; 198 testElement.$.usageApi = api;
199 Polymer.dom(parent).appendChild(api); 199 Polymer.dom(parent).appendChild(api);
200 200
201 browserProxy.setPrefs(prefs); 201 browserProxy.setPrefs(prefs);
202 testElement.site = { 202 testElement.site = {
203 origin: 'https://foo-allow.com:443', 203 origin: 'https://foo-allow.com:443',
204 originForDisplay: 'https://foo-allow.com:443', 204 originForDisplay: 'https://foo-allow.com:443',
205 embeddingOrigin: '', 205 embeddingOrigin: '',
206 }; 206 };
207 207
208 assertFalse(testElement.$.usage.hidden); 208 Polymer.dom.flush();
209 assertFalse(testElement.$.storage.hidden); 209
210 //expect usage to be rendered
Dan Beam 2016/11/18 16:48:07 // Expect usage to be rendered.
211 assertTrue(!!testElement.$$('#usage'));
210 }); 212 });
211 }); 213 });
212 } 214 }
213 return { 215 return {
214 registerTests: registerTests, 216 registerTests: registerTests,
215 }; 217 };
216 }); 218 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/site_settings/site_details.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698