| 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 { | 318 { |
| 319 embeddingOrigin: '', | 319 embeddingOrigin: '', |
| 320 origin: 'chrome-extension://cfhgfbfpcbnnbibfphagcjmgjfjmojfa/', | 320 origin: 'chrome-extension://cfhgfbfpcbnnbibfphagcjmgjfjmojfa/', |
| 321 setting: 'block', | 321 setting: 'block', |
| 322 source: 'preference', | 322 source: 'preference', |
| 323 }, | 323 }, |
| 324 ] | 324 ] |
| 325 } | 325 } |
| 326 }; | 326 }; |
| 327 | 327 |
| 328 // Import necessary html before running suite. | |
| 329 suiteSetup(function() { | 328 suiteSetup(function() { |
| 330 CrSettingsPrefs.setInitialized(); | 329 CrSettingsPrefs.setInitialized(); |
| 331 return PolymerTest.importHtml( | |
| 332 'chrome://md-settings/site_settings/site_list.html'); | |
| 333 }); | 330 }); |
| 334 | 331 |
| 335 suiteTeardown(function() { | 332 suiteTeardown(function() { |
| 336 CrSettingsPrefs.resetForTesting(); | 333 CrSettingsPrefs.resetForTesting(); |
| 337 }); | 334 }); |
| 338 | 335 |
| 339 // Initialize a site-list before each test. | 336 // Initialize a site-list before each test. |
| 340 setup(function() { | 337 setup(function() { |
| 341 browserProxy = new TestSiteSettingsPrefsBrowserProxy(); | 338 browserProxy = new TestSiteSettingsPrefsBrowserProxy(); |
| 342 settings.SiteSettingsPrefsBrowserProxyImpl.instance_ = browserProxy; | 339 settings.SiteSettingsPrefsBrowserProxyImpl.instance_ = browserProxy; |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 assertEquals(settings.ContentSettingsTypes.JAVASCRIPT, args[2]); | 883 assertEquals(settings.ContentSettingsTypes.JAVASCRIPT, args[2]); |
| 887 assertEquals('allow', args[3]); | 884 assertEquals('allow', args[3]); |
| 888 }); | 885 }); |
| 889 }); | 886 }); |
| 890 }); | 887 }); |
| 891 } | 888 } |
| 892 return { | 889 return { |
| 893 registerTests: registerTests, | 890 registerTests: registerTests, |
| 894 }; | 891 }; |
| 895 }); | 892 }); |
| OLD | NEW |