| 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 var ROOT_PATH = '../../../../'; | 5 var ROOT_PATH = '../../../../'; |
| 6 | 6 |
| 7 GEN_INCLUDE( | 7 GEN_INCLUDE( |
| 8 [ROOT_PATH + 'chrome/test/data/webui/polymer_browser_test_base.js']); | 8 [ROOT_PATH + 'chrome/test/data/webui/polymer_browser_test_base.js']); |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 destinationSearch_ = new print_preview.DestinationSearch( | 175 destinationSearch_ = new print_preview.DestinationSearch( |
| 176 destinationStore_, invitationStore_, userInfo_); | 176 destinationStore_, invitationStore_, userInfo_); |
| 177 destinationSearch_.decorate($('destination-search')); | 177 destinationSearch_.decorate($('destination-search')); |
| 178 }); | 178 }); |
| 179 | 179 |
| 180 teardown(function() { | 180 teardown(function() { |
| 181 Mock4JS.verifyAllMocks(); | 181 Mock4JS.verifyAllMocks(); |
| 182 }); | 182 }); |
| 183 | 183 |
| 184 test('ResolutionFails', function() { | 184 test('ResolutionFails', function() { |
| 185 if (!cr.isChromeOS) { | |
| 186 // Capabilities failure logs a console error for non-CrOS printers. | |
| 187 // TODO(crbug.com/708739): Handle this gracefully and activate test. | |
| 188 return; | |
| 189 } | |
| 190 | |
| 191 var destId = "001122DEADBEEF"; | 185 var destId = "001122DEADBEEF"; |
| 192 | 186 |
| 193 var resolver = mockSetupCall(destId, nativeLayer_); | 187 var resolver = mockSetupCall(destId, nativeLayer_); |
| 194 requestSetup(destId, destinationSearch_); | 188 requestSetup(destId, destinationSearch_); |
| 195 resolver.reject(destId); | 189 resolver.reject(destId); |
| 196 }); | 190 }); |
| 197 | 191 |
| 198 test('ReceiveSuccessfulSetup', function() { | 192 test('ReceiveSuccessfulSetup', function() { |
| 199 var destId = "00112233DEADBEEF"; | 193 var destId = "00112233DEADBEEF"; |
| 200 | 194 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 227 resolveSetup(resolver, destId, false, null); | 221 resolveSetup(resolver, destId, false, null); |
| 228 | 222 |
| 229 // Selection should not change on ChromeOS. | 223 // Selection should not change on ChromeOS. |
| 230 assertEquals(null, destinationStore_.selectedDestination); | 224 assertEquals(null, destinationStore_.selectedDestination); |
| 231 }); | 225 }); |
| 232 } | 226 } |
| 233 }); | 227 }); |
| 234 | 228 |
| 235 mocha.run(); | 229 mocha.run(); |
| 236 }); | 230 }); |
| OLD | NEW |