| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 | 227 |
| 228 if (cr.isChromeOS) { | 228 if (cr.isChromeOS) { |
| 229 // Selection should not change on ChromeOS. | 229 // Selection should not change on ChromeOS. |
| 230 assertEquals(null, destinationStore_.selectedDestination); | 230 assertEquals(null, destinationStore_.selectedDestination); |
| 231 } else { | 231 } else { |
| 232 // Other code expects selection to be present so it still occurs | 232 // Other code expects selection to be present so it still occurs |
| 233 // for non-CrOS. | 233 // for non-CrOS. |
| 234 assertEquals(destId, destinationStore_.selectedDestination.id); | 234 assertEquals(destId, destinationStore_.selectedDestination.id); |
| 235 } | 235 } |
| 236 }); | 236 }); |
| 237 |
| 238 test('CloudKioskPrinter', function() { |
| 239 var printerId = 'cloud-printer-id'; |
| 240 |
| 241 // Create cloud destination. |
| 242 var cloudDest = new print_preview.Destination(printerId, |
| 243 print_preview.Destination.Type.GOOGLE, |
| 244 print_preview.Destination.Origin.DEVICE, |
| 245 "displayName", |
| 246 print_preview.Destination.ConnectionStatus.ONLINE); |
| 247 cloudDest.capabilities = getCaps(); |
| 248 |
| 249 // Place destination in the local list as happens for Kiosk printers. |
| 250 destinationSearch_.localList_.updateDestinations([cloudDest]); |
| 251 var dest = destinationSearch_.localList_.getDestinationItem(printerId); |
| 252 // Simulate a click. |
| 253 dest.onActivate_(); |
| 254 |
| 255 // Verify that the destination has been selected. |
| 256 assertEquals(printerId, destinationStore_.selectedDestination.id); |
| 257 }); |
| 237 }); | 258 }); |
| 238 | 259 |
| 239 mocha.run(); | 260 mocha.run(); |
| 240 }); | 261 }); |
| OLD | NEW |