| 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 zoom-levels. */ | 5 /** @fileoverview Suite of tests for zoom-levels. */ |
| 6 cr.define('zoom_levels', function() { | 6 cr.define('zoom_levels', function() { |
| 7 function registerTests() { | 7 function registerTests() { |
| 8 suite('ZoomLevels', function() { | 8 suite('ZoomLevels', function() { |
| 9 /** | 9 /** |
| 10 * A zoom levels category created before each test. | 10 * A zoom levels category created before each test. |
| 11 * @type {ZoomLevels} | 11 * @type {ZoomLevels} |
| 12 */ | 12 */ |
| 13 var testElement; | 13 var testElement; |
| 14 | 14 |
| 15 /** | 15 /** |
| 16 * The mock proxy object to use during test. | 16 * The mock proxy object to use during test. |
| 17 * @type {TestSiteSettingsPrefsBrowserProxy} | 17 * @type {TestSiteSettingsPrefsBrowserProxy} |
| 18 */ | 18 */ |
| 19 var browserProxy = null; | 19 var browserProxy = null; |
| 20 | 20 |
| 21 /** | 21 /** |
| 22 * An example zoom list. | 22 * An example zoom list. |
| 23 * @type {!Array<ZoomLevelEntry>} | 23 * @type {!Array<ZoomLevelEntry>} |
| 24 */ | 24 */ |
| 25 var zoomList = [ | 25 var zoomList = [ |
| 26 { | 26 { |
| 27 origin: 'http://www.google.com', | 27 origin: 'http://www.google.com', |
| 28 displayName: 'http://www.google.com', |
| 29 originForFavicon: 'http://www.google.com', |
| 28 setting: '', | 30 setting: '', |
| 29 source: '', | 31 source: '', |
| 30 zoom: '125%', | 32 zoom: '125%', |
| 31 }, | 33 }, |
| 32 { | 34 { |
| 33 origin: 'http://www.chromium.org', | 35 origin: 'http://www.chromium.org', |
| 36 displayName: 'http://www.chromium.org', |
| 37 originForFavicon: 'http://www.chromium.org', |
| 34 setting: '', | 38 setting: '', |
| 35 source: '', | 39 source: '', |
| 36 zoom: '125%', | 40 zoom: '125%', |
| 37 }, | 41 }, |
| 38 ]; | 42 ]; |
| 39 | 43 |
| 40 // Import necessary html before running suite. | 44 // Import necessary html before running suite. |
| 41 suiteSetup(function() { | 45 suiteSetup(function() { |
| 42 return PolymerTest.importHtml( | 46 return PolymerTest.importHtml( |
| 43 'chrome://md-settings/site_settings/zoom_levels.html'); | 47 'chrome://md-settings/site_settings/zoom_levels.html'); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 assertEquals("http://www.google.com", arguments[0]); | 100 assertEquals("http://www.google.com", arguments[0]); |
| 97 }); | 101 }); |
| 98 }); | 102 }); |
| 99 }); | 103 }); |
| 100 } | 104 } |
| 101 | 105 |
| 102 return { | 106 return { |
| 103 registerTests: registerTests, | 107 registerTests: registerTests, |
| 104 }; | 108 }; |
| 105 }); | 109 }); |
| OLD | NEW |