| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 category-default-setting. */ | 5 /** @fileoverview Suite of tests for category-default-setting. */ |
| 6 cr.define('category_default_setting', function() { | 6 cr.define('category_default_setting', function() { |
| 7 function registerTests() { | 7 function registerTests() { |
| 8 suite('CategoryDefaultSetting', function() { | 8 suite('CategoryDefaultSetting', function() { |
| 9 /** | 9 /** |
| 10 * A site settings category created before each test. | 10 * A site settings category created before each test. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 defaults: { | 70 defaults: { |
| 71 cookies: { | 71 cookies: { |
| 72 setting: 'session_only', | 72 setting: 'session_only', |
| 73 }, | 73 }, |
| 74 }, | 74 }, |
| 75 exceptions: { | 75 exceptions: { |
| 76 cookies: [], | 76 cookies: [], |
| 77 }, | 77 }, |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 // Import necessary html before running suite. | |
| 81 suiteSetup(function() { | |
| 82 return PolymerTest.importHtml( | |
| 83 'chrome://md-settings/site_settings/category_default_setting.html'); | |
| 84 }); | |
| 85 | |
| 86 // Initialize a site-settings-category before each test. | 80 // Initialize a site-settings-category before each test. |
| 87 setup(function() { | 81 setup(function() { |
| 88 browserProxy = new TestSiteSettingsPrefsBrowserProxy(); | 82 browserProxy = new TestSiteSettingsPrefsBrowserProxy(); |
| 89 settings.SiteSettingsPrefsBrowserProxyImpl.instance_ = browserProxy; | 83 settings.SiteSettingsPrefsBrowserProxyImpl.instance_ = browserProxy; |
| 90 PolymerTest.clearBody(); | 84 PolymerTest.clearBody(); |
| 91 testElement = document.createElement('category-default-setting'); | 85 testElement = document.createElement('category-default-setting'); |
| 92 testElement.subOptionLabel = "test label"; | 86 testElement.subOptionLabel = "test label"; |
| 93 document.body.appendChild(testElement); | 87 document.body.appendChild(testElement); |
| 94 }); | 88 }); |
| 95 | 89 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 prefsCookesSessionOnly, settings.ContentSettingsTypes.COOKIES, | 239 prefsCookesSessionOnly, settings.ContentSettingsTypes.COOKIES, |
| 246 settings.PermissionValues.SESSION_ONLY, '#subOptionToggle'); | 240 settings.PermissionValues.SESSION_ONLY, '#subOptionToggle'); |
| 247 }); | 241 }); |
| 248 }); | 242 }); |
| 249 } | 243 } |
| 250 | 244 |
| 251 return { | 245 return { |
| 252 registerTests: registerTests, | 246 registerTests: registerTests, |
| 253 }; | 247 }; |
| 254 }); | 248 }); |
| OLD | NEW |