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 protocol_handlers. */ | 5 /** @fileoverview Suite of tests for protocol_handlers. */ |
6 cr.define('protocol_handlers', function() { | 6 cr.define('protocol_handlers', function() { |
7 function registerTests() { | 7 function registerTests() { |
8 suite('ProtocolHandlers', function() { | 8 suite('ProtocolHandlers', function() { |
9 /** | 9 /** |
10 * A dummy protocol handler element created before each test. | 10 * A dummy protocol handler element created before each test. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 protocol: 'webcal' | 47 protocol: 'webcal' |
48 } | 48 } |
49 ]; | 49 ]; |
50 | 50 |
51 /** | 51 /** |
52 * The mock proxy object to use during test. | 52 * The mock proxy object to use during test. |
53 * @type {TestSiteSettingsPrefsBrowserProxy} | 53 * @type {TestSiteSettingsPrefsBrowserProxy} |
54 */ | 54 */ |
55 var browserProxy = null; | 55 var browserProxy = null; |
56 | 56 |
57 // Import necessary html before running suite. | |
58 suiteSetup(function() { | |
59 return PolymerTest.importHtml( | |
60 'chrome://md-settings/site_settings/protocol_handlers.html'); | |
61 }); | |
62 | |
63 setup(function() { | 57 setup(function() { |
64 browserProxy = new TestSiteSettingsPrefsBrowserProxy(); | 58 browserProxy = new TestSiteSettingsPrefsBrowserProxy(); |
65 settings.SiteSettingsPrefsBrowserProxyImpl.instance_ = browserProxy; | 59 settings.SiteSettingsPrefsBrowserProxyImpl.instance_ = browserProxy; |
66 }); | 60 }); |
67 | 61 |
68 teardown(function() { | 62 teardown(function() { |
69 testElement.remove(); | 63 testElement.remove(); |
70 testElement = null; | 64 testElement = null; |
71 }); | 65 }); |
72 | 66 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 browserProxy.setProtocolHandlers(protocols); | 161 browserProxy.setProtocolHandlers(protocols); |
168 return testButtonFlow('defaultButton', 'setProtocolDefault'); | 162 return testButtonFlow('defaultButton', 'setProtocolDefault'); |
169 }); | 163 }); |
170 }); | 164 }); |
171 } | 165 } |
172 | 166 |
173 return { | 167 return { |
174 registerTests: registerTests, | 168 registerTests: registerTests, |
175 }; | 169 }; |
176 }); | 170 }); |
OLD | NEW |