| OLD | NEW |
| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 assertTrue(testElement.$.usage.hidden); |
| 147 assertTrue(testElement.$.storage.hidden); | |
| 148 | 147 |
| 149 // TODO(finnur): Check for the Permission heading hiding when no | 148 // TODO(finnur): Check for the Permission heading hiding when no |
| 150 // permissions are showing. | 149 // permissions are showing. |
| 151 | 150 |
| 152 var msg = 'No category should be showing, height'; | 151 var msg = 'No category should be showing, height'; |
| 153 assertEquals(0, testElement.$.camera.offsetHeight, msg); | 152 assertEquals(0, testElement.$.camera.offsetHeight, msg); |
| 154 assertEquals(0, testElement.$.cookies.offsetHeight, msg); | 153 assertEquals(0, testElement.$.cookies.offsetHeight, msg); |
| 155 assertEquals(0, testElement.$.geolocation.offsetHeight, msg); | 154 assertEquals(0, testElement.$.geolocation.offsetHeight, msg); |
| 156 assertEquals(0, testElement.$.javascript.offsetHeight, msg); | 155 assertEquals(0, testElement.$.javascript.offsetHeight, msg); |
| 157 assertEquals(0, testElement.$.mic.offsetHeight, msg); | 156 assertEquals(0, testElement.$.mic.offsetHeight, msg); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 | 206 |
| 208 assertFalse(testElement.$.usage.hidden); | 207 assertFalse(testElement.$.usage.hidden); |
| 209 assertFalse(testElement.$.storage.hidden); | 208 assertFalse(testElement.$.storage.hidden); |
| 210 }); | 209 }); |
| 211 }); | 210 }); |
| 212 } | 211 } |
| 213 return { | 212 return { |
| 214 registerTests: registerTests, | 213 registerTests: registerTests, |
| 215 }; | 214 }; |
| 216 }); | 215 }); |
| OLD | NEW |