Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: chrome/test/data/webui/print_preview_destination_search_test.js

Issue 2838603004: Re-enable Cloud printers for ChromeOS kiosks. (Closed)
Patch Set: fix indentation Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/print_preview/search/destination_search.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/print_preview/search/destination_search.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698