| 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_permission', function() { | 6 cr.define('site_details_permission', function() { |
| 7 function registerTests() { | 7 function registerTests() { |
| 8 suite('SiteDetailsPermission', function() { | 8 suite('SiteDetailsPermission', function() { |
| 9 /** | 9 /** |
| 10 * A site list element created before each test. | 10 * A site list element created before each test. |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 testElement.category = settings.ContentSettingsTypes.CAMERA; | 115 testElement.category = settings.ContentSettingsTypes.CAMERA; |
| 116 testElement.site = { | 116 testElement.site = { |
| 117 origin: origin, | 117 origin: origin, |
| 118 embeddingOrigin: '', | 118 embeddingOrigin: '', |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 return browserProxy.whenCalled('getExceptionList').then(function() { | 121 return browserProxy.whenCalled('getExceptionList').then(function() { |
| 122 assertFalse(testElement.$.details.hidden); | 122 assertFalse(testElement.$.details.hidden); |
| 123 | 123 |
| 124 browserProxy.setPrefs(prefsEmpty); | 124 browserProxy.setPrefs(prefsEmpty); |
| 125 browserProxy.whenCalled('getExceptionList').then(function() { | 125 return browserProxy.whenCalled('getExceptionList').then(function() { |
| 126 assertTrue(testElement.$.details.hidden); | 126 assertTrue(testElement.$.details.hidden); |
| 127 }.bind(this)); | 127 }.bind(this)); |
| 128 }.bind(this)); | 128 }.bind(this)); |
| 129 }); | 129 }); |
| 130 }); | 130 }); |
| 131 } | 131 } |
| 132 return { | 132 return { |
| 133 registerTests: registerTests, | 133 registerTests: registerTests, |
| 134 }; | 134 }; |
| 135 }); | 135 }); |
| OLD | NEW |