| 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-list. */ | 5 /** @fileoverview Suite of tests for site-list. */ |
| 6 cr.define('site_list', function() { | 6 cr.define('site_list', function() { |
| 7 function registerTests() { | 7 function registerTests() { |
| 8 suite('SiteList', function() { | 8 suite('SiteList', function() { |
| 9 /** | 9 /** |
| 10 * A site list element created before each test. | 10 * A site list element created before each test. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 origin: 'https://foo-block.com:443', | 54 origin: 'https://foo-block.com:443', |
| 55 setting: 'block', | 55 setting: 'block', |
| 56 source: 'preference', | 56 source: 'preference', |
| 57 }, | 57 }, |
| 58 ], | 58 ], |
| 59 images: [], | 59 images: [], |
| 60 javascript: [], | 60 javascript: [], |
| 61 mic: [], | 61 mic: [], |
| 62 notifications: [], | 62 notifications: [], |
| 63 plugins: [], | 63 plugins: [], |
| 64 protectedContent: [], |
| 64 popups: [], | 65 popups: [], |
| 65 unsandboxed_plugins: [], | 66 unsandboxed_plugins: [], |
| 66 } | 67 } |
| 67 }; | 68 }; |
| 68 | 69 |
| 69 /** | 70 /** |
| 70 * An example pref with mixed schemes (present and absent). | 71 * An example pref with mixed schemes (present and absent). |
| 71 * @type {SiteSettingsPref} | 72 * @type {SiteSettingsPref} |
| 72 */ | 73 */ |
| 73 var prefsMixedSchemes = { | 74 var prefsMixedSchemes = { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 { | 144 { |
| 144 origin: 'https://[*.]foo.com', | 145 origin: 'https://[*.]foo.com', |
| 145 embeddingOrigin: '*', | 146 embeddingOrigin: '*', |
| 146 setting: 'allow', | 147 setting: 'allow', |
| 147 source: 'preference', | 148 source: 'preference', |
| 148 }, | 149 }, |
| 149 ], | 150 ], |
| 150 mic: [], | 151 mic: [], |
| 151 notifications: [], | 152 notifications: [], |
| 152 plugins: [], | 153 plugins: [], |
| 154 protectedContent: [], |
| 153 popups: [], | 155 popups: [], |
| 154 unsandboxed_plugins: [], | 156 unsandboxed_plugins: [], |
| 155 } | 157 } |
| 156 }; | 158 }; |
| 157 | 159 |
| 158 /** | 160 /** |
| 159 * An example pref with multiple categories and multiple allow/block | 161 * An example pref with multiple categories and multiple allow/block |
| 160 * state. | 162 * state. |
| 161 * @type {SiteSettingsPref} | 163 * @type {SiteSettingsPref} |
| 162 */ | 164 */ |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 source: 'preference', | 199 source: 'preference', |
| 198 }, | 200 }, |
| 199 { | 201 { |
| 200 embeddingOrigin: 'https://foo.com', | 202 embeddingOrigin: 'https://foo.com', |
| 201 origin: 'https://foo.com', | 203 origin: 'https://foo.com', |
| 202 setting: 'block', | 204 setting: 'block', |
| 203 source: 'preference', | 205 source: 'preference', |
| 204 }, | 206 }, |
| 205 ], | 207 ], |
| 206 plugins: [], | 208 plugins: [], |
| 209 protectedContent: [], |
| 207 popups: [], | 210 popups: [], |
| 208 unsandboxed_plugins: [], | 211 unsandboxed_plugins: [], |
| 209 } | 212 } |
| 210 }; | 213 }; |
| 211 | 214 |
| 212 /** | 215 /** |
| 213 * An example pref with 1 allowed location item. | 216 * An example pref with 1 allowed location item. |
| 214 * @type {SiteSettingsPref} | 217 * @type {SiteSettingsPref} |
| 215 */ | 218 */ |
| 216 var prefsOneEnabled = { | 219 var prefsOneEnabled = { |
| (...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 assertEquals(settings.ContentSettingsTypes.JAVASCRIPT, args[2]); | 886 assertEquals(settings.ContentSettingsTypes.JAVASCRIPT, args[2]); |
| 884 assertEquals('allow', args[3]); | 887 assertEquals('allow', args[3]); |
| 885 }); | 888 }); |
| 886 }); | 889 }); |
| 887 }); | 890 }); |
| 888 } | 891 } |
| 889 return { | 892 return { |
| 890 registerTests: registerTests, | 893 registerTests: registerTests, |
| 891 }; | 894 }; |
| 892 }); | 895 }); |
| OLD | NEW |