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. |
11 * @type {SiteDetails} | 11 * @type {SiteDetails} |
12 */ | 12 */ |
13 var testElement; | 13 var testElement; |
14 | 14 |
15 /** | 15 /** |
16 * An example pref with 1 allowed in each category. | 16 * An example pref with 1 allowed in each category. |
17 */ | 17 */ |
18 var prefs = { | 18 var prefs = { |
19 exceptions: { | 19 exceptions: { |
| 20 auto_downloads: [ |
| 21 { |
| 22 embeddingOrigin: 'https://foo-allow.com:443', |
| 23 origin: 'https://foo-allow.com:443', |
| 24 setting: 'allow', |
| 25 source: 'preference', |
| 26 }, |
| 27 ], |
| 28 background_sync: [ |
| 29 { |
| 30 embeddingOrigin: 'https://foo-allow.com:443', |
| 31 origin: 'https://foo-allow.com:443', |
| 32 setting: 'allow', |
| 33 source: 'preference', |
| 34 }, |
| 35 ], |
20 media_stream_camera: [ | 36 media_stream_camera: [ |
21 { | 37 { |
22 embeddingOrigin: 'https://foo-allow.com:443', | 38 embeddingOrigin: 'https://foo-allow.com:443', |
23 origin: 'https://foo-allow.com:443', | 39 origin: 'https://foo-allow.com:443', |
24 setting: 'allow', | 40 setting: 'allow', |
25 source: 'preference', | 41 source: 'preference', |
26 }, | 42 }, |
27 ], | 43 ], |
28 cookies: [ | 44 cookies: [ |
29 { | 45 { |
(...skipping 20 matching lines...) Expand all Loading... |
50 }, | 66 }, |
51 ], | 67 ], |
52 javascript: [ | 68 javascript: [ |
53 { | 69 { |
54 embeddingOrigin: 'https://foo-allow.com:443', | 70 embeddingOrigin: 'https://foo-allow.com:443', |
55 origin: 'https://foo-allow.com:443', | 71 origin: 'https://foo-allow.com:443', |
56 setting: 'allow', | 72 setting: 'allow', |
57 source: 'preference', | 73 source: 'preference', |
58 }, | 74 }, |
59 ], | 75 ], |
| 76 keygen: [ |
| 77 { |
| 78 embeddingOrigin: 'https://foo-allow.com:443', |
| 79 origin: 'https://foo-allow.com:443', |
| 80 setting: 'allow', |
| 81 source: 'preference', |
| 82 }, |
| 83 ], |
60 media_stream_mic: [ | 84 media_stream_mic: [ |
61 { | 85 { |
62 embeddingOrigin: 'https://foo-allow.com:443', | 86 embeddingOrigin: 'https://foo-allow.com:443', |
63 origin: 'https://foo-allow.com:443', | 87 origin: 'https://foo-allow.com:443', |
64 setting: 'allow', | 88 setting: 'allow', |
65 source: 'preference', | 89 source: 'preference', |
66 }, | 90 }, |
67 ], | 91 ], |
68 notifications: [ | 92 notifications: [ |
69 { | 93 { |
70 embeddingOrigin: 'https://foo-allow.com:443', | 94 embeddingOrigin: 'https://foo-allow.com:443', |
71 origin: 'https://foo-allow.com:443', | 95 origin: 'https://foo-allow.com:443', |
72 setting: 'allow', | 96 setting: 'allow', |
73 source: 'preference', | 97 source: 'preference', |
74 }, | 98 }, |
75 ], | 99 ], |
| 100 plugins: [ |
| 101 { |
| 102 embeddingOrigin: 'https://foo-allow.com:443', |
| 103 origin: 'https://foo-allow.com:443', |
| 104 setting: 'allow', |
| 105 source: 'preference', |
| 106 }, |
| 107 ], |
76 popups: [ | 108 popups: [ |
77 { | 109 { |
78 embeddingOrigin: 'https://foo-allow.com:443', | 110 embeddingOrigin: 'https://foo-allow.com:443', |
79 origin: 'https://foo-allow.com:443', | 111 origin: 'https://foo-allow.com:443', |
80 setting: 'allow', | 112 setting: 'allow', |
81 source: 'preference', | 113 source: 'preference', |
82 }, | 114 }, |
83 ], | 115 ], |
| 116 unsandboxed_plugins: [ |
| 117 { |
| 118 embeddingOrigin: 'https://foo-allow.com:443', |
| 119 origin: 'https://foo-allow.com:443', |
| 120 setting: 'allow', |
| 121 source: 'preference', |
| 122 }, |
| 123 ], |
84 } | 124 } |
85 }; | 125 }; |
86 | 126 |
87 // Import necessary html before running suite. | 127 // Import necessary html before running suite. |
88 suiteSetup(function() { | 128 suiteSetup(function() { |
89 return PolymerTest.importHtml( | 129 return PolymerTest.importHtml( |
90 'chrome://md-settings/site_settings/site_details.html' | 130 'chrome://md-settings/site_settings/site_details.html' |
91 ); | 131 ); |
92 }); | 132 }); |
93 | 133 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 | 217 |
178 assertFalse(testElement.$.usage.hidden); | 218 assertFalse(testElement.$.usage.hidden); |
179 assertFalse(testElement.$.storage.hidden); | 219 assertFalse(testElement.$.storage.hidden); |
180 }); | 220 }); |
181 }); | 221 }); |
182 } | 222 } |
183 return { | 223 return { |
184 registerTests: registerTests, | 224 registerTests: registerTests, |
185 }; | 225 }; |
186 }); | 226 }); |
OLD | NEW |