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

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

Issue 2501763003: Remove fullscreen from MD Settings internal lists. (Closed)
Patch Set: Fixed tests. 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
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 }, 42 },
43 ], 43 ],
44 cookies: [ 44 cookies: [
45 { 45 {
46 embeddingOrigin: 'https://foo-allow.com:443', 46 embeddingOrigin: 'https://foo-allow.com:443',
47 origin: 'https://foo-allow.com:443', 47 origin: 'https://foo-allow.com:443',
48 setting: 'allow', 48 setting: 'allow',
49 source: 'preference', 49 source: 'preference',
50 }, 50 },
51 ], 51 ],
52 fullscreen: [
53 {
54 embeddingOrigin: 'https://foo-allow.com:443',
55 origin: 'https://foo-allow.com:443',
56 setting: 'allow',
57 source: 'preference',
58 },
59 ],
60 geolocation: [ 52 geolocation: [
61 { 53 {
62 embeddingOrigin: 'https://foo-allow.com:443', 54 embeddingOrigin: 'https://foo-allow.com:443',
63 origin: 'https://foo-allow.com:443', 55 origin: 'https://foo-allow.com:443',
64 setting: 'allow', 56 setting: 'allow',
65 source: 'preference', 57 source: 'preference',
66 }, 58 },
67 ], 59 ],
68 javascript: [ 60 javascript: [
69 { 61 {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 145
154 assertTrue(testElement.$.usage.hidden); 146 assertTrue(testElement.$.usage.hidden);
155 assertTrue(testElement.$.storage.hidden); 147 assertTrue(testElement.$.storage.hidden);
156 148
157 // TODO(finnur): Check for the Permission heading hiding when no 149 // TODO(finnur): Check for the Permission heading hiding when no
158 // permissions are showing. 150 // permissions are showing.
159 151
160 var msg = 'No category should be showing, height'; 152 var msg = 'No category should be showing, height';
161 assertEquals(0, testElement.$.camera.offsetHeight, msg); 153 assertEquals(0, testElement.$.camera.offsetHeight, msg);
162 assertEquals(0, testElement.$.cookies.offsetHeight, msg); 154 assertEquals(0, testElement.$.cookies.offsetHeight, msg);
163 assertEquals(0, testElement.$.fullscreen.offsetHeight, msg);
164 assertEquals(0, testElement.$.geolocation.offsetHeight, msg); 155 assertEquals(0, testElement.$.geolocation.offsetHeight, msg);
165 assertEquals(0, testElement.$.javascript.offsetHeight, msg); 156 assertEquals(0, testElement.$.javascript.offsetHeight, msg);
166 assertEquals(0, testElement.$.mic.offsetHeight, msg); 157 assertEquals(0, testElement.$.mic.offsetHeight, msg);
167 assertEquals(0, testElement.$.notification.offsetHeight, msg); 158 assertEquals(0, testElement.$.notification.offsetHeight, msg);
168 assertEquals(0, testElement.$.popups.offsetHeight, msg); 159 assertEquals(0, testElement.$.popups.offsetHeight, msg);
169 }); 160 });
170 161
171 test('all categories visible', function() { 162 test('all categories visible', function() {
172 var category = settings.ContentSettingsTypes.NOTIFICATIONS; 163 var category = settings.ContentSettingsTypes.NOTIFICATIONS;
173 var site = { 164 var site = {
174 origin: 'https://foo-allow.com:443', 165 origin: 'https://foo-allow.com:443',
175 originForDisplay: 'https://foo-allow.com:443', 166 originForDisplay: 'https://foo-allow.com:443',
176 embeddingOrigin: '', 167 embeddingOrigin: '',
177 }; 168 };
178 169
179 browserProxy.setPrefs(prefs); 170 browserProxy.setPrefs(prefs);
180 testElement.category = category; 171 testElement.category = category;
181 testElement.site = site; 172 testElement.site = site;
182 173
183 var msg = 'All categories should be showing'; 174 var msg = 'All categories should be showing';
184 assertFalse(testElement.$.camera.hidden, msg); 175 assertFalse(testElement.$.camera.hidden, msg);
185 assertFalse(testElement.$.cookies.hidden, msg); 176 assertFalse(testElement.$.cookies.hidden, msg);
186 assertFalse(testElement.$.fullscreen.hidden, msg);
187 assertFalse(testElement.$.geolocation.hidden, msg); 177 assertFalse(testElement.$.geolocation.hidden, msg);
188 assertFalse(testElement.$.javascript.hidden, msg); 178 assertFalse(testElement.$.javascript.hidden, msg);
189 assertFalse(testElement.$.mic.hidden, msg); 179 assertFalse(testElement.$.mic.hidden, msg);
190 assertFalse(testElement.$.notification.hidden, msg); 180 assertFalse(testElement.$.notification.hidden, msg);
191 assertFalse(testElement.$.popups.hidden, msg); 181 assertFalse(testElement.$.popups.hidden, msg);
192 }); 182 });
193 183
194 test('usage heading shows on storage available', function() { 184 test('usage heading shows on storage available', function() {
195 // Remove the current website-usage-private-api element. 185 // Remove the current website-usage-private-api element.
196 var parent = testElement.$.usageApi.parentNode; 186 var parent = testElement.$.usageApi.parentNode;
(...skipping 20 matching lines...) Expand all
217 207
218 assertFalse(testElement.$.usage.hidden); 208 assertFalse(testElement.$.usage.hidden);
219 assertFalse(testElement.$.storage.hidden); 209 assertFalse(testElement.$.storage.hidden);
220 }); 210 });
221 }); 211 });
222 } 212 }
223 return { 213 return {
224 registerTests: registerTests, 214 registerTests: registerTests,
225 }; 215 };
226 }); 216 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698