| 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 setting: 'session_only', | 243 setting: 'session_only', |
| 244 source: 'preference', | 244 source: 'preference', |
| 245 }, | 245 }, |
| 246 ] | 246 ] |
| 247 } | 247 } |
| 248 }; | 248 }; |
| 249 | 249 |
| 250 // Import necessary html before running suite. | 250 // Import necessary html before running suite. |
| 251 suiteSetup(function() { | 251 suiteSetup(function() { |
| 252 CrSettingsPrefs.setInitialized(); | 252 CrSettingsPrefs.setInitialized(); |
| 253 // Add a no-op stub to catch navigations during the test. |
| 254 // TODO(tommycli): Remove once settings.navigateTo is no longer a stub. |
| 255 settings.navigateTo = function(route) {}; |
| 253 return PolymerTest.importHtml( | 256 return PolymerTest.importHtml( |
| 254 'chrome://md-settings/site_settings/site_list.html'); | 257 'chrome://md-settings/site_settings/site_list.html'); |
| 255 }); | 258 }); |
| 256 | 259 |
| 257 suiteTeardown(function() { | 260 suiteTeardown(function() { |
| 258 CrSettingsPrefs.resetForTesting(); | 261 CrSettingsPrefs.resetForTesting(); |
| 259 }); | 262 }); |
| 260 | 263 |
| 261 // Initialize a site-list before each test. | 264 // Initialize a site-list before each test. |
| 262 setup(function() { | 265 setup(function() { |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 function(contentType) { | 643 function(contentType) { |
| 641 // No further checks needed. If this fails, it will hang the test. | 644 // No further checks needed. If this fails, it will hang the test. |
| 642 }); | 645 }); |
| 643 }); | 646 }); |
| 644 }); | 647 }); |
| 645 } | 648 } |
| 646 return { | 649 return { |
| 647 registerTests: registerTests, | 650 registerTests: registerTests, |
| 648 }; | 651 }; |
| 649 }); | 652 }); |
| OLD | NEW |