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 usb_devices. */ | 5 /** @fileoverview Suite of tests for usb_devices. */ |
6 cr.define('usb_devices', function() { | 6 cr.define('usb_devices', function() { |
7 function registerTests() { | 7 function registerTests() { |
8 suite('UsbDevices', function() { | 8 suite('UsbDevices', function() { |
9 /** | 9 /** |
10 * A dummy usb-devices element created before each test. | 10 * A dummy usb-devices element created before each test. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 "serial-number": "device-2-sn", | 43 "serial-number": "device-2-sn", |
44 "vendor-id": 2 | 44 "vendor-id": 2 |
45 }, | 45 }, |
46 objectName: 'device-2', | 46 objectName: 'device-2', |
47 origin: 'device-2-origin', | 47 origin: 'device-2-origin', |
48 setting: 'device-2-settings', | 48 setting: 'device-2-settings', |
49 source: 'device-2-source' | 49 source: 'device-2-source' |
50 } | 50 } |
51 ]; | 51 ]; |
52 | 52 |
53 // Import necessary html before running suite. | |
54 suiteSetup(function() { | |
55 return PolymerTest.importHtml( | |
56 'chrome://md-settings/site_settings/usb_devices.html'); | |
57 }); | |
58 | |
59 setup(function() { | 53 setup(function() { |
60 browserProxy = new TestSiteSettingsPrefsBrowserProxy(); | 54 browserProxy = new TestSiteSettingsPrefsBrowserProxy(); |
61 settings.SiteSettingsPrefsBrowserProxyImpl.instance_ = browserProxy; | 55 settings.SiteSettingsPrefsBrowserProxyImpl.instance_ = browserProxy; |
62 }); | 56 }); |
63 | 57 |
64 teardown(function() { | 58 teardown(function() { |
65 testElement.remove(); | 59 testElement.remove(); |
66 testElement = null; | 60 testElement = null; |
67 }); | 61 }); |
68 | 62 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 return testRemovalFlow(1); | 140 return testRemovalFlow(1); |
147 }); | 141 }); |
148 }); | 142 }); |
149 }); | 143 }); |
150 } | 144 } |
151 | 145 |
152 return { | 146 return { |
153 registerTests: registerTests, | 147 registerTests: registerTests, |
154 }; | 148 }; |
155 }); | 149 }); |
OLD | NEW |